mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-23 09:07:46 +02:00
Preserve Storybook static build output
This commit is contained in:
1 parent
5d22432abe
commit
c19197581b
337 files changed
+112151
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
@@ -0,0 +1,186 @@
|
||||
import{c as e}from"./createLucideIcon-D2uUVdtm.js";import{a as s,b6 as m,j as c,r as p,P as g,b as M,d as x,c as f}from"./iframe-aoIC7NDi.js";import{I as _}from"./input-DeZ-mgkh.js";import{M as N,B as v}from"./message-square-CCO5PzL9.js";import{D as b}from"./database-Dx6aEk21.js";import{L as w,E as A}from"./lightbulb-CWoAXyu4.js";import{S as z}from"./dialog-6DTSoM1_.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const $=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]],q=e("atom",$);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const j=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],oe=e("boxes",j);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const V=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],I=e("brain",V);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const L=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],C=e("bug",L);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const E=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ne=e("chevron-right",E);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const P=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]],S=e("circuit-board",P);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const D=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],T=e("code",D);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const H=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],U=e("cog",H);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const R=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],B=e("cpu",R);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const G=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],Z=e("crown",G);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const F=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],O=e("file-code",F);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const W=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],J=e("fingerprint-pattern",W);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const K=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Q=e("flame",K);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const X=[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]],Y=e("gem",X);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const e1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],a1=e("git-branch",e1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const t1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],c1=e("globe",t1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const o1=[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]],n1=e("hammer",o1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const s1=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],r1=e("heart",s1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const d1=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]],i1=e("hexagon",d1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const p1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],h1=e("lock",p1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const l1=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],y1=e("mail",l1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const k1=[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]],m1=e("microscope",k1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const u1=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],g1=e("package",u1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const M1=[["path",{d:"M10.83 2.38a2 2 0 0 1 2.34 0l8 5.74a2 2 0 0 1 .73 2.25l-3.04 9.26a2 2 0 0 1-1.9 1.37H7.04a2 2 0 0 1-1.9-1.37L2.1 10.37a2 2 0 0 1 .73-2.25z",key:"2hea0t"}]],x1=e("pentagon",M1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const f1=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],_1=e("puzzle",f1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const N1=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],v1=e("radar",N1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const b1=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],w1=e("rocket",b1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const A1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],z1=e("shield",A1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const $1=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],q1=e("sparkles",$1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const j1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],V1=e("star",j1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const I1=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],L1=e("swords",I1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const C1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],E1=e("target",C1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const P1=[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]],S1=e("telescope",P1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const D1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],T1=e("terminal",D1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const H1=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],U1=e("wand-sparkles",H1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const R1=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],B1=e("wrench",R1);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const G1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Z1=e("zap",G1),se={getGeneral:()=>s.get("/instance/settings/general"),updateGeneral:a=>s.patch("/instance/settings/general",a),getExperimental:()=>s.get("/instance/settings/experimental"),updateExperimental:a=>s.patch("/instance/settings/experimental",a)},h={bot:v,cpu:B,brain:I,zap:Z1,rocket:w1,code:T,terminal:T1,shield:z1,eye:A,search:z,wrench:B1,hammer:n1,lightbulb:w,sparkles:q1,star:V1,heart:r1,flame:Q,bug:C,cog:U,database:b,globe:c1,lock:h1,mail:y1,"message-square":N,"file-code":O,"git-branch":a1,package:g1,puzzle:_1,target:E1,wand:U1,atom:q,"circuit-board":S,radar:v1,swords:L1,telescope:S1,microscope:m1,crown:Z,gem:Y,hexagon:i1,pentagon:x1,fingerprint:J},F1="bot";function O1(a){return a&&m.includes(a)?h[a]:h[F1]}const W1="bot";function J1({icon:a,className:r}){const d=O1(a);return c.jsxDEV(d,{className:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:24,columnNumber:10},this)}function K1({value:a,onChange:r,children:d}){const[u,l]=p.useState(!1),[o,y]=p.useState(""),k=p.useMemo(()=>{const t=m.map(n=>[n,h[n]]);if(!o)return t;const i=o.toLowerCase();return t.filter(([n])=>n.includes(i))},[o]);return c.jsxDEV(g,{open:u,onOpenChange:l,children:[c.jsxDEV(M,{asChild:!0,children:d},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:46,columnNumber:7},this),c.jsxDEV(x,{className:"w-72 p-3",align:"start",children:[c.jsxDEV(_,{placeholder:"Search icons...",value:o,onChange:t=>y(t.target.value),className:"mb-2 h-8 text-sm",autoFocus:!0},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:48,columnNumber:9},this),c.jsxDEV("div",{className:"grid grid-cols-7 gap-1 max-h-48 overflow-y-auto",children:[k.map(([t,i])=>c.jsxDEV("button",{onClick:()=>{r(t),l(!1),y("")},className:f("flex items-center justify-center h-8 w-8 rounded hover:bg-accent transition-colors",(a??W1)===t&&"bg-accent ring-1 ring-primary"),title:t,children:c.jsxDEV(i,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:70,columnNumber:15},this)},t,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:57,columnNumber:13},this)),k.length===0&&c.jsxDEV("p",{className:"col-span-7 text-xs text-muted-foreground text-center py-2",children:"No icons match"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:74,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:47,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AgentIconPicker.tsx",lineNumber:45,columnNumber:5},this)}J1.__docgenInfo={description:"",methods:[],displayName:"AgentIcon",props:{icon:{required:!0,tsType:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}]},description:""},className:{required:!1,tsType:{name:"string"},description:""}}};K1.__docgenInfo={description:"",methods:[],displayName:"AgentIconPicker",props:{value:{required:!0,tsType:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}]},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(icon: string) => void",signature:{arguments:[{type:{name:"string"},name:"icon"}],return:{name:"void"}}},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};export{J1 as A,oe as B,B as C,a1 as G,r1 as H,w1 as R,q1 as S,T1 as T,U1 as W,Y as a,T as b,ne as c,E1 as d,K1 as e,I as f,B1 as g,i1 as h,se as i,n1 as j,O1 as k};
|
||||
@@ -0,0 +1,11 @@
|
||||
import{j as e,ab as x,G as U,B as c,L as P,c as w,ac as C}from"./iframe-aoIC7NDi.js";import{B as k}from"./badge-CQZT8Hmw.js";import{I as _}from"./Identity-qezU2VU6.js";import{S as b}from"./shield-check-Do8XLHtm.js";import{c as v}from"./createLucideIcon-D2uUVdtm.js";import{L as q}from"./lightbulb-CWoAXyu4.js";import{U as T}from"./user-plus-Bh0OVGC-.js";import{C as S}from"./circle-check-B6ZHio0H.js";import{C as R}from"./circle-x-D1djpUMR.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const B=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],f=v("clock",B);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const I=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],O=v("shield-alert",I),z={hire_agent:"Hire Agent",approve_ceo_strategy:"CEO Strategy",budget_override_required:"Budget Override",request_board_approval:"Board Approval"};function n(...r){for(const s of r)if(typeof s=="string"&&s.trim().length>0)return s.trim();return null}function L(r){return n(r==null?void 0:r.title,r==null?void 0:r.name,r==null?void 0:r.summary,r==null?void 0:r.recommendedAction)}const M={hire_agent:T,approve_ceo_strategy:q,budget_override_required:O,request_board_approval:b},F=b;function i({label:r,value:s}){return s?e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:"text-muted-foreground w-20 sm:w-24 shrink-0 text-xs",children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:52,columnNumber:7},this),e.jsxDEV("span",{children:String(s)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:53,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:51,columnNumber:5},this):null}function H({values:r}){if(!Array.isArray(r))return null;const s=r.filter(t=>typeof t=="string").map(t=>t.trim()).filter(Boolean);return s.length===0?null:e.jsxDEV("div",{className:"flex items-start gap-2",children:[e.jsxDEV("span",{className:"text-muted-foreground w-20 sm:w-24 shrink-0 text-xs pt-0.5",children:"Skills"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:68,columnNumber:7},this),e.jsxDEV("div",{className:"flex flex-wrap gap-1.5",children:s.map(t=>e.jsxDEV("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:t},t,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:71,columnNumber:11},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:69,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:67,columnNumber:5},this)}function h({payload:r}){return e.jsxDEV("div",{className:"mt-3 space-y-1.5 text-sm",children:[e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:"text-muted-foreground w-20 sm:w-24 shrink-0 text-xs",children:"Name"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:87,columnNumber:9},this),e.jsxDEV("span",{className:"font-medium",children:String(r.name??"—")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:88,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:86,columnNumber:7},this),e.jsxDEV(i,{label:"Role",value:r.role},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:90,columnNumber:7},this),e.jsxDEV(i,{label:"Title",value:r.title},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:91,columnNumber:7},this),e.jsxDEV(i,{label:"Icon",value:r.icon},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:92,columnNumber:7},this),!!r.capabilities&&e.jsxDEV("div",{className:"flex items-start gap-2",children:[e.jsxDEV("span",{className:"text-muted-foreground w-20 sm:w-24 shrink-0 text-xs pt-0.5",children:"Capabilities"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:95,columnNumber:11},this),e.jsxDEV("span",{className:"text-muted-foreground",children:String(r.capabilities)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:96,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:94,columnNumber:9},this),!!r.adapterType&&e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:"text-muted-foreground w-20 sm:w-24 shrink-0 text-xs",children:"Adapter"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:101,columnNumber:11},this),e.jsxDEV("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:String(r.adapterType)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:102,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:100,columnNumber:9},this),e.jsxDEV(H,{values:r.desiredSkills},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ApprovalPayload.tsx",lineNumber:107,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as t}from"./iframe-aoIC7NDi.js";import{D as r}from"./dollar-sign-C1pMKyuM.js";const l={healthy:"bg-emerald-500/90 text-white",warning:"bg-amber-500/95 text-amber-950",critical:"bg-red-500/90 text-white"},s={healthy:"Budget healthy",warning:"Budget warning",critical:"Paused by budget"};function n({title:i,level:e="critical"}){const a=i??s[e];return t.jsxDEV("span",{title:a,"aria-label":a,className:`ml-auto inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-[0_0_0_1px_rgba(255,255,255,0.08)] ${l[e]}`,children:t.jsxDEV(r,{className:"h-3 w-3"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/BudgetSidebarMarker.tsx",lineNumber:32,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/BudgetSidebarMarker.tsx",lineNumber:27,columnNumber:5},this)}n.__docgenInfo={description:"",methods:[],displayName:"BudgetSidebarMarker",props:{title:{required:!1,tsType:{name:"string"},description:""},level:{required:!1,tsType:{name:"union",raw:'"healthy" | "warning" | "critical"',elements:[{name:"literal",value:'"healthy"'},{name:"literal",value:'"warning"'},{name:"literal",value:'"critical"'}]},description:"",defaultValue:{value:'"critical"',computed:!1}}}};export{n as B};
|
||||
@@ -0,0 +1 @@
|
||||
import{g as he,P as de,M as fe,s as M,F as ge,B as Y}from"./DocsRenderer-LL677BLK-C2eW-rkQ.js";import{r as y,R as v,_ as be,x as P}from"./iframe-aoIC7NDi.js";import"./preload-helper-Dp1pzeXC.js";import"./react-18-D7zDPu8g.js";import"./index-DUUcyzlS.js";import"./index-DrFu-skq.js";var ve=P({"../../../node_modules/color-name/index.js"(r,o){o.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),J=P({"../../../node_modules/color-convert/conversions.js"(r,o){var s=ve(),h={};for(let e of Object.keys(s))h[s[e]]=e;var u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};o.exports=u;for(let e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:n,labels:t}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:n}),Object.defineProperty(u[e],"labels",{value:t})}u.rgb.hsl=function(e){let n=e[0]/255,t=e[1]/255,a=e[2]/255,l=Math.min(n,t,a),i=Math.max(n,t,a),c=i-l,d,g;i===l?d=0:n===i?d=(t-a)/c:t===i?d=2+(a-n)/c:a===i&&(d=4+(Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as x,j as d,c as I}from"./iframe-aoIC7NDi.js";const X=[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]];function Y(s){let n=2166136261;for(let t=0;t<s.length;t++)n^=s.charCodeAt(t),n=Math.imul(n,16777619);return n>>>0}function k(s){let n=s>>>0;return()=>{n=n+1831565813>>>0;let t=Math.imul(n^n>>>15,1|n);return t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}function P(s,n,t){const a=(s%360+360)%360,r=Math.max(0,Math.min(100,n))/100,i=Math.max(0,Math.min(100,t))/100,e=(1-Math.abs(2*i-1))*r,o=e*(1-Math.abs(a/60%2-1)),l=i-e/2;let c=0,m=0,u=0;return a<60?(c=e,m=o):a<120?(c=o,m=e):a<180?(m=e,u=o):a<240?(m=o,u=e):a<300?(c=o,u=e):(c=e,u=o),[Math.round((c+l)*255),Math.round((m+l)*255),Math.round((u+l)*255)]}function H(s){const n=parseInt(s.slice(1,3),16)/255,t=parseInt(s.slice(3,5),16)/255,a=parseInt(s.slice(5,7),16)/255,r=Math.max(n,t,a),i=Math.min(n,t,a),e=r-i;if(e===0)return 0;let o=0;return r===n?o=(t-a)/e%6:r===t?o=(a-n)/e+2:o=(n-t)/e+4,(o*60+360)%360}function J(s,n,t=22,a=2){if(typeof document>"u")return"";const r=document.createElement("canvas");r.width=t*a,r.height=t*a;const i=r.getContext("2d");if(!i)return"";const e=k(Y(s)),o=n?H(n):Math.floor(e()*360),[l,c,m]=P(o,54+Math.floor(e()*14),36+Math.floor(e()*12)),[u,D,j]=P(o+(e()>.5?10:-10),86+Math.floor(e()*10),82+Math.floor(e()*10)),p=(t-1)/2,b=Math.max(p,1),y=e()*Math.PI*2,v=Math.cos(y),N=Math.sin(y),E=Math.abs(v*b)+Math.abs(N*b),w=.34+e()*.12,C=.33+e()*.12,R=e()*Math.PI*2,q=e()*Math.PI*2;i.fillStyle=`rgb(${l} ${c} ${m})`,i.fillRect(0,0,r.width,r.height),i.fillStyle=`rgb(${u} ${D} ${j})`;const T=a*.46;for(let h=0;h<t;h++){const g=h-p;for(let f=0;f<t;f++){const M=f-p,U=((M*v+g*N)/E+1)*.5,$=Math.sin((M+g)*w+R)*.5+.5,V=Math.sin((M-g)*C+q)*.5+.5,_=$*.5+V*.5,A=Math.max(0,Math.min(1,U+(_-.5)*.22)),B=Math.max(0,Math.min(15,Math.floor(A*16))),F=X[h&3][f&3];if(B<=F)continue;const G=f*a+a/2,L=h*a+a/2;i.beginPath(),i.arc(G,L,T,0,Math.PI*2),i.fill()}}return r.toDataURL("image/png")}function K({companyName:s,logoUrl:n,brandColor:t,className:a,logoFit:r="cover"}){const i=s.trim().charAt(0).toUpperCase()||"?",[e,o]=x.useState(!1),l=!e&&typeof n=="string"&&n.trim().length>0?n:null;x.useEffect(()=>{o(!1)},[n]);const c=x.useMemo(()=>J(s.trim().toLowerCase(),t),[s,t]);return d.jsxDEV("div",{className:I("relative flex items-center justify-center w-11 h-11 text-base font-semibold text-white overflow-hidden",a),children:[l?d.jsxDEV("img",{src:l,alt:`${s} logo`,onError:()=>o(!0),className:I("absolute inset-0 h-full w-full",r==="contain"?"object-contain":"object-cover")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CompanyPatternIcon.tsx",lineNumber:190,columnNumber:9},this):c?d.jsxDEV("img",{src:c,alt:"","aria-hidden":"true",className:"absolute inset-0 h-full w-full",style:{imageRendering:"pixelated"}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CompanyPatternIcon.tsx",lineNumber:200,columnNumber:9},this):d.jsxDEV("div",{className:"absolute inset-0 bg-muted"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CompanyPatternIcon.tsx",lineNumber:208,columnNumber:9},this),!l&&d.jsxDEV("span",{className:"relative z-10 drop-shadow-[0_1px_2px_rgba(0,0,0,0.65)]",children:i},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CompanyPatternIcon.tsx",lineNumber:211,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CompanyPatternIcon.tsx",lineNumber:183,columnNumber:5},this)}K.__docgenInfo={description:"",methods:[],displayName:"CompanyPatternIcon",props:{companyName:{required:!0,tsType:{name:"string"},description:""},logoUrl:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},brandColor:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},className:{required:!1,tsType:{name:"string"},description:""},logoFit:{required:!1,tsType:{name:"union",raw:'"cover" | "contain"',elements:[{name:"literal",value:'"cover"'},{name:"literal",value:'"contain"'}]},description:"",defaultValue:{value:'"cover"',computed:!1}}}};export{K as C};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as t,j as o,c as i}from"./iframe-aoIC7NDi.js";function C({text:s,children:c,containerClassName:p,className:u,ariaLabel:d,title:m,copiedLabel:a="Copied!"}){const[f,n]=t.useState(!1),[y,l]=t.useState(a),r=t.useRef(void 0),x=t.useRef(null);t.useEffect(()=>()=>clearTimeout(r.current),[]);const b=t.useCallback(async()=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(s);else{const e=document.createElement("textarea");e.value=s,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e);try{if(e.select(),!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{document.body.removeChild(e)}}l(a)}catch{l("Copy failed")}clearTimeout(r.current),n(!0),r.current=setTimeout(()=>n(!1),1500)},[a,s]);return o.jsxDEV("span",{className:i("relative inline-flex",p),children:[o.jsxDEV("button",{ref:x,type:"button","aria-label":d,title:m,className:i("cursor-copy hover:text-foreground transition-colors",u),onClick:b,children:c??s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CopyText.tsx",lineNumber:62,columnNumber:7},this),o.jsxDEV("span",{role:"status","aria-live":"polite",className:i("pointer-events-none absolute left-1/2 -translate-x-1/2 bottom-full mb-1.5 rounded-md bg-foreground text-background px-2 py-1 text-xs whitespace-nowrap transition-opacity duration-300",f?"opacity-100":"opacity-0"),children:y},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CopyText.tsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CopyText.tsx",lineNumber:61,columnNumber:5},this)}C.__docgenInfo={description:"",methods:[],displayName:"CopyText",props:{text:{required:!0,tsType:{name:"string"},description:""},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:"What to display. Defaults to `text`."},containerClassName:{required:!1,tsType:{name:"string"},description:""},className:{required:!1,tsType:{name:"string"},description:""},ariaLabel:{required:!1,tsType:{name:"string"},description:""},title:{required:!1,tsType:{name:"string"},description:""},copiedLabel:{required:!1,tsType:{name:"string"},description:'Tooltip message shown after copying. Default: "Copied!"',defaultValue:{value:'"Copied!"',computed:!1}}}};export{C};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,13 @@
|
||||
import{c as k}from"./createLucideIcon-D2uUVdtm.js";import{h as S,r as b,j as e,a6 as R,a7 as q,q as C}from"./iframe-aoIC7NDi.js";import{D as T,a as $,b as B,c as A}from"./dialog-6DTSoM1_.js";import{S as j,a as V,b as y,c as E,d as U}from"./select-De3TClhU.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const K=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],P=k("download",K);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const O=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],W=k("list-tree",O);function w(l){const f=l.createdByUserId?"board":l.createdByAgentId?"agent":"system";return`rev ${l.revisionNumber} — ${R(l.createdAt)} • ${f}`}function H(l,f){const a=l.split(`
|
||||
`),d=f.split(`
|
||||
`),x=a.length,c=d.length,s=Array.from({length:x+1},()=>Array(c+1).fill(0));for(let n=x-1;n>=0;n-=1)for(let r=c-1;r>=0;r-=1)s[n][r]=a[n]===d[r]?s[n+1][r+1]+1:Math.max(s[n+1][r],s[n][r+1]);const u=[];let i=0,o=0,p=1,m=1;for(;i<x&&o<c;){if(a[i]===d[o]){u.push({kind:"context",oldLineNumber:p,newLineNumber:m,text:a[i]}),i+=1,o+=1,p+=1,m+=1;continue}if(s[i+1][o]>=s[i][o+1]){u.push({kind:"removed",oldLineNumber:p,newLineNumber:null,text:a[i]}),i+=1,p+=1;continue}u.push({kind:"added",oldLineNumber:null,newLineNumber:m,text:d[o]}),o+=1,m+=1}for(;i<x;)u.push({kind:"removed",oldLineNumber:p,newLineNumber:null,text:a[i]}),i+=1,p+=1;for(;o<c;)u.push({kind:"added",oldLineNumber:null,newLineNumber:m,text:d[o]}),o+=1,m+=1;return u}function z({issueId:l,documentKey:f,latestRevisionNumber:a,open:d,onOpenChange:x}){var g,M;const{data:c}=S({queryKey:C.issues.documentRevisions(l,f),queryFn:()=>q.listDocumentRevisions(l,f),enabled:d}),s=b.useMemo(()=>c?[...c].sort((t,D)=>D.revisionNumber-t.revisionNumber):[],[c]),[u,i]=b.useState(null),[o,p]=b.useState(null),m=u??((g=s.find(t=>t.revisionNumber===a-1))==null?void 0:g.id)??null,n=o??((M=s.find(t=>t.revisionNumber===a))==null?void 0:M.id)??null,r=s.find(t=>t.id===m)??null,N=s.find(t=>t.id===n)??null,h=(r==null?void 0:r.body)??"",v=(N==null?void 0:N.body)??"",L=b.useMemo(()=>H(h,v),[h,v]),_={context:"bg-transparent",removed:"bg-red-500/10 text-red-100",added:"bg-green-500/10 text-green-100"},I={context:" ",removed:"-",added:"+"};return e.jsxDEV(T,{open:d,onOpenChange:x,children:e.jsxDEV($,{className:"!max-w-[90%] w-full max-h-[85vh] overflow-hidden flex flex-col",children:[e.jsxDEV("div",{className:"flex items-center justify-between gap-4",children:[e.jsxDEV(B,{className:"shrink-0",children:e.jsxDEV(A,{children:["Diff — ",e.jsxDEV("span",{className:"font-mono text-sm",children:f},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:181,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:179,columnNumber:11},this),e.jsxDEV("div",{className:"flex items-center gap-4 shrink-0",children:[e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:"rounded-full border border-red-500/30 bg-red-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-red-400",children:"Old"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:187,columnNumber:15},this),e.jsxDEV(j,{value:m??"",onValueChange:t=>i(t),children:[e.jsxDEV(V,{className:"h-7 w-60 text-xs border-border/60",children:e.jsxDEV(y,{placeholder:"Select revision"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:193,columnNumber:19},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:192,columnNumber:17},this),e.jsxDEV(E,{children:s.map(t=>e.jsxDEV(U,{value:t.id,className:"text-xs",children:w(t)},t.id,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:197,columnNumber:21},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:195,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:188,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:186,columnNumber:13},this),e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:"rounded-full border border-green-500/30 bg-green-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-green-400",children:"New"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:205,columnNumber:15},this),e.jsxDEV(j,{value:n??"",onValueChange:t=>p(t),children:[e.jsxDEV(V,{className:"h-7 w-60 text-xs border-border/60",children:e.jsxDEV(y,{placeholder:"Select revision"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:211,columnNumber:19},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:210,columnNumber:17},this),e.jsxDEV(E,{children:s.map(t=>e.jsxDEV(U,{value:t.id,className:"text-xs",children:w(t)},t.id,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:215,columnNumber:21},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:213,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:206,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/DocumentDiffModal.tsx",lineNumber:204,columnNumber:13},this)]},void
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e,B as m}from"./iframe-aoIC7NDi.js";import{P as n}from"./plus-CDL1BsFh.js";function o({icon:r,message:i,action:t,onAction:s}){return e.jsxDEV("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsxDEV("div",{className:"bg-muted/50 p-4 mb-4",children:e.jsxDEV(r,{className:"h-10 w-10 text-muted-foreground/50"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EmptyState.tsx",lineNumber:16,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EmptyState.tsx",lineNumber:15,columnNumber:7},this),e.jsxDEV("p",{className:"text-sm text-muted-foreground mb-4",children:i},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EmptyState.tsx",lineNumber:18,columnNumber:7},this),t&&s&&e.jsxDEV(m,{onClick:s,children:[e.jsxDEV(n,{className:"h-4 w-4 mr-1.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EmptyState.tsx",lineNumber:21,columnNumber:11},this),t]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EmptyState.tsx",lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EmptyState.tsx",lineNumber:14,columnNumber:5},this)}o.__docgenInfo={description:"",methods:[],displayName:"EmptyState",props:{icon:{required:!0,tsType:{name:"LucideIcon"},description:""},message:{required:!0,tsType:{name:"string"},description:""},action:{required:!1,tsType:{name:"string"},description:""},onAction:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{o as E};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as C}from"./createLucideIcon-D2uUVdtm.js";import{r as u,j as s,c as m}from"./iframe-aoIC7NDi.js";import{X as R}from"./x-CIQWKcou.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const U=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],B=C("rotate-ccw",U),d="w-full rounded-md border border-border px-2.5 py-1.5 bg-transparent outline-none text-sm font-mono placeholder:text-muted-foreground/40";function k(i){return!i||typeof i!="object"?[{key:"",source:"plain",plainValue:"",secretId:""}]:[...Object.entries(i).map(([c,a])=>{if(typeof a=="string")return{key:c,source:"plain",plainValue:a,secretId:""};if(typeof a=="object"&&a!==null&&"type"in a&&a.type==="secret_ref"){const o=a;return{key:c,source:"secret",plainValue:"",secretId:typeof o.secretId=="string"?o.secretId:""}}if(typeof a=="object"&&a!==null&&"type"in a&&a.type==="plain"){const o=a;return{key:c,source:"plain",plainValue:typeof o.value=="string"?o.value:"",secretId:""}}return{key:c,source:"plain",plainValue:"",secretId:""}}),{key:"",source:"plain",plainValue:"",secretId:""}]}function w({value:i,secrets:h,onCreateSecret:c,onChange:a}){const[o,f]=u.useState(()=>k(i)),[x,b]=u.useState(null),v=u.useRef(i),E=u.useRef(!1);u.useEffect(()=>{if(E.current){E.current=!1,v.current=i;return}i!==v.current&&(v.current=i,f(k(i)))},[i]);function g(r){const e={};for(const n of r){const t=n.key.trim();t&&(n.source==="secret"?n.secretId?e[t]={type:"secret_ref",secretId:n.secretId,version:"latest"}:e[t]={type:"plain",value:n.plainValue}:e[t]={type:"plain",value:n.plainValue})}E.current=!0,a(Object.keys(e).length>0?e:void 0)}function l(r,e){const n=o.map((t,N)=>N===r?{...t,...e}:t);(n[n.length-1].key||n[n.length-1].plainValue||n[n.length-1].secretId)&&n.push({key:"",source:"plain",plainValue:"",secretId:""}),f(n),g(n)}function I(r){const e=o.filter((n,t)=>t!==r);(e.length===0||e[e.length-1].key||e[e.length-1].plainValue||e[e.length-1].secretId)&&e.push({key:"",source:"plain",plainValue:"",secretId:""}),f(e),g(e)}function D(r){return r.trim().toLowerCase().replace(/[^a-z0-9_]+/g,"_").replace(/^_+|_+$/g,"").slice(0,64)}async function V(r){var j;const e=o[r];if(!e)return;const n=e.key.trim(),t=e.plainValue;if(!n||t.length===0)return;const N=D(n)||"secret",y=(j=window.prompt("Secret name",N))==null?void 0:j.trim();if(y)try{b(null);const p=await c(y,t);l(r,{source:"secret",secretId:p.id})}catch(p){b(p instanceof Error?p.message:"Failed to create secret")}}return s.jsxDEV("div",{className:"space-y-1.5",children:[o.map((r,e)=>{const n=e===o.length-1&&!r.key&&!r.plainValue&&!r.secretId;return s.jsxDEV("div",{className:"flex items-center gap-1.5",children:[s.jsxDEV("input",{className:m(d,"flex-[2]"),placeholder:"KEY",value:r.key,onChange:t=>l(e,{key:t.target.value})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:170,columnNumber:13},this),s.jsxDEV("select",{className:m(d,"flex-[1] bg-background"),value:r.source,onChange:t=>l(e,{source:t.target.value==="secret"?"secret":"plain",...t.target.value==="plain"?{secretId:""}:{}}),children:[s.jsxDEV("option",{value:"plain",children:"Plain"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:186,columnNumber:15},this),s.jsxDEV("option",{value:"secret",children:"Secret"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:187,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:176,columnNumber:13},this),r.source==="secret"?s.jsxDEV(s.Fragment,{children:[s.jsxDEV("select",{className:m(d,"flex-[3] bg-background"),value:r.secretId,onChange:t=>l(e,{secretId:t.target.value}),children:[s.jsxDEV("option",{value:"",children:"Select secret..."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:196,columnNumber:19},this),h.map(t=>s.jsxDEV("option",{value:t.id,children:t.name},t.id,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:198,columnNumber:21},this))]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:191,columnNumber:17},this),s.jsxDEV("button",{type:"button",className:"inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs text-muted-foreground hover:bg-accent/50 transition-colors shrink-0",onClick:()=>V(e),disabled:!r.key.trim()||!r.plainValue,title:"Create secret from current plain value",children:"New"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:203,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:190,columnNumber:15},this):s.jsxDEV(s.Fragment,{children:[s.jsxDEV("input",{className:m(d,"flex-[3]"),placeholder:"value",value:r.plainValue,onChange:t=>l(e,{plainValue:t.target.value})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EnvVarEditor.tsx",lineNumber:215,columnNumber:17},this),s.jsxDEV("button",{type:"button",className:"inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{u as j,g as U,h as V,i as y,q as n,j as e,L as f,k as g,l as w,B as D}from"./iframe-aoIC7NDi.js";import{e as E}from"./execution-workspaces-B_BR86BY.js";import{D as T,a as R,b as q,c as P,d as _,e as L}from"./dialog-6DTSoM1_.js";import{L as k}from"./PathInstructionsModal-D4Fgn9Ki.js";function B(i){return i==="blocked"?"border-destructive/30 bg-destructive/5 text-destructive":i==="ready_with_warnings"?"border-amber-500/30 bg-amber-500/10 text-amber-800 dark:text-amber-300":"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"}function A({workspaceId:i,workspaceName:v,currentStatus:r,open:u,onOpenChange:l,onClosed:c}){var b,h;const m=j(),{pushToast:p}=U(),d=r==="cleanup_failed"?"Retry close":"Close workspace",t=V({queryKey:n.executionWorkspaces.closeReadiness(i),queryFn:()=>E.getCloseReadiness(i),enabled:u}),a=y({mutationFn:()=>E.update(i,{status:"archived"}),onSuccess:s=>{m.setQueryData(n.executionWorkspaces.detail(s.id),s),m.invalidateQueries({queryKey:n.executionWorkspaces.closeReadiness(s.id)}),p({title:r==="cleanup_failed"?"Workspace close retried":"Workspace closed",tone:"success"}),l(!1),c==null||c(s)},onError:s=>{p({title:"Failed to close workspace",body:s instanceof Error?s.message:"Unknown error",tone:"error"})}}),o=t.data??null,x=(o==null?void 0:o.linkedIssues.filter(s=>!s.isTerminal))??[],N=(o==null?void 0:o.linkedIssues.filter(s=>s.isTerminal))??[],C=r==="archived"||a.isPending||t.isLoading||o==null||o.state==="blocked";return e.jsxDEV(T,{open:u,onOpenChange:s=>{a.isPending||l(s)},children:e.jsxDEV(R,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxDEV(q,{children:[e.jsxDEV(P,{children:d},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:93,columnNumber:11},this),e.jsxDEV(_,{className:"break-words",children:["Archive ",e.jsxDEV("span",{className:"font-medium text-foreground",children:v},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:95,columnNumber:21},this)," and clean up any owned workspace artifacts. Paperclip keeps the workspace record and issue history, but removes it from active workspace views."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:94,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:92,columnNumber:9},this),t.isLoading?e.jsxDEV("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-background px-4 py-3 text-sm text-muted-foreground",children:[e.jsxDEV(k,{className:"h-4 w-4 animate-spin"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:102,columnNumber:13},this),"Checking whether this workspace is safe to close..."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:101,columnNumber:11},this):t.error?e.jsxDEV("div",{className:"rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:t.error instanceof Error?t.error.message:"Failed to inspect workspace close readiness."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:106,columnNumber:11},this):o?e.jsxDEV("div",{className:"space-y-4",children:[e.jsxDEV("div",{className:`rounded-xl border px-4 py-3 text-sm ${B(o.state)}`,children:[e.jsxDEV("div",{className:"font-medium",children:o.state==="blocked"?"Close is blocked":o.state==="ready_with_warnings"?"Close is allowed with warnings":"Close is ready"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:112,columnNumber:15},this),e.jsxDEV("div",{className:"mt-1 text-xs opacity-80",children:o.isSharedWorkspace?"This is a shared workspace session. Archiving it removes this session record but keeps the underlying project workspace.":(b=o.git)!=null&&b.workspacePath&&o.git.repoRoot&&o.git.workspacePath!==o.git.repoRoot?"This execution workspace has its own checkout path and can be archived independently.":o.isProjectPrimaryWorkspace?"This execution workspace currently points at the project's primary workspace path.":"This workspace is disposable and can be archived."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:119,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:111,columnNumber:13},this),x.length>0?e.jsxDEV("section",{className:"space-y-2",children:[e.jsxDEV("h3",{className:"text-sm font-medium",children:"Blocking issues"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ExecutionWorkspaceCloseDialog.tsx",lineNumber:132,columnNumber:17},this),e.jsxDEV("div",{className:"space-y-2",children:x.map(s=>e.jsxDEV("div",{classNaLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as s,c as a}from"./iframe-aoIC7NDi.js";import{A as m,a as u,b as o}from"./avatar-Cx9l3K2h.js";function p(t){const e=t.trim().split(/\s+/);return e.length>=2?(e[0][0]+e[e.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}const c={xs:"text-sm",sm:"text-xs",default:"text-sm",lg:"text-sm"};function d({name:t,avatarUrl:e,initials:n,size:i="default",className:r}){const l=n??p(t);return s.jsxDEV("span",{className:a("inline-flex gap-1.5 items-center",i==="xs"&&"gap-1",i==="lg"&&"gap-2",r),children:[s.jsxDEV(m,{size:i,children:[e&&s.jsxDEV(u,{src:e,alt:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/Identity.tsx",lineNumber:33,columnNumber:23},this),s.jsxDEV(o,{children:l},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/Identity.tsx",lineNumber:34,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/Identity.tsx",lineNumber:32,columnNumber:7},this),s.jsxDEV("span",{className:a("truncate",c[i]),children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/Identity.tsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/Identity.tsx",lineNumber:31,columnNumber:5},this)}d.__docgenInfo={description:"",methods:[],displayName:"Identity",props:{name:{required:!0,tsType:{name:"string"},description:""},avatarUrl:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},initials:{required:!1,tsType:{name:"string"},description:""},size:{required:!1,tsType:{name:"union",raw:'"xs" | "sm" | "default" | "lg"',elements:[{name:"literal",value:'"xs"'},{name:"literal",value:'"sm"'},{name:"literal",value:'"default"'},{name:"literal",value:'"lg"'}]},description:"",defaultValue:{value:'"default"',computed:!1}},className:{required:!1,tsType:{name:"string"},description:""}}};export{d as I};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as t,j as d,c as g}from"./iframe-aoIC7NDi.js";import{M as $}from"./MarkdownBody-suYvEMx0.js";import{M as G}from"./MarkdownEditor-BtfKiA3v.js";import{u as J}from"./useAutosaveIndicator-DSY8znz3.js";const A="px-1 -mx-1",O="px-1",Q=900;function W(r,y){let m=requestAnimationFrame(()=>{m=requestAnimationFrame(()=>{m=0;const f=document.activeElement;f instanceof Node&&r.contains(f)||y()})});return()=>{m!==0&&(cancelAnimationFrame(m),m=0)}}function X({value:r,onSave:y,as:m="span",className:f,placeholder:C="Click to edit...",multiline:n=!1,nullable:v=!1,imageUploadHandler:H,onDropFile:_,mentions:z}){const[k,D]=t.useState(!1),[N,V]=t.useState(!1),[o,I]=t.useState(!1),[u,b]=t.useState(r),F=t.useRef(r),E=t.useRef(null),M=t.useRef(null),i=t.useRef(null),c=t.useRef(null),P=t.useRef(!1),w=t.useRef(!1),{state:a,markDirty:j,reset:h,runSave:T}=J();t.useEffect(()=>{const e=F.current;F.current=r,b(p=>n&&o&&p!==e?p:r)},[r,n,o]),t.useEffect(()=>()=>{i.current&&clearTimeout(i.current),c.current!==null&&(c.current(),c.current=null)},[]);const R=t.useCallback(e=>{e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)},[]);t.useEffect(()=>{k&&E.current&&(E.current.focus(),E.current.select(),E.current instanceof HTMLTextAreaElement&&R(E.current))},[k,R]),t.useEffect(()=>{var e;!N||!n||P.current&&(P.current=!1,(e=M.current)==null||e.focus())},[N,n]),t.useEffect(()=>{if(o){w.current=!0;return}!n||!N||w.current&&a==="idle"&&(w.current=!1,V(!1))},[n,N,o,a]);const l=t.useCallback(async(e=u)=>{const p=e.trim(),s=p!==r;(v?s:!!(p&&s))?await Promise.resolve(y(p)):b(r),n||D(!1)},[u,n,v,y,r]),S=t.useCallback(()=>{const e=u.trim();if(e===r){h(),l();return}if(!e&&!v){h(),l();return}T(()=>l())},[l,u,v,h,T,r]),q=t.useCallback(()=>{c.current!==null&&(c.current(),c.current=null)},[]),K=t.useCallback(e=>{q(),c.current=W(e,()=>{c.current=null,i.current&&clearTimeout(i.current),I(!1),S()})},[q,S]);function B(e){e.key==="Enter"&&!n&&(e.preventDefault(),l()),e.key==="Escape"&&(i.current&&clearTimeout(i.current),h(),b(r),n?(I(!1),V(!1),w.current=!1,document.activeElement instanceof HTMLElement&&document.activeElement.blur()):D(!1))}if(t.useEffect(()=>{if(!n||!o)return;const e=u.trim();if(e===r||!e&&!v){a!=="saved"&&h();return}return j(),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{T(()=>l(e))},Q),()=>{i.current&&clearTimeout(i.current)}},[a,l,u,j,n,o,v,h,T,r]),n){const e=!!r.trim();if(!(N||o||!e)){const s=()=>{P.current=!0,V(!0)};return d.jsxDEV("div",{className:g(O,"rounded transition-colors hover:bg-accent/20"),onClick:x=>{if(x.defaultPrevented)return;const U=x.target;U&&U.closest("a,button,[data-mention-kind],[data-radix-popper-content-wrapper]")||s()},onDragEnter:()=>s(),role:"textbox","aria-label":C,children:d.jsxDEV($,{className:g("paperclip-edit-in-place-content",f),children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:259,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:245,columnNumber:9},this)}return d.jsxDEV("div",{className:g(O,"rounded transition-colors",o?"bg-transparent":"hover:bg-accent/20"),onFocusCapture:s=>{const x=document.activeElement;!(x instanceof Node)||!s.currentTarget.contains(x)||(q(),I(!0))},onBlurCapture:s=>{s.currentTarget.contains(s.relatedTarget)||K(s.currentTarget)},onKeyDown:B,children:[d.jsxDEV(G,{ref:M,value:u,onChange:b,placeholder:C,bordered:!1,className:"bg-transparent",contentClassName:g("paperclip-edit-in-place-content",f),imageUploadHandler:H,onDropFile:_,mentions:z,onSubmit:()=>{S()}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:287,columnNumber:9},this),d.jsxDEV("div",{className:"flex min-h-4 items-center justify-end pr-1",children:d.jsxDEV("span",{className:g("text-[11px] transition-opacity duration-150",a==="error"?"text-destructive":"text-muted-foreground",a==="idle"?"opacity-0":"opacity-100"),children:a==="saving"?"Autosaving...":a==="saved"?"Saved":a==="error"?"Could not save":"Idle"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:303,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:302,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:267,columnNumber:7},this)}if(k)return d.jsxDEV("textarea",{ref:E,value:u,rows:1,onChange:e=>{b(e.target.value),R(e.target)},onBlur:()=>{l()},onKeyDown:B,className:g("w-full bg-transparent rounded outline-none resize-none overflow-hidden",A,f)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEditor.tsx",lineNumber:326,columnNumber:7},this);const L=r&&n?"div":m;return d.jsxDEV(L,{className:g("cursor-pointer rounded hover:bg-accent/50 transition-colors overflow-hidden",A,!r&&"text-muted-foreground italic",f),onClick:()=>D(!0),children:r||C},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/comLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as U}from"./createLucideIcon-D2uUVdtm.js";import{r as i,j as n,P,b as M,c as N,d as A}from"./iframe-aoIC7NDi.js";import{o as _}from"./recent-selections-CD1WKLHy.js";import{C as F}from"./dialog-6DTSoM1_.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const H=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],G=U("eye-off",H),K=i.forwardRef(function({value:o,options:u,placeholder:S,noneLabel:p,searchPlaceholder:T,emptyMessage:q,onChange:O,onConfirm:E,className:k,renderTriggerValue:w,renderOption:I,recentOptionIds:v=[],disablePortal:j,openOnFocus:R=!0},V){const[m,a]=i.useState(!1),[d,f]=i.useState(""),[y,l]=i.useState(0),D=i.useRef(null),h=i.useRef(!1),g=i.useRef(!1),b=i.useMemo(()=>{const e=[{id:"",label:p,searchText:p},...u];return _(e,o,v)},[p,u,v,o]),r=i.useMemo(()=>{const e=d.trim().toLowerCase();return e?b.filter(t=>`${t.label} ${t.searchText??""}`.toLowerCase().includes(e)):b},[b,d]),c=u.find(e=>e.id===o)??null;i.useEffect(()=>{if(!m)return;const e=r.findIndex(t=>t.id===o);l(e>=0?e:0)},[r,m,o]);const x=(e,t)=>{const s=r[e]??r[0];s&&O(s.id),h.current=t,a(!1),f(""),E&&requestAnimationFrame(()=>{E()})};return n.jsxDEV(P,{open:m,onOpenChange:e=>{a(e),e||f("")},children:[n.jsxDEV(M,{asChild:!0,children:n.jsxDEV("button",{ref:V,type:"button",className:N("inline-flex min-w-0 items-center gap-1 rounded-md border border-border bg-muted/40 px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",k),onPointerDown:()=>{g.current=!0},onFocus:()=>{R&&!g.current&&a(!0),g.current=!1},children:w?w(c):(c==null?void 0:c.label)??n.jsxDEV("span",{className:"text-muted-foreground",children:S},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:118,columnNumber:42},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:103,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:102,columnNumber:9},this),n.jsxDEV(A,{align:"start",side:"bottom",collisionPadding:16,className:"w-[min(20rem,calc(100vw-2rem))] p-1",disablePortal:j,onOpenAutoFocus:e=>{var s;e.preventDefault(),(typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)").matches:!1)||(s=D.current)==null||s.focus()},onCloseAutoFocus:e=>{h.current&&(e.preventDefault(),h.current=!1)},children:[n.jsxDEV("input",{ref:D,className:"w-full border-b border-border bg-transparent px-2 py-1.5 text-sm outline-none placeholder:text-muted-foreground/60",placeholder:T,value:d,onChange:e=>{f(e.target.value)},onKeyDown:e=>{if(e.key==="ArrowDown"){e.preventDefault(),l(t=>r.length===0?0:(t+1)%r.length);return}if(e.key==="ArrowUp"){e.preventDefault(),l(t=>r.length===0?0:t<=0?r.length-1:t-1);return}if(e.key==="Enter"){e.preventDefault(),x(y,!0);return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),x(y,!0);return}e.key==="Escape"&&(e.preventDefault(),a(!1))}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:145,columnNumber:11},this),n.jsxDEV("div",{className:"max-h-56 overflow-y-auto overscroll-contain py-1 touch-pan-y",children:r.length===0?n.jsxDEV("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:q},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:187,columnNumber:15},this):r.map((e,t)=>{const s=e.id===o,C=t===y;return n.jsxDEV("button",{type:"button",className:N("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm touch-manipulation",C&&"bg-accent"),onMouseEnter:()=>l(t),onClick:()=>x(t,!0),children:[I?I(e,s):n.jsxDEV("span",{className:"truncate",children:e.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:203,columnNumber:72},this),n.jsxDEV(F,{className:N("ml-auto h-3.5 w-3.5 text-muted-foreground",s?"opacity-100":"opacity-0")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:204,columnNumber:21},this)]},e.id||"__none__",!0,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:193,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:185,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:121,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/InlineEntitySelector.tsx",lineNumber:95,columnNumber:7},this)});K.__docgenInfo={description:"",methods:[],displayName:"InlineEntitySelector",props:{value:{required:!0,tsType:{name:"string"},description:""},options:{required:!0,tsType:{name:"Array",elements:[{name:"InlineEntityOption"}],raw:"InlineEntityOption[]"},description:""},placeholder:{required:!0,tsType:{name:"stringLine truncated
|
||||
@@ -0,0 +1,65 @@
|
||||
var In=Object.defineProperty;var yn=(t,e,s)=>e in t?In(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var g=(t,e,s)=>yn(t,typeof e!="symbol"?e+"":e,s);import{r as f,N as De,R as rt,aa as vn,h as Tn,A as Cn,q as _n,j as a,c as A,T as Yt,K as Qt,bz as Ft,M as Gt,l as Xt,B as Q,L as Ge,E as En,G as mt,bn as wn,m as Sn,P as kn,b as Dn,d as jn}from"./iframe-aoIC7NDi.js";import{i as An,c as ir,G as ar,A as Te,f as Vn,j as Un}from"./AgentIconPicker-B29UI7uB.js";import{h as Rn}from"./heartbeats-R23LJy38.js";import{o as Mn,g as Bn}from"./registry-7D9NZbk8.js";import{f as je}from"./recent-selections-CD1WKLHy.js";import{A as Xe,a as Pn,b as pe}from"./avatar-Cx9l3K2h.js";import{C as Zt,g as yt,S as On,D as $n,a as Ln,b as qn,c as Fn,d as zn,e as Hn}from"./dialog-6DTSoM1_.js";import{D as Kn,a as Jn,b as Wn,f as jt}from"./dropdown-menu-DRraIghT.js";import{M as vt}from"./MarkdownBody-suYvEMx0.js";import{M as Yn}from"./MarkdownEditor-BtfKiA3v.js";import{I as Qn}from"./InlineEntitySelector-BOnceYYg.js";import{T as es,C as Gn}from"./textarea-CGN-n--7.js";import{P as Xn}from"./PriorityIcon-BJIUslvt.js";import{c as ts}from"./createLucideIcon-D2uUVdtm.js";import{T as ss}from"./triangle-alert-XSXGBeLN.js";import{C as Zn}from"./circle-x-D1djpUMR.js";import{C as ei}from"./circle-check-B6ZHio0H.js";import{L as de}from"./PathInstructionsModal-D4Fgn9Ki.js";import{C as ht}from"./copy-CPgBejOM.js";import{E as ti}from"./ellipsis-BM07d3s-.js";import{S as si}from"./square-CTiUZDc0.js";import{A as js}from"./arrow-right-BmL7S7RJ.js";import{C as ri}from"./circle-pause-DnJAMYCY.js";import{P as ni}from"./paperclip-B7aTkTtY.js";import{T as ii,a as ai}from"./thumbs-up-DOKJqPYr.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const oi=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],ci=ts("circle-dashed",oi);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ui=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],li=ts("list-checks",ui);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const di=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],mi=ts("message-square-quote",di);function As(t){const e=[];for(const s of t.effectTasks)try{s()}catch(r){e.push(r)}if(e.length>0){if(e.length===1)throw e[0];for(const s of e)console.error(s);throw new AggregateError(e,"Errors during commit")}}function or(t){var s;const e=[];for(const r of t.cells)if((r==null?void 0:r.type)==="effect"&&(r.deps=null,r.cleanup))try{(s=r.cleanup)==null||s.call(r)}catch(n){e.push(n)}finally{r.cleanup=void 0}if(e.length>0){if(e.length===1)throw e[0];for(const r of e)console.error(r);throw new AggregateError(e,"Errors during cleanup")}}const xe=typeof process<"u"&&!0;let fe=null;function hi(t,e){t.currentIndex=0;const s=fe;fe=t;try{if(e(),t.isFirstRender=!1,t.cells.length!==t.currentIndex)throw new Error(`Rendered ${t.currentIndex} hooks but expected ${t.cells.length}. Hooks must be called in the exact same order in every render.`)}finally{fe=s}}function Ce(){if(!fe)throw new Error("No resource fiber available");return fe}function pi(t){return xe?fe!=null&&fe.devStrictMode?fe.isFirstRender?"child":"root":t?"root":null:null}function fi(t,e){const s=t[cr];if(!s)throw new Error("ResourceElement.type is not a valid Resource");return s(e)}const cr=Symbol("fnSymbol");function Ze(t,e,s=void 0,r=pi(!1)){return{type:t,root:e,markDirty:s,devStrictMode:r,cells:[],currentIndex:0,renderContext:void 0,isFirstRender:!0,isMounted:!1,isNeverMounted:!0}}function $e(t){if(!t.isMounted)throw new Error("Tried to unmount a fiber that is already unmounted");t.isMounted=!1,or(t)}function ge(t,e){const s={effectTasks:[],props:e,output:void 0};return hi(t,()=>{t.renderContext=s;try{s.output=fi(t.type,e)}finally{t.renderContext=void 0}}),s}function Le(t,e){t.isMounted=!0,xe&&t.isNeverMounted&&t.devStrictMode==="root"&&(t.isNeverMounted=!1,As(e),or(t)),t.isNeverMounted=!1,As(e)}const ur=t=>({version:0,committedVersion:0,dispatchUpdate:t,changelog:[],dirtyCells:[]}),pt=t=>{for(const e of t.dirtyCells)e.dirty=!1,e.queue.clear(),e.current=e.workInProgress;t.committedVersion=t.version,t.changelog.length=0,t.dirtyCells.length=0},We=(t,e)=>{const s=t.version>e;if(t.version=e,s){for(const r of t.dirtyCells)r.dirty=!1,r.queue.clear(),r.workInProgress=r.current;if(t.dirtyCells.length=0,e===t.committedVersion)t.changelog.length=0;else{if(t.committedVersion>e)throw new Error("Version is less than committed version");for(;t.committedVersion+t.changelog.length>e;)t.changelog.pop();t.changelog.forEach(r=>r()),pt(t)}}},Vs=(t,e)=>{var s;e.dirty||(e.dirty=!0,(s=t.markDirty)==null||s.call(t),t.root.dirtyCells.push(e))},gi=()=>{if(!xe)return null;const t=f.useRef(0),e=t.current===0;return f.useState(()=>t.current++),t.current!==2?null:e?"child":"root"};function bi(t){const e=f.useMemo(()=>ur(c=>r(c)),[]),[s,r]=f.useReducer((c,u)=>(We(e,c),c+(u()?1:0)),0);We(e,s);const n=gi(),i=f.useMemo(()=>(t.key,Ze(t.type,e,void 0,n)),[t.type,t.key,e,n]),o=ge(i,t.props);return f.useLayoutEffect(()=>()=>$e(i),[i]),f.useLayoutEffect(()=>{pt(e),Le(i,o)}),o.output}function $(t){const e=s=>({type:e,props:s});return e[cr]=t,e}function Ne(t,e){return{...e,key:t}}const lr=(t,e)=>{const s=Ce(),r=s.currentIndex++;if(!s.isFirstRender&&r>=s.cells.length)throw new Error("Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.");let n=s.cells[r];if(n||(n=e(),s.cells[r]=n),n.type!==t)throw new Error("Hook order changed between renders");return n},xi=t=>{Ce().renderContext.effectTasks.push(t)},Ni=(t,e)=>{if(t.renderContext)throw new Error("Resource updated during render");if(t.isNeverMounted)throw new Error("Resource updated before mount");t.root.dispatchUpdate(()=>{const s=e();return s?(s(),t.root.changelog.push(s),!0):!1})};function dr(t,e,s,r){const n=lr("reducer",()=>{const c=Ce(),u=r?r(s):s;return xe&&c.devStrictMode&&r&&r(s),{type:"reducer",queue:new Set,dirty:!1,workInProgress:u,current:u,reducer:t,dispatch:l=>{const d={action:l,hasEagerState:!1,eagerState:void 0};Ni(c,()=>c.root.dirtyCells.length===0&&!d.hasEagerState&&(d.eagerState=t(n.workInProgress,l),d.hasEagerState=!0,Object.is(n.current,d.eagerState))?null:()=>{Vs(c,n),n.queue.add(d)})}}}),i=Ce(),o=t===n.reducer;n.reducer=t;for(const c of n.queue)(!c.hasEagerState||!o)&&(c.eagerState=t(n.workInProgress,c.action),c.hasEagerState=!0),xe&&i.devStrictMode&&t(n.workInProgress,c.action),n.workInProgress=c.eagerState;if(n.queue.clear(),e){const c=e(n.workInProgress);Object.is(c,n.workInProgress)||(Vs(i,n),n.workInProgress=c)}return[n.workInProgress,n.dispatch]}function Ii(t,e,s){return dr(t,void 0,e,s)}function yi(t,e,s,r){return dr(t,e,s,r)}const vi=(t,e)=>typeof e=="function"?e(t):e,Ti=t=>typeof t=="function"?t():t;function Ie(t){return Ii(vi,t,Ti)}const mr=(t,e)=>{if(t.length!==eLine truncated
|
||||
|
||||
${r.system}`:s.system=r.system),r.tools)for(const[i,o]of Object.entries(r.tools)){const c=(n=s.tools)==null?void 0:n[i];if(c&&c!==o)throw new Error(`You tried to define a tool with the name ${i}, but it already exists.`);s.tools||(s.tools={}),s.tools[i]=o}return r.config&&(s.config={...s.config,...r.config}),r.callSettings&&(s.callSettings={...s.callSettings,...r.callSettings}),s},{});class wr{constructor(){g(this,"_providers",new Set);g(this,"_subscribers",new Set)}getModelContext(){return pa(this._providers)}registerModelContextProvider(e){var r;this._providers.add(e);const s=(r=e.subscribe)==null?void 0:r.call(e,()=>{this.notifySubscribers()});return this.notifySubscribers(),()=>{this._providers.delete(e),s==null||s(),this.notifySubscribers()}}notifySubscribers(){for(const e of this._subscribers)e()}subscribe(e){return this._subscribers.add(e),()=>this._subscribers.delete(e)}}const fa=1,Sr=$(()=>{const[t]=Ie(()=>({version:fa+1})),e=P(()=>new wr,[]);return{getState:()=>t,getModelContext:()=>e.getModelContext(),subscribe:s=>e.subscribe(s),register:s=>e.registerModelContextProvider(s)}}),kr=$(({toolkit:t})=>{const[e,s]=Ie(()=>({tools:{}})),r=_r(),n=Tt((i,o)=>(s(c=>({...c,tools:{...c.tools,[i]:[...c.tools[i]??[],o]}})),()=>{s(c=>{var u;return{...c,tools:{...c.tools,[i]:((u=c.tools[i])==null?void 0:u.filter(l=>l!==o))??[]}}})}),[]);return G(()=>{if(!t)return;const i=[];for(const[u,l]of Object.entries(t))l.render&&i.push(n(u,l.render));const o=Object.entries(t).reduce((u,[l,d])=>{const{render:p,...m}=d;return u[l]=m,u},{}),c={getModelContext:()=>({tools:o})};return i.push(r.current.modelContext().register(c)),()=>{i.forEach(u=>u())}},[t,n,r]),{getState:()=>e,setToolUI:n}});vr(kr,(t,e)=>{!t.modelContext&&e.modelContext.source===null&&(t.modelContext=Sr())});const ga=$(()=>{const[t,e]=Ie(()=>({renderers:{}})),s=Tt((r,n)=>(e(i=>({...i,renderers:{...i.renderers,[r]:[...i.renderers[r]??[],n]}})),()=>{e(i=>{var o;return{...i,renderers:{...i.renderers,[r]:((o=i.renderers[r])==null?void 0:o.filter(c=>c!==n))??[]}}})}),[]);return{getState:()=>t,setDataUI:s}}),Fs=Symbol.for("aui.tool-response");class gt{constructor(e){g(this,"artifact");g(this,"result");g(this,"isError");g(this,"messages");e.artifact!==void 0&&(this.artifact=e.artifact),this.result=e.result,this.isError=e.isError??!1,e.messages!==void 0&&(this.messages=e.messages)}get[Fs](){return!0}static[Symbol.hasInstance](e){return typeof e=="object"&&e!==null&&Fs in e}static toResponse(e){return e instanceof gt?e:new gt({result:e===void 0?"<no result>":e})}}const Ue=t=>{const[,e]=Ie(t.getState);return G(()=>(e(t.getState()),t.subscribe(()=>{e(t.getState())})),[t]),t.getState()},Dr=$(({runtime:t})=>{const e=Ue(t);return{getState:()=>e,remove:t.remove,__internal_getRuntime:()=>t}}),ba=$(({runtime:t})=>{const e=Ue(t);return{getState:()=>e,addToolResult:s=>t.addToolResult(s),resumeToolCall:s=>t.resumeToolCall(s),__internal_getRuntime:()=>t}}),xa=$(({runtime:t,index:e})=>{const s=P(()=>t.getAttachmentByIndex(e),[t,e]);return te(Dr({runtime:s}))}),jr=$(({threadIdRef:t,messageIdRef:e,runtime:s})=>{const r=Ue(s),n=os();G(()=>{const c=[];for(const u of["send","attachmentAdd"]){const l=s.unstable_on(u,()=>{n(`composer.${u}`,{threadId:t.current,...e&&{messageId:e.current}})});c.push(l)}return c.push(s.unstable_on("attachmentAddError",()=>{const u=s.getState().attachments.findLast(l=>l.status.type==="incomplete"&&l.status.reason==="error");n("composer.attachmentAddError",{threadId:t.current,...e&&{messageId:e.current},...u&&{attachmentId:u.id}})})),()=>{for(const u of c)u()}},[s,n,t,e]);const i=qe(()=>r.attachments.map((c,u)=>Ne(c.id,xa({runtime:s,index:u}))),[r.attachments,s]),o=P(()=>({text:r.text,role:r.role,attachments:i.state,runConfig:r.runConfig,isEditing:r.isEditing,canCancel:r.canCancel,attachmentAccept:r.attachmentAccept,isEmpty:r.isEmpty,type:r.type??"thread",dictation:r.dictation,quote:r.quote,queue:[]}),[r,i.state]);return{getState:()=>o,setText:s.setText,setRole:s.setRole,setRunConfig:s.setRunConfig,addAttachment:s.addAttachment,reset:s.reset,clearAttachments:s.clearAttachments,send:s.send,cancel:s.cancel,beginEdit:s.beginEdit??(()=>{throw new Error("beginEdit is not supported in this runtime")}),startDictation:s.startDictation,stopDictation:s.stopDictation,setQuote:s.setQuote,attachment:c=>"id"in c?i.get({key:c.id}):i.get(c),queueItem:()=>{throw new Error("Queue is not supported in this runtime")},__internal_getRuntime:()=>s}}),Na=$(({runtime:t,index:e})=>{const s=P(()=>t.getAttachmentByIndex(e),[t,e]);return te(Dr({runtime:s}))}),Ia=$(({runtime:t,index:e})=>{const s=P(()=>t.getMessagePartByIndex(e),[t,e]);return te(ba({runtime:s}))}),ya=$(({runtime:t,threadIdRef:e})=>{const s=Ue(t),[r,n]=Ie(!1),[i,o]=Ie(!1),c=P(()=>({get current(){return t.getState().id}}),[t]),u=_t(jr({runtime:t.composer,threadIdRef:e,messageIdRef:c})),l=qe(()=>s.content.map((m,h)=>Ne("toolCallId"in m&&m.toolCallId!=null?`toolCallId-${m.toolCallId}`:`index-${h}`,Ia({runtime:t,index:h}))),[s.c
Line truncated
|
||||
|
||||
`),Fe=la("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7),Aa="__optimistic__",Va=()=>`${Aa}${Fe()}`,ze=Symbol("autoStatus"),Ua=Object.freeze(Object.assign({type:"running"},{[ze]:!0})),Ra=Object.freeze(Object.assign({type:"complete",reason:"unknown"},{[ze]:!0}));Object.freeze(Object.assign({type:"requires-action",reason:"tool-calls"},{[ze]:!0}));Object.freeze(Object.assign({type:"requires-action",reason:"interrupt"},{[ze]:!0}));const Ma=t=>t[ze]===!0,Vr=(t,e,s,r,n)=>t&&n?Object.assign({type:"incomplete",reason:"error",error:n},{[ze]:!0}):t&&e?Ua:Ra,Ut=(t,e)=>{if(t.startsWith("data-"))return{type:"data",name:t.substring(5),data:e}},ls=(t,e,s)=>{const{role:r,id:n,createdAt:i,attachments:o,status:c,metadata:u}=t,l={id:n??e,createdAt:i??new Date},d=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content,p=({image:m,...h})=>m.match(/^data:image\/(png|jpeg|jpg|gif|webp);base64,(.*)$/)?{...h,image:m}:(console.warn("Invalid image data format detected"),null);if(r!=="user"&&(o!=null&&o.length))throw new Error("attachments are only supported for user messages");if(r!=="assistant"&&c)throw new Error("status is only supported for assistant messages");if(r!=="assistant"&&(u!=null&&u.steps))throw new Error("metadata.steps is only supported for assistant messages");switch(r){case"assistant":return{...l,role:r,content:d.map(m=>{const h=m.type;switch(h){case"text":case"reasoning":return m.text.trim().length===0?null:m;case"file":case"source":return m;case"image":return p(m);case"data":return m;case"tool-call":{const{parentId:b,messages:x,...y}=m,N={...y,toolCallId:m.toolCallId??`tool-${Fe()}`,...b!==void 0&&{parentId:b},...x!==void 0&&{messages:x}};return m.args?{...N,args:m.args,argsText:m.argsText??JSON.stringify(m.args)}:{...N,args:ua(m.argsText??"")??{},argsText:m.argsText??""}}default:{const b=Ut(h,m.data);if(b)return b;throw new Error(`Unsupported assistant message part type: ${h}`)}}}).filter(m=>!!m),status:c??s,metadata:{unstable_state:(u==null?void 0:u.unstable_state)??null,unstable_annotations:(u==null?void 0:u.unstable_annotations)??[],unstable_data:(u==null?void 0:u.unstable_data)??[],custom:(u==null?void 0:u.custom)??{},steps:(u==null?void 0:u.steps)??[],...(u==null?void 0:u.timing)&&{timing:u.timing},...(u==null?void 0:u.submittedFeedback)&&{submittedFeedback:u.submittedFeedback}}};case"user":return{...l,role:r,content:d.map(m=>{const h=m.type;switch(h){case"text":case"image":case"audio":case"file":case"data":return m;default:{const b=Ut(h,m.data);if(b)return b;throw new Error(`Unsupported user message part type: ${h}`)}}}),attachments:(o??[]).map(m=>({...m,content:m.content.map(h=>Ut(h.type,h.data)??h)})),metadata:{custom:(u==null?void 0:u.custom)??{}}};case"system":if(d.length!==1||d[0].type!=="text")throw new Error("System messages must have exactly one text message part.");return{...l,role:r,content:d,metadata:{custom:(u==null?void 0:u.custom)??{}}};default:{const m=r;throw new Error(`Unknown message role: ${m}`)}}},ds={fromArray:t=>{const e=t.map(s=>ls(s,Fe(),Vr(!1,!1,!1,!1,void 0)));return{messages:e.map((s,r)=>({parentId:r>0?e[r-1].id:null,message:s}))}}},ut=t=>t.next?ut(t.next):"current"in t?t:null;class Ba{constructor(e){g(this,"func");g(this,"_value",null);this.func=e}get value(){return this._value===null&&(this._value=this.func()),this._value}dirty(){this._value=null}}class Ur{constructor(){g(this,"messages",new Map);g(this,"head",null);g(this,"root",{children:[],next:null});g(this,"_messages",new Ba(()=>{var s;const e=new Array((((s=this.head)==null?void 0:s.level)??-1)+1);for(let r=this.head;r;r=r.prev)e[r.level]=r.current;return e}))}updateLevels(e,s){e.level=s;for(const r of e.children){const n=this.messages.get(r);n&&this.updateLevels(n,s+1)}}performOp(e,s,r){const n=s.prev??this.root,i=e??this.root;if(!(r==="relink"&&n===i)){if(r!=="link"&&(n.children=n.children.filter(o=>o!==s.current.id),n.next===s)){const o=n.children.at(-1),c=o?this.messages.get(o):null;if(c===void 0)throw new Error("MessageRepository(performOp/cut): Fallback sibling message not found. This is likely an internal bug in assistant-ui.");n.next=c}if(r!=="cut"){for(let c=e;c;c=c.prev)if(c.current.id===s.current.id)throw new Error("MessageRepository(performOp/link): A message with the same id already exists in the parent tree. This error occurs if the same message id is found multiple times. This is likely an internal bug in assistant-ui.");i.children=[...i.children,s.current.id],(ut(s)===this.head||i.next===null)&&(i.next=s),s.prev=e;const o=e?e.level+1:0;this.updateLevels(s,o)}}}get headId(){var e;return((e=this.head)==null?void 0:e.current.id)??null}getMessages(e){var n;if(e===void 0||e===((n=this.head)==null?void 0:n.current.id))return this._messages.value;const s=this.messages.get(e);if(!s)throw new Error("MessageRepository(getMessages): Head message not found. This is likely an internal bug in assistant-ui.");const r=new Array(s.level+1);for(let i=s;i;i=i.prev)r[i.level]=i.current;return r}a
Line truncated
|
||||
`);s.set(r,i.pop()??"");const o=[];for(const c of i){const u=c.trim();if(u)try{const l=JSON.parse(u),d=l.stream==="stderr"||l.stream==="system"?l.stream:"stdout",p=typeof l.chunk=="string"?l.chunk:"",m=typeof l.ts=="string"?l.ts:new Date().toISOString();if(!p)continue;o.push({ts:m,stream:d,chunk:p,dedupeKey:`log:${t}:${m}:${d}:${p}`})}catch{}}return o}function Jo({runs:t,companyId:e,maxChunksPerRun:s=200,logPollIntervalMs:r=Lo,logReadLimitBytes:n=qo,enableRealtimeUpdates:i=!0}){const o=f.useMemo(()=>t.map(I=>{const T=typeof I.logBytes=="number"?I.logBytes:"",w=typeof I.lastOutputBytes=="number"?I.lastOutputBytes:"";return`${I.id}:${I.status}:${I.adapterType}:${I.hasStoredOutput===!0?"1":"0"}:${T}:${w}`}).sort((I,T)=>I.localeCompare(T)).join(","),[t]),c=f.useMemo(()=>t.map(I=>({...I})),[o]),[u,l]=f.useState(new Map),[d,p]=f.useState(new Set),m=f.useRef(new Set),h=f.useRef(new Map),b=f.useRef(new Map),x=f.useRef(new Set),y=f.useRef(new Map),[N,v]=f.useState(0);f.useEffect(()=>Mn(()=>v(I=>I+1)),[]);const{data:C}=Tn({queryKey:_n.instance.generalSettings,queryFn:()=>An.getGeneral()}),S=f.useMemo(()=>new Map(c.map(I=>[I.id,I])),[c]),V=f.useMemo(()=>new Set(c.filter(I=>!ot(I.status)).map(I=>I.id)),[c]),U=f.useMemo(()=>c.map(I=>I.id).sort((I,T)=>I.localeCompare(T)).join(","),[c]),M=(I,T)=>{T.length!==0&&l(w=>{const B=new Map(w),j=[...B.get(I)??[]];let D=!1;for(const q of T)m.current.has(q.dedupeKey)||(m.current.add(q.dedupeKey),j.push({ts:q.ts,stream:q.stream,chunk:q.chunk}),D=!0);return D?(m.current.size>12e3&&m.current.clear(),B.set(I,j.slice(-s)),B):w})};return f.useEffect(()=>{const I=new Set(c.map(T=>T.id));l(T=>{const w=new Map;for(const[B,j]of T)I.has(B)&&w.set(B,j);return w.size===T.size?T:w}),p(T=>{const w=new Set;for(const B of T)I.has(B)&&w.add(B);return w.size===T.size?T:w});for(const T of h.current.keys()){const w=T.replace(/:records$/,"");I.has(w)||h.current.delete(T)}for(const T of b.current.keys())I.has(T)||b.current.delete(T);for(const T of x.current.keys())I.has(T)||x.current.delete(T);for(const T of y.current.keys())I.has(T)||y.current.delete(T)},[c]),f.useEffect(()=>{if(c.length===0)return;let I=!1;const T=async D=>{if(x.current.has(D.id))return;const q=b.current.get(D.id)??Ho(D,n);try{const L=await Rn.log(D.id,q,n);if(I)return;if(M(D.id,Ko(D.id,L.content,h.current)),L.nextOffset!==void 0){b.current.set(D.id,L.nextOffset);return}L.content.length>0&&b.current.set(D.id,q+L.content.length)}catch(L){L instanceof Cn&&L.status===404&&ot(D.status)&&x.current.add(D.id)}finally{I||p(L=>{if(L.has(D.id))return L;const z=new Set(L);return z.add(D.id),z})}};(async()=>{await Promise.all(c.map(D=>T(D)))})();const B=c.filter(D=>!ot(D.status)),j=B.length>0&&r>0?window.setInterval(()=>{Promise.all(B.map(D=>T(D)))},r):null;return()=>{I=!0,j!==null&&window.clearInterval(j)}},[r,n,c,U]),f.useEffect(()=>{if(!i||!e||V.size===0)return;let I=!1,T=null,w=null;const B=()=>{I||(T=window.setTimeout(j,1500))},j=()=>{if(I)return;const q=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/companies/${encodeURIComponent(e)}/events/ws`;w=new WebSocket(q),w.onmessage=L=>{const z=typeof L.data=="string"?L.data:"";if(!z)return;let K;try{K=JSON.parse(z)}catch{return}if(K.companyId!==e)return;const J=K.payload??{},k=he(J.runId);if(!(!k||!V.has(k))&&S.has(k)){if(K.type==="heartbeat.run.log"){const W=he(J.chunk);if(!W)return;const O=he(J.ts)??K.createdAt,_=he(J.stream)==="stderr"?"stderr":he(J.stream)==="system"?"system":"stdout";M(k,[{ts:O,stream:_,chunk:W,dedupeKey:`log:${k}:${O}:${_}:${W}`}]);return}if(K.type==="heartbeat.run.event"){const W=typeof J.seq=="number"?J.seq:null,O=he(J.eventType)??"event",_=he(J.message)??O;M(k,[{ts:K.createdAt,stream:O==="error"?"stderr":"system",chunk:_,dedupeKey:`socket:event:${k}:${W??`${O}:${_}:${K.createdAt}`}`}]);return}if(K.type==="heartbeat.run.status"){const W=he(J.status)??"updated";M(k,[{ts:K.createdAt,stream:ot(W)&&W!=="succeeded"?"stderr":"system",chunk:`run ${W}`,dedupeKey:`socket:status:${k}:${W}:${he(J.finishedAt)??""}`}])}}},w.onerror=()=>{w==null||w.close()},w.onclose=()=>{B()}};return j(),()=>{I=!0,T!==null&&window.clearTimeout(T),w&&(w.onmessage=null,w.onerror=null,w.onclose=null,w.readyState===WebSocket.CONNECTING?w.onopen=()=>{w==null||w.close(1e3,"live_run_transcripts_unmount")}:w.readyState===WebSocket.OPEN&&w.close(1e3,"live_run_transcripts_unmount"))}},[V,e,i,S]),{transcriptByRun:f.useMemo(()=>{const I=new Map,T=(C==null?void 0:C.censorUsernameInLogs)===!0,w=y.current,B=new Set;for(const j of c){B.add(j.id);const D=u.get(j.id)??Fo,q=w.get(j.id);if(q&&q.adapterType===j.adapterType&&q.chunks===D&&q.censorUsernameInLogs===T&&q.parserTick===N){I.set(j.id,q.transcript);continue}const L=Bn(j.adapterType),z=$o(D,L,{censorUsernameInLogs:T});w.set(j.id,{adapterType:j.adapterType,chunks:D,censorUsernameInLogs:T,parserTick:N,transcript:z}),I.set(j.id,z)}for(const j of w.keys())B.has(j)||w.delete(j);return I},[u,C==null?void 0:C.censorUsernameInLogs,c,N]),isI
Line truncated
|
||||
`);return{command:s.get("command")??null,status:s.get("status")??null,exitCode:s.get("exit_code")??null,body:n}}function tc(t){if(typeof t=="string")try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}return Wr(t)}function sc(t){try{return JSON.parse(t)}catch{return t}}function be(t,e){if(t==="command_execution"||t==="shell"||t==="shellToolCall"||t==="bash")return!0;if(typeof e=="string")return/\b(?:bash|zsh|sh|cmd|powershell)\b/i.test(e);const s=ms(e);return!!(s&&(typeof s.command=="string"||typeof s.cmd=="string"))}function Yr(t,e){return be(t,e)?"Executing command":Zo(t)}function Qr(t,e,s="comfortable"){const r=s==="compact"?72:120;if(typeof e=="string"){const l=be(t,e)?xt(e):ce(e);return Z(l,r)}const n=ms(e);if(!n){const l=ce(Wr(e));return l?Z(l,r):`Inspect ${t} input`}const i=typeof n.command=="string"?n.command:typeof n.cmd=="string"?n.cmd:null,o=lt(n,["description","summary","reason","goal","intent","action","task"])??null;if(o)return Z(o,r);if(i&&be(t,n))return Z(xt(i),r);const c=lt(n,["path","filePath","file_path","query","url","prompt","message"])??lt(n,["pattern","name","title","target","tool","command","cmd"])??null;if(c)return Z(c,r);if(Array.isArray(n.paths)&&n.paths.length>0){const l=n.paths.find(d=>typeof d=="string"&&d.trim().length>0);if(l)return Z(`${n.paths.length} paths, starting with ${l}`,r)}const u=Object.keys(n);return u.length===0?`No ${t} input`:u.length===1?Z(`${u[0]} payload`,r):Z(`${u.length} fields: ${u.slice(0,3).join(", ")}`,r)}function re(t,e=200){if(typeof t=="string"){const s=ce(t);return s?Z(s,e):null}return typeof t=="number"||typeof t=="boolean"?String(t):null}function rc(t,e){if(typeof e=="string"){const c=ce(be(t,e)?xt(e):e);return c?[{label:be(t,e)?"Command":"Input",value:Z(c,200),tone:"code"}]:[]}const s=ms(e);if(!s)return[];const r=[],n=new Set,i=(c,u,l="default")=>{if(!u)return;const d=`${c}:${u}`;n.has(d)||(n.add(d),r.push({label:c,value:u,tone:l}))};if(i("Intent",lt(s,["description","summary","reason","goal","intent","action","task"])??null),i("Path",re(s.path)??re(s.filePath)??re(s.file_path)),i("Directory",re(s.cwd)),i("Query",re(s.query)),i("Target",re(s.url)??re(s.target)),i("Prompt",re(s.prompt)??re(s.message)),i("Pattern",re(s.pattern)),i("Name",re(s.name)??re(s.title)),Array.isArray(s.paths)&&s.paths.length>0){const c=s.paths.filter(u=>typeof u=="string"&&u.trim().length>0).slice(0,3).join(", ");if(c){const u=s.paths.length>3?`, +${s.paths.length-3} more`:"";i("Paths",`${c}${u}`)}}const o=typeof s.command=="string"?s.command:typeof s.cmd=="string"?s.cmd:null;return o&&be(t,s)&&!r.some(c=>c.label==="Intent")&&i("Command",Z(xt(o),200),"code"),r}function nc(t,e,s="comfortable"){if(!t)return"Waiting for result";const r=ec(t);if(r){if(r.body)return Z(r.body.split(`
|
||||
`)[0]??r.body,s==="compact"?84:140);if(r.status==="completed")return"Completed";if(r.status==="failed"||r.status==="error")return r.exitCode?`Failed with exit code ${r.exitCode}`:"Failed"}const i=t.split(/\r?\n/).map(o=>ce(o)).filter(Boolean)[0]??t;return Z(i,s==="compact"?84:140)}function $t(t,e=160){return Z(ce(t),e)}const ic=30;function le(t){return t instanceof Date?t:new Date(t??Date.now())}function ee(t){return le(t).getTime()}function ac(t){return JSON.stringify(t)}function oc(t,e,s){const r=new Map;let n=e.length===t.length;const i=t.map((o,c)=>{const u=ac(o),l=s.get(o.id),d=l&&l.fingerprint===u?l.message:o;return r.set(o.id,{fingerprint:u,message:d}),n&&e[c]!==d&&(n=!1),d});return{messages:n?e:i,cache:r}}function Lt(t){return[...t].sort((e,s)=>{const r=ee(e.createdAt)-ee(s.createdAt);return r!==0?r:e.id.localeCompare(s.id)})}function Nt(t){if(t===null||typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(Array.isArray(t))return t.map(e=>Nt(e));if(typeof t=="object"&&t){const e=Object.entries(t).map(([s,r])=>[s,Nt(r)]);return Object.fromEntries(e)}return String(t)}function cc(t){return typeof t=="object"&&t&&!Array.isArray(t)?Nt(t):t===void 0?{}:{value:Nt(t)}}function uc(t){if(typeof t=="string")return t;if(t==null)return"";try{return JSON.stringify(t,null,2)}catch{return String(t)}}function lc(t,e){return t.text?e.text?t.text.endsWith(`
|
||||
`)||e.text.startsWith(`
|
||||
`)||t.text.endsWith(" ")||e.text.startsWith(" ")?`${t.text}${e.text}`:t.type==="text"?`${t.text} ${e.text}`:`${t.text}
|
||||
${e.text}`:t.text:e.text}function dc(t){return`\`\`\`diff
|
||||
${t.join(`
|
||||
`)}
|
||||
\`\`\``}function mc(t){return t.kind!=="init"&&t.kind!=="stderr"&&t.kind!=="stdout"&&t.kind!=="system"}function Gr(t,e=ic){var c,u,l,d,p;const s=t.map((m,h)=>({entry:m,fullIndex:h})).filter(({entry:m})=>mc(m));if(s.length<=e)return t;let r=Math.max(0,s.length-e);for(;r>0&&((c=s[r])==null?void 0:c.entry.kind)==="diff"&&((u=s[r-1])==null?void 0:u.entry.kind)==="diff";)r-=1;const n=new Set;for(let m=r;m<s.length;m+=1)n.add(m);for(let m=r;m<s.length;m+=1){const h=(l=s[m])==null?void 0:l.entry;if(!((h==null?void 0:h.kind)!=="tool_result"||!h.toolUseId))for(let b=m-1;b>=0;b-=1){const x=(d=s[b])==null?void 0:d.entry;if((x==null?void 0:x.kind)==="tool_call"&&x.toolUseId===h.toolUseId){n.add(b);break}}}const i=new Set;for(const m of n){const h=(p=s[m])==null?void 0:p.fullIndex;h!==void 0&&i.add(h)}return t.filter((m,h)=>i.has(h))}function hs(t){return{unstable_state:null,unstable_annotations:[],unstable_data:[],steps:[],custom:t}}function hc(t,e,s,r){var o,c;if(t.authorAgentId)return((o=e==null?void 0:e.get(t.authorAgentId))==null?void 0:o.name)??t.authorAgentId.slice(0,8);const n=t.authorUserId??null;if(!n)return"You";const i=(c=r==null?void 0:r.get(n))==null?void 0:c.trim();return i||(je(n,s,r)??"You")}function Xr(t){return t.replace(/_/g," ")}function pc(t){const{comment:e,agentMap:s,currentUserId:r,userLabelMap:n,companyId:i,projectId:o}=t,c=le(e.createdAt),u=hc(e,s,r,n),l={kind:"comment",commentId:e.id,anchorId:`comment-${e.id}`,authorName:u,authorAgentId:e.authorAgentId,authorUserId:e.authorUserId,companyId:i??e.companyId,projectId:o??null,runId:e.runId??null,runAgentId:e.runAgentId??null,clientStatus:e.clientStatus??null,queueState:e.queueState??null,queueTargetRunId:e.queueTargetRunId??null,interruptedRunId:e.interruptedRunId??null};return e.authorAgentId?{id:e.id,role:"assistant",createdAt:c,content:[{type:"text",text:e.body}],status:{type:"complete",reason:"stop"},metadata:hs(l)}:{id:e.id,role:"user",createdAt:c,content:[{type:"text",text:e.body}],attachments:[],metadata:{custom:l}}}function fc(t){var u,l,d;const{event:e,agentMap:s,currentUserId:r,userLabelMap:n}=t,i=e.actorType==="agent"?((u=s==null?void 0:s.get(e.actorId))==null?void 0:u.name)??e.actorId.slice(0,8):e.actorType==="system"?"System":je(e.actorId,r,n)??"Board",o=[`${i} updated this issue`];if(e.statusChange&&o.push(`Status: ${e.statusChange.from??"none"} -> ${e.statusChange.to??"none"}`),e.assigneeChange){const p=e.assigneeChange.from.agentId?((l=s==null?void 0:s.get(e.assigneeChange.from.agentId))==null?void 0:l.name)??e.assigneeChange.from.agentId.slice(0,8):je(e.assigneeChange.from.userId,r,n)??"Unassigned",m=e.assigneeChange.to.agentId?((d=s==null?void 0:s.get(e.assigneeChange.to.agentId))==null?void 0:d.name)??e.assigneeChange.to.agentId.slice(0,8):je(e.assigneeChange.to.userId,r,n)??"Unassigned";o.push(`Assignee: ${p} -> ${m}`)}return{id:`activity:${e.id}`,role:"system",createdAt:le(e.createdAt),content:[{type:"text",text:o.join(`
|
||||
`)}],metadata:{custom:{kind:"event",anchorId:`activity-${e.id}`,eventId:e.id,actorName:i,actorType:e.actorType,actorId:e.actorId,statusChange:e.statusChange??null,assigneeChange:e.assigneeChange??null}}}}function gc(t){return{id:`interaction:${t.id}`,role:"system",createdAt:le(t.createdAt),content:[{type:"text",text:Hr(t)}],metadata:{custom:{kind:"interaction",anchorId:`interaction-${t.id}`,interaction:t}}}}function dt(t){return t.finishedAt??t.startedAt??t.createdAt}function bc(t){var i;const e=[];let s=!1,r=0,n=0;for(const o of t){const c=new Date(o.ts).getTime(),u=o.kind==="thinking"||o.kind==="tool_call"||o.kind==="tool_result"||o.kind==="diff"||o.kind==="result"&&(o.isError&&!!((i=o.errors)!=null&&i.length)||!!o.text),l=o.kind==="assistant"&&!!o.text;u?(s||(s=!0,r=c),n=c):l&&s&&(e.push({startMs:r,endMs:n}),s=!1)}return s&&e.push({startMs:r,endMs:n}),e}function ps(t){if(t===null||!Number.isFinite(t)||t<=0)return null;const e=Math.max(1,Math.round(t/1e3));if(e<60)return`${e} second${e===1?"":"s"}`;const s=Math.round(e/60);if(s<60)return`${s} minute${s===1?"":"s"}`;const r=Math.floor(s/60),n=s%60;return n===0?`${r} hour${r===1?"":"s"}`:`${r} hour${r===1?"":"s"} ${n} minute${n===1?"":"s"}`}function Zr(t){const e=t.startedAt??t.createdAt,s=t.finishedAt??null,r=s?Math.max(0,ee(s)-ee(e)):null,n=ps(r);switch(t.status){case"succeeded":return n?`Worked for ${n}`:"Finished work";case"failed":case"error":return n?`Failed after ${n}`:"Run failed";case"timed_out":return n?`Timed out after ${n}`:"Run timed out";case"cancelled":return n?`Cancelled after ${n}`:"Run cancelled";case"queued":return"Queued";case"running":return"Working...";default:return Xr(t.status)}}function xc(t,e){var n;const s=t.agentName??((n=e==null?void 0:e.get(t.agentId))==null?void 0:n.name)??t.agentId.slice(0,8);return{id:`run:${t.runId}`,role:"system",createdAt:le(dt(t)),content:[{type:"text",text:`${s} run ${t.runId.slice(0,8)} ${Xr(t.status)}`}],metadata:{custom:{kind:"run",anchorId:`run-${t.runId}`,runId:t.runId,runAgentId:t.agentId,runAgentName:s,runStatus:t.status}}}}function Nc(t){var h;const{run:e,transcript:s,hasOutput:r,agentMap:n}=t,i=e.agentName??((h=n==null?void 0:n.get(e.agentId))==null?void 0:h.name)??e.agentId.slice(0,8),o=Gr(s),{parts:c,notices:u,segments:l}=en(o),d=r?"":"Run finished",p=c.length>0?c:d?[{type:"text",text:d}]:[];return{id:`run-assistant:${e.runId}`,role:"assistant",createdAt:le(e.startedAt??e.createdAt),content:p,status:{type:"complete",reason:"stop"},metadata:hs({kind:"historical-run",anchorId:`run-${e.runId}`,runId:e.runId,runAgentId:e.agentId,runAgentName:i,runStatus:e.status,notices:u,waitingText:d,chainOfThoughtLabel:Zr(e),chainOfThoughtSegments:l})}}function en(t){var l;const e=[],s=new Map,r=new Map,n=[];let i=[],o;const c=()=>{i.length!==0&&(e.push({type:"text",text:dc(i),parentId:o}),i=[],o=void 0)};for(const[d,p]of t.entries()){if(p.kind==="diff"){o??(o=`diff-group:${d}`),i.push(p.text??"");continue}if(c(),p.kind==="assistant"&&p.text){e.push({type:"text",text:p.text});continue}if(p.kind==="thinking"&&p.text){e.push({type:"reasoning",text:p.text});continue}if(p.kind==="tool_call"){const m=p.toolUseId||`tool-${d}`,h={type:"tool-call",toolCallId:m,toolName:p.name||"tool",args:cc(p.input),argsText:uc(p.input)};if(!s.has(m))r.set(m,e.length),e.push(h);else{const b=r.get(m);b!==void 0&&(e[b]=h)}s.set(m,h);continue}if(p.kind==="tool_result"){const m=p.toolUseId||`tool-result-${d}`,h=s.get(m),b={type:"tool-call",toolCallId:m,toolName:(h==null?void 0:h.toolName)||p.toolName||"tool",args:(h==null?void 0:h.args)??{},argsText:(h==null?void 0:h.argsText)??"",result:p.content??"",isError:p.isError===!0};if(h){const x=r.get(m);x!==void 0&&(e[x]=b)}else r.set(m,e.length),e.push(b);s.set(m,b);continue}if(p.kind!=="init"&&p.kind!=="stderr"&&p.kind!=="stdout"&&p.kind!=="system"&&p.kind==="result"){if(p.isError&&((l=p.errors)!=null&&l.length))for(const m of p.errors)e.push({type:"reasoning",text:`Run error: ${$t(m)}`});else p.text&&e.push({type:"reasoning",text:p.isError?`Run error: ${$t(p.text)}`:$t(p.text)});continue}}c();const u=[];for(const d of e){if(d.type==="tool-call"){u.push(d);continue}const p=u.at(-1);if(p&&p.type===d.type&&p.parentId===d.parentId){u[u.length-1]={...p,text:lc(p,d)};continue}u.push(d)}return{parts:u,notices:n,segments:bc(t)}}function Ic(t,e,s){const r=new Map;for(const n of t)r.set(n.id,n);return e&&r.set(e.id,{id:e.id,status:e.status,invocationSource:e.invocationSource,triggerDetail:e.triggerDetail,startedAt:e.startedAt?le(e.startedAt).toISOString():null,finishedAt:e.finishedAt?le(e.finishedAt).toISOString():null,createdAt:le(e.createdAt).toISOString(),agentId:e.agentId,agentName:e.agentName,adapterType:e.adapterType,issueId:s}),[...r.values()].sort((n,i)=>ee(n.createdAt)-ee(i.createdAt))}function yc(t){const{run:e,transcript:s}=t,r=Gr(s),{parts:n,notices:i,segments:o}=en(r),c=e.status==="queued"?"Queued...":n.length>0?"":"Working...",u=n;return{id:`run-assistant:${e.id}`,role:"assistant",crea
Line truncated
|
||||
`),[t.payload.tasks]);f.useEffect(()=>{N(new Set(t.payload.tasks.map(k=>k.clientKey)))},[t.id,t.status,v]);const C=f.useMemo(()=>new Map(t.payload.tasks.map(k=>[k.clientKey,k])),[t.payload.tasks]),S=y.size,V=((q=(D=t.result)==null?void 0:D.createdTasks)==null?void 0:q.length)??0,U=((z=(L=t.result)==null?void 0:L.skippedClientKeys)==null?void 0:z.length)??0;async function M(){if(n){l("accept");try{await n(t,[...y])}finally{l(null)}}}async function H(){if(i){l("reject");try{await i(t,d.trim()||void 0),c(!1)}finally{l(null)}}}function I(k,W){const O=Jr(k);N(_=>{var ue,ie;const R=new Set(_);if(!W){for(const me of O)R.delete(me);return R}for(const me of O)R.add(me);let Y=((ue=C.get(k.task.clientKey))==null?void 0:ue.parentClientKey)??null;for(;Y;)R.add(Y),Y=((ie=C.get(Y))==null?void 0:ie.parentClientKey)??null;return R})}return a.jsxDEV("div",{className:"space-y-3",children:[a.jsxDEV("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[a.jsxDEV("span",{children:x===1?"1 draft issue":`${x} draft issues`},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:448,columnNumber:9},this),t.payload.defaultParentId?a.jsxDEV(ke,{label:"Default parent",value:t.payload.defaultParentId,tone:"subtle"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:450,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:447,columnNumber:7},this),a.jsxDEV("div",{className:"overflow-hidden border border-border/70",children:m.map(k=>a.jsxDEV(tn,{node:k,createdByClientKey:h,agentMap:e,currentUserId:s,userLabelMap:r,selectedClientKeys:y,skippedClientKeys:b,showSelection:t.status==="pending",onToggleSelection:I},k.task.clientKey,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:456,columnNumber:11},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:454,columnNumber:7},this),t.status==="accepted"?a.jsxDEV("div",{className:"rounded-sm border border-emerald-500/60 bg-emerald-500/10 px-4 py-3 text-sm text-emerald-900 dark:text-emerald-100",children:[a.jsxDEV("div",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-emerald-700",children:"Resolution summary"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:473,columnNumber:11},this),a.jsxDEV("p",{className:"mt-1 leading-6",children:U>0?`Created ${V} draft ${V===1?"issue":"issues"} and skipped ${U} during review.`:`Created all ${V} draft ${V===1?"issue":"issues"}.`},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:476,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:472,columnNumber:9},this):null,t.status==="rejected"?a.jsxDEV("div",{className:"rounded-sm border border-rose-500/60 bg-rose-500/10 px-4 py-3 text-sm text-rose-900 dark:text-rose-100",children:[a.jsxDEV("div",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-rose-700",children:"Rejection reason"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:486,columnNumber:11},this),a.jsxDEV("p",{className:A("mt-1 leading-6",!((K=t.result)!=null&&K.rejectionReason)&&"text-rose-900/75"),children:((J=t.result)==null?void 0:J.rejectionReason)||"No reason provided."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:489,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:485,columnNumber:9},this):null,t.status==="pending"?a.jsxDEV("div",{className:"space-y-3",children:[a.jsxDEV("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsxDEV("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[a.jsxDEV("span",{children:S===x?`All ${x} draft ${x===1?"issue":"issues"} selected`:`${S} of ${x} draft ${x===1?"issue":"issues"} selected`},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:502,columnNumber:15},this),S<x?a.jsxDEV("span",{children:[x-S," will be skipped if you accept this interaction."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:508,columnNumber:17},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueThreadInteractionCard.tsx",lineNumber:501,columnNumber:13},this),a.jsxDEV("div",{className:"ml-auto flex flex-wrap items-center justify-end gap-2",children:[a.jsxDEV(Q,{size:"sm",disabled:!n||u!==null||S===0,onClick:()=>void M(),children:u==="accept"?a.jsxDEV(a.Fragment,{children:[a.jsxDEV(de,{classN
Line truncated
|
||||
interaction: SuggestTasksInteraction | RequestConfirmationInteraction,
|
||||
selectedClientKeys?: string[],
|
||||
) => Promise<void> | void`,signature:{arguments:[{type:{name:"union",raw:"SuggestTasksInteraction | RequestConfirmationInteraction",elements:[{name:"SuggestTasksInteraction"},{name:"RequestConfirmationInteraction"}]},name:"interaction"},{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"selectedClientKeys"}],return:{name:"union",raw:"Promise<void> | void",elements:[{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"},{name:"void"}]}}},description:""},onRejectInteraction:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
||||
interaction: SuggestTasksInteraction | RequestConfirmationInteraction,
|
||||
reason?: string,
|
||||
) => Promise<void> | void`,signature:{arguments:[{type:{name:"union",raw:"SuggestTasksInteraction | RequestConfirmationInteraction",elements:[{name:"SuggestTasksInteraction"},{name:"RequestConfirmationInteraction"}]},name:"interaction"},{type:{name:"string"},name:"reason"}],return:{name:"union",raw:"Promise<void> | void",elements:[{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"},{name:"void"}]}}},description:""},onSubmitInteractionAnswers:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
||||
interaction: AskUserQuestionsInteraction,
|
||||
answers: AskUserQuestionsAnswer[],
|
||||
) => Promise<void> | void`,signature:{arguments:[{type:{name:"AskUserQuestionsInteraction"},name:"interaction"},{type:{name:"Array",elements:[{name:"AskUserQuestionsAnswer"}],raw:"AskUserQuestionsAnswer[]"},name:"answers"}],return:{name:"union",raw:"Promise<void> | void",elements:[{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"},{name:"void"}]}}},description:""}}};function Zs(t){return t.currentBody.trim()?t.currentBody:t.submittedBody}function Mc(t=document,e=window){const s=t.getElementById("main-content");if(s instanceof HTMLElement){const r=e.getComputedStyle(s).overflowY;if((r==="auto"||r==="scroll"||r==="overlay")&&s.scrollHeight>s.clientHeight+1)return{type:"element",element:s}}return{type:"window"}}function sn(t){return t?{composerViewportTop:t.getBoundingClientRect().top}:null}function Bc(t,e=document){if(!t)return!1;const s=e.activeElement;return!!(s instanceof Node&&t.contains(s))}function rn(t,e,s=document,r=window){if(!t||!e)return;const n=e.getBoundingClientRect().top-t.composerViewportTop;if(!Number.isFinite(n)||Math.abs(n)<1)return;const i=Mc(s,r);if(i.type==="element"){i.element.scrollTop+=n;return}r.scrollBy({top:n,left:0,behavior:"auto"})}const Re=f.createContext({feedbackVoteByTargetId:new Map,feedbackDataSharingPreference:"prompt",feedbackTermsUrl:null,activeRunIds:new Set});function Pc(t){const{messageId:e,currentFolded:s,isFoldable:r,previousMessageId:n,previousIsFoldable:i}=t;return e!==n?r:r?i?s:!0:!1}function Oc(t){const{runId:e,runStatus:s,activeRunIds:r}=t;return e?r.has(e)?!0:s==="queued"||s==="running":!1}function $c(t,e){if(e.length===0)return-1;const s=e[0];let r=-1,n=!1;for(const i of t)if(i.type==="reasoning"||i.type==="tool-call"){if(n||(r++,n=!0),i===s)return r}else n=!1;return-1}function Lc(t,e){const[,s]=f.useState(0);return f.useEffect(()=>{if(!e||!t)return;const r=setInterval(()=>s(n=>n+1),1e3);return()=>clearInterval(r)},[e,t]),!e||!t?null:ps(Date.now()-t)}class qc extends f.Component{constructor(){super(...arguments);g(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(s,r){console.error("Issue chat renderer failed; falling back to safe transcript view",{error:s,info:r.componentStack})}componentDidUpdate(s){this.state.hasError&&s.resetKey!==this.props.resetKey&&this.setState({hasError:!1})}render(){return this.state.hasError?a.jsxDEV(Jc,{messages:this.props.messages,emptyMessage:this.props.emptyMessage,variant:this.props.variant},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:332,columnNumber:9},this):this.props.children}}function Fc({issueStatus:t,blockers:e}){if(e.length===0&&t!=="blocked")return null;const s=e.length===1?"the linked issue":"the linked issues";return a.jsxDEV("div",{className:"mb-3 rounded-md border border-amber-300/70 bg-amber-50/90 px-3 py-2.5 text-sm text-amber-950 shadow-sm dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:a.jsxDEV("div",{className:"flex items-start gap-2",children:[a.jsxDEV(ss,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600 dark:text-amber-300"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:357,columnNumber:9},this),a.jsxDEV("div",{className:"min-w-0 space-y-1.5",children:[a.jsxDEV("p",{className:"leading-5",children:e.length>0?a.jsxDEV(a.Fragment,{children:["Work on this issue is blocked by ",s," until ",e.length===1?"it is":"they are"," complete. Comments still wake the assignee for questions or triage."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:361,columnNumber:17},this):a.jsxDEV(a.Fragment,{children:"Work on this issue is blocked until it is moved back to todo. Comments still wake the assignee for questions or triage."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:362,columnNumber:17},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:359,columnNumber:11},this),e.length>0?a.jsxDEV("div",{className:"flex flex-wrap gap-1.5",children:e.map(r=>{const n=r.identifier??r.id;return a.jsxDEV(wn,{issuePathId:n,to:Sn(n),className:"inline-flex max-w-full items-center gap-1 rounded-md border border-amber-300/70 bg-background/80 px-2 py-1 font-mono text-xs text-amber-950 transition-colors hover:border-amber-500 hover:bg-amber-100 hover:underline dark:border-amber-500/40 dark:bg-background/40 dark:text-amber-100 dark:hover:bg-amber-500/15",children:[a.jsxDEV("span",{children:r.identifier??r.id.slice(0,8)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:375,columnNumber:21},this),a.jsxDEV("span",{className:"max-w-[18rem] truncate font-sans text-[11px] text-amber-800 dark:text-amber-200",children:r.title},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:376,columnNumber:21},this)]},r.id,!0,{fileName:"/Users/dotta/pa
Line truncated
|
||||
${i.argsText}`),typeof i.result=="string"&&i.result.trim()&&o.push(`Result:
|
||||
${i.result}`),e.push(o.join(`
|
||||
|
||||
`))}}const s=(n=t.metadata)==null?void 0:n.custom;return e.length===0&&typeof(s==null?void 0:s.waitingText)=="string"&&s.waitingText.trim()&&e.push(s.waitingText),e}function Jc({messages:t,emptyMessage:e,variant:s}){return a.jsxDEV("div",{className:A(s==="embedded"?"space-y-3":"space-y-4"),children:[a.jsxDEV("div",{className:"rounded-xl border border-amber-300/60 bg-amber-50/80 px-4 py-3 text-sm text-amber-900 dark:border-amber-500/30 dark:bg-amber-950/20 dark:text-amber-200",children:a.jsxDEV("div",{className:"flex items-start gap-2",children:[a.jsxDEV(ss,{className:"mt-0.5 h-4 w-4 shrink-0"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:456,columnNumber:11},this),a.jsxDEV("div",{className:"space-y-1",children:[a.jsxDEV("p",{className:"font-medium",children:"Chat renderer hit an internal state error."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:458,columnNumber:13},this),a.jsxDEV("p",{className:"text-xs opacity-80",children:"Showing a safe fallback transcript instead of crashing the issues page."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:459,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:457,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:455,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:454,columnNumber:7},this),t.length===0?a.jsxDEV("div",{className:A("text-center text-sm text-muted-foreground",s==="embedded"?"rounded-xl border border-dashed border-border/70 bg-background/60 px-4 py-6":"rounded-2xl border border-dashed border-border bg-card px-6 py-10"),children:e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:467,columnNumber:9},this):a.jsxDEV("div",{className:A(s==="embedded"?"space-y-3":"space-y-4"),children:t.map(r=>{const n=Kc(r);return a.jsxDEV("div",{className:"rounded-xl border border-border/60 bg-card/70 px-4 py-3",children:[a.jsxDEV("div",{className:"mb-2 flex items-center gap-2 text-sm",children:[a.jsxDEV("span",{className:"font-medium text-foreground",children:Hc(r)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:482,columnNumber:19},this),r.createdAt?a.jsxDEV("span",{className:"text-[11px] text-muted-foreground",children:It(r.createdAt)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:484,columnNumber:21},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:481,columnNumber:17},this),a.jsxDEV("div",{className:"space-y-2",children:n.length>0?n.map((i,o)=>a.jsxDEV(vt,{children:i},`${r.id}:fallback:${o}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:491,columnNumber:21},this)):a.jsxDEV("p",{className:"text-sm text-muted-foreground",children:"No message content."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:493,columnNumber:21},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:489,columnNumber:17},this)]},r.id,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:480,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:476,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:453,columnNumber:5},this)}const Wc=800,Yc=96,Qc=.4;function er(t){var e;return Array.from(((e=t.dataTransfer)==null?void 0:e.types)??[]).includes("Files")}function qt(t){return t?typeof t=="string"?t:t.toISOString():null}function Gc(t){try{return localStorage.getItem(t)??""}catch{return""}}function Xc(t,e){try{e.trim()?localStorage.setItem(t,e):localStorage.removeItem(t)}catch{}}function Zc(t){try{localStorage.removeItem(t)}catch{}}function eu(t){if(!t||t==="__none__")return{assigneeAgentId:null,assigneeUserId:null};if(t.startsWith("agent:")){const e=t.slice(6);return e?{assigneeAgentId:e,assigneeUserId:null}:null}if(t.startsWith("user:")){const e=t.slice(5);return e?{assigneeAgentId:null,assigneeUserId:e}:null}return null}function tu(t,e){return(t==="done"||t==="cancelled"||t==="blocked")&&e.startsWith("agent:")}const su=10080*60*1e3;function It(t){if(!t)return"";const e=new Date(t).getTime();return Date.now()-e<su?mt(t):Ft(t)}function nn({text:t,recessed:e}){const{onImageClick:s}=f.useContext(Re);return a.jsxDEV(vt,{className:"text-sm leading-6",style:e?{opacity:.55}:void 0,softBreaks:!0,onImageClick:s,children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:578,columnNumber:5},this)}function tr(t){return t?t.replace(/_/g,
Line truncated
|
||||
`),p=e.filter(I=>I.type==="tool-call"),m=p.some(I=>I.result===void 0),h=u&&m,[b,x]=f.useState(h),y=Array.isArray(r.chainOfThoughtSegments)?r.chainOfThoughtSegments:[],N=l>=0?y[l]??null:null,v=Lc(N==null?void 0:N.startMs,h);f.useEffect(()=>{h&&x(!0)},[h]);let C,S=null;if(h)C="Working",v&&(S=`for ${v}`);else if(N){const I=N.endMs-N.startMs,T=ps(I);C="Worked",T&&(S=`for ${T}`)}else C="Worked";const V=ou(p),U=d.trim().length>0||p.length>0;return a.jsxDEV("div",{children:[a.jsxDEV("button",{type:"button",className:"group flex w-full items-center gap-2.5 rounded-lg px-1 py-2 text-left transition-colors hover:bg-accent/5",onClick:()=>U&&x(I=>!I),children:[a.jsxDEV("span",{className:"inline-flex items-center gap-2 text-sm font-medium text-foreground/80",children:[c?a.jsxDEV(Te,{icon:c,className:"h-4 w-4 shrink-0"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:777,columnNumber:13},this):h?a.jsxDEV(de,{className:"h-4 w-4 shrink-0 animate-spin text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:779,columnNumber:13},this):a.jsxDEV("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:a.jsxDEV("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500/70"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:782,columnNumber:15},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:781,columnNumber:13},this),h?a.jsxDEV("span",{className:"shimmer-text",children:C},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:786,columnNumber:13},this):C]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:775,columnNumber:9},this),S?a.jsxDEV("span",{className:"text-xs text-muted-foreground/60",children:S},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:792,columnNumber:11},this):null,V?a.jsxDEV("span",{className:"text-xs text-muted-foreground/40",children:["· ",V]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:795,columnNumber:11},this):null,U?a.jsxDEV(yt,{className:A("ml-auto h-4 w-4 shrink-0 text-muted-foreground/50 transition-transform",b&&"rotate-180")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:798,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:770,columnNumber:7},this),b&&U?a.jsxDEV("div",{className:"space-y-1 py-1",children:h?a.jsxDEV(a.Fragment,{children:[d?a.jsxDEV(rr,{text:d},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:805,columnNumber:35},this):null,p.length>0?a.jsxDEV(lu,{toolParts:p},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:806,columnNumber:39},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:804,columnNumber:13},this):a.jsxDEV(a.Fragment,{children:[d?a.jsxDEV(rr,{text:d},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:810,columnNumber:35},this):null,p.map(I=>a.jsxDEV(mu,{toolName:I.toolName,args:I.args,argsText:I.argsText,result:I.result,isError:!1},I.toolCallId,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:812,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:809,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:802,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:769,columnNumber:5},this)}function rr({text:t}){const e=t.split(`
|
||||
`).filter(o=>o.trim()),s=e[e.length-1]??t.slice(-200),r=f.useRef(s),[n,i]=f.useState({key:0,current:s,exiting:null});return f.useEffect(()=>{if(s!==r.current){const o=r.current;r.current=s,i(c=>({key:c.key+1,current:s,exiting:o}))}},[s]),a.jsxDEV("div",{className:"flex gap-2 px-1",children:[a.jsxDEV("div",{className:"flex flex-col items-center pt-0.5",children:a.jsxDEV(Vn,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/50"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:850,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:849,columnNumber:7},this),a.jsxDEV("div",{className:"relative h-5 min-w-0 flex-1 overflow-hidden",children:[n.exiting!==null&&a.jsxDEV("span",{className:"cot-line-exit absolute inset-x-0 truncate text-[13px] italic leading-5 text-muted-foreground/70",onAnimationEnd:()=>i(o=>({...o,exiting:null})),children:n.exiting},`out-${n.key}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:854,columnNumber:11},this),a.jsxDEV("span",{className:A("absolute inset-x-0 truncate text-[13px] italic leading-5 text-muted-foreground/70",n.key>0&&"cot-line-enter"),children:n.current},`in-${n.key}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:862,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:852,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:848,columnNumber:5},this)}function lu({toolParts:t}){const e=t[t.length-1];if(!e)return null;const s=cu(e),r=f.useRef(s),[n,i]=f.useState({key:0,current:s,exiting:null});f.useEffect(()=>{if(s!==r.current){const u=r.current;r.current=s,i(l=>({key:l.key+1,current:s,exiting:u}))}},[s]);const o=an(e.toolName),c=e.result===void 0;return a.jsxDEV("div",{className:"flex gap-2 px-1",children:[a.jsxDEV("div",{className:"flex flex-col items-center pt-0.5",children:c?a.jsxDEV(de,{className:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground/50"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:904,columnNumber:11},this):a.jsxDEV(o,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/50"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:906,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:902,columnNumber:7},this),a.jsxDEV("div",{className:"relative h-5 min-w-0 flex-1 overflow-hidden",children:[n.exiting!==null&&a.jsxDEV("span",{className:"cot-line-exit absolute inset-x-0 truncate text-[13px] leading-5 text-muted-foreground/70",onAnimationEnd:()=>i(u=>({...u,exiting:null})),children:n.exiting},`out-${n.key}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:911,columnNumber:11},this),a.jsxDEV("span",{className:A("absolute inset-x-0 truncate text-[13px] leading-5 text-muted-foreground/70",n.key>0&&"cot-line-enter"),children:n.current},`in-${n.key}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:919,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:909,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:901,columnNumber:5},this)}function nr({children:t,className:e}){const[s,r]=f.useState(!1);return a.jsxDEV("div",{className:"group/pre relative",children:[a.jsxDEV("pre",{className:e,children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:937,columnNumber:7},this),a.jsxDEV("button",{type:"button",className:A("absolute right-1.5 top-1.5 inline-flex h-6 w-6 items-center justify-center rounded-md bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-foreground group-hover/pre:opacity-100",s&&"opacity-100"),title:"Copy","aria-label":"Copy",onClick:()=>{navigator.clipboard.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})},children:s?a.jsxDEV(Zt,{className:"h-3 w-3"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:953,columnNumber:19},this):a.jsxDEV(ht,{className:"h-3 w-3"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:953,columnNumber:51},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:938,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:936,columnNumber:5},this)}const du={};function an(t){return du[t]??Un}function mu({toolName:t,args:e,argsText:s,result:r,isError:n}){const[i,o]=f.useState(!1),c=s??"",u=e??sc(c),l=typeof r=="string"?r:r===void 0?"":tc(r),d=rc(t,u),p=Yr(t,u),h=
Line truncated
|
||||
|
||||
`)}function pu({message:t,recessed:e=!1}){return a.jsxDEV(a.Fragment,{children:t.content.filter(s=>s.type==="text").map((s,r)=>a.jsxDEV(nn,{text:s.text,recessed:e},`${t.id}:text:${r}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1088,columnNumber:11},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1084,columnNumber:5},this)}function fu(t){const e=[];let s=[],r=-1;const n=()=>{s.length!==0&&(e.push({type:"cot",parts:s,startIndex:r}),s=[],r=-1)};return t.forEach((i,o)=>{if(i.type==="reasoning"||i.type==="tool-call"){s.length===0&&(r=o),s.push(i);return}n(),i.type==="text"&&e.push({type:"text",part:i,index:o})}),n(),e}function gu({message:t,hasCoT:e}){return a.jsxDEV(a.Fragment,{children:fu(t.content).map(s=>s.type==="text"?a.jsxDEV(nn,{text:s.part.text,recessed:e},`${t.id}:text:${s.index}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1146,columnNumber:13},this):a.jsxDEV(uu,{message:t,cotParts:s.parts},`${t.id}:cot:${s.startIndex}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1154,columnNumber:11},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1142,columnNumber:5},this)}function bu({message:t}){const{onInterruptQueued:e,onCancelQueued:s,interruptingQueuedRunId:r,currentUserId:n,userProfileMap:i}=f.useContext(Re),o=t.metadata.custom,c=typeof o.anchorId=="string"?o.anchorId:void 0,u=typeof o.commentId=="string"?o.commentId:t.id,l=typeof o.authorName=="string"?o.authorName:null,d=typeof o.authorUserId=="string"?o.authorUserId:null,p=o.queueState==="queued"||o.clientStatus==="queued",m=o.clientStatus==="pending",h=typeof o.queueTargetRunId=="string"?o.queueTargetRunId:null,[b,x]=f.useState(!1),{isCurrentUser:y,authorName:N,avatarUrl:v}=nu({authorName:l,authorUserId:d,currentUserId:n,userProfileMap:i}),C=a.jsxDEV(Xe,{size:"sm",className:"shrink-0",children:[v?a.jsxDEV(Pn,{src:v,alt:N},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1194,columnNumber:20},this):null,a.jsxDEV(pe,{children:tt(N)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1195,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1193,columnNumber:5},this),S=a.jsxDEV("div",{className:A("flex min-w-0 max-w-[85%] flex-col",y&&"items-end"),children:[a.jsxDEV("div",{className:A("mb-1 flex items-center gap-2 px-1",y?"justify-end":"justify-start"),children:a.jsxDEV("span",{className:"text-sm font-medium text-foreground",children:N},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1201,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1200,columnNumber:7},this),a.jsxDEV("div",{className:A("min-w-0 max-w-full overflow-hidden break-all rounded-2xl px-4 py-2.5",p?"bg-amber-50/80 dark:bg-amber-500/10":"bg-muted",m&&"opacity-80"),children:[p?a.jsxDEV("div",{className:"mb-1.5 flex items-center gap-2",children:[a.jsxDEV("span",{className:"inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200",children:"Queued"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1214,columnNumber:13},this),h&&e?a.jsxDEV(Q,{size:"sm",variant:"outline",className:"h-6 border-red-300 px-2 text-[11px] text-red-700 hover:bg-red-50 hover:text-red-800 dark:border-red-500/40 dark:text-red-300 dark:hover:bg-red-500/10",disabled:r===h,onClick:()=>void e(h),children:r===h?"Interrupting...":"Interrupt"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1218,columnNumber:15},this):null,s?a.jsxDEV(Q,{size:"sm",variant:"outline",className:"h-6 border-amber-300 px-2 text-[11px] text-amber-900 hover:bg-amber-100/80 hover:text-amber-950 dark:border-amber-500/40 dark:text-amber-100 dark:hover:bg-amber-500/10",onClick:()=>s(u),children:"Cancel"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1229,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1213,columnNumber:11},this):null,a.jsxDEV("div",{className:"min-w-0 max-w-full space-y-3",children:a.jsxDEV(pu,{message:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1241,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1240,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1203,columnNumber:7},this),m?a.js
Line truncated
|
||||
|
||||
`);navigator.clipboard.writeText(V).then(()=>{x(!0),setTimeout(()=>x(!1),2e3)})},children:b?a.jsxDEV(Zt,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1285,columnNumber:23},this):a.jsxDEV(ht,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1285,columnNumber:59},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1269,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1250,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1199,columnNumber:5},this);return a.jsxDEV("div",{id:c,children:a.jsxDEV("div",{className:A("group flex items-start gap-2.5",y&&"justify-end"),children:y?a.jsxDEV(a.Fragment,{children:[S,C]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1296,columnNumber:11},this):a.jsxDEV(a.Fragment,{children:[C,S]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1301,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1294,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1293,columnNumber:5},this)}function xu({message:t}){var k,W;const{feedbackVoteByTargetId:e,feedbackDataSharingPreference:s,feedbackTermsUrl:r,onVote:n,agentMap:i,activeRunIds:o,onStopRun:c,stoppingRunId:u}=f.useContext(Re),l=t.metadata.custom,d=typeof l.anchorId=="string"?l.anchorId:void 0,p=typeof l.authorName=="string"?l.authorName:typeof l.runAgentName=="string"?l.runAgentName:"Agent",m=typeof l.authorAgentId=="string"?l.authorAgentId:null,h=typeof l.runId=="string"?l.runId:null,b=typeof l.runAgentId=="string"?l.runAgentId:null,x=typeof l.runStatus=="string"?l.runStatus:null,y=m??b,N=y?(k=i==null?void 0:i.get(y))==null?void 0:k.icon:void 0,v=typeof l.commentId=="string"?l.commentId:null,C=Array.isArray(l.notices)?l.notices.filter(O=>typeof O=="string"&&O.length>0):[],S=typeof l.waitingText=="string"?l.waitingText:"",V=t.role==="assistant"&&((W=t.status)==null?void 0:W.type)==="running",U=h&&b?`/agents/${b}/runs/${h}`:null,M=Oc({runId:h,runStatus:x,activeRunIds:o}),H=typeof l.chainOfThoughtLabel=="string"?l.chainOfThoughtLabel:null,I=t.content.some(O=>O.type==="reasoning"||O.type==="tool-call"),T=!V&&!!H,[w,B]=f.useState(T),[j,D]=f.useState({messageId:t.id,isFoldable:T}),[q,L]=f.useState(!1),z=hu(t);if(t.id!==j.messageId||T!==j.isFoldable){const O=Pc({messageId:t.id,currentFolded:w,isFoldable:T,previousMessageId:j.messageId,previousIsFoldable:j.isFoldable});D({messageId:t.id,isFoldable:T}),O!==w&&B(O)}const K=async(O,_)=>{!v||!n||await n(v,O,_)},J=v?e.get(v)??null:null;return a.jsxDEV("div",{id:d,children:a.jsxDEV("div",{className:"flex items-start gap-2.5 py-1.5",children:[a.jsxDEV(Xe,{size:"sm",className:"shrink-0",children:N?a.jsxDEV(pe,{children:a.jsxDEV(Te,{icon:N,className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1383,columnNumber:29},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1383,columnNumber:13},this):a.jsxDEV(pe,{children:tt(p)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1385,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1381,columnNumber:9},this),a.jsxDEV("div",{className:"min-w-0 flex-1",children:[T?a.jsxDEV("button",{type:"button",className:"group flex w-full items-center gap-2 py-0.5 text-left",onClick:()=>B(O=>!O),children:[a.jsxDEV("span",{className:"text-sm font-medium text-foreground",children:p},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1396,columnNumber:15},this),a.jsxDEV("span",{className:"text-xs text-muted-foreground/60",children:H==null?void 0:H.toLowerCase()},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1397,columnNumber:15},this),a.jsxDEV("span",{className:"ml-auto flex items-center gap-1.5",children:[t.createdAt?a.jsxDEV("span",{className:"text-[11px] text-muted-foreground/50",children:It(t.createdAt)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1400,columnNumber:19},this):null,a.jsxDEV(yt,{className:A("h-3.5 w-3.5 text-muted-foreground/40 transition-transform",!w&&"rotate-180")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1404,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:1398,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/s
Line truncated
|
||||
|
||||
${ue}`:ue)}else s&&await s(_)}async function J(_){var Y;const R=(Y=_.target.files)==null?void 0:Y[0];if(R){C(!0);try{await K(R)}finally{C(!1),T.current&&(T.current.value="")}}}async function k(_){if(!(!_||_.length===0)){C(!0);try{for(const R of Array.from(_))await K(R)}finally{C(!1)}}}function W(){U.current=0,V(!1)}const O=!y&&!!b.trim();return d?a.jsxDEV("div",{className:"rounded-md border border-amber-300/70 bg-amber-50/80 px-3 py-2 text-sm text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:d},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2204,columnNumber:7},this):a.jsxDEV("div",{ref:B,"data-testid":"issue-chat-composer",className:A("relative rounded-md border border-border/70 bg-background/95 p-[15px] shadow-[0_-12px_28px_rgba(15,23,42,0.08)] backdrop-blur supports-[backdrop-filter]:bg-background/85 dark:shadow-[0_-12px_28px_rgba(0,0,0,0.28)]",S&&"ring-2 ring-primary/60 bg-accent/10"),onDragEnter:_=>{!D||!er(_)||(U.current+=1,V(!0))},onDragOver:_=>{!D||!er(_)||(_.preventDefault(),_.dataTransfer.dropEffect="copy")},onDragLeave:()=>{D&&(U.current=Math.max(0,U.current-1),U.current===0&&V(!1))},onDrop:_=>{var R;D&&(W(),!_.defaultPrevented&&(_.preventDefault(),k((R=_.dataTransfer)==null?void 0:R.files)))},children:[a.jsxDEV(Yn,{ref:w,value:b,onChange:x,placeholder:"Reply",mentions:u,onSubmit:z,imageUploadHandler:e,bordered:!1,contentClassName:"max-h-[28dvh] overflow-y-auto pr-1 text-sm scrollbar-auto-hide"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2241,columnNumber:7},this),a.jsxDEV("div",{className:"flex flex-wrap items-center justify-end gap-3",children:[e||s?a.jsxDEV("div",{className:"mr-auto flex items-center gap-3",children:[a.jsxDEV("input",{ref:T,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",className:"hidden",onChange:J},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2256,columnNumber:13},this),a.jsxDEV(Q,{variant:"ghost",size:"icon-sm",onClick:()=>{var _;return(_=T.current)==null?void 0:_.click()},disabled:v,title:"Attach image",children:a.jsxDEV(ni,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2270,columnNumber:15},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2263,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2255,columnNumber:11},this):null,n&&i.length>0?a.jsxDEV(Qn,{value:H,options:i,placeholder:"Assignee",noneLabel:"No assignee",searchPlaceholder:"Search assignees...",emptyMessage:"No assignees found.",onChange:I,className:"h-8 text-xs",renderTriggerValue:_=>{if(!_)return a.jsxDEV("span",{className:"text-muted-foreground",children:"Assignee"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2286,columnNumber:35},this);const R=_.id.startsWith("agent:")?_.id.slice(6):null,Y=R?l==null?void 0:l.get(R):null;return a.jsxDEV(a.Fragment,{children:[Y?a.jsxDEV(Te,{icon:Y.icon,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2292,columnNumber:21},this):null,a.jsxDEV("span",{className:"truncate",children:_.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2294,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2290,columnNumber:17},this)},renderOption:_=>{if(!_.id)return a.jsxDEV("span",{className:"truncate",children:_.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2299,columnNumber:38},this);const R=_.id.startsWith("agent:")?_.id.slice(6):null,Y=R?l==null?void 0:l.get(R):null;return a.jsxDEV(a.Fragment,{children:[Y?a.jsxDEV(Te,{icon:Y.icon,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2305,columnNumber:21},this):null,a.jsxDEV("span",{className:"truncate",children:_.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2307,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2303,columnNumber:17},this)}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2276,columnNumber:11},this):null,a.jsxDEV(Q,{size:"sm",disabled:!O,onClick:()=>void z(),children:y?"Posting...":"Send"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2314,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueChatThread.tsx",lineNumber:2253,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/
Line truncated
|
||||
commentId: string,
|
||||
vote: FeedbackVoteValue,
|
||||
options?: { allowSharing?: boolean; reason?: string },
|
||||
) => Promise<void>`,signature:{arguments:[{type:{name:"string"},name:"commentId"},{type:{name:"FeedbackVoteValue"},name:"vote"},{type:{name:"signature",type:"object",raw:"{ allowSharing?: boolean; reason?: string }",signature:{properties:[{key:"allowSharing",value:{name:"boolean",required:!1}},{key:"reason",value:{name:"string",required:!1}}]}},name:"options"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},onAdd:{required:!0,tsType:{name:"signature",type:"function",raw:"(body: string, reopen?: boolean, reassignment?: CommentReassignment) => Promise<void>",signature:{arguments:[{type:{name:"string"},name:"body"},{type:{name:"boolean"},name:"reopen"},{type:{name:"CommentReassignment"},name:"reassignment"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},onCancelRun:{required:!1,tsType:{name:"signature",type:"function",raw:"() => Promise<void>",signature:{arguments:[],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},onStopRun:{required:!1,tsType:{name:"signature",type:"function",raw:"(runId: string) => Promise<void>",signature:{arguments:[{type:{name:"string"},name:"runId"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},imageUploadHandler:{required:!1,tsType:{name:"signature",type:"function",raw:"(file: File) => Promise<string>",signature:{arguments:[{type:{name:"File"},name:"file"}],return:{name:"Promise",elements:[{name:"string"}],raw:"Promise<string>"}}},description:""},onAttachImage:{required:!1,tsType:{name:"signature",type:"function",raw:"(file: File) => Promise<void>",signature:{arguments:[{type:{name:"File"},name:"file"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},draftKey:{required:!1,tsType:{name:"string"},description:""},enableReassign:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},reassignOptions:{required:!1,tsType:{name:"Array",elements:[{name:"InlineEntityOption"}],raw:"InlineEntityOption[]"},description:"",defaultValue:{value:"[]",computed:!1}},currentAssigneeValue:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},suggestedAssigneeValue:{required:!1,tsType:{name:"string"},description:""},mentions:{required:!1,tsType:{name:"Array",elements:[{name:"MentionOption"}],raw:"MentionOption[]"},description:"",defaultValue:{value:"[]",computed:!1}},composerDisabledReason:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},showComposer:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showJumpToLatest:{required:!1,tsType:{name:"boolean"},description:""},emptyMessage:{required:!1,tsType:{name:"string"},description:""},variant:{required:!1,tsType:{name:"union",raw:'"full" | "embedded"',elements:[{name:"literal",value:'"full"'},{name:"literal",value:'"embedded"'}]},description:"",defaultValue:{value:'"full"',computed:!1}},enableLiveTranscriptPolling:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},transcriptsByRunId:{required:!1,tsType:{name:"ReadonlyMap",elements:[{name:"string"},{name:"unknown"}],raw:"ReadonlyMap<string, readonly IssueChatTranscriptEntry[]>"},description:""},hasOutputForRun:{required:!1,tsType:{name:"signature",type:"function",raw:"(runId: string) => boolean",signature:{arguments:[{type:{name:"string"},name:"runId"}],return:{name:"boolean"}}},description:""},includeSucceededRunsWithoutOutput:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onInterruptQueued:{required:!1,tsType:{name:"signature",type:"function",raw:"(runId: string) => Promise<void>",signature:{arguments:[{type:{name:"string"},name:"runId"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},onCancelQueued:{required:!1,tsType:{name:"signature",type:"function",raw:"(commentId: string) => void",signature:{arguments:[{type:{name:"string"},name:"commentId"}],return:{name:"void"}}},description:""},interruptingQueuedRunId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},stoppingRunId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},onImageClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(src: string) => void",signature:{arguments:[{type:{name:"string"},name:"src"}],return:{name:"void"}}},description:""},onAcceptInteraction:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
||||
interaction: SuggestTasksInteraction | RequestConfirmationInteraction,
|
||||
selectedClientKeys?: string[],
|
||||
) => Promise<void> | void`,signature:{arguments:[{type:{name:"union",raw:"SuggestTasksInteraction | RequestConfirmationInteraction",elements:[{name:"SuggestTasksInteraction"},{name:"RequestConfirmationInteraction"}]},name:"interaction"},{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"selectedClientKeys"}],return:{name:"union",raw:"Promise<void> | void",elements:[{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"},{name:"void"}]}}},description:""},onRejectInteraction:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
||||
interaction: SuggestTasksInteraction | RequestConfirmationInteraction,
|
||||
reason?: string,
|
||||
) => Promise<void> | void`,signature:{arguments:[{type:{name:"union",raw:"SuggestTasksInteraction | RequestConfirmationInteraction",elements:[{name:"SuggestTasksInteraction"},{name:"RequestConfirmationInteraction"}]},name:"interaction"},{type:{name:"string"},name:"reason"}],return:{name:"union",raw:"Promise<void> | void",elements:[{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"},{name:"void"}]}}},description:""},onSubmitInteractionAnswers:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
||||
interaction: AskUserQuestionsInteraction,
|
||||
answers: AskUserQuestionsAnswer[],
|
||||
) => Promise<void> | void`,signature:{arguments:[{type:{name:"AskUserQuestionsInteraction"},name:"interaction"},{type:{name:"Array",elements:[{name:"AskUserQuestionsAnswer"}],raw:"AskUserQuestionsAnswer[]"},name:"answers"}],return:{name:"union",raw:"Promise<void> | void",elements:[{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"},{name:"void"}]}}},description:""},composerRef:{required:!1,tsType:{name:"Ref",elements:[{name:"IssueChatComposerHandle"}],raw:"Ref<IssueChatComposerHandle>"},description:""}}};export{Tu as I,fs as a,Zs as r,Jo as u};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{c as m,j as e,Q as f,L as I,w as j,U,m as E}from"./iframe-aoIC7NDi.js";import{X as V}from"./x-CIQWKcou.js";function k({issue:s,strikethrough:c,className:t,children:a}){const l=s.identifier??s.title,o=m("paperclip-mention-chip paperclip-mention-chip--issue","inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs no-underline",s.identifier&&"hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",c&&"opacity-60 line-through decoration-muted-foreground",t),r=e.jsxDEV(e.Fragment,{children:[s.status?e.jsxDEV(f,{status:s.status,className:"h-3 w-3 shrink-0"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferencePill.tsx",lineNumber:29,columnNumber:23},this):null,a!==void 0?a:e.jsxDEV("span",{children:s.identifier??s.title},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferencePill.tsx",lineNumber:30,columnNumber:44},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferencePill.tsx",lineNumber:28,columnNumber:5},this);return s.identifier?e.jsxDEV(I,{to:`/issues/${l}`,"data-mention-kind":"issue",className:o,title:s.title,"aria-label":`Issue ${l}: ${s.title}`,children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferencePill.tsx",lineNumber:48,columnNumber:5},this):e.jsxDEV("span",{"data-mention-kind":"issue",className:o,title:s.title,"aria-label":`Issue: ${s.title}`,children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferencePill.tsx",lineNumber:36,columnNumber:7},this)}k.__docgenInfo={description:"",methods:[],displayName:"IssueReferencePill",props:{issue:{required:!0,tsType:{name:"intersection",raw:`Pick<IssueRelationIssueSummary, "id" | "identifier" | "title"> &
|
||||
Partial<Pick<IssueRelationIssueSummary, "status">>`,elements:[{name:"Pick",elements:[{name:"IssueRelationIssueSummary"},{name:"union",raw:'"id" | "identifier" | "title"',elements:[{name:"literal",value:'"id"'},{name:"literal",value:'"identifier"'},{name:"literal",value:'"title"'}]}],raw:'Pick<IssueRelationIssueSummary, "id" | "identifier" | "title">'},{name:"Partial",elements:[{name:"Pick",elements:[{name:"IssueRelationIssueSummary"},{name:"literal",value:'"status"'}],raw:'Pick<IssueRelationIssueSummary, "status">'}],raw:'Partial<Pick<IssueRelationIssueSummary, "status">>'}]},description:""},strikethrough:{required:!1,tsType:{name:"boolean"},description:""},className:{required:!1,tsType:{name:"string"},description:""},children:{required:!1,tsType:{name:"ReactNode"},description:""}}};function P({issue:s,issueLinkState:c,selected:t=!1,mobileLeading:a,desktopMetaLeading:l,desktopLeadingSpacer:o=!1,mobileMeta:r,desktopTrailing:N,trailingMeta:d,titleSuffix:g,unreadState:u=null,onMarkRead:n,onArchive:p,archiveDisabled:v,className:y}){const b=s.identifier??s.id,w=s.identifier??s.id.slice(0,8),D=u!==null,R=u==="visible"||u==="fading",x=t?"!text-muted-foreground !border-muted-foreground":void 0,h=j(c,s);return e.jsxDEV(I,{to:E(b),state:h,disableIssueQuicklook:!0,issuePrefetch:s,"data-inbox-issue-link":!0,onClickCapture:()=>U(b,h),className:m("group flex items-start gap-2 border-b border-border py-2.5 pl-2 pr-3 text-sm no-underline text-inherit transition-colors last:border-b-0 sm:items-center sm:py-2 sm:pl-1",t?"hover:bg-transparent":"hover:bg-accent/50",y),children:[e.jsxDEV("span",{className:"shrink-0 pt-px sm:hidden",children:a??e.jsxDEV(f,{status:s.status,className:x},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:72,columnNumber:27},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:71,columnNumber:7},this),e.jsxDEV("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:contents",children:[e.jsxDEV("span",{className:"line-clamp-2 text-sm sm:order-2 sm:min-w-0 sm:flex-1 sm:truncate sm:line-clamp-none",children:[s.title,g]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:75,columnNumber:9},this),e.jsxDEV("span",{className:"flex items-center gap-2 sm:order-1 sm:shrink-0",children:[o?e.jsxDEV("span",{className:"hidden w-3.5 shrink-0 sm:block"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:80,columnNumber:13},this):null,l??e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"hidden shrink-0 sm:inline-flex",children:e.jsxDEV(f,{status:s.status,className:x},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:85,columnNumber:17},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:84,columnNumber:15},this),e.jsxDEV("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:w},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:87,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:83,columnNumber:13},this),r?e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"text-xs text-muted-foreground sm:hidden","aria-hidden":"true",children:"·"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:94,columnNumber:15},this),e.jsxDEV("span",{className:"text-xs text-muted-foreground sm:hidden",children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:97,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:93,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:74,columnNumber:7},this),N||d?e.jsxDEV("span",{className:"ml-auto hidden shrink-0 items-center gap-2 sm:order-3 sm:flex sm:gap-3",children:[N,d?e.jsxDEV("span",{className:"text-xs text-muted-foreground",children:d},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:106,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueRow.tsx",lineNumber:103,columnNumber:9},this):null,D?e.jsxDEV("span",{className:"inline-flex h-4 w-4 shrink-0 items-center justify-center self-center",children:R?e.jsxDEV("button",{type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),n==null||n()},onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopPropagation(),n==null||n())},className:m("inline-flex h-4 w-4 items-center justify-center rounded-full transition-colors",t?"hover:bg-muted/80":"hover:bg-blue-500/20"),"aria-label":"Mark as read",children:e.jsxDEV("span",{className:m("block h-2 w-2 rounded-full transition-opacity duration
Line truncated
|
||||
@@ -0,0 +1,47 @@
|
||||
import{V as ee,r as c,h as R,q as z,j as s,B as V,L as _,c as Q,W as se}from"./iframe-aoIC7NDi.js";import{e as re}from"./execution-workspaces-B_BR86BY.js";import{G as K,i as ae}from"./AgentIconPicker-B29UI7uB.js";import{S as N}from"./skeleton-B0nw-fyt.js";import{X as te}from"./x-CIQWKcou.js";import{c as oe}from"./createLucideIcon-D2uUVdtm.js";import{F as ne}from"./folder-open-D-CLSWj-.js";import{C as ie}from"./dialog-6DTSoM1_.js";import{C as ce}from"./copy-CPgBejOM.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const le=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ue=oe("pencil",le),pe=[{value:"shared_workspace",label:"Project default"},{value:"isolated_workspace",label:"New isolated workspace"},{value:"reuse_existing",label:"Reuse existing workspace"}];function de(e){return e==="isolated_workspace"||e==="operator_branch"||e==="shared_workspace"?e:e==="adapter_managed"||e==="cloud_sandbox"?"agent_default":"shared_workspace"}function me(e){var o,n;const r=((o=e.currentExecutionWorkspace)==null?void 0:o.mode)??((n=e.executionWorkspaceSettings)==null?void 0:n.mode)??e.executionWorkspacePreference;return!!(e.executionWorkspaceId&&(r==="isolated_workspace"||r==="operator_branch"))}function xe(e){var o;const r=(o=e==null?void 0:e.executionWorkspacePolicy)!=null&&o.enabled?e.executionWorkspacePolicy.defaultMode:null;return r==="isolated_workspace"||r==="operator_branch"?r:r==="adapter_default"?"agent_default":"shared_workspace"}function g({text:e}){const r=[],o=e.split(new RegExp("(?<=[\\/-])"));for(let n=0;n<o.length;n++)n>0&&r.push(s.jsxDEV("wbr",{},n,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:61,columnNumber:27},this)),r.push(o[n]);return s.jsxDEV(s.Fragment,{children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:64,columnNumber:10},this)}function P({value:e,label:r,mono:o}){const[n,d]=c.useState(!1),m=c.useRef(void 0),w=c.useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),clearTimeout(m.current),m.current=setTimeout(()=>d(!1),1500)}catch{}},[e]);return s.jsxDEV("span",{className:"inline-flex items-center gap-1 group/copy",children:[r&&s.jsxDEV("span",{className:"text-muted-foreground",children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:81,columnNumber:17},this),s.jsxDEV("span",{className:Q("min-w-0",o&&"font-mono"),style:{overflowWrap:"anywhere"},children:s.jsxDEV(g,{text:e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:83,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:82,columnNumber:7},this),s.jsxDEV("button",{type:"button",className:"shrink-0 p-0.5 rounded hover:bg-accent/50 transition-colors text-muted-foreground hover:text-foreground opacity-0 group-hover/copy:opacity-100 focus:opacity-100",onClick:w,title:n?"Copied!":"Copy",children:n?s.jsxDEV(ie,{className:"h-3 w-3 text-green-500"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:91,columnNumber:19},this):s.jsxDEV(ce,{className:"h-3 w-3"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:91,columnNumber:66},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:85,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:80,columnNumber:5},this)}function fe(e){switch(e){case"isolated_workspace":return"Isolated workspace";case"operator_branch":return"Operator branch";case"cloud_sandbox":return"Cloud sandbox";case"adapter_managed":return"Adapter managed";default:return"Workspace"}}function Ne(e,r){switch(e){case"isolated_workspace":return"New isolated workspace";case"reuse_existing":return(r==null?void 0:r.mode)==="isolated_workspace"?"Existing isolated workspace":"Reuse existing workspace";default:return"Project default"}}function ke(e){return!e.projectId||!e.projectWorkspaceId?null:se({id:e.projectId,urlKey:e.projectId},e.projectWorkspaceId)}function G(e){var o,n;const r=((o=e.workspace)==null?void 0:o.projectWorkspaceId)??e.issueProjectWorkspaceId??null;return((n=e.workspace)==null?void 0:n.mode)==="shared_workspace"?ke({projectId:e.projectId,projectWorkspaceId:r}):e.workspace?`/execution-workspaces/${e.workspace.id}`:null}function X(e){const r={active:"bg-green-500/15 text-green-700 dark:text-green-400",idle:"bg-muted text-muted-foreground",in_review:"bg-blue-500/15 text-blue-700 dark:text-blue-400",archived:"bg-muted text-muted-foreground"};return s.jsxDEV("span",{className:Q("text-[10px] px-1.5 py-0.5 rounded-full font-medium",r[e]??r.idle),children:e.replace(/_/g," ")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsx",lineNumber:154,columnNumber:5},this)}function be(){return s.jsxDEV("div",{className:"rounded-lg border border-border p-3 space-y-3","data-testid":"issue-workspace-card-skeleton",children:[s.jsxDEV("div",{className:"flex items-center justify-between gap-2",children:[s.jsxDEV("div",{className:"flex items-center gap-2",children:[s.jsxDEV(N,{className:"h-4 w-4 rounded-full"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueWorkspaceCard.tsxLine truncated
|
||||
Pick<
|
||||
Issue,
|
||||
| "companyId"
|
||||
| "projectId"
|
||||
| "projectWorkspaceId"
|
||||
| "executionWorkspaceId"
|
||||
| "executionWorkspacePreference"
|
||||
| "executionWorkspaceSettings"
|
||||
>,
|
||||
"companyId"
|
||||
> & {
|
||||
companyId: string | null;
|
||||
currentExecutionWorkspace?: ExecutionWorkspace | null;
|
||||
}`,elements:[{name:"Omit",elements:[{name:"Pick",elements:[{name:"Issue"},{name:"union",raw:`| "companyId"
|
||||
| "projectId"
|
||||
| "projectWorkspaceId"
|
||||
| "executionWorkspaceId"
|
||||
| "executionWorkspacePreference"
|
||||
| "executionWorkspaceSettings"`,elements:[{name:"literal",value:'"companyId"'},{name:"literal",value:'"projectId"'},{name:"literal",value:'"projectWorkspaceId"'},{name:"literal",value:'"executionWorkspaceId"'},{name:"literal",value:'"executionWorkspacePreference"'},{name:"literal",value:'"executionWorkspaceSettings"'}]}],raw:`Pick<
|
||||
Issue,
|
||||
| "companyId"
|
||||
| "projectId"
|
||||
| "projectWorkspaceId"
|
||||
| "executionWorkspaceId"
|
||||
| "executionWorkspacePreference"
|
||||
| "executionWorkspaceSettings"
|
||||
>`},{name:"literal",value:'"companyId"'}],raw:`Omit<
|
||||
Pick<
|
||||
Issue,
|
||||
| "companyId"
|
||||
| "projectId"
|
||||
| "projectWorkspaceId"
|
||||
| "executionWorkspaceId"
|
||||
| "executionWorkspacePreference"
|
||||
| "executionWorkspaceSettings"
|
||||
>,
|
||||
"companyId"
|
||||
>`},{name:"signature",type:"object",raw:`{
|
||||
companyId: string | null;
|
||||
currentExecutionWorkspace?: ExecutionWorkspace | null;
|
||||
}`,signature:{properties:[{key:"companyId",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"currentExecutionWorkspace",value:{name:"union",raw:"ExecutionWorkspace | null",elements:[{name:"ExecutionWorkspace"},{name:"null"}],required:!1}}]}}]},description:""},project:{required:!0,tsType:{name:"union",raw:"{ id: string; executionWorkspacePolicy?: { enabled?: boolean; defaultMode?: string | null; defaultProjectWorkspaceId?: string | null } | null; workspaces?: Array<{ id: string; isPrimary: boolean }> } | null",elements:[{name:"signature",type:"object",raw:"{ id: string; executionWorkspacePolicy?: { enabled?: boolean; defaultMode?: string | null; defaultProjectWorkspaceId?: string | null } | null; workspaces?: Array<{ id: string; isPrimary: boolean }> }",signature:{properties:[{key:"id",value:{name:"string",required:!0}},{key:"executionWorkspacePolicy",value:{name:"union",raw:"{ enabled?: boolean; defaultMode?: string | null; defaultProjectWorkspaceId?: string | null } | null",elements:[{name:"signature",type:"object",raw:"{ enabled?: boolean; defaultMode?: string | null; defaultProjectWorkspaceId?: string | null }",signature:{properties:[{key:"enabled",value:{name:"boolean",required:!1}},{key:"defaultMode",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"defaultProjectWorkspaceId",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}}]}},{name:"null"}],required:!1}},{key:"workspaces",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: string; isPrimary: boolean }",signature:{properties:[{key:"id",value:{name:"string",required:!0}},{key:"isPrimary",value:{name:"boolean",required:!0}}]}}],raw:"Array<{ id: string; isPrimary: boolean }>",required:!1}}]}},{name:"null"}]},description:""},onUpdate:{required:!0,tsType:{name:"signature",type:"function",raw:"(data: Record<string, unknown>) => void",signature:{arguments:[{type:{name:"Record",elements:[{name:"string"},{name:"unknown"}],raw:"Record<string, unknown>"},name:"data"}],return:{name:"void"}}},description:""},initialEditing:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},livePreview:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDraftChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(data: Record<string, unknown>, meta: { canSave: boolean; workspaceBranchName?: string | null }) => void",signature:{arguments:[{type:{name:"Record",elements:[{name:"string"},{name:"unknown"}],raw:"Record<string, unknown>"},name:"data"},{type:{name:"signature",type:"object",raw:"{ canSave: boolean; workspaceBranchName?: string | null }",signature:{properties:[{key:"canSave",value:{name:"boolean",required:!0}},{key:"workspaceBranchName",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}}]}},name:"meta"}],return:{name:"void"}}},description:""}}};export{he as I};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as a,j as o,P as n,b as u,d as l,I as c,w as p,m as d}from"./iframe-aoIC7NDi.js";function m({issue:s,children:t}){const[r,e]=a.useState(!1);return o.jsxDEV(n,{open:r,onOpenChange:e,children:[o.jsxDEV(u,{asChild:!0,onMouseEnter:()=>e(!0),onMouseLeave:()=>e(!1),children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssuesQuicklook.tsx",lineNumber:17,columnNumber:7},this),o.jsxDEV(l,{className:"w-72 p-3",side:"top",align:"start",onMouseEnter:()=>e(!0),onMouseLeave:()=>e(!1),onOpenAutoFocus:i=>i.preventDefault(),children:o.jsxDEV(c,{issue:s,linkTo:d(s.identifier??s.id),linkState:p(null,s)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssuesQuicklook.tsx",lineNumber:32,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssuesQuicklook.tsx",lineNumber:24,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssuesQuicklook.tsx",lineNumber:16,columnNumber:5},this)}m.__docgenInfo={description:"",methods:[],displayName:"IssuesQuicklook",props:{issue:{required:!0,tsType:{name:"Issue"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};export{m as I};
|
||||
@@ -0,0 +1,21 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-BRRy2yZG.js","./preload-helper-Dp1pzeXC.js","./iframe-aoIC7NDi.js","./iframe-CAdr9hwF.css","./index-DrFu-skq.js"])))=>i.map(i=>d[i]);
|
||||
import{_ as ht}from"./preload-helper-Dp1pzeXC.js";import{aa as Nn,N as he,bu as dt,j as E,c as Le,bx as gt,h as yt,L as wt,Q as kt,r as Z,by as xt,a7 as bt,q as vt}from"./iframe-aoIC7NDi.js";import{Q as P,R as rn,V as Be,S as p,W as ee,X as St,Y as Et,Z as Dn,_ as Me,$ as Ct,a0 as At,a1 as ln,a2 as W,a3 as ze,a4 as re,a5 as Pt,a6 as Nt,a7 as Dt,a8 as Lt,a9 as Mt,aa as Tt,ab as ne,ac as O,ad as Rt,ae as _,af as Ot,ag as Ln,ah as ce,ai as It,aj as Ft,ak as jt,al as _t,am as Mn,an as Bt}from"./MarkdownEditor-BtfKiA3v.js";import{c as zt}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ut=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Vt=zt("github",Ut);function qt(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Ht=/[ \t\n\f\r]/g;function Wt(e){return typeof e=="object"?e.type==="text"?on(e.value):!1:on(e)}function on(e){return e.replace(Ht,"")===""}class le{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}le.prototype.normal={};le.prototype.property={};le.prototype.space=void 0;function Tn(e,n){const t={},r={};for(const l of e)Object.assign(t,l.property),Object.assign(r,l.normal);return new le(t,r,n)}function Te(e){return e.toLowerCase()}class D{constructor(n,t){this.attribute=t,this.property=n}}D.prototype.attribute="";D.prototype.booleanish=!1;D.prototype.boolean=!1;D.prototype.commaOrSpaceSeparated=!1;D.prototype.commaSeparated=!1;D.prototype.defined=!1;D.prototype.mustUseProperty=!1;D.prototype.number=!1;D.prototype.overloadedBoolean=!1;D.prototype.property="";D.prototype.spaceSeparated=!1;D.prototype.space=void 0;let $t=0;const w=U(),C=U(),Re=U(),d=U(),S=U(),H=U(),L=U();function U(){return 2**++$t}const Oe=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:C,commaOrSpaceSeparated:L,commaSeparated:H,number:d,overloadedBoolean:Re,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),de=Object.keys(Oe);class Ue extends D{constructor(n,t,r,l){let o=-1;if(super(n,t),an(this,"space",l),typeof r=="number")for(;++o<de.length;){const i=de[o];an(this,de[o],(r&Oe[i])===Oe[i])}}}Ue.prototype.defined=!0;function an(e,n,t){t&&(e[n]=t)}function $(e){const n={},t={};for(const[r,l]of Object.entries(e.properties)){const o=new Ue(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Te(r)]=r,t[Te(o.attribute)]=r}return new le(n,t,e.space)}const Rn=$({properties:{ariaActiveDescendant:null,ariaAtomic:C,ariaAutoComplete:null,ariaBusy:C,ariaChecked:C,ariaColCount:d,ariaColIndex:d,ariaColSpan:d,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:C,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:C,ariaFlowTo:S,ariaGrabbed:C,ariaHasPopup:null,ariaHidden:C,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:d,ariaLive:null,ariaModal:C,ariaMultiLine:C,ariaMultiSelectable:C,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:d,ariaPressed:C,ariaReadOnly:C,ariaRelevant:null,ariaRequired:C,ariaRoleDescription:S,ariaRowCount:d,ariaRowIndex:d,ariaRowSpan:d,ariaSelected:C,ariaSetSize:d,ariaSort:null,ariaValueMax:d,ariaValueMin:d,ariaValueNow:d,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function On(e,n){return n in e?e[n]:n}function In(e,n){return On(e,n.toLowerCase())}const Xt=$({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:H,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:S,autoFocus:w,autoPlay:w,blocking:S,capture:null,charSet:null,checked:w,cite:null,className:S,cols:d,colSpan:null,content:null,contentEditable:C,controls:w,controlsList:S,coords:d|H,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:Re,draggable:C,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:S,height:d,hidden:Re,high:d,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:S,itemRef:S,itemScope:w,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:d,manifest:null,max:null,maxLength:d,media:null,method:null,min:null,minLength:d,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,Line truncated
|
||||
`,c="/",u="*",s="",m="comment",g="declaration";function h(y,A){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];A=A||{};var b=1,N=1;function B(v){var x=v.match(n);x&&(b+=x.length);var T=v.lastIndexOf(f);N=~T?v.length-T:N+v.length}function oe(){var v={line:b,column:N};return function(x){return x.position=new M(v),en(),x}}function M(v){this.start=v,this.end={line:b,column:N},this.source=A.source}M.prototype.content=y;function Qe(v){var x=new Error(A.source+":"+b+":"+N+": "+v);if(x.reason=v,x.filename=A.source,x.line=b,x.column=N,x.source=y,!A.silent)throw x}function G(v){var x=v.exec(y);if(x){var T=x[0];return B(T),y=y.slice(T.length),x}}function en(){G(t)}function nn(v){var x;for(v=v||[];x=tn();)x!==!1&&v.push(x);return v}function tn(){var v=oe();if(!(c!=y.charAt(0)||u!=y.charAt(1))){for(var x=2;s!=y.charAt(x)&&(u!=y.charAt(x)||c!=y.charAt(x+1));)++x;if(x+=2,s===y.charAt(x-1))return Qe("End of comment missing");var T=y.slice(2,x-2);return N+=2,B(T),y=y.slice(x),N+=2,v({type:m,comment:T})}}function ft(){var v=oe(),x=G(r);if(x){if(tn(),!G(l))return Qe("property missing ':'");var T=G(o),mt=v({type:g,property:k(x[0].replace(e,s)),value:T?k(T[0].replace(e,s)):s});return G(i),mt}}function pt(){var v=[];nn(v);for(var x;x=ft();)x!==!1&&(v.push(x),nn(v));return v}return en(),pt()}function k(y){return y?y.replace(a,s):s}return ge=h,ge}var cn;function lr(){if(cn)return V;cn=1;var e=V&&V.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(V,"__esModule",{value:!0}),V.default=t;const n=e(rr());function t(r,l){let o=null;if(!r||typeof r!="string")return o;const i=(0,n.default)(r),a=typeof l=="function";return i.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:u}=f;a?l(c,u,f):u&&(o=o||{},o[c]=u)}),o}return V}var Y={},fn;function ir(){if(fn)return Y;fn=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(c){return!c||t.test(c)||e.test(c)},i=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},f=function(c,u){return u===void 0&&(u={}),o(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(l,a):c=c.replace(r,a),c.replace(n,i))};return Y.camelCase=f,Y}var K,pn;function or(){if(pn)return K;pn=1;var e=K&&K.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(lr()),t=ir();function r(l,o){var i={};return!l||typeof l!="string"||(0,n.default)(l,function(a,f){a&&f&&(i[(0,t.camelCase)(a,o)]=f)}),i}return r.default=r,K=r,K}var ar=or();const sr=Nn(ar),Bn=zn("end"),qe=zn("start");function zn(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ur(e){const n=qe(e),t=Bn(e);if(n&&t)return{start:n,end:t}}const He={}.hasOwnProperty,cr=new Map,fr=/[A-Z]/g,pr=new Set(["table","tbody","thead","tfoot","tr"]),mr=new Set(["td","th"]),Un="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hr(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=vr(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=br(t,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Ve:nr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Vn(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Vn(e,n,t){if(n.type==="element")return dr(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return gr(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return wr(e,n,t);if(n.type==="mdxjsEsm")return yr(e,n);if(n.type==="root")return kr(e,n,t);if(n.type==="text")return xr(e,n)}function dr(e,n,t){const r=e.schema;let l=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(l=Ve,e.schema=l),e.ancestors.push(n);const o=Hn(e,n.tagName,!1),i=Sr(e,n);let a=$e(e,n);return pr.has(n.tagName)&&(a=a.filter(function(f){return typeof f=="string"?!Wt(f):!0})),qn(e,i,o,n),We(i,a),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function gr(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return P(r.type==="ExpressionStatement"),e.evaluater.evaluateExpression(r.expre
Line truncated
|
||||
`}]}function Rr(e,n){const t=n.value?n.value+`
|
||||
`:"",r={},l=n.lang?n.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function Or(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ir(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Fr(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),l=X(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,a+=1,e.footnoteCounts.set(r,a);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+l,id:t+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function jr(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function _r(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Wn(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const l=e.all(n),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const i=l[l.length-1];return i&&i.type==="text"?i.value+=r:l.push({type:"text",value:r}),l}function Br(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Wn(e,n);const l={src:X(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(l.title=r.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(n,o),e.applyData(n,o)}function zr(e,n){const t={src:X(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Ur(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Vr(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Wn(e,n);const l={href:X(r.url||"")};r.title!==null&&r.title!==void 0&&(l.title=r.title);const o={type:"element",tagName:"a",properties:l,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function qr(e,n){const t={href:X(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Hr(e,n,t){const r=e.all(n),l=t?Wr(t):$n(n),o={},i=[];if(typeof n.checked=="boolean"){const u=r[0];let s;u&&u.type==="element"&&u.tagName==="p"?s=u:(s={type:"element",tagName:"p",properties:{},children:[]},r.unshift(s)),s.children.length>0&&s.children.unshift({type:"text",value:" "}),s.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(l||a!==0||u.type!=="element"||u.tagName!=="p")&&i.push({type:"text",value:`
|
||||
`}),u.type==="element"&&u.tagName==="p"&&!l?i.push(...u.children):i.push(u)}const f=r[r.length-1];f&&(l||f.type!=="element"||f.tagName!=="p")&&i.push({type:"text",value:`
|
||||
`});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(n,c),e.applyData(n,c)}function Wr(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=$n(t[r])}return n}function $n(e){const n=e.spread;return n??e.children.length>1}function $r(e,n){const t={},r=e.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++l<r.length;){const i=r[l];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function Xr(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Gr(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Yr(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Kr(e,n){const t=e.all(n),r=t.shift(),l=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],i),l.push(i)}if(t.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=qe(n.children[1]),f=Bn(n.children[n.children.length-1]);a&&f&&(i.position={start:a,end:f}),l.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(n,o),e.applyData(n,o)}function Jr(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",i=t&&t.type==="table"?t.align:void 0,a=i?i.length:n.children.length;let f=-1;const c=[];for(;++f<a;){const s=n.children[f],m={},g=i?i[f]:void 0;g&&(m.align=g);let h={type:"element",tagName:o,properties:m,children:[]};s&&(h.children=e.all(s),e.patch(s,h),h=e.applyData(s,h)),c.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(n,u),e.applyData(n,u)}function Zr(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const mn=9,hn=32;function Qr(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),l=0;const o=[];for(;r;)o.push(dn(n.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=t.exec(n);return o.push(dn(n.slice(l),l>0,!1)),o.join("")}function dn(e,n,t){let r=0,l=e.length;if(n){let o=e.codePointAt(r);for(;o===mn||o===hn;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(l-1);for(;o===mn||o===hn;)l--,o=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}function el(e,n){const t={type:"text",value:Qr(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function nl(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const tl={blockquote:Mr,break:Tr,code:Rr,delete:Or,emphasis:Ir,footnoteReference:Fr,heading:jr,html:_r,imageReference:Br,image:zr,inlineCode:Ur,linkReference:Vr,link:qr,listItem:Hr,list:$r,paragraph:Xr,root:Gr,strong:Yr,table:Kr,tableCell:Zr,tableRow:Jr,text:el,thematicBreak:nl,toml:ae,yaml:ae,definition:ae,footnoteDefinition:ae};function ae(){}const Xn=-1,me=0,Q=1,fe=2,Xe=3,Ge=4,Ye=5,Ke=6,Gn=7,Yn=8,gn=typeof self=="object"?self:globalThis,rl=(e,n)=>{const t=(l,o)=>(e.set(o,l),l),r=l=>{if(e.has(l))return e.get(l);const[o,i]=n[l];switch(o){case me:case Xn:return t(i,l);case Q:{const a=t([],l);for(const f of i)a.push(r(f));return a}case fe:{const a=t({},l);for(const[f,c]of i)a[r(f)]=r(c);return a}case Xe:return t(new Date(i),l);case Ge:{const{source:a,flags:f}=i;return t(new RegExp(a,f),l)}case Ye:{const a=t(new Map,l);for(const[f,c]of i)a.set(r(f),r(c));return a}case Ke:{const a=t(new Set,l);for(const f of i)a.add(r(f));return a}case Gn:{const{name:a,message:f}=i;return t(new gn[a](f),l)}case Yn:return t(BigInt(i),l);case"BigInt":return t(Object(BigInt(i)),l);case"ArrayBuffer":return t(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:a}=new Uint8Array(i);return t(new DataView(a),i)}}return t(new gn[o](i),l)};return r},yn=e=>rl(new Map,e)(0),q="",{toString:ll}={},{keys:il}=Object,J=e=>{const n=typeof e;if(n!=="object"||!e)return[me,n];const t=ll.call(e).slice(8,-1);switch(t){case"Array":return[Q,q];case"Object":return[fe,q];case"Date":return[Xe,q];case"RegExp":return[Ge,q];case"Map":return[Ye,q];case"Set":return[Ke,q];case"DataView":return[Q,t]}return t.includes("Array")?[Q,t]:t.includes("Error")?[Gn,t]:[fe,t]},se=([e,n])=>e===me&&(n==="function"||n==="symbol"),ol=(e,n,t,r)=>{const l=(i,a)=>{const f=r.push(i)-1;return t.set(a,f),f},o=i=>{if(t.has(i))return t.get(i);let[a,f]=J(i);switch(a){case me:{let u=i;switch(f){case"bigint":a=Yn,u=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);u=null;break;case"undefined":return l([Xn],i)}return l([a,u],i)}case Q:{if(f){let m=i;return f==="DataView"?m=new Uint8Array(i.buffer):f==="ArrayBuffer"&&(m=new Uint8Array(i)),l([f,[...m]
Line truncated
|
||||
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
||||
`}]}}const Ie={}.hasOwnProperty,cl={};function fl(e,n){const t=n||cl,r=new Map,l=new Map,o=new Map,i={...tl,...t.handlers},a={all:c,applyData:ml,definitionById:r,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:i,one:f,options:t,patch:pl,wrap:dl};return Dn(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const s=u.type==="definition"?r:l,m=String(u.identifier).toUpperCase();s.has(m)||s.set(m,u)}}),a;function f(u,s){const m=u.type,g=a.handlers[m];if(Ie.call(a.handlers,m)&&g)return g(a,u,s);if(a.options.passThrough&&a.options.passThrough.includes(m)){if("children"in u){const{children:k,...y}=u,A=pe(y);return A.children=a.all(u),A}return pe(u)}return(a.options.unknownHandler||hl)(a,u,s)}function c(u){const s=[];if("children"in u){const m=u.children;let g=-1;for(;++g<m.length;){const h=a.one(m[g],u);if(h){if(g&&m[g-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=kn(h.value)),!Array.isArray(h)&&h.type==="element")){const k=h.children[0];k&&k.type==="text"&&(k.value=kn(k.value))}Array.isArray(h)?s.push(...h):s.push(h)}}}return s}}function pl(e,n){e.position&&(n.position=ur(e))}function ml(e,n){let t=n;if(e&&e.data){const r=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const i="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:i}}t.type==="element"&&o&&Object.assign(t.properties,pe(o)),"children"in t&&t.children&&l!==null&&l!==void 0&&(t.children=l)}return t}function hl(e,n){const t=n.data||{},r="value"in n&&!(Ie.call(t,"hProperties")||Ie.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function dl(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
||||
`});++r<e.length;)r&&t.push({type:"text",value:`
|
||||
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
||||
`}),t}function kn(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function xn(e,n){const t=fl(e,n),r=t.one(e,void 0),l=ul(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return l&&(P("children"in o),o.children.push({type:"text",value:`
|
||||
`},l)),o}function gl(e,n){return e&&"run"in e?async function(t,r){const l=xn(t,{file:r,...n});await e.run(l,r)}:function(t,r){return xn(t,{file:r,...e||n})}}function bn(e){if(e)throw e}var we,vn;function yl(){if(vn)return we;vn=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,l=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},o=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var u=e.call(c,"constructor"),s=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!s)return!1;var m;for(m in c);return typeof m>"u"||e.call(c,m)},i=function(c,u){t&&u.name==="__proto__"?t(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},a=function(c,u){if(u==="__proto__")if(e.call(c,u)){if(r)return r(c,u).value}else return;return c[u]};return we=function f(){var c,u,s,m,g,h,k=arguments[0],y=1,A=arguments.length,b=!1;for(typeof k=="boolean"&&(b=k,k=arguments[1]||{},y=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});y<A;++y)if(c=arguments[y],c!=null)for(u in c)s=a(k,u),m=a(c,u),k!==m&&(b&&m&&(o(m)||(g=l(m)))?(g?(g=!1,h=s&&l(s)?s:[]):h=s&&o(s)?s:{},i(k,{name:u,newValue:f(b,h,m)})):typeof m<"u"&&i(k,{name:u,newValue:m}));return k},we}var wl=yl();const ke=Nn(wl);function Fe(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kl(){const e=[],n={run:t,use:r};return n;function t(...l){let o=-1;const i=l.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);a(null,...l);function a(f,...c){const u=e[++o];let s=-1;if(f){i(f);return}for(;++s<l.length;)(c[s]===null||c[s]===void 0)&&(c[s]=l[s]);l=c,u?xl(u,a)(...c):i(null,...c)}}function r(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),n}}function xl(e,n){let t;return r;function r(...i){const a=e.length>i.length;let f;a&&i.push(l);try{f=e.apply(this,i)}catch(c){const u=c;if(a&&t)throw u;return l(u)}a||(f&&f.then&&typeof f.then=="function"?f.then(o,l):f instanceof Error?l(f):o(f))}function l(i,...a){t||(t=!0,n(i,...a))}function o(i){l(null,i)}}const R={basename:bl,dirname:vl,extname:Sl,join:El,sep:"/"};function bl(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ie(e);let t=0,r=-1,l=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){t=l+1;break}}else r<0&&(o=!0,r=l+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let i=-1,a=n.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){t=l+1;break}}else i<0&&(o=!0,i=l+1),a>-1&&(e.codePointAt(l)===n.codePointAt(a--)?a<0&&(r=l):(a=-1,r=i));return t===r?r=i:r<0&&(r=e.length),e.slice(t,r)}function vl(e){if(ie(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Sl(e){ie(e);let n=e.length,t=-1,r=0,l=-1,o=0,i;for(;n--;){const a=e.codePointAt(n);if(a===47){if(i){r=n+1;break}continue}t<0&&(i=!0,t=n+1),a===46?l<0?l=n:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||t<0||o===0||o===1&&l===t-1&&l===r+1?"":e.slice(l,t)}function El(...e){let n=-1,t;for(;++n<e.length;)ie(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Cl(t)}function Cl(e){ie(e);const n=e.codePointAt(0)===47;let t=Al(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Al(e,n){let t="",r=0,l=-1,o=0,i=-1,a,f;for(;++i<=e.length;){if(i<e.length)a=e.codePointAt(i);else{if(a===47)break;a=47}if(a===47){if(!(l===i-1||o===1))if(l!==i-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",r=0):(t=t.slice(0,f),r=t.length-1-t.lastIndexOf("/")),l=i,o=0;continue}}else if(t.length>0){t="",r=0,l=i,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(l+1,i):t=e.slice(l+1,i),r=i-l-1;l=i,o=0}else a===46&&o>-1?o++:o=-1}return t}function ie(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Pl={cwd:Nl};function Nl(){return"/"}function je(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Dl(e){if(typeof e=="string")e=new URL(e);else if(!je(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Ll(e)}function Ll(e){if(e.hostname!==""){consLine truncated
|
||||
`:" ")+o.indentLines(o.containerFlow(r,a.current()),n?et:ki))),c(),f}}function ki(e,n,t){return n===0?e:et(e,n,t)}function et(e,n,t){return(t?"":" ")+e}function xi(){return[Kl(),yi(),Pt(),Nt(),Dt()]}function bi(e){return{extensions:[Jl(),wi(e),Lt(),Mt(e),Tt()]}}const vi={tokenize:Ni,partial:!0},nt={tokenize:Di,partial:!0},tt={tokenize:Li,partial:!0},rt={tokenize:Mi,partial:!0},Si={tokenize:Ti,partial:!0},lt={name:"wwwAutolink",tokenize:Ai,previous:ot},it={name:"protocolAutolink",tokenize:Pi,previous:at},j={name:"emailAutolink",tokenize:Ci,previous:st},I={};function Ei(){return{text:I}}let z=p.digit0;for(;z<p.leftCurlyBrace;)I[z]=j,z++,z===p.colon?z=p.uppercaseA:z===p.leftSquareBracket&&(z=p.lowercaseA);I[p.plusSign]=j;I[p.dash]=j;I[p.dot]=j;I[p.underscore]=j;I[p.uppercaseH]=[j,it];I[p.lowercaseH]=[j,it];I[p.uppercaseW]=[j,lt];I[p.lowercaseW]=[j,lt];function Ci(e,n,t){const r=this;let l,o;return i;function i(s){return!_e(s)||!st.call(r,r.previous)||Ze(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(s))}function a(s){return _e(s)?(e.consume(s),a):s===p.atSign?(e.consume(s),f):t(s)}function f(s){return s===p.dot?e.check(Si,u,c)(s):s===p.dash||s===p.underscore||ee(s)?(o=!0,e.consume(s),f):u(s)}function c(s){return e.consume(s),l=!0,f}function u(s){return o&&l&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(s)):t(s)}}function Ai(e,n,t){const r=this;return l;function l(i){return i!==p.uppercaseW&&i!==p.lowercaseW||!ot.call(r,r.previous)||Ze(r.events)?t(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(vi,e.attempt(nt,e.attempt(tt,o),t),t)(i))}function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(i)}}function Pi(e,n,t){const r=this;let l="",o=!1;return i;function i(s){return(s===p.uppercaseH||s===p.lowercaseH)&&at.call(r,r.previous)&&!Ze(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(s),e.consume(s),a):t(s)}function a(s){if(ne(s)&&l.length<5)return l+=String.fromCodePoint(s),e.consume(s),a;if(s===p.colon){const m=l.toLowerCase();if(m==="http"||m==="https")return e.consume(s),f}return t(s)}function f(s){return s===p.slash?(e.consume(s),o?c:(o=!0,f)):t(s)}function c(s){return s===p.eof||Rt(s)||O(s)||W(s)||ze(s)?t(s):e.attempt(nt,e.attempt(tt,u),t)(s)}function u(s){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(s)}}function Ni(e,n,t){let r=0;return l;function l(i){return(i===p.uppercaseW||i===p.lowercaseW)&&r<3?(r++,e.consume(i),l):i===p.dot&&r===3?(e.consume(i),o):t(i)}function o(i){return i===p.eof?t(i):n(i)}}function Di(e,n,t){let r,l,o;return i;function i(c){return c===p.dot||c===p.underscore?e.check(rt,f,a)(c):c===p.eof||O(c)||W(c)||c!==p.dash&&ze(c)?f(c):(o=!0,e.consume(c),i)}function a(c){return c===p.underscore?r=!0:(l=r,r=void 0),e.consume(c),i}function f(c){return l||r||!o?t(c):n(c)}}function Li(e,n){let t=0,r=0;return l;function l(i){return i===p.leftParenthesis?(t++,e.consume(i),l):i===p.rightParenthesis&&r<t?o(i):i===p.exclamationMark||i===p.quotationMark||i===p.ampersand||i===p.apostrophe||i===p.rightParenthesis||i===p.asterisk||i===p.comma||i===p.dot||i===p.colon||i===p.semicolon||i===p.lessThan||i===p.questionMark||i===p.rightSquareBracket||i===p.underscore||i===p.tilde?e.check(rt,n,o)(i):i===p.eof||O(i)||W(i)?n(i):(e.consume(i),l)}function o(i){return i===p.rightParenthesis&&r++,e.consume(i),l}}function Mi(e,n,t){return r;function r(a){return a===p.exclamationMark||a===p.quotationMark||a===p.apostrophe||a===p.rightParenthesis||a===p.asterisk||a===p.comma||a===p.dot||a===p.colon||a===p.semicolon||a===p.questionMark||a===p.underscore||a===p.tilde?(e.consume(a),r):a===p.ampersand?(e.consume(a),o):a===p.rightSquareBracket?(e.consume(a),l):a===p.lessThan||a===p.eof||O(a)||W(a)?n(a):t(a)}function l(a){return a===p.eof||a===p.leftParenthesis||a===p.leftSquareBracket||O(a)||W(a)?n(a):r(a)}function o(a){return ne(a)?i(a):t(a)}function i(a){return a===p.semicolon?(e.consume(a),r):ne(a)?(e.consume(a),i):t(a)}}function Ti(e,n,t){return r;function r(o){return e.consume(o),l}function l(o){return ee(o)?t(o):n(o)}}function ot(e){return e===p.eof||e===p.leftParenthesis||e===p.asterisk||e===p.underscore||e===p.leftSquareBracket||e===p.rightSquareBracket||e===p.tilde||O(e)}function at(e){return!ne(e)}function st(e){return!(e===p.slash||_e(e))}function _e(e){return e===p.plusSign||e===p.dash||e===p.dot||e===p.underscore||ee(e)}function Ze(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Ri={tokenize:Ui,partial:!0};function Oi(){return{document:{[p.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:_i,continuation:{tokenize:Bi},exit:zi}},text:{[p.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:ji},[p.rightSquareBracket]:{name:"gfmPotentialFoo
Line truncated
|
||||
`),t=[];for(let r=0;r<n.length;r+=1){const l=n[r];l.length>0&&t.push({type:"text",value:l}),r<n.length-1&&t.push({type:"break"})}return t.length>0?t:[{type:"text",value:""}]}function ut(e){if(Wi(e))for(let n=0;n<e.children.length;n+=1){const t=e.children[n];if((t==null?void 0:t.type)==="text"&&typeof t.value=="string"&&t.value.includes(`
|
||||
`)){const r=$i(t.value);e.children.splice(n,1,...r),n+=r.length-1;continue}ut(t)}}function Xi(){return e=>{ut(e)}}let De=null;function Gi({issuePathId:e,children:n}){const{data:t}=yt({queryKey:vt.issues.detail(e),queryFn:()=>bt.get(e),staleTime:6e4}),r=(t==null?void 0:t.identifier)??e,l=(t==null?void 0:t.title)??r,o=t==null?void 0:t.status;return E.jsxDEV(wt,{to:`/issues/${r}`,"data-mention-kind":"issue",className:"paperclip-markdown-issue-ref",title:l,"aria-label":`Issue ${r}: ${l}`,children:[o?E.jsxDEV(kt,{status:o,className:"mr-1 h-3 w-3 align-[-0.125em]"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:56,columnNumber:9},this):null,n]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:48,columnNumber:5},this)}function Yi(){return De||(De=ht(()=>import("./mermaid.core-BRRy2yZG.js").then(e=>e.bC),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(e=>e.default)),De}const Ki={overflowWrap:"anywhere",wordBreak:"break-word"},Ji={maxWidth:"100%",overflowX:"auto"};function F(e){return{...Ki,...e}}function Zi(e){return{...Ji,...e}}function ct(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(n=>ct(n)).join(""):""}function Qi(e){if(!Z.isValidElement(e))return null;const n=e.props;return typeof n.className!="string"||!/\blanguage-mermaid\b/i.test(n.className)?null:ct(n.children).replace(/\n$/,"")}function eo(e){return Mn(e)?e:Jn(e)}function no(e){if(!e)return!1;try{const n=new URL(e);return n.protocol==="https:"&&(n.hostname==="github.com"||n.hostname==="www.github.com")}catch{return!1}}function to(e){if(!e)return!1;try{const n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?!1:typeof window>"u"?!0:n.origin!==window.location.origin}catch{return!1}}function ro({source:e,darkMode:n}){const t=Z.useId().replace(/[^a-zA-Z0-9_-]/g,""),[r,l]=Z.useState(null),[o,i]=Z.useState(null);return Z.useEffect(()=>{let a=!0;return l(null),i(null),Yi().then(async f=>{f.initialize({startOnLoad:!1,securityLevel:"strict",theme:n?"dark":"default",fontFamily:"inherit",suppressErrorRendering:!0});const c=await f.render(`paperclip-mermaid-${t}`,e);a&&l(c.svg)}).catch(f=>{if(!a)return;const c=f instanceof Error&&f.message?f.message:"Failed to render Mermaid diagram.";i(c)}),()=>{a=!1}},[n,t,e]),E.jsxDEV("div",{className:"paperclip-mermaid",children:r?E.jsxDEV("div",{dangerouslySetInnerHTML:{__html:r}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:175,columnNumber:9},this):E.jsxDEV(E.Fragment,{children:[E.jsxDEV("p",{className:Le("paperclip-mermaid-status",o&&"paperclip-mermaid-status-error"),children:o?`Unable to render Mermaid diagram: ${o}`:"Rendering Mermaid diagram..."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:178,columnNumber:11},this),E.jsxDEV("pre",{className:"paperclip-mermaid-source",children:E.jsxDEV("code",{className:"language-mermaid",children:e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:182,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:181,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:177,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:173,columnNumber:5},this)}function lo({children:e,className:n,style:t,softBreaks:r=!0,linkIssueReferences:l=!0,resolveImageSrc:o,onImageClick:i}){const{theme:a}=dt(),f=[Hi];l&&f.push(xt),r&&f.push(Xi);const c={p:({node:u,style:s,children:m,...g})=>E.jsxDEV("p",{...g,style:F(s),children:m},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:209,columnNumber:7},this),li:({node:u,style:s,children:m,...g})=>E.jsxDEV("li",{...g,style:F(s),children:m},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:214,columnNumber:7},this),blockquote:({node:u,style:s,children:m,...g})=>E.jsxDEV("blockquote",{...g,style:F(s),children:m},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:219,columnNumber:7},this),td:({node:u,style:s,children:m,...g})=>E.jsxDEV("td",{...g,style:F(s),children:m},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:224,columnNumber:7},this),th:({node:u,style:s,children:m,...g})=>E.jsxDEV("th",{...g,style:F(s),children:m},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:229,columnNumber:7},this),pre:({node:u,children:s,...m})=>{const g=Qi(s);return g?E.jsxDEV(ro,{source:g,darkMode:a==="dark"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownBody.tsx",lineNumber:236,columnNumber:16},this):E.jsxDEV("pre",{...m,style:Zi(m.style),children:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/co
Line truncated
|
||||
@@ -0,0 +1,141 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-4hBsc5Xg.js","./index-B5DJgMQZ.js","./iframe-aoIC7NDi.js","./preload-helper-Dp1pzeXC.js","./iframe-CAdr9hwF.css","./dialog-6DTSoM1_.js","./createLucideIcon-D2uUVdtm.js","./x-CIQWKcou.js","./index-BWXhrlcm.js","./AgentIconPicker-B29UI7uB.js","./input-DeZ-mgkh.js","./message-square-CCO5PzL9.js","./database-Dx6aEk21.js","./lightbulb-CWoAXyu4.js","./index-D06BVPe_.js","./index-Da5H9YyE.js","./index-DyT3wjMS.js","./index-L7QtbZZE.js","./index-DLflUP2U.js","./index-DRla6-Ws.js","./index-BCKkBgrt.js","./index-qKR5U20D.js","./index-CdYcLeG3.js","./index-DYb2F9ma.js","./index-C6KHExHv.js","./index-C50j51Pp.js","./index-BEGuXGS-.js","./index-Z4Rf-Aiw.js","./index-DtJrYABh.js","./index-Cn0X7WlW.js","./index-DQnQ4flw.js","./index-DLU08YNV.js","./dockerfile-BKs6k2Af.js","./simple-mode-GW_nhZxv.js","./factor-kuTfRLto.js","./nsis-LdVXkNf5.js","./pug-DeIclll2.js","./javascript-iXu5QeM3.js","./index-CWAiPZ_g.js","./index-DnJMcKN2.js"])))=>i.map(i=>d[i]);
|
||||
var BN=Object.defineProperty;var VN=(n,e,t)=>e in n?BN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Tn=(n,e,t)=>VN(n,typeof e!="symbol"?e+"":e,t);import{r as H,X as Hm,N as Ue,O as il,a1 as Pw,R as k,a2 as Fw,aa as zm,bA as HN,bB as zN,bC as WN,bD as UN,C as Dp,bE as Wm,bF as $w,bG as Um,bH as Bw,bI as Km,bJ as Qx,bK as Vw,bL as Hw,bM as zw,bN as Ww,bO as Uw,bP as KN,bQ as jN,bR as qN,bS as ey,bT as JN,j as Vt,c as Ds,bU as GN,bV as YN,bW as ZN}from"./iframe-aoIC7NDi.js";import{I as jm,h as nh,u as Kw,R as jw,j as XN,P as QN,O as eO,k as tO,T as nO,m as rO}from"./dialog-6DTSoM1_.js";import{R as iO,a as sO,g as oO,T as lO,V as aO,I as cO,P as uO,C as fO,b as hO,c as dO,e as pO}from"./index-BWXhrlcm.js";import{_ as q}from"./preload-helper-Dp1pzeXC.js";import{k as gO,B as mO,A as xO}from"./AgentIconPicker-B29UI7uB.js";import{c as yO}from"./createLucideIcon-D2uUVdtm.js";const bO=/^[A-Z]+-\d+$/;function CO(n){const e=n.trim().toUpperCase();return bO.test(e)?e:null}function _O(n){var i;const e=n.trim();if(!e)return null;let t;try{t=e.startsWith("/")?new URL(e,"https://paperclip.invalid"):new URL(e)}catch{return null}const r=t.pathname.split("/").map(s=>s.trim()).filter(Boolean);for(let s=0;s<r.length-1;s+=1){if(((i=r[s])==null?void 0:i.toLowerCase())!=="issues")continue;const o=CO(r[s+1]??"");if(o)return{identifier:o}}return null}var qw="Toggle",Jw=H.forwardRef((n,e)=>{const{pressed:t,defaultPressed:r,onPressedChange:i,...s}=n,[o,l]=Hm({prop:t,onChange:i,defaultProp:r??!1,caller:qw});return Ue.jsx(il.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":n.disabled?"":void 0,...s,ref:e,onClick:Pw(n.onClick,()=>{n.disabled||l(!o)})})});Jw.displayName=qw;var ks="ToggleGroup",[Gw,Yw]=Fw(ks,[nh]),Zw=nh(),qm=k.forwardRef((n,e)=>{const{type:t,...r}=n;if(t==="single"){const i=r;return Ue.jsx(vO,{...i,ref:e})}if(t==="multiple"){const i=r;return Ue.jsx(wO,{...i,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${ks}\``)});qm.displayName=ks;var[Xw,Qw]=Gw(ks),vO=k.forwardRef((n,e)=>{const{value:t,defaultValue:r,onValueChange:i=()=>{},...s}=n,[o,l]=Hm({prop:t,defaultProp:r??"",onChange:i,caller:ks});return Ue.jsx(Xw,{scope:n.__scopeToggleGroup,type:"single",value:k.useMemo(()=>o?[o]:[],[o]),onItemActivate:l,onItemDeactivate:k.useCallback(()=>l(""),[l]),children:Ue.jsx(eS,{...s,ref:e})})}),wO=k.forwardRef((n,e)=>{const{value:t,defaultValue:r,onValueChange:i=()=>{},...s}=n,[o,l]=Hm({prop:t,defaultProp:r??[],onChange:i,caller:ks}),a=k.useCallback(u=>l((f=[])=>[...f,u]),[l]),c=k.useCallback(u=>l((f=[])=>f.filter(h=>h!==u)),[l]);return Ue.jsx(Xw,{scope:n.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:a,onItemDeactivate:c,children:Ue.jsx(eS,{...s,ref:e})})});qm.displayName=ks;var[SO,kO]=Gw(ks),eS=k.forwardRef((n,e)=>{const{__scopeToggleGroup:t,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:o,loop:l=!0,...a}=n,c=Zw(t),u=Kw(o),f={role:"group",dir:u,...a};return Ue.jsx(SO,{scope:t,rovingFocus:i,disabled:r,children:i?Ue.jsx(jw,{asChild:!0,...c,orientation:s,dir:u,loop:l,children:Ue.jsx(il.div,{...f,ref:e})}):Ue.jsx(il.div,{...f,ref:e})})}),Hu="ToggleGroupItem",tS=k.forwardRef((n,e)=>{const t=Qw(Hu,n.__scopeToggleGroup),r=kO(Hu,n.__scopeToggleGroup),i=Zw(n.__scopeToggleGroup),s=t.value.includes(n.value),o=r.disabled||n.disabled,l={...n,pressed:s,disabled:o},a=k.useRef(null);return r.rovingFocus?Ue.jsx(jm,{asChild:!0,...i,focusable:!o,active:s,ref:a,children:Ue.jsx(ty,{...l,ref:e})}):Ue.jsx(ty,{...l,ref:e})});tS.displayName=Hu;var ty=k.forwardRef((n,e)=>{const{__scopeToggleGroup:t,value:r,...i}=n,s=Qw(Hu,t),o={role:"radio","aria-checked":n.pressed,"aria-pressed":void 0},l=s.type==="single"?o:void 0;return Ue.jsx(Jw,{...l,...i,ref:e,onPressedChange:a=>{a?s.onItemActivate(r):s.onItemDeactivate(r)}})}),EO=qm,TO=tS,Jm="Toolbar",[AO]=Fw(Jm,[nh,Yw]),Gm=nh(),nS=Yw(),[MO,rS]=AO(Jm),iS=H.forwardRef((n,e)=>{const{__scopeToolbar:t,orientation:r="horizontal",dir:i,loop:s=!0,...o}=n,l=Gm(t),a=Kw(i);return Ue.jsx(MO,{scope:t,orientation:r,dir:a,children:Ue.jsx(jw,{asChild:!0,...l,orientation:r,dir:a,loop:s,children:Ue.jsx(il.div,{role:"toolbar","aria-orientation":r,dir:a,...o,ref:e})})})});iS.displayName=Jm;var sS="ToolbarSeparator",oS=H.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=rS(sS,t);return Ue.jsx(iO,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:e})});oS.displayName=sS;var IO="ToolbarButton",Ym=H.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=Gm(t);return Ue.jsx(jm,{asChild:!0,...i,focusable:!n.disabled,children:Ue.jsx(il.button,{type:"button",...r,ref:e})})});Ym.displayName=IO;var NO="ToolbarLink",OO=H.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=Gm(t);return Ue.jsx(jm,{asChild:!0,...i,focusable:!0,children:Ue.jsx(il.a,{...r,ref:e,onKeyDown:Pw(n.onKeyDown,s=>{s.key===" "&&s.currentTarget.click()})})})});OO.displayName=NO;var lS="ToolbarToggleGroup",aS=H.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=rS(lS,t),s=nS(t);rLine truncated
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const PO=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],FO=yO("user",PO);function je(){return je=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},je.apply(null,arguments)}function Rr(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var ny=Object.prototype.hasOwnProperty;function ry(n,e,t){for(t of n.keys())if(sa(t,e))return t}function sa(n,e){var t,r,i;if(n===e)return!0;if(n&&e&&(t=n.constructor)===e.constructor){if(t===Date)return n.getTime()===e.getTime();if(t===RegExp)return n.toString()===e.toString();if(t===Array){if((r=n.length)===e.length)for(;r--&&sa(n[r],e[r]););return r===-1}if(t===Set){if(n.size!==e.size)return!1;for(r of n)if(i=r,i&&typeof i=="object"&&(i=ry(e,i),!i)||!e.has(i))return!1;return!0}if(t===Map){if(n.size!==e.size)return!1;for(r of n)if(i=r[0],i&&typeof i=="object"&&(i=ry(e,i),!i)||!sa(r[1],e.get(i)))return!1;return!0}if(t===ArrayBuffer)n=new Uint8Array(n),e=new Uint8Array(e);else if(t===DataView){if((r=n.byteLength)===e.byteLength)for(;r--&&n.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(n)){if((r=n.byteLength)===e.byteLength)for(;r--&&n[r]===e[r];);return r===-1}if(!t||typeof n=="object"){r=0;for(t in n)if(ny.call(n,t)&&++r&&!ny.call(e,t)||!(t in e)||!sa(n[t],e[t]))return!1;return Object.keys(e).length===r}}return n!==n&&e!==e}class $O extends Error{constructor(t,r,i,s,o){super(t);Tn(this,"name","Assertion");Tn(this,"code","ERR_ASSERTION");Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=r,this.expected=i,this.generated=o,this.operator=s}}function L(n,e){fS(!!n,!1,!0,"ok","Expected value to be truthy",e)}function uQ(n){fS(!1,!1,!0,"ok","Unreachable",n)}function fS(n,e,t,r,i,s){if(!n)throw s instanceof Error?s:new $O(s||i,e,t,r,!s)}const BO=/[$_\p{ID_Start}]/u,VO=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,HO=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,zO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hS={};function ar(n){return n?BO.test(String.fromCodePoint(n)):!1}function Hl(n,e){const r=(e||hS).jsx?HO:VO;return n?r.test(String.fromCodePoint(n)):!1}function fQ(n,e){return(hS.jsx?WO:zO).test(n)}function vi(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?iy(n.position):"start"in n||"end"in n?iy(n):"line"in n||"column"in n?Lp(n):""}function Lp(n){return sy(n&&n.line)+":"+sy(n&&n.column)}function iy(n){return Lp(n&&n.start)+"-"+Lp(n&&n.end)}function sy(n){return n&&typeof n=="number"?n:1}class ct extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",s={},o=!1;if(t&&("line"in t&&"column"in t?s={place:t}:"start"in t&&"end"in t?s={place:t}:"type"in t?s={ancestors:[t],place:t.position}:s={...t}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?s.ruleId=r:(s.source=r.slice(0,a),s.ruleId=r.slice(a+1))}if(!s.place&&s.ancestors&&s.ancestors){const a=s.ancestors[s.ancestors.length-1];a&&(s.place=a.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=vi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ct.prototype.file="";ct.prototype.name="";ct.prototype.reason="";ct.prototype.message="";ct.prototype.stack="";ct.prototype.column=void 0;ct.prototype.line=void 0;ct.prototype.ancestors=void 0;ct.prototype.cause=void 0;ct.prototype.fatal=void 0;ct.prototype.place=void 0;ct.prototype.ruleId=void 0;ct.prototype.source=void 0;const UO={};function Zm(n,e){const t=UO,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return dS(n,r,i)}function dS(n,e,t){if(KO(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return oy(n.children,e,t)}return Array.isArray(n)?oy(n,e,t):""}function oy(n,e,t){const r=[];let i=-1;for(;++i<n.length;)r[i]=dS(n[i],e,t);return r.join("")}function KO(n){return!!(n&&typeof n=="object")}const ly=document.createElement("i");function wa(n){const e="&"+n+";";ly.innerHTML=e;const t=ly.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}const _={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35Line truncated
|
||||
`,cr:"\r",space:" ",replacementCharacter:"�"};function un(n,e,t,r){const i=n.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<be.v8MaxSafeChunkSize)o=Array.from(r),o.unshift(e,t),n.splice(...o);else for(t&&n.splice(e,t);s<r.length;)o=r.slice(s,s+be.v8MaxSafeChunkSize),o.unshift(e,0),n.splice(...o),s+=be.v8MaxSafeChunkSize,e+=be.v8MaxSafeChunkSize}function Gn(n,e){return n.length>0?(un(n,n.length,0,e),n):e}const ay={}.hasOwnProperty;function jO(n){const e={};let t=-1;for(;++t<n.length;)qO(e,n[t]);return e}function qO(n,e){let t;for(t in e){const i=(ay.call(n,t)?n[t]:void 0)||(n[t]={}),s=e[t];let o;if(s)for(o in s){ay.call(i,o)||(i[o]=[]);const l=s[o];JO(i[o],Array.isArray(l)?l:l?[l]:[])}}}function JO(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);un(n,0,0,r)}function pS(n,e){const t=Number.parseInt(n,e);return t<_.ht||t===_.vt||t>_.cr&&t<_.space||t>_.tilde&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?yn.replacementCharacter:String.fromCodePoint(t)}function Ko(n){return n.replace(/[\t\n\r ]+/g,yn.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Pr=Es(/[A-Za-z]/),pr=Es(/[\dA-Za-z]/),GO=Es(/[#-'*+\--9=?A-Z^-~]/);function Rp(n){return n!==null&&(n<_.space||n===_.del)}const Pp=Es(/\d/),YO=Es(/[\dA-Fa-f]/),ZO=Es(/[!-/:-@[-`{-~]/);function Ce(n){return n!==null&&n<_.horizontalTab}function wt(n){return n!==null&&(n<_.nul||n===_.space)}function ze(n){return n===_.horizontalTab||n===_.virtualSpace||n===_.space}const XO=Es(new RegExp("\\p{P}|\\p{S}","u")),pi=Es(/\s/);function Es(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function Qe(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(a){return ze(a)?(n.enter(t),l(a)):e(a)}function l(a){return ze(a)&&s++<i?(n.consume(a),l):(n.exit(t),e(a))}}const QO={tokenize:e9};function e9(n){const e=n.attempt(this.parser.constructs.contentInitial,r,i);let t;return e;function r(l){if(L(l===_.eof||Ce(l),"expected eol or eof"),l===_.eof){n.consume(l);return}return n.enter(E.lineEnding),n.consume(l),n.exit(E.lineEnding),Qe(n,e,E.linePrefix)}function i(l){return L(l!==_.eof&&!Ce(l),"expected anything other than a line ending or EOF"),n.enter(E.paragraph),s(l)}function s(l){const a=n.enter(E.chunkText,{contentType:be.contentTypeText,previous:t});return t&&(t.next=a),t=a,o(l)}function o(l){if(l===_.eof){n.exit(E.chunkText),n.exit(E.paragraph),n.consume(l);return}return Ce(l)?(n.consume(l),n.exit(E.chunkText),s):(n.consume(l),o)}}const t9={tokenize:n9},cy={tokenize:r9};function n9(n){const e=this,t=[];let r=0,i,s,o;return l;function l(y){if(r<t.length){const C=t[r];return e.containerState=C[1],L(C[0].continuation,"expected `continuation` to be defined on container construct"),n.attempt(C[0].continuation,a,c)(y)}return c(y)}function a(y){if(L(e.containerState,"expected `containerState` to be defined after continuation"),r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&g();const C=e.events.length;let w=C,v;for(;w--;)if(e.events[w][0]==="exit"&&e.events[w][1].type===E.chunkFlow){v=e.events[w][1].end;break}L(v,"could not find previous flow chunk"),x(r);let S=C;for(;S<e.events.length;)e.events[S][1].end={...v},S++;return un(e.events,w+1,0,e.events.slice(C)),e.events.length=S,c(y)}return l(y)}function c(y){if(r===t.length){if(!i)return h(y);if(i.currentConstruct&&i.currentConstruct.concrete)return p(y);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(cy,u,f)(y)}function u(y){return i&&g(),x(r),h(y)}function f(y){return e.parser.lazy[e.now().line]=r!==t.length,o=e.now().offset,p(y)}function h(y){return e.containerState={},n.attempt(cy,d,p)(y)}function d(y){return L(e.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),L(e.containerState,"expected `containerState` to be defined on tokenizer"),r++,t.push([e.currentConstruct,e.containerState]),h(y)}function p(y){if(y===_.eof){i&&g(),x(0),n.consume(y);return}return i=i||e.parser.flow(e.now()),n.enter(E.chunkFlow,{_tokenizer:i,contentType:be.contentTypeFlow,previous:s}),m(y)}function m(y){if(y===_.eof){b(n.exit(E.chunkFlow),!0),x(0),n.consume(y);return}return Ce(y)?(n.consume(y),b(n.exit(E.chunkFlow)),r=0,e.interrupt=void 0,l):(n.consume(y),m)}function b(y,C){L(i,"expected `childFlow` to be defined when continuing");const w=e.sliceStream(y);if(C&&w.push(null),y.previous=s,s&&(s.next=y),s=y,i.defineSkip(y.start),i.write(w),e.parser.lazy[y.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<o&&(!i.events[v][1].end||i.events[v][1].end.offset>o))return;const S=e.events.length;let T=S,N,I;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type===E.chunkFlow){if(N){I=e.events[T][1].end;break}N=!0}for(L(I,"could not find previous flow chunk"),x(r),v=S;v<e.events.length;)e.events[v][1].end={...I},v++;un(e.events,T+1,0,e.events.slice(S)),e.events.length=v}}function xLine truncated
|
||||
`)}function p3(n){return n==null?"":String(n)}function _y(n){const e=typeof n=="string"?n.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}const vy={}.hasOwnProperty;function g3(n,e){const t=e||{};function r(i,...s){let o=r.invalid;const l=r.handlers;if(i&&vy.call(i,n)){const a=String(i[n]);o=vy.call(l,a)?l[a]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const m3={}.hasOwnProperty;function IS(n,e){let t=-1,r;if(e.extensions)for(;++t<e.extensions.length;)IS(n,e.extensions[t]);for(r in e)if(m3.call(e,r))switch(r){case"extensions":break;case"unsafe":{wy(n[r],e[r]);break}case"join":{wy(n[r],e[r]);break}case"handlers":{x3(n[r],e[r]);break}default:n.options[r]=e[r]}return n}function wy(n,e){e&&n.push(...e)}function x3(n,e){e&&Object.assign(n,e)}function y3(n,e,t,r){const i=t.enter("blockquote"),s=t.createTracker(r);s.move("> "),s.shift(2);const o=t.indentLines(t.containerFlow(n,s.current()),b3);return i(),o}function b3(n,e,t){return">"+(t?"":" ")+n}function NS(n,e){return Sy(n,e.inConstruct,!0)&&!Sy(n,e.notInConstruct,!1)}function Sy(n,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let r=-1;for(;++r<e.length;)if(n.includes(e[r]))return!0;return!1}function ky(n,e,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
||||
`&&NS(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
||||
`}function C3(n,e){const t=String(n);let r=t.indexOf(e),i=r,s=0,o=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+e.length,r=t.indexOf(e,i);return o}function Bp(n,e){return!!(e.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function _3(n){const e=n.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function v3(n,e,t,r){const i=_3(t),s=n.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Bp(n,t)){const f=t.enter("codeIndented"),h=t.indentLines(s,w3);return f(),h}const l=t.createTracker(r),a=i.repeat(Math.max(C3(s,i)+1,3)),c=t.enter("codeFenced");let u=l.move(a);if(n.lang){const f=t.enter(`codeFencedLang${o}`);u+=l.move(t.safe(n.lang,{before:u,after:" ",encode:["`"],...l.current()})),f()}if(n.lang&&n.meta){const f=t.enter(`codeFencedMeta${o}`);u+=l.move(" "),u+=l.move(t.safe(n.meta,{before:u,after:`
|
||||
`,encode:["`"],...l.current()})),f()}return u+=l.move(`
|
||||
`),s&&(u+=l.move(s+`
|
||||
`)),u+=l.move(a),c(),u}function w3(n,e,t){return(t?"":" ")+n}function e1(n){const e=n.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function S3(n,e,t,r){const i=e1(t),s=i==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");return c+=a.move(t.safe(t.associationId(n),{before:c,after:"]",...a.current()})),c+=a.move("]: "),l(),!n.url||/[\0- \u007F]/.test(n.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(n.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(n.url,{before:c,after:n.title?" ":`
|
||||
`,...a.current()}))),l(),n.title&&(l=t.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(t.safe(n.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),o(),c}function k3(n){const e=n.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function us(n){return"&#x"+n.toString(16).toUpperCase()+";"}function zu(n,e,t){const r=cs(n),i=cs(e);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}OS.peek=E3;function OS(n,e,t,r){const i=k3(t),s=t.enter("emphasis"),o=t.createTracker(r),l=o.move(i);let a=o.move(t.containerPhrasing(n,{after:i,before:l,...o.current()}));const c=a.charCodeAt(0),u=zu(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(a=us(c)+a.slice(1));const f=a.charCodeAt(a.length-1),h=zu(r.after.charCodeAt(0),f,i);h.inside&&(a=a.slice(0,-1)+us(f));const d=o.move(i);return s(),t.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},l+a+d}function E3(n,e,t){return t.options.emphasis||"*"}function DS(n,e){let t=!1;return s3(n,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,$p}),!!((!n.depth||n.depth<3)&&Zm(n)&&(e.options.setext||t))}function T3(n,e,t,r){const i=Math.max(Math.min(6,n.depth||1),1),s=t.createTracker(r);if(DS(n,t)){const u=t.enter("headingSetext"),f=t.enter("phrasing"),h=t.containerPhrasing(n,{...s.current(),before:`
|
||||
`,after:`
|
||||
`});return f(),u(),h+`
|
||||
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
||||
`))+1))}const o="#".repeat(i),l=t.enter("headingAtx"),a=t.enter("phrasing");s.move(o+" ");let c=t.containerPhrasing(n,{before:"# ",after:`
|
||||
`,...s.current()});return/^[\t ]/.test(c)&&(c=us(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),a(),l(),c}LS.peek=A3;function LS(n){return n.value||""}function A3(){return"<"}RS.peek=M3;function RS(n,e,t,r){const i=e1(t),s=i==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("![");return c+=a.move(t.safe(n.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),l(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(n.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(n.url,{before:c,after:n.title?" ":")",...a.current()}))),l(),n.title&&(l=t.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(t.safe(n.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function M3(){return"!"}PS.peek=I3;function PS(n,e,t,r){const i=n.referenceType,s=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(r);let a=l.move("![");const c=t.safe(n.alt,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),o();const u=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(n),{before:a,after:"]",...l.current()});return o(),t.stack=u,s(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function I3(){return"!"}FS.peek=N3;function FS(n,e,t){let r=n.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<t.unsafe.length;){const o=t.unsafe[s],l=t.compilePattern(o);let a;if(o.atBreak)for(;a=l.exec(r);){let c=a.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(a.index+1)}}return i+r+i}function N3(){return"`"}function $S(n,e){const t=Zm(n);return!!(!e.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(t===n.url||"mailto:"+t===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}BS.peek=O3;function BS(n,e,t,r){const i=e1(t),s=i==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let l,a;if($S(n,t)){const u=t.stack;t.stack=[],l=t.enter("autolink");let f=o.move("<");return f+=o.move(t.containerPhrasing(n,{before:f,after:">",...o.current()})),f+=o.move(">"),l(),t.stack=u,f}l=t.enter("link"),a=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(n,{before:c,after:"](",...o.current()})),c+=o.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(n.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(a=t.enter("destinationRaw"),c+=o.move(t.safe(n.url,{before:c,after:n.title?" ":")",...o.current()}))),a(),n.title&&(a=t.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(t.safe(n.title,{before:c,after:i,...o.current()})),c+=o.move(i),a()),c+=o.move(")"),l(),c}function O3(n,e,t){return $S(n,t)?"<":"["}VS.peek=D3;function VS(n,e,t,r){const i=n.referenceType,s=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(r);let a=l.move("[");const c=t.containerPhrasing(n,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),o();const u=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(n),{before:a,after:"]",...l.current()});return o(),t.stack=u,s(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function D3(){return"["}function t1(n){const e=n.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function L3(n){const e=t1(n),t=n.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function R3(n){const e=n.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function HS(n){const e=n.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function P3(n,e,t,r){const i=t.enter("list"),s=t.bulletCurrent;let o=n.ordered?R3(t):t1(t);const l=n.ordered?o==="."?")":".":L3(t);let a=e&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!n.ordered){const u=n.children?n.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(a=!0),HS(t)===o&&u){let f=-1;for(;++f<n.chilLine truncated
|
||||
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Rs},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
||||
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Rs},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
||||
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Rs},{atBreak:!0,character:"+",after:`(?:[ \r
|
||||
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
||||
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
||||
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Rs},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Rs},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Rs},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Rs},{atBreak:!0,character:"~"}];function Y3(n){return n.label||!n.identifier?n.label||"":kS(n.identifier)}function Z3(n){if(!n._compiled){const e=(n.atBreak?"[\\r\\n][\\t ]*":"")+(n.before?"(?:"+n.before+")":"");n._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(n.character)?"\\":"")+n.character+(n.after?"(?:"+n.after+")":""),"g")}return n._compiled}function X3(n,e,t){const r=e.indexStack,i=n.children||[],s=[];let o=-1,l=t.before,a;r.push(-1);let c=e.createTracker(t);for(;++o<i.length;){const u=i[o];let f;if(r[r.length-1]=o,o+1<i.length){let p=e.handle.handlers[i[o+1].type];p&&p.peek&&(p=p.peek),f=p?p(i[o+1],n,e,{before:"",after:"",...c.current()}).charAt(0):""}else f=t.after;s.length>0&&(l==="\r"||l===`
|
||||
`)&&u.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",c=e.createTracker(t),c.move(s.join("")));let h=e.handle(u,n,e,{...c.current(),after:f,before:l});a&&a===h.slice(0,1)&&(h=us(a.charCodeAt(0))+h.slice(1));const d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,a=void 0,d&&(s.length>0&&d.before&&l===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+us(l.charCodeAt(0))),d.after&&(a=f)),c.move(h),s.push(h),l=h.slice(-1)}return r.pop(),s.join("")}function Q3(n,e,t){const r=e.indexStack,i=n.children||[],s=e.createTracker(t),o=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,o.push(s.move(e.handle(a,n,e,{before:`
|
||||
`,after:`
|
||||
`,...s.current()}))),a.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&o.push(s.move(eL(a,i[l+1],n,e)))}return r.pop(),o.join("")}function eL(n,e,t,r){let i=r.join.length;for(;i--;){const s=r.join[i](n,e,t,r);if(s===!0||s===1)break;if(typeof s=="number")return`
|
||||
`.repeat(1+s);if(s===!1)return`
|
||||
|
||||
<!---->
|
||||
|
||||
`}return`
|
||||
|
||||
`}const tL=/\r?\n|\r/g;function nL(n,e){const t=[];let r=0,i=0,s;for(;s=tL.exec(n);)o(n.slice(r,s.index)),t.push(s[0]),r=s.index+s[0].length,i++;return o(n.slice(r)),t.join("");function o(l){t.push(e(l,i,!l))}}function rL(n,e,t){const r=(t.before||"")+(e||"")+(t.after||""),i=[],s=[],o={};let l=-1;for(;++l<n.unsafe.length;){const u=n.unsafe[l];if(!NS(n.stack,u))continue;const f=n.compilePattern(u);let h;for(;h=f.exec(r);){const d="before"in u||!!u.atBreak,p="after"in u,m=h.index+(d?h[1].length:0);i.includes(m)?(o[m].before&&!d&&(o[m].before=!1),o[m].after&&!p&&(o[m].after=!1)):(i.push(m),o[m]={before:d,after:p})}}i.sort(iL);let a=t.before?t.before.length:0;const c=r.length-(t.after?t.after.length:0);for(l=-1;++l<i.length;){const u=i[l];u<a||u>=c||u+1<c&&i[l+1]===u+1&&o[u].after&&!o[u+1].before&&!o[u+1].after||i[l-1]===u-1&&o[u].before&&!o[u-1].before&&!o[u-1].after||(a!==u&&s.push(Ey(r.slice(a,u),"\\")),a=u,/[!-/:-@[-`{-~]/.test(r.charAt(u))&&(!t.encode||!t.encode.includes(r.charAt(u)))?s.push("\\"):(s.push(us(r.charCodeAt(u))),a++))}return s.push(Ey(r.slice(a,c),t.after)),s.join("")}function iL(n,e){return n-e}function Ey(n,e){const t=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],s=n+e;let o=-1,l=0,a;for(;a=t.exec(s);)r.push(a.index);for(;++o<r.length;)l!==r[o]&&i.push(n.slice(l,r[o])),i.push("\\"),l=r[o];return i.push(n.slice(l)),i.join("")}function sL(n){const e=n||{},t=e.now||{};let r=e.lineShift||0,i=t.line||1,s=t.column||1;return{move:a,current:o,shift:l};function o(){return{now:{line:i,column:s},lineShift:r}}function l(c){r+=c}function a(c){const u=c||"",f=u.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,s=f.length===1?s+h.length:1+h.length+r,u}}function WS(n,e){const t=e||{},r={associationId:Y3,containerPhrasing:cL,containerFlow:uL,createTracker:sL,compilePattern:Z3,enter:s,handlers:{...n1},handle:void 0,indentLines:nL,indexStack:[],join:[...q3],options:{},safe:fL,stack:[],unsafe:[...G3]};IS(r,t),r.options.tightDefinitions&&r.join.push(aL),r.handle=g3("type",{invalid:oL,unknown:lL,handlers:r.handlers});let i=r.handle(n,void 0,r,{before:`
|
||||
`,after:`
|
||||
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
||||
`),i;function s(o){return r.stack.push(o),l;function l(){r.stack.pop()}}}function oL(n){throw new Error("Cannot handle value `"+n+"`, expected node")}function lL(n){const e=n;throw new Error("Cannot handle unknown node `"+e.type+"`")}function aL(n,e){if(n.type==="definition"&&n.type===e.type)return 0}function cL(n,e){return X3(n,this,e)}function uL(n,e){return Q3(n,this,e)}function fL(n,e){return rL(this,n,e)}function hL(){return{enter:{table:dL,tableData:Ty,tableHeader:Ty,tableRow:gL},exit:{codeText:mL,table:pL,tableData:pd,tableHeader:pd,tableRow:pd}}}function dL(n){const e=n._align;L(e,"expected `_align` on table"),this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},n),this.data.inTable=!0}function pL(n){this.exit(n),this.data.inTable=void 0}function gL(n){this.enter({type:"tableRow",children:[]},n)}function pd(n){this.exit(n)}function Ty(n){this.enter({type:"tableCell",children:[]},n)}function mL(n){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,xL));const t=this.stack[this.stack.length-1];L(t.type==="inlineCode"),t.value=e,this.exit(n)}function xL(n,e){return e==="|"?e:n}function yL(n){const e=n||{},t=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
||||
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:a,tableRow:l}};function o(d,p,m,b){return c(u(d,m,b),d.align)}function l(d,p,m,b){const x=f(d,m,b),g=c([x]);return g.slice(0,g.indexOf(`
|
||||
`))}function a(d,p,m,b){const x=m.enter("tableCell"),g=m.enter("phrasing"),y=m.containerPhrasing(d,{...b,before:s,after:s});return g(),x(),y}function c(d,p){return d3(d,{align:p,alignDelimiters:r,padding:t,stringLength:i})}function u(d,p,m){const b=d.children;let x=-1;const g=[],y=p.enter("table");for(;++x<b.length;)g[x]=f(b[x],p,m);return y(),g}function f(d,p,m){const b=d.children;let x=-1;const g=[],y=p.enter("tableRow");for(;++x<b.length;)g[x]=a(b[x],d,p,m);return y(),g}function h(d,p,m){let b=n1.inlineCode(d,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function bL(){return{exit:{taskListCheckValueChecked:Ay,taskListCheckValueUnchecked:Ay,paragraph:_L}}}function CL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vL}}}function Ay(n){const e=this.stack[this.stack.length-2];L(e.type==="listItem"),e.checked=n.type==="taskListCheckValueChecked"}function _L(n){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const t=this.stack[this.stack.length-1];L(t.type==="paragraph");const r=t.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,o;for(;++s<i.length;){const l=i[s];if(l.type==="paragraph"){o=l;break}}o===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(n)}function vL(n,e,t,r){const i=n.children[0],s=typeof n.checked=="boolean"&&i&&i.type==="paragraph",o="["+(n.checked?"x":" ")+"] ",l=t.createTracker(r);s&&l.move(o);let a=n1.listItem(n,e,t,{...r,...l.current()});return s&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),a;function c(u){return u+o}}function wL(n){let t=(n||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return t==null&&(t=!0),{text:{[_.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[_.tilde]}};function i(o,l){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let c=a;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[a][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[a][1].end)},f={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",u,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",f,l]],d=l.parser.constructs.insideSpan.null;d&&un(h,h.length,0,lc(d,o.slice(c+1,a),l)),un(h,h.length,0,[["exit",f,l],["enter",o[a][1],l],["exit",o[a][1],l],["exit",u,l]]),un(o,c-1,a-c+3,h),a=c+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type=E.data);return o}function s(o,l,a){const c=this.previous,u=this.events;let f=0;return h;function h(p){return L(p===_.tilde,"expected `~`"),c===_.tilde&&u[u.length-1][1].type!==E.characterEscape?a(p):(o.enter("strikethroughSequenceTemporary"),d(p))}function d(p){const m=cs(c);if(p===_.tilde)return f>1?a(p):(o.consume(p),f++,d);if(f<2&&!t)return a(p);const b=o.exit("strikethroughSequenceTemporary"),x=cs(p);return b._open=!x||x===be.attentionSideAfter&&!!m,b._close=!m||m===be.attentionSideAfter&&!!x,l(p)}}}class SL{constructor(){this.map=[]}add(e,t,r){kL(this,e,t,r)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function kL(n,e,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<n.map.length;){if(n.map[i][0]===e){n.map[i][1]+=t,n.map[i][2].push(...r);return}i+=1}n.map.push([e,t,r])}}function EL(n,e){L(n[e][1].type==="table","expected table");let t=!1;const r=[];for(;e<n.length;){const i=n[e];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(n[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(n[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return r}function TL(){return{flow:{null:{name:"table",tokenize:AL,resolveAll:ML}}}}function AL(n,e,t){const r=this;let i=0,s=0,o;return l;function l(I){let B=r.events.length-1;for(;B>-1;){const W=r.events[B][1].type;if(W===E.lineEnding||W===E.linePrefix)B--;else break}const $=B>-1?r.events[B][1].type:null,P=$==="tableHead"||$==="tableRow"?v:a;return P===v&&r.parser.lazy[r.now().line]?t(I):P(I)}function a(I){return n.enter("tableHead"),n.enter("tableRow"),c(I)}function c(I){return I===_.verticalBar||(o=!0,s+=
Line truncated
|
||||
|
||||
`,rR=Xs?sk:ph,hs={bold:ah,capitalize:rk,code:uh,highlight:dh,italic:ch,lowercase:tk,strikethrough:Sa,subscript:fh,superscript:hh,underline:ka,uppercase:nk},iR={directionless:Vp,unmergeable:Ea},Dy={center:u1,end:p1,justify:h1,left:c1,right:f1,start:d1},sR={[u1]:"center",[p1]:"end",[h1]:"justify",[c1]:"left",[f1]:"right",[d1]:"start"},oR={normal:ek,segmented:a1,token:l1},lR={[ek]:"normal",[a1]:"segmented",[l1]:"token"},g1="$",Ly="$config";function aR(n,e){const t=n._decorators;let i=n._pendingDecorators||t;const s=e._nodeMap;let o;for(o in i)s.has(o)||(i===t&&(i=bE(n)),delete i[o])}function ok(n,e,t,r,i,s){let o=n.getFirstChild();for(;o!==null;){const l=o.__key;o.__parent===e&&(oe(o)&&ok(o,l,t,r,i,s),t.has(l)||s.delete(l),i.push(l)),o=o.getNextSibling()}}function cR(n,e,t,r){const i=n._nodeMap,s=e._nodeMap,o=[];for(const[l]of r){const a=s.get(l);a!==void 0&&(a.isAttached()||(oe(a)&&ok(a,l,i,s,o,r),i.has(l)||r.delete(l),o.push(l)))}for(const l of o)s.delete(l);for(const l of t){const a=s.get(l);a!==void 0&&!a.isAttached()&&(i.has(l)||t.delete(l),s.delete(l))}}const uR=100;let Hp=!1,m1=0;function fR(){return Hp}function hR(n){m1=n.timeStamp}function dR(n){m1===0&&sr(n).addEventListener("textInput",hR,!0)}function md(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&Ah(n,t)!==void 0}function pR(n){return n.getEditorState().read(()=>{const e=nt();return e!==null?e.clone():null})}function gR(n,e,t){const r=ri(sr(t));let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&V1(e,o,i,s,!1)}function mR(n,e,t){if(Le(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return ni(e)&&t.isAttached()}function xR(n,e,t,r){for(let i=n;i&&!BE(i);i=dc(i)){const s=Ah(i,e);if(s!==void 0){const o=Ot(s,t);if(o)return mt(o)||!En(i)?void 0:[i,o]}else if(i===r)return[r,CE(t)]}}function lk(n,e,t){Hp=!0;const r=performance.now()-m1>uR;try{qn(n,()=>{const i=nt()||pR(n),s=new Map,o=n.getRootElement(),l=n._editorState,a=n._blockCursorElement;let c=!1,u="";for(let h=0;h<e.length;h++){const d=e[h],p=d.type,m=d.target,b=xR(m,n,l,o);if(!b)continue;const[x,g]=b;if(p==="characterData")r&&Oe(g)&&ni(m)&&mR(i,m,g)&&gR(m,g,n);else if(p==="childList"){c=!0;const y=d.addedNodes;for(let v=0;v<y.length;v++){const S=y[v],T=yE(S),N=S.parentNode;if(N!=null&&S!==a&&T===null&&!md(S,N,n)){if(Xs){const I=(En(S)?S.innerText:null)||S.nodeValue;I&&(u+=I)}N.removeChild(S)}}const C=d.removedNodes,w=C.length;if(w>0){let v=0;for(let S=0;S<w;S++){const T=C[S];(md(T,m,n)||a===T)&&(m.appendChild(T),v++)}w!==v&&s.set(x,g)}}}if(s.size>0)for(const[h,d]of s)d.reconcileObservedMutation(h,n);const f=t.takeRecords();if(f.length>0){for(let h=0;h<f.length;h++){const d=f[h],p=d.addedNodes,m=d.target;for(let b=0;b<p.length;b++){const x=p[b],g=x.parentNode;g!=null&&x.nodeName==="BR"&&!md(x,m,n)&&g.removeChild(x)}}t.takeRecords()}i!==null&&(c&&$n(i),Xs&&TE(n)&&i.insertRawText(u))})}finally{Hp=!1}}function ak(n){const e=n._observer;if(e!==null){const t=e.takeRecords();lk(n,t,e)}}function ck(n){dR(n),n._observer=new MutationObserver((e,t)=>{lk(n,e,t)})}function uk(n){const e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Nh(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&t.add(o.key)):o=s,e.set(o.key,o)}}return{flatKeys:t,sharedConfigMap:e}}class x1{constructor(e,t,r=void 0,i=new Map,s=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,l=s!==void 0?s:CR(o,r,i);{s===void 0||l===s||X(`NodeState: size != computedSize (${String(s)} != ${String(l)})`);for(const a of i.keys())o.has(a.key)||X(`NodeState: sharedConfigMap missing knownState key ${a.key}`)}this.size=l}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return Ry(e)&&(t[g1]=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new x1(e,t,_R(t.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=Ry(s)),this.size++),i.set(e,t)}updateFromUnknown(e,t){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)
Line truncated
|
||||
`)n.preventDefault(),Te(e,aa,!1);else if(s===Ai)n.preventDefault(),Te(e,jp,void 0);else if(s==null&&n.dataTransfer){const u=n.dataTransfer.getData("text/plain");n.preventDefault(),i.insertRawText(u)}else s!=null&&Hk(i,r,s,n.timeStamp,!0)?(n.preventDefault(),Te(e,Jo,s)):Lo=s;Bk=n.timeStamp;return}switch(n.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{Te(e,Jo,n);break}case"insertFromComposition":{qt(null),Te(e,Jo,n);break}case"insertLineBreak":{qt(null),Te(e,aa,!1);break}case"insertParagraph":{qt(null),ca&&!_l?(ca=!1,Te(e,aa,!1)):Te(e,jp,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{Te(e,v1,n);break}case"deleteByComposition":{UR(a,c)&&Te(e,qp,n);break}case"deleteByDrag":case"deleteByCut":{Te(e,qp,n);break}case"deleteContent":{Te(e,Ma,!1);break}case"deleteWordBackward":{Te(e,Ia,!0);break}case"deleteWordForward":{Te(e,Ia,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{Te(e,Na,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{Te(e,Na,!1);break}case"formatStrikeThrough":{Te(e,es,"strikethrough");break}case"formatBold":{Te(e,es,"bold");break}case"formatItalic":{Te(e,es,"italic");break}case"formatUnderline":{Te(e,es,"underline");break}case"historyUndo":{Te(e,w1,void 0);break}case"historyRedo":{Te(e,S1,void 0);break}}})}function qR(n,e){n.stopPropagation(),qn(e,()=>{if(En(n.target)&&gE(n.target))return;const t=nt(),r=n.data,i=Wk(n);if(r!=null&&Le(t)&&Hk(t,i,r,n.timeStamp,!1)){Ql&&(Xu(e,r),Ql=!1);const o=t.anchor.getNode(),l=ri(sr(e));if(l===null)return;const a=t.isBackward(),c=a?t.anchor.offset:t.focus.offset,u=a?t.focus.offset:t.anchor.offset;(!ju||t.isCollapsed()||!Oe(o)||l.anchorNode===null||o.getTextContent().slice(0,c)+r+o.getTextContent().slice(c+u)!==wE(l.anchorNode))&&Te(e,Jo,r);const f=r.length;Xs&&f>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=f),!cc&&!_l&&!lh&&e.isComposing()&&(uc=0,qt(null))}else B1(!1,e,r!==null?r:void 0),Ql&&(Xu(e,r||void 0),Ql=!1);p7()},{event:n}),Lo=null}function JR(n,e){qn(e,()=>{const t=nt();if(Le(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();qt(r.key),(n.timeStamp<uc+T1||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||Oe(i)&&i.getStyle()!==t.style)&&Te(e,Jo,rR)}})}function Xu(n,e){const t=n._compositionKey;if(qt(null),t!==null&&e!=null){if(e===""){const r=Ot(t),i=io(n.getElementByKey(t));i!==null&&i.nodeValue!==null&&Oe(r)&&V1(r,i.nodeValue,null,null,!0);return}if(e[e.length-1]===`
|
||||
`){const r=nt();if(Le(r)){const i=r.focus;r.anchor.set(i.key,i.offset,i.type),Te(n,Gu,null);return}}}B1(!0,n,e)}function GR(n,e){Xs?Ql=!0:!_l&&(cc||lh)?(Xp=!0,Qp=n.data):qn(e,()=>{Xu(e,n.data)})}function YR(n,e){if(uc=n.timeStamp,$k=n.key,!e.isComposing()&&!Te(e,bk,n)&&n.key!=null){if(Xp&&gb(n)){qn(e,()=>{Xu(e,Qp)}),Xp=!1,Qp="";return}if(F7(n))Te(e,Ck,n);else if($7(n))Te(e,_k,n);else if(R7(n))Te(e,vk,n);else if(P7(n))Te(e,wk,n);else if(B7(n))Te(e,Sk,n);else if(V7(n))Te(e,kk,n);else if(w7(n))ca=!0,Te(e,Gu,n);else if(z7(n))Te(e,Ek,n);else if(S7(n))n.preventDefault(),ca=!0,Te(e,aa,!0);else if(v7(n))ca=!1,Te(e,Gu,n);else if(M7(n))gb(n)?Te(e,Tk,n):(n.preventDefault(),Te(e,Ma,!0));else if(W7(n))Te(e,Ak,n);else if(I7(n))U7(n)?Te(e,Mk,n):(n.preventDefault(),Te(e,Ma,!1));else if(k7(n))n.preventDefault(),Te(e,Ia,!0);else if(E7(n))n.preventDefault(),Te(e,Ia,!1);else if(T7(n))n.preventDefault(),Te(e,Na,!0);else if(A7(n))n.preventDefault(),Te(e,Na,!1);else if(b7(n))n.preventDefault(),Te(e,es,"bold");else if(_7(n))n.preventDefault(),Te(e,es,"underline");else if(C7(n))n.preventDefault(),Te(e,es,"italic");else if(y7(n))Te(e,Ik,n);else if(N7(n))n.preventDefault(),Te(e,w1,void 0);else if(O7(n))n.preventDefault(),Te(e,S1,void 0);else{const t=e._editorState._selection;t!==null&&!Le(t)?D7(n)?(n.preventDefault(),Te(e,k1,n)):L7(n)?(n.preventDefault(),Te(e,E1,n)):mb(n)&&(n.preventDefault(),Te(e,Jp,n)):mb(n)&&(n.preventDefault(),Te(e,Jp,n))}H7(n)&&Te(e,Fk,n)}}function Uk(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Go=new Map;function Kk(n){const e=DE(n.target);if(e===null)return;const t=F1(e.anchorNode);if(t===null)return;Zp&&(Zp=!1,qn(t,()=>{const a=Co(),c=e.anchorNode;if(En(c)||ni(c)){const u=N1(a,e,t,n);$n(u)}}));const r=$1(t),i=r[r.length-1],s=i._key,o=Go.get(s),l=o||i;l!==t&&Uy(e,l,!1),Uy(e,t,!0),t!==i?Go.set(s,t):o&&Go.delete(s)}function Ky(n){n._lexicalHandled=!0}function jy(n){return n._lexicalHandled===!0}function ZR(n,e){const t=n.ownerDocument,r=Yu.get(t);(r===void 0||r<1)&&t.addEventListener("selectionchange",Kk),Yu.set(t,(r||0)+1),n.__lexicalEditor=e;const i=Uk(n);for(let s=0;s<Gp.length;s++){const[o,l]=Gp[s],a=typeof l=="function"?c=>{jy(c)||(Ky(c),(e.isEditable()||o==="click")&&l(c,e))}:c=>{if(jy(c))return;Ky(c);const u=e.isEditable();switch(o){case"cut":return u&&Te(e,E1,c);case"copy":return Te(e,k1,c);case"paste":return u&&Te(e,v1,c);case"dragstart":return u&&Te(e,Ok,c);case"dragover":return u&&Te(e,Dk,c);case"dragend":return u&&Te(e,Lk,c);case"focus":return u&&Te(e,Rk,c);case"blur":return u&&Te(e,Pk,c);case"drop":return u&&Te(e,Nk,c)}};n.addEventListener(o,a),i.push(()=>{n.removeEventListener(o,a)})}}const XR=NR("Root element not registered");function QR(n){const e=n.ownerDocument,t=Yu.get(e);if(t===void 0){XR();return}const r=t-1;r>=0||X("Root element count less than 0"),Yu.set(e,r),r===0&&e.removeEventListener("selectionchange",Kk);const i=hc(n);Th(i)?(e8(i),n.__lexicalEditor=null):i&&X("Attempted to remove event handlers from a node that does not belong to this build of Lexical");const s=Uk(n);for(let o=0;o<s.length;o++)s[o]();n.__lexicalEventHandles=[]}function e8(n){if(n._parentEditor!==null){const e=$1(n),r=e[e.length-1]._key;Go.get(r)===n&&Go.delete(r)}else Go.delete(n._key)}function t8(){Yp=!0}function n8(n,e,t,r,i){Vk=[n,e,t,r,i]}function eg(n,e,t){jt();const r=n.__key,i=n.getParent();if(i===null)return;const s=q7(n);let o=!1;if(Le(s)&&e){const l=s.anchor,a=s.focus;l.key===r&&(tf(l,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0),a.key===r&&(tf(a,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else _h(s)&&e&&n.isSelected()&&n.selectPrevious();if(Le(s)&&e&&!o){const l=n.getIndexWithinParent();ls(n),ef(s,i,l,-1)}else ls(n);!t&&!$i(i)&&!i.canBeEmpty()&&i.isEmpty()&&eg(i,e),e&&s&&on(i)&&i.isEmpty()&&i.selectEnd()}function r8(n){return n}class yo{static getType(){const{ownNodeType:e}=Nh(this);return e===void 0&&X(`LexicalNode: Node ${this.name} does not implement .getType().`),e}static clone(e){X(`LexicalNode: Node ${this.name} does not implement .clone().`)}$config(){return{}}config(e,t){const r=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:r,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),xE(this,e),this.__type!=="root"&&(jt(),i8(this.__type,this.constructor))}getType(){return this.__type}isInline(){X(`LexicalNode: Node ${this.constructor.name} does not implement .isInline().`)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=Ot(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||nt();if(t==null)return!1;const r=t.getNode
Line truncated
|
||||
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>l8(e)||a8(e)?null:{conversion:o8,priority:0}}}static importJSON(e){return ol().updateFromJSON(e)}}function o8(n){return{node:ol()}}function ol(){return pc(new vl)}function no(n){return n instanceof vl}function l8(n){const e=n.parentElement;if(e!==null&&K1(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Qu(t)){const r=e.lastChild;if(r===n||r.previousSibling===n&&Qu(r))return!0}}return!1}function a8(n){const e=n.parentElement;if(e!==null&&K1(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Qu(t))return!1;const r=e.lastChild;if(r===n||r.previousSibling===n&&Qu(r))return!0}return!1}function Qu(n){return ni(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function yd(n,e){return e&uh?"code":e&dh?"mark":e&fh?"sub":e&hh?"sup":null}function bd(n,e){return e&ah?"strong":e&ch?"em":"span"}function jk(n,e,t,r,i){const s=r.classList;let o=Yo(i,"base");o!==void 0&&s.add(...o),o=Yo(i,"underlineStrikethrough");let l=!1;const a=e&ka&&e&Sa,c=t&ka&&t&Sa;o!==void 0&&(c?(l=!0,a||s.add(...o)):a&&s.remove(...o));for(const u in hs){const h=hs[u];if(o=Yo(i,u),o!==void 0)if(t&h){if(l&&(u==="underline"||u==="strikethrough")){e&h&&s.remove(...o);continue}((e&h)===0||a&&u==="underline"||u==="strikethrough")&&s.add(...o)}else e&h&&s.remove(...o)}}function c8(n,e){const t=n.length,r=e.length;let i=0,s=0;for(;i<t&&i<r&&n[i]===e[i];)i++;for(;s+i<t&&s+i<r&&n[t-s-1]===e[r-s-1];)s++;return[i,t-i-s,e.slice(i,r-s)]}function qk(n,e,t){const r=e.firstChild,i=t.isComposing(),o=n+(i?ph:"");if(r==null)e.textContent=o;else{const l=r.nodeValue;if(l!==o)if(i||Xs){const[a,c,u]=c8(l,o);c!==0&&r.deleteData(a,c),r.insertData(a,u)}else r.nodeValue=o}}function qy(n,e,t,r,i,s){qk(i,n,e);const l=s.theme.text;l!==void 0&&jk(t,0,r,n,l)}function Bc(n,e){const t=document.createElement(e);return t.appendChild(n),t}let ro=class Jk extends yo{static getType(){return"text"}static clone(e){return new Jk(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return lR[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===l1}isComposing(){return this.__key===ts()}isSegmented(){return this.getLatest().__mode===a1}isDirectionless(){return(this.getLatest().__detail&Vp)!==0}isUnmergeable(){return(this.getLatest().__detail&Ea)!==0}hasFormat(e){const t=hs[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){const i=this.getLatest().__format;return sf(i,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,i=yd(this,r),s=bd(this,r),o=i===null?s:i,l=document.createElement(o);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(s),l.appendChild(a));const c=this.__text;qy(a,this,s,r,c,e);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(e,t,r){const i=this.__text,s=e.__format,o=this.__format,l=yd(this,s),a=yd(this,o),c=bd(this,s),u=bd(this,o);if((l===null?c:l)!==(a===null?u:a))return!0;if(l===a&&c!==u){const g=t.firstChild;g==null&&X("updateDOM: prevInnerDOM is null or undefined");const y=document.createElement(u);return qy(y,this,u,o,i,r),t.replaceChild(y,g),!1}let d=t;a!==null&&l!==null&&(d=t.firstChild,d==null&&X("updateDOM: innerDOM is null or undefined")),qk(i,d,this);const m=r.theme.text;m!==void 0&&s!==o&&jk(u,s,o,d,m);const b=e.__style,x=this.__style;return b!==x&&(t.style.cssText=x),!1}static importDOM(){return{"#text":()=>({conversion:p8,priority:0}),b:()=>({conversion:f8,priority:0}),code:()=>({conversion:hi,priority:0}),em:()=>({conversion:hi,priority:0}),i:()=>({conversion:hi,priority:0}),mark:()=>({conversion:hi,priority:0}),s:()=>({conversion:hi,priority:0}),span:()=>({conversion:u8,priority:0}),strong:()=>({conversion:hi,priority:0}),sub:()=>({conversion:hi,priority:0}),sup:()=>({conversion:hi,priority:0}),u:()=>({conversion:hi,priority:0})}}static importJSON(e){return Kt().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return En(t)||X("Expected TextNode createDOM to always return a HTMLElement"),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=Bc(t,"b")),this.hasFormat("italic")&&(t=Bc(
Line truncated
|
||||
`||a===`\r
|
||||
`?s.push(ol()):a===" "?s.push(bh()):a!==""&&s.push(Kt(a))}return{node:s}}if(r=r.replace(/\r/g,"").replace(/[ \t\n]+/g," "),r==="")return{node:null};if(r[0]===" "){let i=e,s=!0;for(;i!==null&&(i=Gy(i,!1))!==null;){const o=i.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(r=r.slice(1)),s=!1;break}}s&&(r=r.slice(1))}if(r[r.length-1]===" "){let i=e,s=!0;for(;i!==null&&(i=Gy(i,!0))!==null;)if((i.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){s=!1;break}s&&(r=r.slice(0,r.length-1))}return r===""?{node:null}:{node:Kt(r)}}function Gy(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const s=t.parentElement;if(s===null)return null;t=s}if(t=r,En(t)){const s=t.style.display;if(s===""&&!RE(t)||s!==""&&!s.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(ni(t))return t;if(t.nodeName==="BR")return null}}const g8={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function hi(n){const e=g8[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:A1(n.style,e),node:null}}function Kt(n=""){return pc(new ro(n))}function Oe(n){return n instanceof ro}function A1(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",s=r.includes("line-through"),o=n.fontStyle==="italic",l=r.includes("underline"),a=n.verticalAlign;return c=>(Oe(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),s&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),l&&!c.hasFormat("underline")&&c.toggleFormat("underline"),a==="sub"&&!c.hasFormat("subscript")&&c.toggleFormat("subscript"),a==="super"&&!c.hasFormat("superscript")&&c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class wl extends ro{static getType(){return"tab"}static clone(e){return new wl(e.__key)}constructor(e){super(" ",e),this.__detail=Ea}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),r=Yo(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){return bh().updateFromJSON(e)}setTextContent(e){return e===" "||e===""||X("TabNode does not support setTextContent"),super.setTextContent(" ")}spliceText(e,t,r,i){return r===""&&t===0||r===" "&&t===1||X("TabNode does not support spliceText"),this}setDetail(e){return e!==Ea&&X("TabNode does not support setDetail"),this}setMode(e){return e!=="normal"&&X("TabNode does not support setMode"),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function bh(){return pc(new wl)}function M1(n){return n instanceof wl}class m8{constructor(e,t,r){Object.defineProperty(this,"_selection",{enumerable:!1,writable:!0}),this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){if(this.key===e.key)return this.offset<e.offset;const t=yr(gs(this,"next")),r=yr(gs(e,"next"));return Q1(t,r)<0}getNode(){const e=this.key,t=Ot(e);return t===null&&X("Point.getNode: node not found"),t}set(e,t,r,i){const s=this._selection,o=this.key;if(!(i&&this.key===e&&this.offset===t&&this.type===r)){this.key=e,this.offset=t,this.type=r;{const l=Ot(e);(r==="text"?Oe(l):oe(l))||X(`PointType.set: node with key ${e} is ${l?l.__type:"[not found]"} and can not be used for a ${r} point`)}Sl()||(ts()===o&&qt(e),s!==null&&(s.setCachedNodes(null),s.dirty=!0))}}}function _r(n,e,t){return new m8(n,e,t)}function Cd(n,e){let t=e.__key,r=n.offset,i="element";if(Oe(e)){i="text";const s=e.getTextContentSize();r>s&&(r=s)}else if(!oe(e)){const s=e.getNextSibling();if(Oe(s))t=s.__key,r=0,i="text";else{const o=e.getParent();o&&(t=o.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function Yy(n,e){if(oe(e)){const t=e.getLastDescendant();oe(t)||Oe(t)?Cd(n,t):Cd(n,e)}else Cd(n,e)}function x8(n,e,t,r){const i=n.getNode(),s=i.getChildAtIndex(n.offset),o=Kt();if(o.setFormat(t),o.setStyle(r),dE(s))s.splice(0,0,[o]);else{const l=on(i)?Mi().append(o):o;s===null?i.append(l):s.insertBefore(l)}n.is(e)&&e.set(o.__key,0,"text"),n.set(o.__key,0,"text")}class Ch{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!_h(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Ch(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let s;if(Oe(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(e);for(
Line truncated
|
||||
`),h.isEmpty()?u=!1:u=!0;else if(u=!1,Oe(h)){let d=h.getTextContent();h===t?h===r?(i.type!=="element"||s.type!=="element"||s.offset===i.offset)&&(d=l<a?d.slice(l,a):d.slice(a,l)):d=o?d.slice(l):d.slice(a):h===r&&(d=o?d.slice(0,a):d.slice(0,l)),c+=d}else(mt(h)||no(h))&&(h!==r||!this.isCollapsed())&&(c+=h.getTextContent())}return c}applyDOMRange(e){const t=Tt(),i=t.getEditorState()._selection,s=Yk(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,i);if(s===null)return;const[o,l]=s;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(l.key,l.offset,l.type,!0),qu(this)}clone(){const e=this.anchor,t=this.focus;return new bo(_r(e.key,e.offset,e.type),_r(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=sf(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=hs[e];return(this.format&t)!==0}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];o===`
|
||||
`||o===`\r
|
||||
`?r.push(ol()):o===" "?r.push(bh()):r.push(Kt(o))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,s=this.style;let o=t,l=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,l=t),o.type==="element"&&x8(o,l,i,s),l.type==="element"&&ll(l,yr(gs(l,"next")));const a=o.offset;let c=l.offset;const u=this.getNodes(),f=u.length;let h=u[0];Oe(h)||X("insertText: first node is not a text node");const p=h.getTextContent().length,m=h.getParentOrThrow(),b=f-1;let x=u[b];if(f===1&&l.type==="element"&&(c=p,l.set(o.key,c,"text")),this.isCollapsed()&&a===p&&(mi(h)||!h.canInsertTextAfter()||!m.canInsertTextAfter()&&h.getNextSibling()===null)){let g=h.getNextSibling();if((!Oe(g)||!g.canInsertTextBefore()||mi(g))&&(g=Kt(),g.setFormat(i),g.setStyle(s),m.canInsertTextAfter()?h.insertAfter(g):m.insertAfter(g)),g.select(0,0),h=g,e!==""){this.insertText(e);return}}else if(this.isCollapsed()&&a===0&&(mi(h)||!h.canInsertTextBefore()||!m.canInsertTextBefore()&&h.getPreviousSibling()===null)){let g=h.getPreviousSibling();if((!Oe(g)||mi(g))&&(g=Kt(),g.setFormat(i),m.canInsertTextBefore()?h.insertBefore(g):m.insertBefore(g)),g.select(),h=g,e!==""){this.insertText(e);return}}else if(h.isSegmented()&&a!==p){const g=Kt(h.getTextContent());g.setFormat(i),h.replace(g),h=g}else if(!this.isCollapsed()&&e!==""){const g=x.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||oe(g)&&(!g.canInsertTextBefore()||!g.canInsertTextAfter())){this.insertText(""),Gk(this.anchor,this.focus,null),this.insertText(e);return}}if(f===1){if(os(h)){const w=Kt(e);w.select(),h.replace(w);return}const g=h.getFormat(),y=h.getStyle();if(a===c&&(g!==i||y!==s))if(h.getTextContent()==="")h.setFormat(i),h.setStyle(s);else{const w=Kt(e);if(w.setFormat(i),w.setStyle(s),w.select(),a===0)h.insertBefore(w,!1);else{const[v]=h.splitText(a);v.insertAfter(w,!1)}w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);return}else if(M1(h)){const w=Kt(e);w.setFormat(i),w.setStyle(s),w.select(),h.replace(w);return}const C=c-a;h=h.spliceText(a,C,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=g,this.style=y))}else{const g=new Set([...h.getParentKeys(),...x.getParentKeys()]),y=oe(h)?h:h.getParentOrThrow();let C=oe(x)?x:x.getParentOrThrow(),w=x;if(!y.is(C)&&C.isInline())do w=C,C=C.getParentOrThrow();while(C.isInline());if(l.type==="text"&&(c!==0||x.getTextContent()==="")||l.type==="element"&&x.getIndexWithinParent()<c)if(Oe(x)&&!os(x)&&c!==x.getTextContentSize()){if(x.isSegmented()){const I=Kt(x.getTextContent());x.replace(I),x=I}!on(l.getNode())&&l.type==="text"&&(x=x.spliceText(0,c,"")),g.add(x.__key)}else{const I=x.getParentOrThrow();!I.canBeEmpty()&&I.getChildrenSize()===1?I.remove():x.remove()}else g.add(x.__key);const v=C.getChildren(),S=new Set(u),T=y.is(C),N=y.isInline()&&h.getNextSibling()===null?y:h;for(let I=v.length-1;I>=0;I--){const B=v[I];if(B.is(h)||oe(B)&&B.isParentOf(h))break;B.isAttached()&&(!S.has(B)||B.is(w)?T||N.insertAfter(B,!1):B.remove())}if(!T){let I=C,B=null;for(;I!==null;){const $=I.getChildren(),P=$.length;(P===0||$[P-1].is(B))&&(g.delete(I.__key),B=I),I=I.getParent()}}if(!os(h))h=h.spliceText(a,p-a,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);else if(a===p)h.select();else{const I=Kt(e);I.select(),h.replace(I)}for(let I=1;I<f;I++){const B=u[I],$=B.__key;g.has($)||B.remove()}}}removeText(){const e=nt()===this,t=UE(rg(this));ha(this,t),e&&nt()!==this&&$n(this)}formatText(e,t=null){if(this.isCollapsed()){this.toggleFormat(e),qt(null);return}const r=this.getNodes(),i=[];for(const C of r)Oe(C)&&i.push(C);const s=C=>{r.forEach(w=>{if(oe(w)){const v=w.getFormatFlags(e,C);w.setTextFormat(v)}})},o=i.length;if(o===0){this.toggleFormat(e),qt(null),s(t);return}const l=this.anchor,a=this.focus,c=this.isBackward(),u=c?a:l,f=c?l:a;let h=0,d=i[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===d.getTextContentSize()&&(h=1,d=i[1],p=0),d==null)return;const m=d.getFormatFlags(e,t);s(m);const b=o-1;let x=i[b];const g=f.type==="text"?f.offset:x.getTextContentSize();if(d.is(x)){if(p===g)return;if(mi(d)||p===0&&g===d.getTextContentSize())d.setFormat(m);else{const C=d.splitText(p,g),w=p===0?C[0]:C[1];w.setFormat(m),u.type==="text"&&u.set(w.__key,0,"text"),f.type==="text"&&f.set(w.__key,g-p,"text")}this.format=m;return}p!==0&&!mi(d)&&([,d]=d.splitText(p),p=0),d.setFormat(m);const y=x.getFormatFlags(e,m);g>0&&(g!==x.getTextContentSize()&&!mi(x)&&([x]=x.splitText(g)),x.setFormat(y));for(let C=h+1;C<b;C++){const w=i[C],v=w.getFormatFlags(e,y);w.setFormat(v)}u.type==="text"&&u.set(d.__key,p,"text"),f.type==="text"&&f.set(x.__key,g,"text"),this.format=m|y}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const x=nt();return Le(x)||X("Expected RangeSelection after insertParagraph"),x.insertNodes(e)}const r=(
Line truncated
|
||||
`||u===`\r
|
||||
`?c.insertParagraph():u===" "?c.insertNodes([r0()]):c.insertText(u)}}}else e.insertRawText(o)}function BP(n){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(n):n}function Fb(n,e,t){n.dispatchCommand(Q6,{nodes:e,selection:t})||(t.insertNodes(e),VP(t))}function VP(n){if(Ne(n)&&n.isCollapsed()){const e=n.anchor;let t=null;const r=n0(e,"previous");if(r)if(XE(r))t=r.origin;else{const i=A6(r,af(sn(),"next").getFlipped());for(const s of i)if(rt(s.origin)){t=s.origin;break}else if(Je(s.origin)&&!s.origin.isInline())break}if(t&&rt(t)){const i=t.getFormat(),s=t.getStyle();(n.format!==i||n.style!==s)&&(n.format=i,n.style=s,n.dirty=!0)}}}function HP(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&pf(`LexicalNode: Node ${t.name} does not implement .exportJSON().`),Je(n)){const r=e.children;Array.isArray(r)||pf(`LexicalNode: Node ${t.name} is an element but .exportJSON() does not have a children array.`)}return e}function PT(n,e,t,r=[]){let i=e!==null?t.isSelected(e):!0;const s=Je(t)&&t.excludeFromCopy("html");let o=t;if(e!==null){let c=qE(t);c=rt(c)&&e!==null?vT(e,c):c,o=c}const l=Je(o)?o.getChildren():[],a=HP(o);if(rt(o)){const c=o.__text;c.length>0?a.text=c:i=!1}for(let c=0;c<l.length;c++){const u=l[c],f=PT(n,e,u,a.children);!i&&Je(t)&&f&&t.extractWithChild(u,e,"clone")&&(i=!0)}if(i&&!s)r.push(a);else if(Array.isArray(a.children))for(let c=0;c<a.children.length;c++){const u=a.children[c];r.push(u)}return i}function zP(n,e){const t=[],i=sn().getChildren();for(let s=0;s<i.length;s++){const o=i[s];PT(n,e,o,t)}return{namespace:n._config.namespace,nodes:t}}function WP(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=L6(r);rt(i)&&aP(i),e.push(i)}return e}const UP=50;let To=null;async function FT(n,e,t){if(To!==null)return!1;if(e!==null)return new Promise((c,u)=>{n.update(()=>{c($b(n,e,t))})});const r=n.getRootElement(),i=n._window||window,s=window.document,o=gT(i);if(r===null||o===null)return!1;const l=s.createElement("span");l.style.cssText="position: fixed; top: -1000px;",l.append(s.createTextNode("#")),r.append(l);const a=new Range;return a.setStart(l,0),a.setEnd(l,1),o.removeAllRanges(),o.addRange(a),new Promise((c,u)=>{const f=n.registerCommand(tT,h=>(xs(h,ClipboardEvent)&&(f(),To!==null&&(window.clearTimeout(To),To=null),c($b(n,h,t))),!0),Qr);To=window.setTimeout(()=>{f(),To=null,c(!1)},UP),s.execCommand("copy"),l.remove()})}function $b(n,e,t){if(t===void 0){const i=gT(n._window);if(!i)return!1;const s=i.anchorNode,o=i.focusNode;if(s!==null&&o!==null&&!oP(n,s,o))return!1;const l=Ie();if(l===null)return!1;t=jP(l)}e.preventDefault();const r=e.clipboardData;return r===null?!1:(qP(r,t),!0)}const KP=[["text/html",FP],["application/x-lexical-editor",$P]];function jP(n=Ie()){const e={"text/plain":n?n.getTextContent():""};if(n){const t=JE();for(const[r,i]of KP){const s=i(t,n);s!==null&&(e[r]=s)}}return e}function qP(n,e){for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function Bb(n,e){if(typeof document.caretRangeFromPoint<"u"){const t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}else return null}const Il=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JP=Il&&"documentMode"in document?document.documentMode:null,GP=Il&&"InputEvent"in window&&!JP?"getTargetRanges"in new window.InputEvent("input"):!1,YP=Il&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Vb=Il&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ZP=Il&&/^(?=.*Chrome).*/i.test(navigator.userAgent),XP=Il&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ZP,Hb=si("DRAG_DROP_PASTE_FILE");class Nl extends Ni{static getType(){return"quote"}static clone(e){return new Nl(e.__key)}createDOM(e){const t=document.createElement("blockquote");return wr(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:QP,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(ei(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return Bh().updateFromJSON(e)}insertNewAfter(e,t){const r=Et(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,t),r}collapseAtStart(){const e=Et();return this.getChildren().forEach(r=>e.append(r)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function Bh(){return Bi(new Nl)}function ug(n){return n instanceof Nl}class vo extends Ni{static getType(){return"heading"}static clone(e){return new vo(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,r=do
Line truncated
|
||||
`+g.join(`
|
||||
`)+`
|
||||
`+m)}else v&&(T+=S.move(" "+v));return d&&(T+=S.move((i||w?"":" ")+"/")),T+=S.move(">"),a.children&&a.children.length>0&&(a.type==="mdxJsxTextElement"?T+=S.move(u.containerPhrasing(a,{...S.current(),before:">",after:"<"})):(S.shift(2),T+=S.move(`
|
||||
`),T+=S.move(M4(a,u,S.current())),T+=S.move(`
|
||||
`))),d||(T+=S.move((h?m:"")+"</"+(a.name||"")+">")),C(),T}}function M4(n,e,t){const r=e.indexStack,i=n.children,s=e.createTracker(t),o=zT(HT(e)),l=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a;const u={before:`
|
||||
`,after:`
|
||||
`,...s.current()},f=e.handle(c,n,e,u),h=c.type==="mdxJsxFlowElement"?f:e.indentLines(f,function(d,p,m){return(m?"":o)+d});l.push(s.move(h)),c.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&l.push(s.move(`
|
||||
|
||||
`))}return r.pop(),l.join("")}function HT(n){let e=0,t=n.stack.length;for(;--t>-1;){const r=n.stack[t];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&e++}return e}function zT(n){return VT.repeat(n)}function I4(){return"<"}var N4={};let fg,WT,UT,KT,jT=!0;typeof process<"u"&&({FORCE_COLOR:fg,NODE_DISABLE_COLORS:WT,NO_COLOR:UT,TERM:KT}=N4||{},jT=process.stdout&&process.stdout.isTTY);const Xe={enabled:!WT&&UT==null&&KT!=="dumb"&&(fg!=null&&fg!=="0"||jT),reset:xt(0,0),bold:xt(1,22),dim:xt(2,22),italic:xt(3,23),underline:xt(4,24),inverse:xt(7,27),hidden:xt(8,28),strikethrough:xt(9,29),black:xt(30,39),red:xt(31,39),green:xt(32,39),yellow:xt(33,39),blue:xt(34,39),magenta:xt(35,39),cyan:xt(36,39),white:xt(37,39),gray:xt(90,39),grey:xt(90,39),bgBlack:xt(40,49),bgRed:xt(41,49),bgGreen:xt(42,49),bgYellow:xt(43,49),bgBlue:xt(44,49),bgMagenta:xt(45,49),bgCyan:xt(46,49),bgWhite:xt(47,49)};function Jb(n,e){let t=0,r,i="",s="";for(;t<n.length;t++)r=n[t],i+=r.open,s+=r.close,~e.indexOf(r.close)&&(e=e.replace(r.rgx,r.close+r.open));return i+e+s}function O4(n,e){let t={has:n,keys:e};return t.reset=Xe.reset.bind(t),t.bold=Xe.bold.bind(t),t.dim=Xe.dim.bind(t),t.italic=Xe.italic.bind(t),t.underline=Xe.underline.bind(t),t.inverse=Xe.inverse.bind(t),t.hidden=Xe.hidden.bind(t),t.strikethrough=Xe.strikethrough.bind(t),t.black=Xe.black.bind(t),t.red=Xe.red.bind(t),t.green=Xe.green.bind(t),t.yellow=Xe.yellow.bind(t),t.blue=Xe.blue.bind(t),t.magenta=Xe.magenta.bind(t),t.cyan=Xe.cyan.bind(t),t.white=Xe.white.bind(t),t.gray=Xe.gray.bind(t),t.grey=Xe.grey.bind(t),t.bgBlack=Xe.bgBlack.bind(t),t.bgRed=Xe.bgRed.bind(t),t.bgGreen=Xe.bgGreen.bind(t),t.bgYellow=Xe.bgYellow.bind(t),t.bgBlue=Xe.bgBlue.bind(t),t.bgMagenta=Xe.bgMagenta.bind(t),t.bgCyan=Xe.bgCyan.bind(t),t.bgWhite=Xe.bgWhite.bind(t),t}function xt(n,e){let t={open:`\x1B[${n}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(n)||(this.has.push(n),this.keys.push(t)),r===void 0?this:Xe.enabled?Jb(this.keys,r+""):r+""):r===void 0?O4([n],[t]):Xe.enabled?Jb([t],r+""):r+""}}function Is(){}Is.prototype={diff:function(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function l(C){return s?(setTimeout(function(){s(void 0,C)},0),!0):C}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var a=t.length,c=e.length,u=1,f=a+c;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var h=(r=i.timeout)!==null&&r!==void 0?r:1/0,d=Date.now()+h,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],t,e,0);if(p[0].oldPos+1>=c&&m+1>=a)return l([{value:this.join(t),count:t.length}]);var b=-1/0,x=1/0;function g(){for(var C=Math.max(b,-u);C<=Math.min(x,u);C+=2){var w=void 0,v=p[C-1],S=p[C+1];v&&(p[C-1]=void 0);var T=!1;if(S){var N=S.oldPos-C;T=S&&0<=N&&N<a}var I=v&&v.oldPos+1<c;if(!T&&!I){p[C]=void 0;continue}if(!I||T&&v.oldPos+1<S.oldPos?w=o.addToPath(S,!0,void 0,0):w=o.addToPath(v,void 0,!0,1),m=o.extractCommon(w,t,e,C),w.oldPos+1>=c&&m+1>=a)return l(D4(o,w.lastComponent,t,e,o.useLongestToken));p[C]=w,w.oldPos+1>=c&&(x=Math.min(x,C-1)),m+1>=a&&(b=Math.max(b,C+1))}u++}if(s)(function C(){setTimeout(function(){if(u>f||Date.now()>d)return s();g()||C()},0)})();else for(;u<=f&&Date.now()<=d;){var y=g();if(y)return y}},addToPath:function(e,t,r,i){var s=e.lastComponent;return s&&s.added===t&&s.removed===r?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:t,removed:r,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:t,removed:r,previousComponent:s}}},extractCommon:function(e,t,r,i){for(var s=t.length,o=r.length,l=e.oldPos,a=l-i,c=0;a+1<s&&l+1<o&&this.equals(t[a+1],r[l+1]);)a++,l++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=l,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function D4(n,e,t,r,i){for(var s=[],o;e;)s.push(e),o=e.previousComponent,delete e.previousComponent,e=o;s.reverse();for(var l=0,a=s.length,c=0,u=0;l<a;l++){var f=s[l];if(f.removed){if(f.value=n.join(r.slice(u,u+f.count)),u+=f.count,l&&s[l-1].added){var d=s[l-1];s[l-1]=s[l],s[l]=d}}else{if(!f.added&&i){var h=t.slice(c,c+f.count);h=h.map(function(m,b){var x=r[u+b];return x.length>m.length?x:m}),f.value=n.join(h)}else f.value=n.join(t.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}var p=s[a-1];return a>1&&typeof p.value=="string"&&(p.added||p.removed)&&n.equals("",p.value)&&(s[a-2].value+=p.value,s.pop()),s}var Gb=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Yb=/\S/,qT=new Is;qT.equals=funct
Line truncated
|
||||
`));var e=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var r=0;r<t.length;r++){var i=t[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var L4=new Is;L4.tokenize=function(n){return n.split(/(\S.+?[.!?])(?=\s+|$)/)};var R4=new Is;R4.tokenize=function(n){return n.split(/([{}:;,]|\s+)/)};function _u(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_u=function(e){return typeof e}:_u=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_u(n)}var P4=Object.prototype.toString,Ra=new Is;Ra.useLongestToken=!0;Ra.tokenize=JT.tokenize;Ra.castInput=function(n){var e=this.options,t=e.undefinedReplacement,r=e.stringifyReplacer,i=r===void 0?function(s,o){return typeof o>"u"?t:o}:r;return typeof n=="string"?n:JSON.stringify(hg(n,null,null,i),i," ")};Ra.equals=function(n,e){return Is.prototype.equals.call(Ra,n.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function hg(n,e,t,r,i){e=e||[],t=t||[],r&&(n=r(i,n));var s;for(s=0;s<e.length;s+=1)if(e[s]===n)return t[s];var o;if(P4.call(n)==="[object Array]"){for(e.push(n),o=new Array(n.length),t.push(o),s=0;s<n.length;s+=1)o[s]=hg(n[s],e,t,r,i);return e.pop(),t.pop(),o}if(n&&n.toJSON&&(n=n.toJSON()),_u(n)==="object"&&n!==null){e.push(n),o={},t.push(o);var l=[],a;for(a in n)n.hasOwnProperty(a)&&l.push(a);for(l.sort(),s=0;s<l.length;s+=1)a=l[s],o[a]=hg(n[a],e,t,r,a);e.pop(),t.pop()}else o=n;return o}var dg=new Is;dg.tokenize=function(n){return n.slice()};dg.join=dg.removeEmpty=function(n){return n};Xe.red,Xe.grey,Xe.green;Xe.dim().italic;Xe.dim("→");Xe.dim("·");Xe.dim("↵");function gf(n){n=n.replace(/\r?\n/g,`
|
||||
`);let e=n.match(/^[ \t]*(?=\S)/gm),t=0,r=1/0,i=(e||[]).length;for(;t<i;t++)r=Math.min(r,e[t].length);return i&&r?n.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):n}class F4 extends Error{constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}}function rr(n,e,t,r,i,s,o){if(n)return;let l=o||s;if(o instanceof Error)throw o;let a=i;throw new F4({actual:e,expects:t,operator:r,message:l,details:a,generated:!o})}function $4(n,e){rr(!!n,!1,!0,"ok",!1,"Expected value to be truthy",e)}function Oi(n,e){rr(!n,!0,!1,"not",!1,"Expected value to be falsey",e)}Oi.ok=Oi;Oi.equal=function(n,e,t){rr(!sa(n,e),n,e,"not.equal",!1,"Expected values not to be deeply equal",t)};Oi.type=function(n,e,t){let r=typeof n;rr(r!==e,r,e,"not.type",!1,`Expected "${r}" not to be "${e}"`,t)};Oi.instance=function(n,e,t){let r="`"+(e.name||e.constructor.name)+"`";rr(!(n instanceof e),n,e,"not.instance",!1,`Expected value not to be an instance of ${r}`,t)};Oi.snapshot=function(n,e,t){n=gf(n),e=gf(e),rr(n!==e,n,e,"not.snapshot",!1,"Expected value not to match snapshot",t)};Oi.fixture=function(n,e,t){n=gf(n),e=gf(e),rr(n!==e,n,e,"not.fixture",!1,"Expected value not to match fixture",t)};Oi.match=function(n,e,t){typeof e=="string"?rr(!n.includes(e),n,e,"not.match",!1,`Expected value not to include "${e}" substring`,t):rr(!e.test(n),n,e,"not.match",!1,`Expected value not to match \`${String(e)}\` pattern`,t)};Oi.throws=function(n,e,t){!t&&typeof e=="string"&&(t=e,e=null);try{n()}catch(r){typeof e=="function"?rr(!e(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",t):e instanceof RegExp?rr(!e.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(e)}\` pattern`,t):e||rr(!1,!0,!1,"not.throws",!1,"Expected function not to throw",t)}};var Wl="highlightSequenceTemporary",Zb="highlightSequence",B4="highlight",V4="highlightText";function H4(){const n={name:"highlight",tokenize:t,resolveAll:e};return{text:{[_.equalsTo]:n},insideSpan:{null:[n]},attentionMarkers:{null:[_.equalsTo]}};function e(r,i){let s=-1;for(;++s<r.length;)if(r[s][0]==="enter"&&r[s][1].type===Wl&&r[s][1]._close){let o=s;for(;o--;)if(r[o][0]==="exit"&&r[o][1].type===Wl&&r[o][1]._open&&r[s][1].end.offset-r[s][1].start.offset===r[o][1].end.offset-r[o][1].start.offset){r[s][1].type=Zb,r[o][1].type=Zb;const l={type:B4,start:Object.assign({},r[o][1].start),end:Object.assign({},r[s][1].end)},a={type:V4,start:Object.assign({},r[o][1].end),end:Object.assign({},r[s][1].start)},c=[["enter",l,i],["enter",r[o][1],i],["exit",r[o][1],i],["enter",a,i]],u=i.parser.constructs.insideSpan.null;u&&un(c,c.length,0,lc(u,r.slice(o+1,s),i)),un(c,c.length,0,[["exit",a,i],["enter",r[s][1],i],["exit",r[s][1],i],["exit",l,i]]),un(r,o-1,s-o+3,c),s=o+c.length-2;break}}for(s=-1;++s<r.length;)r[s][1].type===Wl&&(r[s][1].type=E.data);return r}function t(r,i,s){const o=this.previous,l=this.events;let a=0;return c;function c(f){return $4(f===_.equalsTo,"expected `=`"),o===_.equalsTo&&l[l.length-1][1].type!==E.characterEscape?s(f):(r.enter(Wl),u(f))}function u(f){const h=cs(o);if(f===_.equalsTo)return a>1?s(f):(r.consume(f),a++,u);if(a<2)return s(f);const d=r.exit(Wl),p=cs(f);return d._open=!p||p===be.attentionSideAfter&&!!h,d._close=!h||h===be.attentionSideAfter&&!!p,i(f)}}}const z4={}.hasOwnProperty,W4=Symbol("continue"),Nd=Symbol("exit"),U4=Symbol("skip");function K4(n,e){let t,r;typeof e=="function"?t=e:e&&typeof e=="object"&&(e.enter&&(t=e.enter),e.leave&&(r=e.leave)),i(n,void 0,void 0,[])();function i(s,o,l,a){return Od(s)&&(c.displayName="node ("+s.type+")"),c;function c(){const u=t?Xb(t(s,o,l,a)):[];if(u[0]===Nd)return u;if(u[0]!==U4){let f;for(f in s)if(z4.call(s,f)&&s[f]&&typeof s[f]=="object"&&f!=="data"&&f!=="position"){const h=a.concat(s),d=s[f];if(Array.isArray(d)){const p=d;let m=0;for(;m>-1&&m<p.length;){const b=p[m];if(Od(b)){const x=i(b,f,m,h)();if(x[0]===Nd)return x;m=typeof x[1]=="number"?x[1]:m+1}else m++}}else if(Od(d)){const p=i(d,f,void 0,h)();if(p[0]===Nd)return p}}}return r?Xb(r(s,o,l,a)):u}}}function Xb(n){return Array.isArray(n)?n:typeof n=="number"?[W4,n]:[n]}function Od(n){return!!(n&&typeof n=="object"&&"type"in n&&typeof n.type=="string"&&n.type.length>0)}function j4(n,e){const t=e.prefix||"",r=e.suffix||"",i=Object.assign({},e.acornOptions),s=[],o=[],l=i.onComment,a=i.onToken;let c=!1,u,f;const h=Object.assign({},i,{onComment:s,preserveParens:!0});a&&(h.onToken=o);const d=q4(n,e.tokenTypes),p=d.value,m=t+p+r,b=Qb(p);if(b&&!e.allowEmpty)throw new ct("Unexpected empty expression",{place:g(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{u=e.expression&&!b?e.acorn.parseExpressionAt(m,0,h):e.acorn.parse(m,h)}catch(y){const C=y,w=g(C.pos);C.message=String(C.message).Line truncated
|
||||
`}function Ul(n){return n.children instanceof Array}class pg extends Error{constructor(e,t){super(e),this.name="MarkdownParseError",this.cause=t}}class gg extends Error{constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}}function dF(n){const e=new Map;return n.type!=="root"?{importDeclarations:{}}:(n.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,s;(((s=(i=r.data)==null?void 0:i.estree)==null?void 0:s.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(l=>{e.set(l.local.name,{source:`${o.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(e.entries())})}function pF({root:n,markdown:e,visitors:t,syntaxExtensions:r,mdastExtensions:i,...s}){var o;let l;try{l=qD(e,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new pg(`Error parsing markdown: ${a.message}`,a):new pg(`Error parsing markdown: ${a}`,a)}l.children.length===0&&l.children.push({type:"paragraph",children:[]}),((o=l.children.at(-1))==null?void 0:o.type)!=="paragraph"&&l.children.push({type:"paragraph",children:[]}),e2({root:n,mdastRoot:l,visitors:t,...s})}function e2({root:n,mdastRoot:e,visitors:t,...r}){const i=new WeakMap,s=new WeakMap,o=dF(e);t=t.sort((c,u)=>(u.priority??0)-(c.priority??0));function l(c,u){if(!Ul(c))throw new Error("Attempting to visit children of a non-parent");c.children.forEach(f=>{a(f,u,c)})}function a(c,u,f,h=null){const d=t.find((p,m)=>h!=null&&h.has(m)?!1:typeof p.testNode=="string"?p.testNode===c.type:p.testNode(c,r));if(!d)try{throw new gg(`Unsupported markdown syntax: ${WS(c)}`)}catch{throw new gg(`Parsing of the following markdown structure failed: ${JSON.stringify({type:c.type,name:"name"in c?c.name:"N/A"})}`)}d.visitNode({mdastNode:c,lexicalParent:u,mdastParent:f,descriptors:r,metaData:o,actions:{visitChildren:l,nextVisitor(){a(c,u,f,(h??new Set).add(t.indexOf(d)))},addAndStepInto(p){u.append(p),Ul(c)&&l(c,p)},addFormatting(p,m){m||Ul(c)&&(m=c),m&&i.set(m,p|(i.get(f)??0))},removeFormatting(p,m){m||Ul(c)&&(m=c),m&&i.set(m,p^(i.get(f)??0))},getParentFormatting(){return i.get(f)??0},addStyle(p,m){m||Ul(c)&&(m=c),m&&s.set(m,p)},getParentStyle(){return s.get(f)??""}}})}a(e,n,null)}var gF=Object.defineProperty,mF=(n,e,t)=>e in n?gF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rd=(n,e,t)=>(mF(n,typeof e!="symbol"?e+"":e,t),t);const lC="generic-html";class bc extends Ni{constructor(e,t,r,i){super(i),Rd(this,"__tag"),Rd(this,"__nodeType"),Rd(this,"__attributes"),this.__tag=e,this.__nodeType=t,this.__attributes=r}static getType(){return lC}static clone(e){return new bc(e.__tag,e.__nodeType,e.__attributes,e.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(e){const t=this.getWritable();t.__attributes=e}getStyle(){var e;return(e=this.__attributes.find(t=>t.name==="style"))==null?void 0:e.value}createDOM(){const e=this.__tag,t=document.createElement(e);return this.__attributes.forEach(r=>{t.setAttribute(r.name,r.value)}),t}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:t}=super.exportDOM(e);return{element:t}}static importJSON(e){const t=t2(e.tag,e.mdxType,e.attributes);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:lC,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function t2(n,e,t){return Bi(new bc(n,e,t))}function xF(n){return n instanceof bc}const yF={testLexicalNode:xF,visitLexicalNode({actions:n,lexicalNode:e}){n.addAndStepInto("mdxJsxTextElement",{name:e.getTag(),type:e.getNodeType(),attributes:e.getAttributes()})},priority:-100},bF={testLexicalNode:xc,visitLexicalNode:({mdastParent:n,actions:e})=>{e.appendToParent(n,{type:"text",value:`
|
||||
`})}},CF={testLexicalNode:s0,visitLexicalNode:({actions:n})=>{n.addAndStepInto("paragraph")}},_F={testLexicalNode:Dh,visitLexicalNode:({actions:n})=>{n.addAndStepInto("root")}},wu=1,Su=2,ku=4,Eu=8,p0=16,Tu=32,Au=64,Mu=128;function aC(n){return n.type==="text"}const vF=["u","span","sub","sup"],wF={shouldJoin:(n,e)=>{if(["text","emphasis","strong","highlight"].includes(n.type))return n.type===e.type;if(n.type==="mdxJsxTextElement"&&e.type==="mdxJsxTextElement"&&vF.includes(e.name)){const t=e;return n.name===t.name&&JSON.stringify(n.attributes)===JSON.stringify(t.attributes)}return!1},join(n,e){return aC(n)&&aC(e)?{type:"text",value:n.value+e.value}:{...n,children:[...n.children,...e.children]}},testLexicalNode:rt,visitLexicalNode:({lexicalNode:n,mdastParent:e,actions:t})=>{const r=n.getPreviousSibling(),i=rt(r)?r.getFormat():0,s=n.getTextContent(),o=n.getFormat(),l=n.getStyle();let a=e;if(l&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:l}]})),i&o&Eu&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&o&Au&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&o&Tu&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&o&Su&&(a=t.appendToParent(a,{type:"emphasis",children:[]})),i&o&wu&&(a=t.appendToParent(a,{type:"strong",children:[]})),i&o&ku&&(a=t.appendToParent(a,{type:"delete",children:[]})),i&o&Mu&&(a=t.appendToParent(a,{type:"highlight",children:[]})),o&Eu&&!(i&Eu)&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),o&Au&&!(i&Au)&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),o&Tu&&!(i&Tu)&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),o&Su&&!(i&Su)&&(a=t.appendToParent(a,{type:"emphasis",children:[]})),o&wu&&!(i&wu)&&(a=t.appendToParent(a,{type:"strong",children:[]})),o&ku&&!(i&ku)&&(a=t.appendToParent(a,{type:"delete",children:[]})),o&Mu&&!(i&Mu)&&(a=t.appendToParent(a,{type:"highlight",children:[]})),o&p0){t.appendToParent(a,{type:"inlineCode",value:s});return}t.appendToParent(a,{type:"text",value:s})}},SF={testNode:"break",visitNode:function({lexicalParent:n}){n.append(al())}};function Kc(n,e){return[{testNode:t=>t.type==="mdxJsxTextElement"&&t.name===n,visitNode({actions:t,mdastNode:r,lexicalParent:i}){t.addFormatting(e),t.visitChildren(r,i)}},{testNode:t=>t.type==="html"&&t.value===`<${n}>`,visitNode({actions:t,mdastParent:r}){t.addFormatting(e,r)}},{testNode:t=>t.type==="html"&&t.value===`</${n}>`,visitNode({actions:t,mdastParent:r}){t.removeFormatting(e,r)}}]}const kF={testNode:"delete",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(ku),e.visitChildren(n,t)}},EF={testNode:"highlight",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(Mu),e.visitChildren(n,t)}},TF={testNode:"inlineCode",visitNode({mdastNode:n,actions:e}){e.addAndStepInto(Xr(n.value).setFormat(e.getParentFormatting()|p0))}},AF={testNode:"emphasis",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(Su),e.visitChildren(n,t)}},MF={testNode:"strong",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(wu),e.visitChildren(n,t)}},IF=[AF,MF,...Kc("u",Eu),...Kc("code",p0),TF,kF,EF,...Kc("sup",Au),...Kc("sub",Tu)],NF={testNode:YT,visitNode:function({mdastNode:n,actions:e,lexicalParent:t}){n.name==="span"&&n.attributes.length===1&&n.attributes[0].type==="mdxJsxAttribute"&&n.attributes[0].name==="style"?(e.addStyle(n.attributes[0].value,n),e.visitChildren(n,t)):e.addAndStepInto(t2(n.name,n.type,n.attributes))},priority:-100},OF=["listitem","quote","admonition"],DF={testNode:"paragraph",visitNode:function({mdastNode:n,lexicalParent:e,actions:t}){OF.includes(e.getType())?t.visitChildren(n,e):t.addAndStepInto(Et())}},LF={testNode:"root",visitNode({actions:n,mdastNode:e,lexicalParent:t}){n.visitChildren(e,t)}},RF={testNode:"text",visitNode({mdastNode:n,actions:e}){const t=Xr(n.value);t.setFormat(e.getParentFormatting());const r=e.getParentStyle();r!==""&&t.setStyle(r),e.addAndStepInto(t)}},PF=()=>k.createElement(NT,{externalHistoryState:Yr(a$)});function FF(n){return{canContainEols:["comment"],enter:{comment(e){this.buffer()}},exit:{comment(e){this.resume()}}}}const cC=(n,e,t)=>{return r;function r(p){return n.enter("comment"),n.consume(p),i}function i(p){return p===_.exclamationMark?(n.consume(p),s):t(p)}function s(p){return p===_.dash?(n.consume(p),o):t(p)}function o(p){return p===_.dash?(n.consume(p),l):t(p)}function l(p){return p===_.greaterThan?t(p):Ce(p)?u(p):(n.enter(E.data),p===_.dash?(n.consume(p),a):c(p))}function a(p){return p===_.greaterThan?t(p):c(p)}function c(p){return p===_.eof?t(p):p===_.dash?(n.consume(p),h):Ce(p)?(n.exit(E.data),u(p)):(n.consume(p),c)}function u(p){return n.enter(E.lineEnding),n.consume(p),n.exit(E.lineEnding),Qe(n,f,E.linePrefix)}function fLine truncated
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/var gC;function R$(){return gC||(gC=1,(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(s=i(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var l in s)e.call(s,l)&&s[l]&&(o=i(o,l));return o}function i(s,o){return o?s?s+" "+o:s+o:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(Pd)),Pd.exports}var P$=R$();const at=zm(P$),F$={undo:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),format_highlight:k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"},k.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),k.createElement("path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"})),code:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17
Line truncated
|
||||
|
||||
`}else if(Ve(a)){const c=a.getParent(),u=c&&Fe(c)&&c.getListType()==="number"?"1. ":"- ",h=a.getChildren().map(d=>l(d)).join("");return u+h+`
|
||||
`}else{if(Fe(a))return a.getChildren().map(u=>l(u)).join("")+`
|
||||
`;if(rt(a)){let c=a.getTextContent();const u=a.getFormat();return u&16?`\`${c}\``:(u&1&&(c=`**${c}**`),u&2&&(c=`*${c}*`),u&4&&(c=`~~${c}~~`),c)}else if(bn(a)){const c=a.getURL(),u=a.getTitle(),h=a.getChildren().map(d=>l(d)).join("");return u?`[${h}](${c} "${u}")`:`[${h}](${c})`}else if(Je(a))return a.getChildren().map(u=>l(u)).join("")}return a.getTextContent()}t=o.map(a=>l(a)).join("")}),t.trim()}const bV=({children:n})=>{const e=Yr(Vi),t=k.useMemo(()=>[e,YS(null,Vh)],[e]);return k.createElement(Ku.Provider,{value:t},n)},CV=()=>{const n=Ui(),e=Un(o2),t=Un(s$),r=f=>{t(f),e(f?{current:f}:null)},[i,s,o,l,a,c,u]=Er(mg,xg,d2,p2,m2,yg,g2);return k.createElement(k.Fragment,null,l.map((f,h)=>k.createElement(f,{key:h})),k.createElement(R2,{wrappers:a},k.createElement("div",{className:at(ue.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},k.createElement(k2,{contentEditable:k.createElement("div",{ref:r},k.createElement(w2,{className:at(ue.contentEditable,i),ariaLabel:n("contentArea.editableMarkdown","editable markdown"),spellCheck:s})),placeholder:k.createElement("div",{className:at(ue.contentEditable,ue.placeholder,i)},k.createElement("p",null,c)),ErrorBoundary:S2}))),o.map((f,h)=>k.createElement(f,{key:h})),u.map((f,h)=>k.createElement(f,{key:h})))},_V={listItemIndent:"one"},vV=n=>F$[n];function wV(n,e,t={}){let r=e;for(const[i,s]of Object.entries(t))r=r.replaceAll(`{{${i}}}`,String(s));return r}const R2=({wrappers:n,children:e})=>{if(n.length===0)return k.createElement(k.Fragment,null,e);const t=n[0];return k.createElement(t,null,k.createElement(R2,{wrappers:n.slice(1)},e))},SV=({children:n,className:e,overlayContainer:t})=>{const r=k.useRef(null),i=k.useRef(null),s=Un(wo),o=Un(i$);return k.useEffect(()=>{const l=document.createElement("div");return l.classList.add("mdxeditor-popup-container",ue.editorRoot,ue.popupContainer,...(e??"").trim().split(" ").filter(Boolean)),(t??document.body).appendChild(l),r.current=l,s(r),o(i),()=>{l.remove()}},[e,r,t,s,o]),k.createElement("div",{className:at("mdxeditor",ue.editorRoot,ue.editorWrapper,e),ref:i},n)},kV=({mdxRef:n})=>{const e=oh();return k.useImperativeHandle(n,()=>({getMarkdown:()=>{const t=e.getValue(Ba);return t==="source"||t==="diff"?e.getValue(Va):e.getValue(co)},setMarkdown:t=>{e.pub(C0,t)},insertMarkdown:t=>{e.pub(l2,t)},focus:(t,r)=>{var i;(i=e.getValue(Vi))==null||i.focus(t,r)},getContentEditableHTML:()=>{var t;return((t=e.getValue(o2))==null?void 0:t.current.innerHTML)??""},getSelectionMarkdown:()=>{const t=e.getValue(Ba);if(t==="source"||t==="diff")return"";const r=e.getValue(St);return r?(e.getValue(zh),e.getValue(x0),e.getValue(yf),e.getValue(Wh),e.getValue(y0),yV(r)):""}}),[e]),null},EV=k.forwardRef((n,e)=>k.createElement(JL,{plugins:[u$({contentEditableClassName:n.contentEditableClassName??"",spellCheck:n.spellCheck??!0,initialMarkdown:n.markdown,onChange:n.onChange??ss,onBlur:n.onBlur??ss,toMarkdownOptions:n.toMarkdownOptions??_V,autoFocus:n.autoFocus??!1,placeholder:n.placeholder??"",readOnly:!!n.readOnly,iconComponentFor:n.iconComponentFor??vV,suppressHtmlProcessing:n.suppressHtmlProcessing??!1,onError:n.onError??ss,translation:n.translation??wV,trim:n.trim??!0,lexicalTheme:n.lexicalTheme,..."editorState"in n?{editorState:n.editorState}:{},suppressSharedHistory:n.suppressSharedHistory??!1,additionalLexicalNodes:n.additionalLexicalNodes??[],lexicalEditorNamespace:n.lexicalEditorNamespace??"MDXEditor"}),...n.plugins??[]]},k.createElement(SV,{className:n.className,overlayContainer:n.overlayContainer},k.createElement(bV,null,k.createElement(CV,null))),k.createElement(kV,{mdxRef:e}))),P2=typeof window<"u"&&typeof window.document.createElement<"u",F2=P2&&(()=>{var n;const e=(n=navigator.userAgentData)==null?void 0:n.platform;return e?/mac/i.test(e):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function TV(n,e){return F2?n:e}const AV={testLexicalNode:cl,visitLexicalNode:({lexicalNode:n,actions:e})=>{const t=parseInt(n.getTag()[1],10);e.addAndStepInto("heading",{depth:t})}},MV={testNode:"heading",visitNode:function({mdastNode:n,actions:e}){e.addAndStepInto(wi(`h${n.depth}`))}},IV=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],$2=[1,2,3,4,5,6],NV={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},E0=Ae($2,n=>{n.pub(Uh,e=>e.registerCommand(uT,t=>{const{code:r,ctrlKey:i,metaKey:s,altKey:o}=t;return IV.includes(r)&&TV(s,i)&&o?(t.preventDefault(),e.update(()=>{if(r==="Digit0")n.pub(wg,()=>Et());else{const l=n.getValue(E0),a=NV[r];l.includes(a)&&n.pub(wg,()=>wi(`h${a}`))}}),!0):!1},Ct))}),OV=Bn({init(n){n.pubIn({[Ol]:"headings",[ti]:MV,[Hi]:vo,[zi]:AV})},update(n,e){n.pub(E0,(e==null?void 0:e.allowedHeadingLevels)??$2)}});function EC(n,e){return n.getEditorState().read(()=>{const t=Jr(e);return t===null?!1:t.isSelected()})}function B2(n){const[e]=dn(),[t,r]=H.useState(()=>EC(e,n));H.useEffect(()=>{let o=!0;const l=e.registerUpdateListener(()=>{o&&r(EC(e,n))});return()=>{o=!1,l()}},[e,n]);const i=H.useCallback(o=>{e.updatLine truncated
|
||||
`}isInline(){return!1}updateDOM(){return!1}decorate(){return Ue.jsx(DV,{nodeKey:this.__key})}}function LV(){return{node:Ll()}}function Ll(){return Bi(new ko)}function T0(n){return n instanceof ko}function RV(){const[n]=dn();return H.useEffect(()=>n.registerCommand(V2,e=>{const t=Ie();if(!Ne(t))return!1;if(t.focus.getNode()!==null){const i=Ll();MT(i)}return!0},qe),[n]),null}const PV={testLexicalNode:T0,visitLexicalNode({actions:n}){n.addAndStepInto("thematicBreak")}},FV={testNode:"thematicBreak",visitNode({actions:n}){n.addAndStepInto(Ll())}},$V=Ts(n=>{n.sub(n.pipe($V,At(St)),([,e])=>{e==null||e.dispatchCommand(V2,void 0)})}),BV=Bn({init(n){n.pubIn({[Ol]:"thematicBreak",[ti]:FV,[Hi]:ko,[zi]:PV,[So]:RV})}}),VV={testNode:"list",visitNode:function({mdastNode:n,lexicalParent:e,actions:t}){const r=n.children.some(s=>typeof s.checked=="boolean")?"check":n.ordered?"number":"bullet",i=vn(r);if(Ve(e)){const s=Sn();s.append(i),e.insertAfter(s)}else e.append(i);t.visitChildren(n,i)}},HV={testNode:"listItem",visitNode({mdastNode:n,actions:e,lexicalParent:t}){const r=t.getListType()==="check"?n.checked??!1:void 0;e.addAndStepInto(Sn(r))}},zV={testLexicalNode:Fe,visitLexicalNode:({lexicalNode:n,actions:e})=>{e.addAndStepInto("list",{ordered:n.getListType()==="number",spread:!1})}},WV={testLexicalNode:Ve,visitLexicalNode:({lexicalNode:n,mdastParent:e,actions:t})=>{const r=n.getChildren(),i=r[0];if(r.length===1&&Fe(i)){const s=e.children.at(-1);s?t.visitChildren(n,s):t.visitChildren(i,e)}else{const s=n.getParent(),o=t.appendToParent(e,{type:"listItem",checked:s.getListType()==="check"?!!n.getChecked():void 0,spread:!1,children:[]});let l=null;for(const a of n.getChildren())rt(a)||xc(a)||a.isInline()&&(Je(a)||Gs(a))?(l??(l=t.appendToParent(o,{type:"paragraph",children:[]})),t.visit(a,l)):(l=null,t.visit(a,o))}}};function UV(n){const e=n.getNodes();if(yP(e,a=>cf(a)&&a.canIndent()?a:null).length>0)return!0;const r=n.anchor,i=n.focus,s=i.isBefore(r)?i:r,o=s.getNode(),l=h0(o);if(l.canIndent()){const a=l.getKey();let c=mc();if(c.anchor.set(a,0,"element"),c.focus.set(a,0,"element"),c=uf(c),c.anchor.is(s))return!0}return!1}function KV(n,e){return Vn(n.registerCommand(f0,t=>{const r=Ie();if(!Ne(r))return!1;t.preventDefault();const i=UV(r)?t.shiftKey?og:df:oT;return n.dispatchCommand(i,void 0)},qe),n.registerCommand(df,()=>{if(e==null)return!1;const t=Ie();if(!Ne(t))return!1;const r=t.getNodes().map(i=>h0(i).getIndent());return Math.max(...r)+1>=e},Qr))}function TC({maxIndent:n}){const[e]=dn();return H.useEffect(()=>KV(e,n),[e,n]),null}function AC(){const[n]=dn();return H.useEffect(()=>aV(n),[n]),null}function jV(n){H.useEffect(()=>fV(n),[n])}function MC({hasStrictIndent:n=!1}){const[e]=dn();return H.useEffect(()=>{if(!e.hasNodes([ji,Ki]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),H.useEffect(()=>{if(n)return hV(e)},[e,n]),jV(e),null}const qV=new Map([["number",O2],["bullet",N2],["check",M2],["",D2]]),IC=Ae("",n=>{n.sub(n.pipe(ul,At(St)),([e,t])=>{if(!e||!t)return;const r=e.anchor.getNode();let i=r.getKey()==="root"?r:br(r,l=>{const a=l.getParent();return a!==null&&nr(a)});i??(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(t.getElementByKey(s)!==null)if(Fe(i)){const l=AT(r,ji),a=l?l.getListType():i.getListType();n.pub(IC,a)}else n.pub(IC,"")})}),JV=Dt(n=>{n.sub(n.pipe(JV,At(St)),([e,t])=>{t==null||t.dispatchCommand(qV.get(e),void 0)})}),GV=Bn({init(n){var e;(e=n.getValue(Vi))==null||e.registerCommand(df,()=>!ZV(7),Qr),n.pubIn({[Ol]:"lists",[Cf]:bL(),[bf]:NL(),[ti]:[VV,HV],[Hi]:[Ki,ji],[zi]:[zV,WV],[b0]:CL(),[So]:[TC,MC,AC],[v0]:[TC,MC,AC]})}});function YV(n){const e=n.getNodes();return e.length===0?new Set([n.anchor.getNode().getParentOrThrow(),n.focus.getNode().getParentOrThrow()]):new Set(e.map(t=>Je(t)?t:t.getParentOrThrow()))}function ZV(n){const e=Ie();if(!Ne(e))return!1;const t=YV(e);let r=0;for(const i of t)if(Fe(i))r=Math.max(Ha(i)+1,r);else if(Ve(i)){const s=i.getParent();if((s==null?void 0:s.getChildren().length)===1){const o=s.getParent();if(Ve(o)&&o.getChildren().length===1)return!1}if(!Fe(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(Ha(s)+1,r)}return r<=n}const NC=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],OC=NC[Math.floor(Math.random()*NC.length)],XV=H.createContext({clientID:0,color:OC[1],isCollabActive:!1,name:OC[0],yjsDocMap:new Map});function QV(n,e){return H.useContext(XV)}function eH(n){throw new Error(n)}function H2(n){{let e=!1;return()=>{e||console.warn(n),e=!0}}}function DC(n){const e=new Set,{ownN
Line truncated
|
||||
You can configure your editor's nodes with createEditor({nodes: [], parentEditor: $getEditor()})`),LC=H2(`LexicalNestedComposer initialEditor should explicitly initialize its namespace when the node configuration differs from the parentEditor. For backwards compatibility, the namespace will be initialized from parentEditor until v0.32.0, but this has always had incorrect copy/paste behavior when the configuration differed.
|
||||
You can configure your editor's namespace with createEditor({namespace: 'nested-editor-namespace', nodes: [], parentEditor: $getEditor()}).`);function nH({initialEditor:n,children:e,initialNodes:t,initialTheme:r,skipCollabChecks:i,skipEditableListener:s}){const o=H.useRef(!1),l=H.useContext(Ku);l==null&&eH("Unexpected parent context null on a nested composer");const[a,{getTheme:c}]=l,u=H.useMemo(()=>{const p=r||c()||void 0,m=YS(l,p);p!==void 0&&(n._config.theme=p),n._parentEditor=n._parentEditor||a;const b=n._createEditorArgs,x=b&&b.namespace;if(t){tH(),x||(LC(),n._config.namespace=a._config.namespace);for(let g of t){let y=null,C=null;if(typeof g!="function"){const v=g;g=v.replace,y=v.with,C=v.withKlass||null}const w=mT(n,g.getType());n._nodes.set(g.getType(),{exportDOM:w?w.exportDOM:void 0,klass:g,replace:y,replaceWithKlass:C,sharedNodeState:kb(g),transforms:DC(g)})}}else if(b&&b.nodes)x||(LC(),n._config.namespace=a._config.namespace);else{const g=n._nodes=new Map(a._nodes);x||(n._config.namespace=a._config.namespace);for(const[y,C]of g)n._nodes.set(y,{exportDOM:C.exportDOM,klass:C.klass,replace:C.replace,replaceWithKlass:C.replaceWithKlass,sharedNodeState:kb(C.klass),transforms:DC(C.klass)})}return[n,m]},[]),{isCollabActive:f,yjsDocMap:h}=QV(),d=i||o.current||h.has(n.getKey());return H.useEffect(()=>{d&&(o.current=!0)},[d]),H.useEffect(()=>{if(!s){const p=m=>n.setEditable(m);return p(a.isEditable()),a.registerEditableListener(p)}},[n,a,s]),Ue.jsx(Ku.Provider,{value:u,children:!f||d?e:null})}function z2(n,e){return n===null||n===e?!1:n.dataset.editorDialog!==void 0||n.dataset.toolbarItem!==void 0||n.dataset.editorDropdown?!0:z2(n.parentElement,e)}function rH(){const n=[...Array(256).keys()].map(t=>t.toString(16).padStart(2,"0")),e=crypto.getRandomValues(new Uint8Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,[...e.entries()].map(([t,r])=>[4,6,8,10].includes(t)?`-${n[r]}`:n[r]).join("")}const W2=n=>n===0?"th":"td",U2={center:ue.centeredCell,left:ue.leftAlignedCell,right:ue.rightAlignedCell},iH=({mdastNode:n,parentEditor:e,lexicalTable:t})=>{const[r,i]=k.useState(null),[s,o]=Er(Wi,Sr),l=k.useMemo(()=>m=>(m.__cacheKey??(m.__cacheKey=rH()),m.__cacheKey),[]),a=k.useCallback(m=>{const b=t.getColCount();if(m===null){i(null);return}let[x,g]=m;if(x>b-1&&(x=0,g++),x<0&&(x=b-1,g-=1),g>t.getRowCount()-1){i(null),e.update(()=>{if(t.getLatest().getNextSibling())t.getLatest().selectNext();else{const C=Et();t.insertAfter(C),C.select()}});return}if(g<0){i(null),e.update(()=>{t.getLatest().selectPrevious()});return}i([x,g])},[t,e]);k.useEffect(()=>{t.focusEmitter.subscribe(a)},[t,a]);const c=k.useCallback(m=>{m.preventDefault(),e.update(()=>{t.addRowToBottom(),i([0,t.getRowCount()])})},[e,t]),u=k.useCallback(m=>{m.preventDefault(),e.update(()=>{t.addColumnToRight(),i([t.getColCount(),0])})},[e,t]),[f,h]=k.useState([-1,-1]),d=k.useCallback(m=>{let b=m.target;for(;b&&!["TH","TD"].includes(b.tagName);){if(b===m.currentTarget)return;b=b.parentElement}if(b===null)return;const x=b.parentElement,y=x.parentElement.tagName==="TFOOT"?-1:Array.from(x.children).indexOf(b),C=b.tagName==="TH"?-1:Array.from(x.parentElement.children).indexOf(x);h([y,C])},[]),p=Ui();return k.createElement("table",{className:ue.tableEditor,onMouseOver:d,onMouseLeave:()=>{h([-1,-1])}},k.createElement("colgroup",null,o?null:k.createElement("col",null),Array.from({length:n.children[0].children.length},(m,b)=>{const g=(n.align??[])[b]??"left",y=U2[g];return k.createElement("col",{key:b,className:y})}),o?null:k.createElement("col",null)),o||k.createElement("thead",null,k.createElement("tr",null,k.createElement("th",{className:ue.tableToolsColumn}),Array.from({length:n.children[0].children.length},(m,b)=>k.createElement("th",{key:b,"data-tool-cell":!0},k.createElement(lH,{setActiveCellWithBoundaries:a,parentEditor:e,colIndex:b,highlightedCoordinates:f,lexicalTable:t,align:(n.align??[])[b]}))),k.createElement("th",{className:ue.tableToolsColumn,"data-tool-cell":!0},k.createElement("button",{className:ue.iconButton,type:"button",title:p("table.deleteTable","Delete table"),onClick:m=>{m.preventDefault(),e.update(()=>{t.selectNext(),t.remove()})}},s("delete_small"))))),k.createElement("tbody",null,n.children.map((m,b)=>{const x=W2(b);return k.createElement("tr",{key:b},o||k.createElement(x,{className:ue.toolCell,"data-tool-cell":!0},k.createElement(aH,{setActiveCellWithBoundaries:a,parentEditor:e,rowIndex:b,highlightedCoordinates:f,lexicalTable:t})),m.children.map((g,y)=>{var C;return k.createElement(sH,{align:(C=n.align)==null?void 0:C[y],key:l(g),contents:g.children,setActiveCell:a,rowIndex:b,colIndex:y,lexicalTable:t,parentEditor:e,activeCell:o?[-1,-1]:r})}),o||b===0&&k.createElement("th",{rowSpan:t.getRowCount(),"data-tool-cell":!0},k.createElement("button",{type:"button",className:ue.addColumnButton,onClick:u},s("add_column"))))})),o||k.createElement("tfoot",null,k.createElement("tr",null,k.createElement("th",null),k.createElement("th",{colSpan:t.getColCoun
Line truncated
|
||||
* react-is.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/return(function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,a=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,u=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,d=n?Symbol.for("react.memo"):60115,p=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,g=n?Symbol.for("react.scope"):60119;function y(le){return typeof le=="string"||typeof le=="function"||le===r||le===c||le===s||le===i||le===f||le===h||typeof le=="object"&&le!==null&&(le.$$typeof===p||le.$$typeof===d||le.$$typeof===o||le.$$typeof===l||le.$$typeof===u||le.$$typeof===b||le.$$typeof===x||le.$$typeof===g||le.$$typeof===m)}function C(le){if(typeof le=="object"&&le!==null){var He=le.$$typeof;switch(He){case e:var ut=le.type;switch(ut){case a:case c:case r:case s:case i:case f:return ut;default:var Mt=ut&&ut.$$typeof;switch(Mt){case l:case u:case p:case d:case o:return Mt;default:return He}}case t:return He}}}var w=a,v=c,S=l,T=o,N=e,I=u,B=r,$=p,P=d,W=t,J=s,pe=i,re=f,Se=!1;function Me(le){return Se||(Se=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(le)||C(le)===a}function A(le){return C(le)===c}function G(le){return C(le)===l}function ne(le){return C(le)===o}function O(le){return typeof le=="object"&&le!==null&&le.$$typeof===e}function ge(le){return C(le)===u}function me(le){return C(le)===r}function _e(le){return C(le)===p}function ce(le){return C(le)===d}function ee(le){return C(le)===t}function he(le){return C(le)===s}function de(le){return C(le)===i}function ie(le){return C(le)===f}it.AsyncMode=w,it.ConcurrentMode=v,it.ContextConsumer=S,it.ContextProvider=T,it.Element=N,it.ForwardRef=I,it.Fragment=B,it.Lazy=$,it.Memo=P,it.Portal=W,it.Profiler=J,it.StrictMode=pe,it.Suspense=re,it.isAsyncMode=Me,it.isConcurrentMode=A,it.isContextConsumer=G,it.isContextProvider=ne,it.isElement=O,it.isForwardRef=ge,it.isFragment=me,it.isLazy=_e,it.isMemo=ce,it.isPortal=ee,it.isProfiler=he,it.isStrictMode=de,it.isSuspense=ie,it.isValidElementType=y,it.typeOf=C})(),it}var XC;function l5(){return XC||(XC=1,Vd.exports=fz()),Vd.exports}/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/var Hd,QC;function hz(){if(QC)return Hd;QC=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},l=0;l<10;l++)o["_"+String.fromCharCode(l)]=l;var a=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(a.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Hd=i()?Object.assign:function(s,o){for(var l,a=r(s),c,u=1;u<arguments.length;u++){l=Object(arguments[u]);for(var f in l)e.call(l,f)&&(a[f]=l[f]);if(n){c=n(l);for(var h=0;h<c.length;h++)t.call(l,c[h])&&(a[c[h]]=l[c[h]])}}return a},Hd}var zd,e_;function a5(){if(e_)return zd;e_=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zd=n,zd}var Wd,t_;function c5(){return t_||(t_=1,Wd=Function.call.bind(Object.prototype.hasOwnProperty)),Wd}var Ud,n_;function dz(){if(n_)return Ud;n_=1;var n=function(){};{var e=a5(),t={},r=c5();n=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(s,o,l,a,c){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var h=Error((a||"React class")+": "+l+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[u](o,u,a,l,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&n((a||"React class")+": type specification of "+l+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var d=c?c():"";n("Failed "+l+" type: "+f.message+(d??""))}}}return i.resetWarningCache=function(){t={}},Ud=i,Ud}var Kd,r_;function pz(){if(r_)return Kd;r_=1;var n=l5(),e=hz(),t=a5(),r=c5(),i=dz(),s=function(){};s=function(l){var a="Warning: "+l;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}};function o(){return null}return Kd=function(l,a){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(A){var G=A&&(c&&A[c]||A[u]);if(typeof G=="function")return G}var h="<<anonymous>>",d={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:g(),arrayOf:y,element:C(),elementType:w(),instanceOf:v,node:I(),objectOf:T,oneOf:S,oneOfType:N,shape:$,exact:P};function p(A,G){return A===G?A!==0||1/A===1/G:A!==A&&G!==G}function m(A,G){this.message=A,this.data=G&&typeof G=="object"?G:{},this.stack=""}m.prototype=Error.prototype;function b(A){var G={},ne=0;function O(me,_e,ce,ee,he,de,ie){if(ee=ee||h,de=de||ce,ie!==t){if(a){var le=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw le.name="Invariant Violation",le}else if(typeof console<"u"){var He=ee+":"+ce;!G[He]&&ne<3&&(s("You are manually calling a React.PropTypes validation function for the `"+de+"` prop on `"+ee+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),G[He]=!0,ne++)}}return _e[ce]==null?me?_e[ce]===null?new m("The "+he+" `"+de+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new m("The "+he+" `"+de+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:A(_e,ce,ee,he,de)}var ge=O.bind(null,!1);return ge.isRequired=O.bind(null,!0),ge}function x(A){function G(ne,O,ge,me,_e,ce){var ee=ne[O],he=pe(ee);if(he!==A){var de=re(ee);return new m("Invalid "+me+" `"+_e+"` of type "+("`"+de+"` supplied to `"+ge+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return b(G)}function g(){return b(o)}function y(A){function G(ne,O,ge,me,_e){if(typeof A!="function")return new m("Property `"+_e+"` of component `"+ge+"` has invalid PropType notation inside arrayOf.");var ce=ne[O];if(!Array.isArray(ce)){var ee=pe(ce);return new m("Invalid "+me+" `"+_e+"` of type "+("`"+ee+"` supplied to `"+ge+"`, expected an array."))}for(var he=0;he<ce.length;he++){var de=A(ce,he,ge,me,_e+"["+he+"]",t);if(de instanceof Error)return de}return null}return b(G)}function C(){function A(G,ne,O,ge,me){var _e=G[ne];if(!l(_e)){var ce=pe(_e);return new m("Invalid "+ge+" `Line truncated
|
||||
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var le=ie(ce,de,ge,me,_e+"."+de,t);if(le)return le}return null}return b(G)}function W(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(W);if(A===null||l(A))return!0;var G=f(A);if(G){var ne=G.call(A),O;if(G!==A.entries){for(;!(O=ne.next()).done;)if(!W(O.value))return!1}else for(;!(O=ne.next()).done;){var ge=O.value;if(ge&&!W(ge[1]))return!1}}else return!1;return!0;default:return!1}}function J(A,G){return A==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function pe(A){var G=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":J(G,A)?"symbol":G}function re(A){if(typeof A>"u"||A===null)return""+A;var G=pe(A);if(G==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return G}function Se(A){var G=re(A);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Me(A){return!A.constructor||!A.constructor.name?h:A.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Kd}var i_;function gz(){if(i_)return Bd.exports;i_=1;{var n=l5(),e=!0;Bd.exports=pz()(n.isElement,e)}return Bd.exports}var mz=gz();const Y=zm(mz);var jd={exports:{}},ot={},s_;function xz(){if(s_)return ot;s_=1;/** @license React v17.0.2
|
||||
* react-is.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/return(function(){var n=60103,e=60106,t=60107,r=60108,i=60114,s=60109,o=60110,l=60112,a=60113,c=60120,u=60115,f=60116,h=60121,d=60122,p=60117,m=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;n=x("react.element"),e=x("react.portal"),t=x("react.fragment"),r=x("react.strict_mode"),i=x("react.profiler"),s=x("react.provider"),o=x("react.context"),l=x("react.forward_ref"),a=x("react.suspense"),c=x("react.suspense_list"),u=x("react.memo"),f=x("react.lazy"),h=x("react.block"),d=x("react.server.block"),p=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),m=x("react.debug_trace_mode"),x("react.offscreen"),b=x("react.legacy_hidden")}var g=!1;function y(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===t||ie===i||ie===m||ie===r||ie===a||ie===c||ie===b||g||typeof ie=="object"&&ie!==null&&(ie.$$typeof===f||ie.$$typeof===u||ie.$$typeof===s||ie.$$typeof===o||ie.$$typeof===l||ie.$$typeof===p||ie.$$typeof===h||ie[0]===d))}function C(ie){if(typeof ie=="object"&&ie!==null){var le=ie.$$typeof;switch(le){case n:var He=ie.type;switch(He){case t:case i:case r:case a:case c:return He;default:var ut=He&&He.$$typeof;switch(ut){case o:case l:case f:case u:case s:return ut;default:return le}}case e:return le}}}var w=o,v=s,S=n,T=l,N=t,I=f,B=u,$=e,P=i,W=r,J=a,pe=!1,re=!1;function Se(ie){return pe||(pe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Me(ie){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function A(ie){return C(ie)===o}function G(ie){return C(ie)===s}function ne(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===n}function O(ie){return C(ie)===l}function ge(ie){return C(ie)===t}function me(ie){return C(ie)===f}function _e(ie){return C(ie)===u}function ce(ie){return C(ie)===e}function ee(ie){return C(ie)===i}function he(ie){return C(ie)===r}function de(ie){return C(ie)===a}ot.ContextConsumer=w,ot.ContextProvider=v,ot.Element=S,ot.ForwardRef=T,ot.Fragment=N,ot.Lazy=I,ot.Memo=B,ot.Portal=$,ot.Profiler=P,ot.StrictMode=W,ot.Suspense=J,ot.isAsyncMode=Se,ot.isConcurrentMode=Me,ot.isContextConsumer=A,ot.isContextProvider=G,ot.isElement=ne,ot.isForwardRef=O,ot.isFragment=ge,ot.isLazy=me,ot.isMemo=_e,ot.isPortal=ce,ot.isProfiler=ee,ot.isStrictMode=he,ot.isSuspense=de,ot.isValidElementType=y,ot.typeOf=C})(),ot}var o_;function yz(){return o_||(o_=1,jd.exports=xz()),jd.exports}var l_=yz();let a_=n=>typeof n=="object"&&n!=null&&n.nodeType===1,c_=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",qd=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){let t=getComputedStyle(n,null);return c_(t.overflowY,e)||c_(t.overflowX,e)||(r=>{let i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(n)}return!1},jc=(n,e,t,r,i,s,o,l)=>s<n&&o>e||s>n&&o<e?0:s<=n&&l<=t||o>=e&&l>=t?s-n-r:o>e&&l<t||s<n&&l>t?o-e+i:0,bz=n=>{let e=n.parentElement;return e??(n.getRootNode().host||null)};var Cz=(n,e)=>{var t,r,i,s,o,l;if(typeof document>"u")return[];let{inline:a,boundary:c,skipOverflowHiddenElements:u}=e,f=typeof c=="function"?c:$=>$!==c;if(!a_(n))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,d=[],p=n;for(;a_(p)&&f(p);){if(p=bz(p),p===h){d.push(p);break}p!=null&&p===document.body&&qd(p)&&!qd(document.documentElement)||p!=null&&qd(p,u)&&d.push(p)}let m=(r=(t=window.visualViewport)==null?void 0:t.width)!=null?r:innerWidth,b=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,x=(o=window.scrollX)!=null?o:pageXOffset,g=(l=window.scrollY)!=null?l:pageYOffset,{height:y,width:C,top:w,right:v,bottom:S,left:T}=n.getBoundingClientRect(),N=w,I=a==="center"?T+C/2:a==="end"?v:T,B=[];for(let $=0;$<d.length;$++){let P=d[$],{height:W,width:J,top:pe,right:re,bottom:Se,left:Me}=P.getBoundingClientRect();if(w>=0&&T>=0&&S<=b&&v<=m&&w>=pe&&S<=Se&&T>=Me&&v<=re)return B;let A=getComputedStyle(P),G=parseInt(A.borderLeftWidth,10),ne=parseInt(A.borderTopWidth,10),O=parseInt(A.borderRightWidth,10),ge=parseInt(A.borderBottomWidth,10),me=0,_e=0,ce="offsetWidth"in P?P.offsetWidth-P.clientWidth-G-O:0,ee="offsetHeight"in P?P.offsetHeight-P.clientHeight-ne-ge:0,he="offsetWidth"in P?P.offsetWidth===0?0:J/P.offsetWidth:0,de="offsetHeight"in P?P.offsetHeight===0?0:W/P.offsetHeight:0;if(h===P)me=jc(g,g+b,b,ne,ge,g+N,g+N+y,y),_e=a==="start"?I:a==="center"?I-m/2:a==="end"?I-m:jc(x,x+m,m,G,O,x+I,x+I+C,C),me=Math.max(0,me+g),_e=Math.max(0,_e+x);else{me=jc(pe,Se,W,ne,ge+ee,N,N+y,y),_e=a==="start"?I-Me-G:a==="center"?I-(Me+J/2)+ce/2:a==="end"?I-re+O+ce:jc(Me,re,J,G,O+ce,I,I+C,C);let{scrollLeft:ie,scrollTop:le}=P;me=Math.max(0,Math.min(le+me/de,P.scrollHeight-W/de+ee)),_e=Math.max(0,Math.min(ie+_e/he,P.scrollWidth-J/he+ce)),N+=le-me,I+=ie-_e}B.puLine truncated
|
||||
<svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
||||
<rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
|
||||
<text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
|
||||
</svg>
|
||||
`),cW={__cache:{},read(n){if(this.__cache[n]||(this.__cache[n]=new Promise(e=>{const t=new Image;t.onerror=()=>{this.__cache[n]=aW,e()},t.onload=()=>{this.__cache[n]=n,e()},t.src=n})),this.__cache[n]instanceof Promise)throw this.__cache[n];return this.__cache[n]}};function uW({title:n,alt:e,className:t,imageRef:r,src:i,width:s,height:o}){return k.createElement("img",{className:t??void 0,alt:e,src:cW.read(i),title:n,ref:r,draggable:"false",width:s,height:o})}function fW({src:n,title:e,alt:t,nodeKey:r,width:i,height:s,rest:o}){const[l,a,c,u,f,h]=Er(Bg,Fg,za,$g,Sr,Vg),d=k.useRef(null),p=k.useRef(null),[m,b,x]=B2(r),[g]=dn(),[y,C]=k.useState(null),w=k.useRef(null),[v,S]=k.useState(!1),[T,N]=k.useState(null),[I,B]=k.useState(null),$=k.useCallback(A=>{if(m&&It(Ie())){A.preventDefault();const ne=Jr(r);If(ne)&&ne.remove()}return!1},[m,r]),P=k.useCallback(A=>{const G=Ie(),ne=p.current;return m&&It(G)&&G.getNodes().length===1&&ne!==null&&ne!==document.activeElement?(A.preventDefault(),ne.focus(),!0):!1},[m]),W=k.useCallback(A=>p.current===A.target?(ii(null),g.update(()=>{b(!0);const G=g.getRootElement();G!==null&&G.focus()}),!0):!1,[g,b]);k.useEffect(()=>{u?(async()=>{I||B(n);const G=await u(n);N(G)})().catch(G=>{console.error(G)}):N(n)},[n,u,I]),k.useEffect(()=>{if(c&&d.current){const{current:A}=d;x_(A,"width",i),x_(A,"height",s)}},[c,i,s]),k.useEffect(()=>{let A=!0;const G=Vn(g.registerUpdateListener(({editorState:ne})=>{A&&C(ne.read(()=>Ie()))}),g.registerCommand(hT,(ne,O)=>(w.current=O,!1),Ct),g.registerCommand(o0,ne=>{const O=ne;return v?!0:O.target===d.current?(O.shiftKey?b(!m):(x(),b(!0)),!0):!1},Ct),g.registerCommand(l0,ne=>ne.target===d.current?(ne.preventDefault(),!0):!1,Ct),g.registerCommand(c0,$,Ct),g.registerCommand(a0,$,Ct),g.registerCommand(u0,P,Ct),g.registerCommand(Rh,W,Ct));return()=>{A=!1,G()}},[x,g,v,m,r,$,P,W,b]);const J=(A,G)=>{setTimeout(()=>{S(!1)},200),g.update(()=>{const ne=Jr(r);If(ne)&&ne.setWidthAndHeight(A,G)})},pe=()=>{S(!0)},re=It(y),Se=m,Me=k.useMemo(()=>{if(o.length===0)return null;const A=o.find(G=>G.type==="mdxJsxAttribute"&&(G.name==="class"||G.name==="className"));return A?A.value:null},[o]);return T!==null?k.createElement(k.Suspense,{fallback:l?k.createElement(l,null):null},k.createElement("div",{className:ue.imageWrapper,"data-editor-block-type":"image"},k.createElement("div",{draggable:re},k.createElement(uW,{width:i,height:s,className:at({[ue.focusedImage]:Se},Me),src:T,title:e??"",alt:t??"",imageRef:d})),re&&Se&&!a&&k.createElement(lW,{editor:g,imageRef:d,onResizeStart:pe,onResizeEnd:J}),f||k.createElement(h,{nodeKey:r,imageSource:T,initialImagePath:I,title:e??"",alt:t??"",width:i,height:s}))):null}const x_=(n,e,t)=>{typeof t=="number"?n.style[e]=`${t}px`:n.style.removeProperty(e)};var hW=Object.defineProperty,dW=(n,e,t)=>e in n?hW(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Io=(n,e,t)=>(dW(n,typeof e!="symbol"?e+"":e,t),t);function pW(n){if(n instanceof HTMLImageElement){const{alt:e,src:t,title:r,width:i,height:s}=n;return{node:Eo({altText:e,src:t,title:r,width:i,height:s})}}return null}class vc extends yc{constructor(e,t,r,i,s,o,l){super(l),Io(this,"__src"),Io(this,"__altText"),Io(this,"__title"),Io(this,"__width"),Io(this,"__height"),Io(this,"__rest"),this.__src=e,this.__title=r,this.__altText=t,this.__width=i??"inherit",this.__height=s??"inherit",this.__rest=o??[]}static getType(){return"image"}static clone(e){return new vc(e.__src,e.__altText,e.__title,e.__width,e.__height,e.__rest,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__altText=e.__altText,this.__title=e.__title,this.__width=e.__width,this.__height=e.__height,this.__rest=e.__rest}static importJSON(e){const{altText:t,title:r,src:i,width:s,rest:o,height:l}=e;return Eo({altText:t,title:r,src:i,height:l,width:s,rest:o})}exportDOM(){const e=document.createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__altText),this.__title&&e.setAttribute("title",this.__title),this.__width&&e.setAttribute("width",this.__width.toString()),this.__height&&e.setAttribute("height",this.__height.toString()),{element:e}}static importDOM(){return{img:()=>({conversion:pW,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(e,t){const r=this.getWritable();r.__width=e,r.__height=t}createDOM(e,t){const r=document.createElement("span"),s=e.theme.image;return s!==void 0&&(r.className=s),r}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(e){this.getWritable().__title=e}setSrc(e){this.getWritable().__src=e}setAltText(e){this.getWritable().__altText=e??""}shouldBeSerializedAsElement(){return this.__width
Line truncated
|
||||
`){[e,t]=dl(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(i+=r),e<a&&t>s&&(i+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new Nt(r,i)),r=[],i=-1);return i>-1&&t.push(new Nt(r,i)),t}}class $r extends tt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,a=r+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,r,i);i=l+1,r=a+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let c=i&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!c?r.push(l):l.decompose(e-o,t-o,r,c)}o=a+1}}replace(e,t,r){if([e,t]=dl(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,r),c=this.lines-o.lines+a.lines;if(a.lines<c>>4&&a.lines>c>>6){let u=this.children.slice();return u[i]=a,new $r(u,this.length-(t-e)+r.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
|
||||
`){[e,t]=dl(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(i+=r),e<a&&t>o&&(i+=l.sliceString(e-o,t-o,r)),o=a+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof $r))return 0;let r=0,[i,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==l)return r;let a=this.children[i],c=e.children[s];if(a!=c)return r+a.scanIdentical(c,t);r+=a.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new Nt(d,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],a=0,c=-1,u=[];function f(d){let p;if(d.lines>s&&d instanceof $r)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(h(),l.push(d)):d instanceof Nt&&a&&(p=u[u.length-1])instanceof Nt&&d.lines+p.lines<=32?(a+=d.lines,c+=d.length+1,u[u.length-1]=new Nt(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>i&&h(),a+=d.lines,c+=d.length+1,u.push(d))}function h(){a!=0&&(l.push(u.length==1?u[0]:$r.from(u,c)),c=-1,a=u.length=0)}for(let d of e)f(d);return h(),l.length==1?l[0]:new $r(l,t)}}tt.empty=new Nt([""],0);function KW(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Du(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let l=n[s],a=i+l.length;a>=t&&(a>r&&(l=l.slice(0,r-i)),i<t&&(l=l.slice(t-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=a+1}return e}function v_(n,e,t){return Du(n,[""],e,t)}class xa{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Nt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof Nt?i.text.length:i.children.length;if(o==(t>0?l:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(i instanceof Nt){let a=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=i.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Nt?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class oA{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new xa(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class lA{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(tt.prototype[Symbol.iterator]=function(){return this.iter()},xa.prototype[Symbol.iterator]=oA.prototype[Symbol.iterator]=lA.prototype[Symbol.iterator]=function(){return this});class jW{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function dl(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Yt(n,e,t=!0,r=!0){return WW(n,e,t,r)}function qW(n){return n>=56320&&n<57344}function JW(n){return n>=55296&&n<56320}function Nn(n,e){let t=n.charCodeAt(e);if(!JW(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return qW(r)?(t-55296<<10)+(r-56320)+65536:t}function rx(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Br(n){return n<65536?1:2}const Wg=/\r\n?|\n/;var rn=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(rn||(rn={}));class Gr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){Ug(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new Gr(e)}composeDesc(e){return this.empty?e:e.empty?this:aA(this,e)}mapDesc(e,t=!1){return e.empty?this:Kg(this,e,t)}mapPos(e,t=-1,r=rn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],c=i+l;if(a<0){if(c>e)return s+(e-i);s+=l}else{if(r!=rn.Simple&&c>=e&&(r==rn.TrackDel&&i<e&&c>e||r==rn.TrackBefore&&i<e||r==rn.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!l)return e==i||t<0?s:s+a;s+=a}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=t&&l>=e)return i<e&&l>t?"cover":!0;i=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Gr(e)}static create(e){return new Gr(e)}}class zt extends Gr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ug(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return Kg(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],l=t[i+1];if(l>=0){t[i]=l,t[i+1]=o;let a=i>>1;for(;r.length<a;)r.push(tt.empty);r.push(o?e.slice(s,s+o):tt.empty)}s+=o}return new zt(t,r)}compose(e){return this.empty?e:e.empty?this:aA(this,e,!0)}map(e,t=!1){return e.empty?this:Kg(this,e,t,!0)}iterChanges(e,t=!1){Ug(this,e,t)}get desc(){return Gr
Line truncated
|
||||
`}get readOnly(){return this.facet(mA)}phrase(e,...t){for(let r of this.facet(et.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(fA))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return sU(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let a=Yt(t,o,!1);if(s(t.slice(a,o))!=kt.Word)break;o=a}for(;l<i;){let a=Yt(t,l);if(s(t.slice(l,a))!=kt.Word)break;l=a}return o==l?null:Q.range(o+r,l+r)}}et.allowMultipleSelections=Jg;et.tabSize=ke.define({combine:n=>n.length?n[0]:4});et.lineSeparator=hA;et.readOnly=mA;et.phrases=ke.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});et.languageData=fA;et.changeFilter=dA;et.transactionFilter=pA;et.transactionExtender=gA;jh.reconfigure=Be.define();function oi(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class ys{eq(e){return this==e}range(e,t=e){return Zg.create(e,t,this)}}ys.prototype.startSide=ys.prototype.endSide=0;ys.prototype.point=!1;ys.prototype.mapMode=rn.TrackDel;function ox(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Zg=class bA{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new bA(e,t,r)}};function Xg(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class lx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let a=o+l>>1,c=s[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return c>=0?o:l;c>=0?l=a:o=a+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let c=this.value[a],u=this.from[a]+e,f=this.to[a]+e,h,d;if(u==f){let p=t.mapPos(u,c.startSide,c.mapMode);if(p==null||(h=d=p,c.startSide!=c.endSide&&(d=t.mapPos(u,c.endSide),d<h)))continue}else if(h=t.mapPos(u,c.startSide),d=t.mapPos(f,c.endSide),h>d||h==d&&c.startSide>0&&c.endSide<=0)continue;(d-h||c.endSide-c.startSide)<0||(o<0&&(o=h),c.point&&(l=Math.max(l,d-h)),r.push(c),i.push(h-o),s.push(d-o))}return{mapped:r.length?new lx(i,s,r,l):null,pos:o}}}class Ze{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Ze(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(Xg)),this.isEmpty)return t.length?Ze.of(t):this;let l=new CA(this,null,-1).goto(0),a=0,c=[],u=new Li;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let f=t[a++];u.addInner(f.from,f.to,f.value)||c.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&u.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(u.addInner(l.from,l.to,l.value)||c.push(Zg.create(l.from,l.to,l.value))),l.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?Ze.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],c=e.touchesRange(l,l+a.length);if(c===!1)i=Math.max(i,a.maxPoint),t.push(a),r.push(e.mapPos(l));else if(c===!0){let{mapped:u,pos:f}=a.map(l,e);u&&(i=Math.max(i,u.maxPoint),t.push(u),r.push(f))}}let s=this.nextLayer.map(e);return t.length==0?s:new Ze(r,t,s||Ze.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ua.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ua.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&
Line truncated
|
||||
`)}static newName(){let e=A_[T_]||1;return A_[T_]=e+1,tm+e.toString(36)}static mount(e,t,r){let i=e[nm],s=r&&r.nonce;i?s&&i.setNonce(s):i=new lU(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let M_=new Map;class lU{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=M_.get(r);if(s)return e[nm]=s;this.sheet=new i.CSSStyleSheet,M_.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[nm]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<s&&a>-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),r)for(let c=0;c<l.rules.length;c++)r.insertRule(l.rules[c],i++)}else{for(;s<a;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+`
|
||||
`;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Cs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ka={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},aU=typeof navigator<"u"&&/Mac/.test(navigator.platform),cU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var nn=0;nn<10;nn++)Cs[48+nn]=Cs[96+nn]=String(nn);for(var nn=1;nn<=24;nn++)Cs[nn+111]="F"+nn;for(var nn=65;nn<=90;nn++)Cs[nn]=String.fromCharCode(nn+32),Ka[nn]=String.fromCharCode(nn);for(var Zd in Cs)Ka.hasOwnProperty(Zd)||(Ka[Zd]=Cs[Zd]);function uU(n){var e=aU&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||cU&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ka:Cs)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function lt(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)_A(n,arguments[e]);return n}function _A(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)_A(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let Cn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},rm=typeof document<"u"?document:{documentElement:{style:{}}};const im=/Edge\/(\d+)/.exec(Cn.userAgent),vA=/MSIE \d/.test(Cn.userAgent),sm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Cn.userAgent),qh=!!(vA||sm||im),I_=!qh&&/gecko\/(\d+)/i.test(Cn.userAgent),Xd=!qh&&/Chrome\/(\d+)/.exec(Cn.userAgent),fU="webkitFontSmoothing"in rm.documentElement.style,om=!qh&&/Apple Computer/.test(Cn.vendor),N_=om&&(/Mobile\/\w+/.test(Cn.userAgent)||Cn.maxTouchPoints>2);var Ee={mac:N_||/Mac/.test(Cn.platform),windows:/Win/.test(Cn.platform),linux:/Linux|X11/.test(Cn.platform),ie:qh,ie_version:vA?rm.documentMode||6:sm?+sm[1]:im?+im[1]:0,gecko:I_,gecko_version:I_?+(/Firefox\/(\d+)/.exec(Cn.userAgent)||[0,0])[1]:0,chrome:!!Xd,chrome_version:Xd?+Xd[1]:0,ios:N_,android:/Android\b/.test(Cn.userAgent),webkit_version:fU?+(/\bAppleWebKit\/(\d+)/.exec(Cn.userAgent)||[0,0])[1]:0,safari:om,safari_version:om?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Cn.userAgent)||[0,0])[1]:0,tabSize:rm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function ax(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Lf=Object.create(null);function cx(n,e,t){if(n==e)return!0;n||(n=Lf),e||(e=Lf);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function hU(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function O_(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function dU(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class li{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var ln=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(ln||(ln={}));class Pe extends ys{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Sc(e)}Line truncated
|
||||
`,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),c=n.visualLineSide(i,!t)}if(a){if(!a(u))return l}else{if(!r)return c;a=r(u)}l=c}}function tK(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==kt.Space&&(i=o),i==o}}function nK(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return Q.cursor(i,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),c=n.coordsAtPos(i,(e.empty?e.assoc:0)||(t?1:-1)),u=n.documentTop;if(c)o==null&&(o=c.left-a.left),l=s<0?c.top:c.bottom;else{let p=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(i-p.from))),l=(s<0?p.top:p.bottom)+u}let f=a.left+o,h=r??n.viewState.heightOracle.textHeight>>1,d=pm(n,{x:f,y:l+h*s},!1,s);return Q.cursor(d.pos,d.assoc,void 0,o)}function _a(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let a=r||t||(e-s<o-e?-1:1);e=a<0?s:o,r=a}});if(!r)return e}}function YA(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=_a(n,i.from,0);o!=i.from&&(s=Q.cursor(o,-1))}else{let o=_a(n,i.from,-1),l=_a(n,i.to,1);(o!=i.from||l!=i.to)&&(s=Q.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?Q.create(t,e.mainIndex):e}function rp(n,e,t){let r=_a(n.state.facet(Ec).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:Q.cursor(r,r<t.from?1:-1)}class Vr{constructor(e,t){this.pos=e,this.assoc=t}}function pm(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:l}=e,a=l-s,c;for(;;){if(a<0)return new Vr(0,1);if(a>n.viewState.docHeight)return new Vr(n.state.doc.length,-1);if(c=n.elementAtHeight(a),r==null)break;if(c.type==ln.Text){if(r<0?c.to<n.viewport.from:c.from>n.viewport.to)break;let h=n.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(h&&(r<0?h.top<=a+s:h.bottom>=a+s))break}let f=n.viewState.heightOracle.textHeight/2;a=r>0?c.bottom+f:c.top-f}if(n.viewport.from>=c.to||n.viewport.to<=c.from){if(t)return null;if(c.type==ln.Text){let f=QU(n,i,c,o,l);return new Vr(f,f==c.from?1:-1)}}if(c.type!=ln.Text)return a<(c.top+c.bottom)/2?new Vr(c.from,1):new Vr(c.to,-1);let u=n.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=n.docView.lineAt(c.from,-2)),new rK(n,o,l,n.textDirectionAt(c.from)).scanTile(u,c.from)}class rK{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[zr.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[zr.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),l,a,c=-1,u=1e9,f;e:for(;r<i;){let d=i-r,p=r+i>>1;t:if(s.has(p)){let b=r+Math.floor(Math.random()*d);for(let x=0;x<d;x++){if(!s.has(b)){p=b;break t}b++,b==i&&(b=r)}break e}s.add(p);let m=t(p);if(m)for(let b=0;b<m.length;b++){let x=m[b],g=0;if(x.bottom<this.y)(!l||l.bottom<x.bottom)&&(l=x),g=1;else if(x.top>this.y)(!a||a.top>x.top)&&(a=x),g=-1;else{let y=x.left>this.x?this.x-x.left:x.right<this.x?this.x-x.right:0,C=Math.abs(y);C<u&&(c=p,u=C,f=x),y&&(g=y<0==(this.baseDir==pt.LTR)?-1:1)}g==-1&&(!o||this.baseDirAt(e[p],1))?i=p:g==1&&(!o||this.baseDirAt(e[p+1],-1))&&(r=p+1)}}if(!f){let d=l&&(!a||this.y-l.bottom<a.top-this.y)?l:a;return this.y=(d.top+d.bottom)/2,this.scan(e,t)}let h=(o?this.dirAt(e[c],1):this.baseDir)==pt.LTR;return{i:c,after:this.x>(f.left+f.right)/2==h}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Yt(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,l=r[s+1]-t;return Ja(e.dom,o,l).getClientRects()});return i.after?new Vr(r[i.i+1],-1):new Vr(r[i.i],1)}scanTile(e,t){if(!e.length)return new Vr(t,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,t);if(l.isComposite())return this.scanTile(l,t)}let r=[t];for(let l=0,a=t;l<e.children.length;l++)r.push(a+=e.children[l].length);let i=this.scan(r,l=>{let a=e.children[l];return a.flags&48?null:(a.dom.nodeType==1?a.dom:Ja(a.dom,0,a.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new Vr(r[i.i+1],-1):new Vr(o,1)}}const ta="";class iK{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(et.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ta}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=$t.get(i),l=i.nextSibling;if(l==t){o!=null&&o.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let a=$t.get(l);(o&&a?o.breakAfter:(o?o.breakAfte
Line truncated
|
||||
`&&n.lineWrapping&&(r&&(r=Q.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:tt.of([" "])}),t)return mx(n,t,r,s);if(r&&!Vf(r,i)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin,l=="select.pointer"&&(r=YA(n.state.facet(Ec).map(a=>a(n)),r))),n.dispatch({selection:r,scrollIntoView:o,userEvent:l}),!0}else return!1}function mx(n,e,t,r=-1){if(Ee.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Ee.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Qo(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Qo(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Qo(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=aK(n,e,t));return n.state.facet($A).some(a=>a(n,e.from,e.to,s,l))||n.dispatch(l()),!0}function aK(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let a=e.from<s.from?-1:1,c=a<0?s.from:s.to,u=_a(i.facet(Ec).map(f=>f(n)),c,a);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:Q.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let a=i.changes(e),c=t&&t.main.to<=a.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=n.state.sliceDoc(e.from,e.to),f,h=t&&GA(n,t.main.head);if(h){let p=e.insert.length-(e.to-e.from);f={from:h.from,to:h.to-p}}else f=n.state.doc.lineAt(s.head);let d=s.to-e.to;r=i.changeByRange(p=>{if(p.from==s.from&&p.to==s.to)return{changes:a,range:c||p.map(a)};let m=p.to-d,b=m-u.length;if(n.state.sliceDoc(b,m)!=u||m>=f.from&&b<=f.to)return{range:p};let x=i.changes({from:b,to:m,insert:e.insert}),g=p.to-s.to;return{changes:x,range:c?Q.range(Math.max(0,c.anchor+g),Math.max(0,c.head+g)):p.map(x)}})}else r={changes:a,selection:c&&i.selection.replaceRange(c)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function QA(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}if(o<s&&n.length<e.length){let a=t<=s&&t>=o?s-t:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=t<=s&&t>=l?s-t:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function cK(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new V_(t,r)),(i!=t||s!=r)&&e.push(new V_(i,s))),e}function uK(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?Q.single(t+e,r+e):null}function Vf(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class fK{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ee.safari&&e.contentDOM.addEventListener("input",()=>null),Ee.gecko&&EK(e.contentDOM.ownerDocument)}handleEvent(e){!bK(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=hK(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].hand
Line truncated
|
||||
`))};if((Ee.mac||Ee.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:a,insert:tt.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let h=this.to-this.from+(f.to-f.from+f.insert.length);mx(e,f,Q.single(this.toEditorPos(r.selectionStart,h),this.toEditorPos(r.selectionEnd,h)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let a=e.coordsForChar(o);s=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(a<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(Pe.mark({attributes:{style:u}}).range(a,c))}}}e.dispatch({effects:WA.of(Pe.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=qa(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,t+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}t+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class we{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measur
Line truncated
|
||||
--\u2028\u2029\uFEFF-]`,Cm),uj={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let op=null;function fj(){var n;if(op==null&&typeof document<"u"&&document.body){let e=document.body.style;op=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return op||!1}const $u=ke.define({combine(n){let e=oi(n,{render:null,specialChars:cj,addSpecialChars:null});return(e.replaceTabs=!fj())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Cm)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Cm)),e}});function hj(n={}){return[$u.of(n),dj()]}let av=null;function dj(){return av||(av=Bt.fromClass(class{constructor(n){this.view=n,this.decorations=Pe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet($u)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new aj({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,s=Nn(e[0],0);if(s==9){let o=i.lineAt(r),l=t.state.tabSize,a=Fl(o.text,l,r-o.from);return Pe.replace({widget:new xj((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Pe.replace({widget:new mj(n,s)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet($u);n.startState.facet($u)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const pj="•";function gj(n){return n>=32?pj:n==10?"":String.fromCharCode(9216+n)}class mj extends li{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=gj(this.code),r=e.state.phrase("Control character")+" "+(uj[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let s=document.createElement("span");return s.textContent=t,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class xj extends li{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function yj(){return Cj}const bj=Pe.line({class:"cm-activeLine"}),Cj=Bt.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(bj.range(i.from)),e=i.from)}return Pe.set(t)}},{decorations:n=>n.decorations}),_m=2e3;function _j(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),s=[];if(e.off>_m||t.off>_m||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=r;a<=i;a++){let c=n.doc.line(a);c.length<=l&&s.push(Q.range(c.from+o,c.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=r;a<=i;a++){let c=n.doc.line(a),u=em(c.text,o,n.tabSize,!0);if(u<0)s.push(Q.cursor(c.to));else{let f=em(c.text,l,n.tabSize);s.push(Q.range(c.from+u,c.from+f))}}}return s}function vj(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function cv(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,s=i>_m?-1:i==r.length?vj(n,e.clientX):Fl(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:s,off:i}}function wj(n,e){let t=cv(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(t.line).from),o=i.state.doc.lineAt(s);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let l=cv(n,i);if(!l)return r;let a=_j(n.state,t,l);return a.length?o?Q.create(a.concat(r.ranges)):Q.create(a):r}}:null}function Sj(n){let e=(t=>t.altKey&&t.button==0);return we.mouseSelectionStyle.of((t,r)=>e(r)?wj(t,r):null)}const kj={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},Ej={style:"cursor: crosshair"};function Tj(n={}){let[e,t]=kj[n.key||"Alt"],r=Bt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,we.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void
Line truncated
|
||||
`&&(t="");else{let r=t.indexOf(`
|
||||
`);r>-1&&(t=t.slice(0,r))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),r=e+t.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(t=t.slice(0,s-(r-t.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,l=this.lineAfter(o);t+=l,r=o+l.length}return{line:t,end:r}}skipGapsTo(e,t,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+t;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;t+=o-i}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(t,i,1),t+=i;let l=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-l}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==t?this.chunk[o+2]=r:this.chunk.push(e,t,r,s),i}parseLine(e){let{line:t,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new GM(t,e?e.state.tabSize:4,e?mo(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=ZM(s.token,o,this.state);if(l&&(i=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=gt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:fJ,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new gt(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new gt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function ZM(n,e,t){e.start=e.pos;for(let r=0;r<10;r++){let i=n(e,t);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const Ix=Object.create(null),ec=[kn.none],fJ=new vx(ec),Rv=[],Pv=Object.create(null),XM=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])XM[n]=eI(Ix,e);class QM{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),XM)}resolve(e){return e?this.table[e]||(this.table[e]=eI(this.extra,e)):0}}const hJ=new QM(Ix);function mp(n,e){Rv.indexOf(n)>-1||(Rv.push(n),console.warn(e))}function eI(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let c of l.split(".")){let u=n[c]||j[c];u?typeof u=="function"?a.length?a=a.map(u):mp(c,`Modifier ${c} used at start of tag`):a.length?mp(c,`Tag ${c} used as modifier`):a=Array.isArray(u)?u:[u]:mp(c,`Unknown highlighting tag ${c}`)}for(let c of a)t.push(c)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(l=>l.id),s=Pv[i];if(s)return s.id;let o=Pv[i]=kn.define({id:ec.length,name:r,props:[gq({[r]:t})]});return ec.push(o),o.id}function dJ(n,e){let t=kn.define({id:ec.length,name:"Document",props:[js.add(()=>n),LM.add(()=>r=>e.getIndent(r))],top:!0});return ec.push(t),t}pt.RTL,pt.LTR;class tI{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=an(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(nI(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function Fv(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function pJ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=Fv(e)+Fv(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function gJ(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:pJ(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function kQ(n,e){return t=>{for(let r=an(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class $v{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Zs(n){return n.selection.main.from}function nI(n,e)
Line truncated
|
||||
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new ZY(this):new JY(this)}getCursor(e,t=0,r){let i=e.doc?e:et.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Fo(this,i,t,r):Po(this,i,t,r)}}class GI{constructor(e){this.spec=e}}function jY(n,e,t){return(r,i,s,o)=>{if(t&&!t(r,i,s,o))return!1;let l=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return n(l,e,r,i)}}function Po(n,e,t,r){let i;return n.wholeWord&&(i=qY(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=jY(n.test,e,i)),new bl(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function qY(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(Xf(i,t-s))!=kt.Word||e(Qf(i,t-s))!=kt.Word)&&(e(Qf(i,r-s))!=kt.Word||e(Xf(i,r-s))!=kt.Word))}class JY extends GI{constructor(e){super(e)}nextMatch(e,t,r){let i=Po(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=Po(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),o=Po(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=Po(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=Po(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function GY(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function Fo(n,e,t,r){let i;return n.wholeWord&&(i=YY(e.charCategorizer(e.selection.main.head))),n.test&&(i=GY(n.test,e,i)),new jI(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function Xf(n,e){return n.slice(Yt(n,e,!1),e)}function Qf(n,e){return n.slice(e,Yt(n,e))}function YY(n){return(e,t,r)=>!r[0].length||(n(Xf(r.input,r.index))!=kt.Word||n(Qf(r.input,r.index))!=kt.Word)&&(n(Qf(r.input,r.index+r[0].length))!=kt.Word||n(Xf(r.input,r.index+r[0].length))!=kt.Word)}class ZY extends GI{nextMatch(e,t,r){let i=Fo(this.spec,e,r,e.doc.length).next();return i.done&&(i=Fo(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),o=Fo(this.spec,e,s,r),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==t||l.from>s+10))return l;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=Fo(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=Fo(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const ic=Be.define(),Ux=Be.define(),as=Xt.define({create(n){return new Ep(Rm(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ic)?n=new Ep(t.value.create(),n.panel):t.is(Ux)&&(n=new Ep(n.query,t.value?Kx:null));return n},provide:n=>Ya.from(n,e=>e.panel)});class Ep{constructor(e,t){this.query=e,this.panel=t}}const XY=Pe.mark({class:"cm-searchMatch"}),QY=Pe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),eZ=Bt.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(as))}update(n){let e=n.state.field(as);(e!=n.startState.field(as)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Pe.none;let{view:t}=this,r=new Li;for(let i=0,s=t.visibleRanges,o=s.length;i<o;i++){let{from:l,to:a}=s[i];for(;i<o-1&&a>s[i+1].from-500;)a=s[++i].to;n.highlight(t.state,l,a,(c,u)=>{let f=t.state.selection.ranges.some(h=>h.from==c&&h.to==u);r.add(c,u,f?QY:XY)})}return r.finish()}},{decorations:n=>n.decorations});function Dc(n){return e=>{let t=e.state.field(as,!1);return t&&t.query.spec.valid?n(e,t):XI(e)}}const eh=Dc((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=Q.single(r.from,r.to),s=n.state.facet(Vl);return n.dispatch({selection:i,effects:[jx(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),ZI(n),!0}),th=Dc((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)
Line truncated
|
||||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||||
*
|
||||
* @license MIT <https://opensource.org/licenses/MIT>
|
||||
* @author Lea Verou <https://lea.verou.me>
|
||||
* @namespace
|
||||
* @public
|
||||
*/var t=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function g(y){return y instanceof a?new a(y.type,g(y.content),y.alias):Array.isArray(y)?y.map(g):y.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(g){return Object.prototype.toString.call(g).slice(8,-1)},objId:function(g){return g.__id||Object.defineProperty(g,"__id",{value:++s}),g.__id},clone:function g(y,C){C=C||{};var w,v;switch(l.util.type(y)){case"Object":if(v=l.util.objId(y),C[v])return C[v];w={},C[v]=w;for(var S in y)y.hasOwnProperty(S)&&(w[S]=g(y[S],C));return w;case"Array":return v=l.util.objId(y),C[v]?C[v]:(w=[],C[v]=w,y.forEach(function(T,N){w[N]=g(T,C)}),w);default:return y}},getLanguage:function(g){for(;g;){var y=i.exec(g.className);if(y)return y[1].toLowerCase();g=g.parentElement}return"none"},setLanguage:function(g,y){g.className=g.className.replace(RegExp(i,"gi"),""),g.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(g){var y=document.getElementsByTagName("script");for(var C in y)if(y[C].src==g)return y[C]}return null}},isActive:function(g,y,C){for(var w="no-"+y;g;){var v=g.classList;if(v.contains(y))return!0;if(v.contains(w))return!1;g=g.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(g,y){var C=l.util.clone(l.languages[g]);for(var w in y)C[w]=y[w];return C},insertBefore:function(g,y,C,w){w=w||l.languages;var v=w[g],S={};for(var T in v)if(v.hasOwnProperty(T)){if(T==y)for(var N in C)C.hasOwnProperty(N)&&(S[N]=C[N]);C.hasOwnProperty(T)||(S[T]=v[T])}var I=w[g];return w[g]=S,l.languages.DFS(l.languages,function(B,$){$===I&&B!=g&&(this[B]=S)}),S},DFS:function g(y,C,w,v){v=v||{};var S=l.util.objId;for(var T in y)if(y.hasOwnProperty(T)){C.call(y,T,y[T],w||T);var N=y[T],I=l.util.type(N);I==="Object"&&!v[S(N)]?(v[S(N)]=!0,g(N,C,null,v)):I==="Array"&&!v[S(N)]&&(v[S(N)]=!0,g(N,C,T,v))}}},plugins:{},highlightAll:function(g,y){l.highlightAllUnder(document,g,y)},highlightAllUnder:function(g,y,C){var w={callback:C,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),l.hooks.run("before-all-elements-highlight",w);for(var v=0,S;S=w.elements[v++];)l.highlightElement(S,y===!0,w.callback)},highlightElement:function(g,y,C){var w=l.util.getLanguage(g),v=l.languages[w];l.util.setLanguage(g,w);var S=g.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,w);var T=g.textContent,N={element:g,language:w,grammar:v,code:T};function I($){N.highlightedCode=$,l.hooks.run("before-insert",N),N.element.innerHTML=N.highlightedCode,l.hooks.run("after-highlight",N),l.hooks.run("complete",N),C&&C.call(N.element)}if(l.hooks.run("before-sanity-check",N),S=N.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!N.code){l.hooks.run("complete",N),C&&C.call(N.element);return}if(l.hooks.run("before-highlight",N),!N.grammar){I(l.util.encode(N.code));return}if(y&&r.Worker){var B=new Worker(l.filename);B.onmessage=function($){I($.data)},B.postMessage(JSON.stringify({language:N.language,code:N.code,immediateClose:!0}))}else I(l.highlight(N.code,N.grammar,N.language))},highlight:function(g,y,C){var w={code:g,grammar:y,language:C};if(l.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=l.tokenize(w.code,w.grammar),l.hooks.run("after-tokenize",w),a.stringify(l.util.encode(w.tokens),w.language)},tokenize:function(g,y){var C=y.rest;if(C){for(var w in C)y[w]=C[w];delete y.rest}var v=new f;return h(v,v.head,g),u(g,v,y,v.head,0),p(v)},hooks:{all:{},add:function(g,y){var C=l.hooks.all;C[g]=C[g]||[],C[g].push(y)},run:function(g,y){var C=l.hooks.all[g];if(!(!C||!C.length))for(var w=0,v;v=C[w++];)v(y)}},Token:a};r.Prism=l;function a(g,y,C,w){this.type=g,this.content=y,this.alias=C,this.length=(w||"").length|0}a.stringify=function g(y,C){if(typeof y=="string")return y;if(Array.isArray(y)){var w="";return y.forEach(function(I){w+=g(I,C)}),w}var v={type:y.type,content:g(y.content,C),tag:"span",classes:["token",y.type],attributes:{},language:C},S=y.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(v.classes,S):v.classes.push(S)),l.hooks.run("wrap",v);var T="";for(var N in v.attributes)T+=" "+N+'="'+(v.attributes[N]||"").replace(/"/g,""")+'"';return"<"+v.tag+' class="'+v.classes.join(" ")+'"'+T+">"+v.content+"</"+v.tag+">"};function c(g,y,C,w){g.lastIndex=y;var v=g.exec(C);if(v&&w&&v[1]){var S=v[1].length;v.indexLine truncated
|
||||
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(N+1))}x.textContent=v,t.highlightElement(x)},function(v){b.setAttribute(l,u),x.textContent=v})}}),t.plugins.fileHighlight={highlight:function(b){for(var x=(b||document).querySelectorAll(f),g=0,y;y=x[g++];)t.highlightElement(y)}};var p=!1;t.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Ap)),Ap.exports}LZ();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?Line truncated
|
||||
`&&r[i-2].getTextContent()===`
|
||||
`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const c=Et();return this.insertAfter(c,t),c}const{anchor:s,focus:o}=e,a=(s.isBefore(o)?s:o).getNode();if(rt(a)){let c=KZ(a);const u=[];for(;;)if(ZE(c))u.push(r0()),c=c.getNextSibling();else if(yN(c)){let x=0;const g=c.getTextContent(),y=c.getTextContentSize();for(;x<y&&g[x]===" ";)x++;if(x!==0&&u.push(xN(" ".repeat(x))),x!==y)break;c=c.getNextSibling()}else break;const f=a.splitText(s.offset)[0],h=s.offset===0?0:1,d=f.getIndexWithinParent()+h,p=a.getParentOrThrow(),m=[al(),...u];p.splice(d,0,m);const b=u[u.length-1];b?b.select():s.offset===0?f.selectPrevious():f.getNextSibling().selectNext(0,0)}if(Jx(a)){const{offset:c}=e.anchor;a.splice(c,0,[al()]),a.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const e=Et();return this.getChildren().forEach(r=>e.append(r)),this.replace(e),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}}function Si(n,e){return S6(Lc).setLanguage(n).setTheme(e)}function Jx(n){return n instanceof Lc}function Aw(n){const e=n.getAttribute(ia);return{node:Si(e)}}function VZ(n){const e=n,t=mN(e);return!t&&!zZ(e)?{node:null}:{node:t?Si():null}}function HZ(){return{node:Si()}}function Mw(){return{node:null}}function mN(n){return n.style.fontFamily.match("monospace")!==null}function zZ(n){let e=n.parentElement;for(;e!==null;){if(mN(e))return!0;e=e.parentElement}return!1}function WZ(n){return n.classList.contains("js-file-line")}function Mp(n){return n.classList.contains("js-file-line-container")}class ld extends Ph{constructor(e="",t,r){super(e,r),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new ld(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e),r=Ip(e.theme,this.__highlightType);return wr(t,r),t}updateDOM(e,t,r){const i=super.updateDOM(e,t,r),s=Ip(r.theme,e.__highlightType),o=Ip(r.theme,this.__highlightType);return s!==o&&(s&&$h(t,s),o&&wr(t,o)),i}static importJSON(e){return xN().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return Si()}}function Ip(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function xN(n="",e){return Bi(new ld(n,e))}function yN(n){return n instanceof ld}function UZ(n,e){let t=n;for(let r=i0(n,e);r&&(yN(r.origin)||ZE(r.origin));r=mP(r))t=r.origin;return t}function KZ(n){return UZ(n,"previous")}(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(t){var r=e[t],i=[];/^\w+$/.test(t)||i.push(/\w+/.exec(t)[0]),t==="diff"&&i.push("bold"),n.languages.diff[t]={pattern:RegExp("^(?:["+r+`].*(?:\r
|
||||
?|
|
||||
|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:e})})(Prism);function Vm(n,e){const t={};for(const r of n){const i=e(r);i&&(t[i]?t[i].push(r):t[i]=[r])}return t}function jZ(n){const e=Vm(n,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const Iw=/[!-/:-@[-`{-~\s]/;function qZ(n){return rt(n)&&!n.hasFormat("code")}function JZ(n){throw new Error(n)}function GZ(n,e,t,r){const i=n.getParent();if(!nr(i)||n.getFirstChild()!==e)return!1;const s=e.getTextContent();if(s[t-1]!==" ")return!1;for(const{regExp:o,replace:l}of r){const a=s.match(o);if(a&&a[0].length===(a[0].endsWith(" ")?t:t-1)){const c=e.getNextSiblings(),[u,f]=e.splitText(t),h=f?[f,...c]:c;if(l(n,h,a,!1)!==!1)return u.remove(),!0}}return!1}function YZ(n,e,t,r){const i=n.getParent();if(!nr(i)||n.getFirstChild()!==e)return!1;const s=e.getTextContent();if(s[t-1]!==" ")return!1;for(const{regExpStart:o,replace:l,regExpEnd:a}of r){if(a&&!("optional"in a)||a&&"optional"in a&&!a.optional)continue;const c=s.match(o);if(c&&c[0].length===(c[0].endsWith(" ")?t:t-1)){const u=e.getNextSiblings(),[f,h]=e.splitText(t),d=h?[h,...u]:u;if(l(n,d,c,null,null,!1)!==!1)return f.remove(),!0}}return!1}function ZZ(n,e,t){let r=n.getTextContent();const i=r[e-1],s=t[i];if(s==null)return!1;e<r.length&&(r=r.slice(0,e));for(const o of s){if(!o.replace||!o.regExp)continue;const l=r.match(o.regExp);if(l===null)continue;const a=l.index||0,c=a+l[0].length;let u;return a===0?[u]=n.splitText(c):[,u]=n.splitText(a,c),u.selectNext(0,0),o.replace(u,l),!0}return!1}function XZ(n,e,t){const r=n.getTextContent(),i=e-1,s=r[i],o=t[s];if(!o)return!1;for(const l of o){const{tag:a}=l,c=a.length,u=i-c+1;if(c>1&&!bN(r,u,a,0,c)||r[u-1]===" ")continue;const f=r[i+1];if(l.intraword===!1&&f&&!Iw.test(f))continue;const h=n;let d=h,p=Nw(r,u,a),m=d;for(;p<0&&(m=m.getPreviousSibling())&&!xc(m);)if(rt(m)){if(m.hasFormat("code"))continue;const T=m.getTextContent();d=m,p=Nw(T,T.length,a)}if(p<0||d===h&&p+c===u)continue;const b=d.getTextContent();if(p>0&&b[p-1]===s)continue;const x=b[p-1];if(l.intraword===!1&&x&&!Iw.test(x))continue;const g=h.getTextContent(),y=g.slice(0,u)+g.slice(i+1);h.setTextContent(y);const C=d===h?y:b;d.setTextContent(C.slice(0,p)+C.slice(p+c));const w=Ie(),v=mc();ii(v);const S=i-c*(d===h?2:1)+1;v.anchor.set(d.__key,p,"text"),v.focus.set(h.__key,S,"text");for(const T of l.format)v.hasFormat(T)||v.formatText(T);v.anchor.set(v.focus.key,v.focus.offset,v.focus.type);for(const T of l.format)v.hasFormat(T)&&v.toggleFormat(T);return Ne(w)&&(v.format=w.format),!0}return!1}function Nw(n,e,t){const r=t.length;for(let i=e;i>=r;i--){const s=i-r;if(bN(n,s,t,0,r)&&n[s+r]!==" ")return s}return-1}function bN(n,e,t,r,i){for(let s=0;s<i;s++)if(n[e+s]!==t[r+s])return!1;return!0}function QZ(n,e=DN){const t=jZ(e),r=Vm(t.textFormat,({tag:o})=>o[o.length-1]),i=Vm(t.textMatch,({trigger:o})=>o);for(const o of e){const l=o.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=o.dependencies;for(const c of a)n.hasNode(c)||JZ(`MarkdownShortcuts: missing dependency ${c.getType()} for transformer. Ensure node dependency is included in editor initial config.`)}}const s=(o,l,a)=>{GZ(o,l,a,t.element)||YZ(o,l,a,t.multilineElement)||ZZ(l,a,i)||XZ(l,a,r)};return n.registerUpdateListener(({tags:o,dirtyLeaves:l,editorState:a,prevEditorState:c})=>{if(o.has(V6)||o.has(Lh)||n.isComposing())return;const u=a.read(Ie),f=c.read(Ie);if(!Ne(f)||!Ne(u)||!u.isCollapsed()||u.is(f))return;const h=u.anchor.key,d=u.anchor.offset,p=a._nodeMap.get(h);!rt(p)||!l.has(h)||d!==1&&d>f.anchor.offset+1||n.update(()=>{if(!qZ(p))return;const m=p.getParent();m===null||Jx(m)||s(m,p,u.anchor.offset)})})}const eX=/^(\s*)(\d{1,})\.\s/,tX=/^(\s*)[-*+]\s/,nX=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,rX=/^(#{1,6})\s/,iX=/^>\s/,sX=/^[ \t]*```([\w-]+)?/,oX=/[ \t]*```$/,CN=n=>(e,t,r,i)=>{const s=n(r);s.append(...t),e.replace(s),i||s.select(0,0)},_N=4;function lX(n){const e=n.match(/\t/g),t=n.match(/ /g);let r=0;return e&&(r+=e.length),t&&(r+=Math.floor(t.length/_N)),r}const Gx=n=>(e,t,r,i)=>{const s=e.getPreviousSibling(),o=e.getNextSibling(),l=Sn(n==="check"?r[3]==="x":void 0);if(Fe(o)&&o.getListType()===n){const c=o.getFirstChild();c!==null?c.insertBefore(l):o.append(l),e.remove()}else if(Fe(s)&&s.getListType()===n)s.append(l),e.remove();else{const c=vn(n,n==="number"?Number(r[2]):void 0);c.append(l),e.replace(c)}l.append(...t),i||l.select(0,0);const a=lX(r[1]);a&&l.setIndent(a)},ad=(n,e,t)=>{const r=[],i=n.getChildren();let s=0;for(const o of i)if(Ve(o)){if(o.getChildrenSize()===1){const u=o.getFirstChild();if(Fe(u)){r.push(ad(u,e,t+1));continue}}const l=" ".repeat(t*_N),a=n.getListType(),c=a==="number"?`${n.getStart()+s}. `:a==="check"?`- [${o.getChecked()?"x":" "}] `:"- ";r.push(l+c+e(o)),sLine truncated
|
||||
`)},aX={dependencies:[vo],export:(n,e)=>{if(!cl(n))return null;const t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:rX,replace:CN(n=>{const e="h"+n[1].length;return wi(e)}),type:"element"},vN={dependencies:[Nl],export:(n,e)=>{if(!ug(n))return null;const t=e(n).split(`
|
||||
`),r=[];for(const i of t)r.push("> "+i);return r.join(`
|
||||
`)},regExp:iX,replace:(n,e,t,r)=>{if(r){const s=n.getPreviousSibling();if(ug(s)){s.splice(s.getChildrenSize(),0,[al(),...e]),n.remove();return}}const i=Bh();i.append(...e),n.replace(i),r||i.select(0,0)},type:"element"},wN={dependencies:[Lc],export:n=>{if(!Jx(n))return null;const e=n.getTextContent();return"```"+(n.getLanguage()||"")+(e?`
|
||||
`+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:oX},regExpStart:sX,replace:(n,e,t,r,i,s)=>{let o,l;if(!e&&i){if(i.length===1)r?(o=Si(),l=t[1]+i[0]):(o=Si(t[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(o=Si(t[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();l=i.join(`
|
||||
`)}const a=Xr(l);o.append(a),n.append(o)}else e&&CN(a=>Si(a?a[1]:void 0))(n,e,t,s)},type:"multiline-element"},Yx={dependencies:[ji,Ki],export:(n,e)=>Fe(n)?ad(n,e,0):null,regExp:tX,replace:Gx("bullet"),type:"element"},SN={dependencies:[ji,Ki],export:(n,e)=>Fe(n)?ad(n,e,0):null,regExp:nX,replace:Gx("check"),type:"element"},Zx={dependencies:[ji,Ki],export:(n,e)=>Fe(n)?ad(n,e,0):null,regExp:eX,replace:Gx("number"),type:"element"},kN={format:["code"],tag:"`",type:"text-format"},cX={format:["highlight"],tag:"==",type:"text-format"},EN={format:["bold","italic"],tag:"***",type:"text-format"},TN={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},AN={format:["bold"],tag:"**",type:"text-format"},MN={format:["bold"],intraword:!1,tag:"__",type:"text-format"},uX={format:["strikethrough"],tag:"~~",type:"text-format"},IN={format:["italic"],tag:"*",type:"text-format"},NN={format:["italic"],intraword:!1,tag:"_",type:"text-format"},ON={dependencies:[Ar],export:(n,e,t)=>{if(!bn(n)||gr(n))return null;const r=n.getTitle(),i=e(n);return r?`[${i}](${n.getURL()} "${r}")`:`[${i}](${n.getURL()})`},importRegExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{const[,t,r,i]=e,s=Di(r,{title:i}),o=t.split("[").length-1,l=t.split("]").length-1;let a=t,c="";if(o<l)return;if(o>l){const f=t.split("[");c="["+f[0],a=f.slice(1).join("[")}const u=Xr(a);return u.setFormat(n.getFormat()),s.append(u),n.replace(s),c&&s.insertBefore(Xr(c)),u},trigger:")",type:"text-match"},fX=[aX,vN,Yx,Zx],hX=[wN],dX=[kN,EN,TN,AN,MN,cX,IN,NN,uX],pX=[ON],DN=[...fX,...hX,...dX,...pX],gX={dependencies:[ko],export:n=>T0(n)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(n,e,t,r)=>{const i=Ll();r||n.getNextSibling()!=null?n.replace(i):n.insertBefore(i),i.selectNext()},type:"element"},mX=[gX,...DN];function Np({transformers:n=mX}){const[e]=dn();return H.useEffect(()=>QZ(e,n),[e,n]),null}const xX=Bn({init(n){const e=n.getValue(b2),t=e.includes("headings")?n.getValue(E0):[],r=_X(e,t),i=r.filter(s=>!CX.has(s));n.pubIn({[So]:()=>k.createElement(Np,{transformers:r}),[v0]:()=>k.createElement(Np,{transformers:r}),[y2]:()=>k.createElement(Np,{transformers:i})})}}),yX=n=>(e,t,r)=>{const i=n(r);i.append(...t),e.replace(i),i.select(0,0)},bX={dependencies:[ko],export:n=>T0(n)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(n,e,t,r)=>{const i=Ll();r||n.getNextSibling()!=null?n.replace(i):n.insertBefore(i),i.selectNext()},type:"element"},CX=new Set([Zx,Yx,SN]);function _X(n,e){const t=[EN,TN,AN,MN,kN,IN,NN];if(n.includes("headings")){const r=Math.min(...e),i=Math.max(...e),s=new RegExp(`^(#{${r},${i}})\\s`),o={dependencies:[vo],export:(l,a)=>{if(!cl(l))return null;const c=Number(l.getTag().slice(1));return"#".repeat(c)+" "+a(l)},regExp:s,replace:yX(l=>{const a=`h${l[1].length}`;return wi(a)}),type:"element"};t.push(o)}if(n.includes("thematicBreak")&&t.push(bX),n.includes("quote")&&t.push(vN),n.includes("link")&&t.push(ON),n.includes("lists")&&t.push(Zx,Yx,SN),n.includes("codeblock")){const r={...wN,dependencies:[Pl],replace:(i,s,o)=>{const l=wc({code:"",language:o[1]??"",meta:""});i.selectPrevious(),i.replace(l),setTimeout(()=>{l.select()},80)}};t.push(r)}return t}const vX=/^(agent|project|skill):\/\//;class Cl extends Ar{static getType(){return"mention-aware-link"}static clone(e){return new Cl(e.getURL(),{rel:e.getRel(),target:e.getTarget(),title:e.getTitle()},e.getKey())}static importJSON(e){return new Cl(e.url??"",{rel:e.rel??null,target:e.target??null,title:e.title??null})}constructor(e,t,r){super(e,t,r)}sanitizeUrl(e){return vX.test(e)?e:super.sanitizeUrl(e)}}function wX(n){return{url:n.getURL(),attributes:{rel:n.getRel(),target:n.getTarget(),title:n.getTitle()}}}const SX={replace:Ar,with:n=>{const{url:e,attributes:t}=wX(n);return new Cl(e,t)},withKlass:Cl};function Ow(n){return!!(n&&bn(n)&&i1(n.getURL()))}function Js(n){if(!n)return null;if(Ow(n))return n;let e=n.getParent();for(;e;){if(Ow(e))return e;e=e.getParent()}return null}function kX(n,e){const t=n.getNode(),r=Js(t);if(r)return r;if(n.type==="element"&&Je(t)){const i=e==="backward"?n.offset-1:n.offset;return i<0?null:Js(t.getChildAtIndex(i))}if(n.type==="text"&&rt(t)){if(e==="backward"&&n.offset===0)return Js(t.getPreviousSibling());if(e==="forward"&&n.offset===t.getTextContentSize())return Js(t.getNextSibling())}return null}function EX(n){const e=Ie();if(!e)return null;if(It(e)){const[i]=e.getNodes();return i?Js(i):null}if(!Ne(e))return null;const t=Js(e.anchor.getNode()),r=Js(e.focus.getNode());return t&&r&&t.is(r)?t:e.isCollapsed()?kX(e.anchor,n):null}function TX(n){const e=EX(n);if(!e)return!1;const t=e.getPreviousSibling(),r=e.getNextSibling(),i=e.getParentOrThrow();return e.remove(),n==="backward"?t?(t.selectEnd(),!0):r?(r.selectStart(),!0):(i.selectStart(),!0):r?(r.selectStart(),!0):t?(t.selectEnd(),!0):(i.selectEnd(),!0)}function Dw(n,e){return TX(n)?(e==null||e.preventDefault()Line truncated
|
||||
`)}function LN(n){const e=IX(n).trim();return e?MX.some(t=>t.test(e)):!1}function RN(n){let e=n.replace(/\r\n/g,`
|
||||
`).replace(/\r/g,`
|
||||
`);const t=e.split(`
|
||||
`);if(t.length<=1)return e;let r=1/0,i=null;for(const s of t){if(s.trim()==="")continue;const o=s.match(/^(\s+)/);if(o){const l=o[1],a=l.includes(" ")?"tabs":"spaces";if(i&&i!==a)return e;i=a,r=Math.min(r,l.length)}else{r=0;break}}return r>0&&r<1/0&&(e=t.map(s=>s.trim()===""?"":s.slice(r)).join(`
|
||||
`)),e}const NX=Bn({init(n){n.pub(Uh,[e=>{let t=!1;return e.registerCommand(La,r=>{if(t)return t=!1,!1;const i=r instanceof ClipboardEvent?r.clipboardData:null;if(!i)return!1;const s=i.getData("text/plain");if(!s||i.getData("text/html")||LN(s))return!1;const o=RN(s);if(o===s)return!1;r instanceof ClipboardEvent&&r.preventDefault();const l=new DataTransfer;l.setData("text/plain",o);const a=new ClipboardEvent("paste",{clipboardData:l,bubbles:!0,cancelable:!0});return t=!0,e.dispatchCommand(La,a),!0},Qr)}])}});function Op(n,e){const t=new RegExp(`${e}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(n);return(t==null?void 0:t[2])??(t==null?void 0:t[3])??(t==null?void 0:t[4])??null}function OX(n){return n.replace(/<img\b([^>]*?)\/?>/gi,(e,t)=>{const r=Op(t,"src");if(!r)return e;const i=Op(t,"alt")??"image",s=Op(t,"title"),o=i.replace(/[[\]]/g,"\\$&"),l=s==null?void 0:s.replace(/"/g,'\\"');return l?``:``})}function DX(n){const e=n.replace(/\r\n/g,`
|
||||
`).replace(/\r/g,`
|
||||
`);return OX(e)}function LX(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function PN(n){if(!n)return!1;if(n.nodeType===Node.TEXT_NODE)return(n.textContent??"").trim().length>0;if(n.nodeType!==Node.ELEMENT_NODE)return!1;const e=n;return["IMG","HR","TABLE","VIDEO","IFRAME"].includes(e.tagName)?!0:Array.from(e.childNodes).some(t=>PN(t))}function RX(n,e,t){const r=e.trim();if(!r)return!1;const i=(n.textContent??"").trim();if(i.length===0)return!Array.from(n.childNodes).some(o=>PN(o));const s=t==null?void 0:t.trim();return!!(s&&i===s&&r!==s)}function PX(n){const e=n.trim();return e?!/^(javascript|data|vbscript):/i.test(e):!0}const FN=188,$N=208,Lw=8,FX=34,$X=8,BX={txt:"Text",md:"Markdown",js:"JavaScript",jsx:"JavaScript (JSX)",ts:"TypeScript",tsx:"TypeScript (TSX)",json:"JSON",bash:"Bash",sh:"Shell",python:"Python",go:"Go",rust:"Rust",sql:"SQL",html:"HTML",css:"CSS",yaml:"YAML",yml:"YAML"},VX={priority:0,match:()=>!0,Editor:iN};function HX(n,e){let t=-1,r=null,i=null;for(let o=e-1;o>=0;o--){const l=n[o];if(l==="@"||l==="/"){(o===0||/\s/.test(n[o-1]))&&(t=o,r=l==="@"?"mention":"skill",i=l);break}if(l===`
|
||||
`||l==="\r")break}if(t===-1)return null;const s=n.slice(t+1,e);return r==="skill"&&/\s/.test(s)?null:{trigger:r??"mention",marker:i??"@",query:s,atPos:t,endPos:e}}function zX(n){const e=window.getSelection();if(!e||e.rangeCount===0||!e.isCollapsed)return null;const t=e.getRangeAt(0),r=t.startContainer;if(r.nodeType!==Node.TEXT_NODE||!n.contains(r))return null;const i=r.textContent??"",s=t.startOffset,o=HX(i,s);if(!o)return null;const l=document.createRange();l.setStart(r,o.atPos),l.setEnd(r,o.atPos+1);const a=l.getBoundingClientRect(),c=n.getBoundingClientRect();return{trigger:o.trigger,marker:o.marker,query:o.query,top:a.bottom-c.top,left:a.left-c.left,viewportTop:a.bottom,viewportLeft:a.left,textNode:r,atPos:o.atPos,endPos:o.endPos}}function WX(){const n=window.visualViewport;return n?{offsetLeft:n.offsetLeft,offsetTop:n.offsetTop,width:n.width,height:n.height}:{offsetLeft:0,offsetTop:0,width:window.innerWidth,height:window.innerHeight}}function UX(n,e,t={width:FN,height:$N}){const r=e.offsetLeft+Lw,i=e.offsetLeft+e.width-t.width,s=e.offsetTop+Lw,o=e.offsetTop+e.height-t.height;return{top:Math.max(s,Math.min(e.offsetTop+n.viewportTop+4,o)),left:Math.max(r,Math.min(e.offsetLeft+n.viewportLeft,i))}}function KX(n){const e=Math.max(1,Math.min(n,8));return{width:FN,height:Math.min($N,e*FX+$X)}}function jX(n,e){if(!e||!n.contains(e))return!1;const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;return!!(t!=null&&t.closest("pre, code"))}function Rw(n){if(!n)return!1;const e=window.getSelection();if(!e)return!1;for(const t of[e.anchorNode,e.focusNode])if(jX(n,t))return!0;return!1}function qX(n){if(n.kind==="project"&&n.projectId)return`[@${n.name}](${GN(n.projectId,n.projectColor??null)}) `;if(n.kind==="user"&&n.userId)return`[@${n.name}](${YN(n.userId)}) `;const e=n.agentId??n.id.replace(/^agent:/,"");return`[@${n.name}](${ZN(e,n.agentIcon??null)}) `}function JX(n){return`[/${n.slug}](${n.href}) `}function GX(n){return n.kind==="skill"?JX(n):qX(n)}function YX(n,e,t=!1){return n==="Tab"?!0:n!=="Enter"?!1:e==="mention"||e==="skill"&&t}function ZX(n,e){return!n||!e?!1:n.trigger===e.trigger&&n.marker===e.marker&&n.query===e.query&&n.textNode===e.textNode&&n.atPos===e.atPos&&n.endPos===e.endPos}function XX(n,e){const t=i1(e);if(!t)return!1;if(n.kind==="skill")return t.kind==="skill"&&t.skillId===n.skillId;if(n.kind==="project"&&n.projectId)return t.kind==="project"&&t.projectId===n.projectId;if(n.kind==="user"&&n.userId)return t.kind==="user"&&t.userId===n.userId;const r=n.agentId??n.id.replace(/^agent:/,"");return t.kind==="agent"&&t.agentId===r}function QX(n,e,t){const r=Array.from(n.querySelectorAll("a")).filter(s=>s instanceof HTMLAnchorElement).filter(s=>XX(e,s.getAttribute("href")??""));if(r.length===0)return null;if(!t)return r[0]??null;const i=n.getBoundingClientRect();return r.sort((s,o)=>{const l=s.getBoundingClientRect(),a=o.getBoundingClientRect(),c=l.left-i.left,u=l.top-i.top,f=a.left-i.left,h=a.top-i.top,d=Math.hypot(c-t.left,u-t.top),p=Math.hypot(f-t.left,h-t.top);return d-p})[0]??null}function eQ(n){const e=window.getSelection();if(!e)return!1;const t=document.createRange(),r=n.nextSibling;if((r==null?void 0:r.nodeType)===Node.TEXT_NODE){const i=r.textContent??"";if(i.startsWith(" "))return t.setStart(r,1),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!0;if(i.length>0)return t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!0}return t.setStartAfter(n),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!0}function tQ(n,e,t){const r=`${e.marker}${e.query}`,i=GX(t),s=n.lastIndexOf(r);return s===-1?n:n.slice(0,s)+i+n.slice(s+r.length)}const nQ=H.forwardRef(function({value:e,onChange:t,placeholder:r,className:i,contentClassName:s,onBlur:o,imageUploadHandler:l,onDropFile:a,bordered:c=!0,mentions:u,onSubmit:f,readOnly:h=!1},d){const p=H.useMemo(()=>DX(e),[e]),{slashCommands:m}=JN(),b=H.useRef(null),x=H.useRef(null),g=H.useRef(null),y=H.useRef(p);y.current=p;const C=H.useRef(p),w=H.useRef(!0),v=H.useRef(null),[S,T]=H.useState(null),[N,I]=H.useState(!1),[B,$]=H.useState(null),P=H.useRef(0),W=H.useRef(l);W.current=l;const[J,pe]=H.useState(null),re=H.useRef(null),[Se,Me]=H.useState(0),A=H.useRef(!1),G=H.useRef(!1),ne=J!==null&&(J.trigger==="mention"&&!!(u!=null&&u.length)||J.trigger==="skill"&&m.length>0),O=H.useMemo(()=>{const U=new Map;for(const fe of u??[]){if(fe.kind==="agent"){const Re=fe.agentId??fe.id.replace(/^agent:/,"");U.set(`agent:${Re}`,fe)}fe.kind==="user"&&fe.userId&&U.set(`user:${fe.userId}`,fe),fe.kind==="project"&&fe.projectId&&U.set(`project:${fe.projectId}`,fe)}return U},[u]),ge=H.useCallback(U=>{x.current=U,U&&y.current!==C.current&&(v.current=y.current,U.setMarkdown(y.current),C.current=y.current)},[]),me=H.useMemo(()=>{if(!J)return[];const U=J.query.trim().toLowerCase();return J.trigger==="skill"?m.filter(fe=>U?fe.aliases.some(Re=>Re.toLowerCase().includes(U)):!0).slice(0,8):u?u.filter(fe=>fe.name.toLowerCase().includes(U)).slice(0,8):[]},[J,u,m]);H.useImperativeHandleLine truncated
|
||||
|
||||
`);z!==D&&(C.current=z,v.current=z,(se=x.current)==null||se.setMarkdown(z),t(z),requestAnimationFrame(()=>{var ae;(ae=x.current)==null||ae.focus(void 0,{defaultSelection:"rootEnd"})}))},100),We}catch(We){const D=We instanceof Error?We.message:"Image upload failed";throw T(D),We}}:void 0,fe=[OV(),GV(),NW(),yH(),$H({validateUrl:PX}),DZ(),AX(),NX(),BV(),HW({defaultCodeBlockLanguage:"txt",codeBlockEditorDescriptors:[VX]}),MZ({codeBlockLanguages:BX}),xX()];return U&&fe.push(_W({imageUploadHandler:U})),fe},[ce]);H.useEffect(()=>{p!==C.current&&x.current&&(v.current=p,x.current.setMarkdown(p),C.current=p)},[p]);const he=H.useCallback(()=>{var Re;const U=(Re=b.current)==null?void 0:Re.querySelector('[contenteditable="true"]');if(!U)return;const fe=U.querySelectorAll("a");for(const Ke of fe){const We=Ke,D=i1(We.getAttribute("href")??"");if(!D){KS(We);continue}if(D.kind==="project"){const z=O.get(`project:${D.projectId}`);Fc(We,{...D,color:D.color??(z==null?void 0:z.projectColor)??null});continue}if(D.kind==="skill"){Fc(We,D);continue}if(D.kind==="user"||D.kind==="issue"){Fc(We,D);continue}const V=O.get(`agent:${D.agentId}`);Fc(We,{...D,icon:D.icon??(V==null?void 0:V.agentIcon)??null})}},[O]),de=H.useCallback(()=>{if(!b.current||Rw(b.current)){re.current=null,A.current=!1,pe(null);return}const U=zX(b.current);if(U&&U.trigger==="mention"&&(!u||u.length===0)){re.current=null,A.current=!1,pe(null);return}if(U&&U.trigger==="skill"&&m.length===0){re.current=null,A.current=!1,pe(null);return}const fe=re.current,Re=ZX(fe,U);re.current=U,Re||(A.current=!1,Me(0)),pe(U)},[u,m.length]);H.useEffect(()=>{if((!u||u.length===0)&&m.length===0)return;const U=b.current,fe=()=>requestAnimationFrame(de);return document.addEventListener("selectionchange",de),U==null||U.addEventListener("input",fe,!0),()=>{document.removeEventListener("selectionchange",de),U==null||U.removeEventListener("input",fe,!0)}},[de,u,m.length]),H.useEffect(()=>{if(!ne)return;const U=()=>requestAnimationFrame(de),fe=window.visualViewport;return fe==null||fe.addEventListener("resize",U),fe==null||fe.addEventListener("scroll",U),window.addEventListener("resize",U),window.addEventListener("scroll",U,!0),()=>{fe==null||fe.removeEventListener("resize",U),fe==null||fe.removeEventListener("scroll",U),window.removeEventListener("resize",U),window.removeEventListener("scroll",U,!0)}},[de,ne]),H.useEffect(()=>{ne||(G.current=!1)},[ne]),H.useEffect(()=>{var Re;const U=(Re=b.current)==null?void 0:Re.querySelector('[contenteditable="true"]');if(!U)return;he();const fe=new MutationObserver(()=>{he()});return fe.observe(U,{subtree:!0,childList:!0,characterData:!0}),()=>fe.disconnect()},[he,e]);const ie=H.useCallback(U=>{var D;const fe=re.current;if(!fe)return!1;const Re=C.current,Ke=tQ(Re,fe,U);Ke!==Re&&(C.current=Ke,v.current=Ke,(D=x.current)==null||D.setMarkdown(Ke),t(Ke));const We=V=>{var ae;const z=(ae=b.current)==null?void 0:ae.querySelector('[contenteditable="true"]');if(!(z instanceof HTMLElement))return;he(),z.focus();const se=QX(z,U,fe);if(!se){V>0&&requestAnimationFrame(()=>We(V-1));return}eQ(se)};return requestAnimationFrame(()=>We(4)),re.current=null,A.current=!1,pe(null),!0},[he,t]),le=H.useCallback((U,fe)=>{if(U.preventDefault(),U.stopPropagation(),G.current)return;ie(fe)&&(G.current=!0)},[ie]);function He(U){var fe;return Array.from(((fe=U.dataTransfer)==null?void 0:fe.types)??[]).includes("Files")}const ut=!!(l||a),Mt=H.useCallback(U=>{const fe=U.clipboardData;if(!fe||!x.current)return;const Re=new Set(Array.from(fe.types));if(Re.has("Files")||Re.has("text/html")||Rw(b.current))return;const Ke=fe.getData("text/plain");LN(Ke)&&(U.preventDefault(),x.current.insertMarkdown(RN(Ke)))},[]);return J&&UX(J,WX(),KX(me.length)),B?Vt.jsxDEV("div",{ref:b,className:Ds("relative paperclip-mdxeditor-scope",c?"rounded-md border border-border bg-transparent":"bg-transparent",i),children:[Vt.jsxDEV("div",{className:"flex items-start justify-between gap-3 px-3 pt-2 text-xs text-muted-foreground",children:[Vt.jsxDEV("p",{children:"Rich editor unavailable for this markdown. Showing raw source instead."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownEditor.tsx",lineNumber:935,columnNumber:11},this),Vt.jsxDEV("button",{type:"button",className:"shrink-0 underline underline-offset-2 hover:text-foreground",onClick:()=>{$(null)},children:"Retry rich editor"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownEditor.tsx",lineNumber:936,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/MarkdownEditor.tsx",lineNumber:934,columnNumber:9},this),Vt.jsxDEV("textarea",{ref:g,value:e,placeholder:r,readOnly:h,onChange:U=>{h||(t(U.target.value),_e(U.target))},onBlur:()=>o==null?void 0:o(),onKeyDown:U=>{f&&U.key==="Enter"&&(U.metaKey||U.ctrlKey)&&(U.preventDefault(),f())},className:Ds("min-h-[12rem] w-full resize-none bg-transparent px-3 pb-3 pt-2 font-mono text-sm leading-6 outline-none",s)},void 0,!1,{fileName:"/Users/d
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as a,j as e,B as i,c as v}from"./iframe-aoIC7NDi.js";import{T as U}from"./textarea-CGN-n--7.js";import{D as S,a as R,b as T,c as P,d as C,e as q}from"./dialog-6DTSoM1_.js";import{T as A,a as z}from"./thumbs-up-DOKJqPYr.js";function I({activeVote:b,disabled:u=!1,sharingPreference:x="prompt",termsUrl:g=null,onVote:j,rightSlot:k,inline:B=!1}){const[t,f]=a.useState(null),[n,V]=a.useState(!1),[N,l]=a.useState(""),[y,h]=a.useState(!1),[E,r]=a.useState(void 0),[c,m]=a.useState(null),w=c??b??null;a.useEffect(()=>{c&&b===c&&m(null)},[b,c]);async function p(s,F,o){V(!0);try{await j(s,F),f(null),o!=null&&o.keepReasonPromptOpen||(h(!1),l(""),r(void 0))}catch(d){throw m(null),d}finally{V(!1)}}function D(s,F,o){if(x==="prompt"){f({vote:s,...o!=null&&o.keepReasonPromptOpen?{keepReasonPromptOpen:!0}:{}});return}const d=x==="allowed";s==="down"&&r(d),p(s,{...d?{allowSharing:!0}:{}},o)}function O(s){if(m(s),s==="down"){h(!0),l(""),r(void 0),D("down",void 0,{keepReasonPromptOpen:!0});return}D(s)}return e.jsxDEV(e.Fragment,{children:[e.jsxDEV("div",{className:v("flex items-center gap-2",B?"justify-end":"mt-3 border-t border-border/60 pt-3"),children:[e.jsxDEV(i,{type:"button",size:"sm",variant:"outline",disabled:u||n,className:v(w==="up"&&"border-green-600/50 bg-green-500/10 text-green-700"),onClick:()=>O("up"),children:[e.jsxDEV(A,{className:"mr-1.5 h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:126,columnNumber:11},this),"Helpful"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:118,columnNumber:9},this),e.jsxDEV(i,{type:"button",size:"sm",variant:"outline",disabled:u||n,className:v(w==="down"&&"border-amber-600/50 bg-amber-500/10 text-amber-800"),onClick:()=>O("down"),children:[e.jsxDEV(z,{className:"mr-1.5 h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:137,columnNumber:11},this),"Needs work"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:129,columnNumber:9},this),k?e.jsxDEV("div",{className:"ml-auto",children:k},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:140,columnNumber:22},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:114,columnNumber:7},this),y?e.jsxDEV("div",{className:"mt-2 rounded-md border border-border/60 bg-accent/20 p-3",children:[e.jsxDEV("div",{className:"mb-2 text-sm font-medium",children:"What could have been better?"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:144,columnNumber:11},this),e.jsxDEV(U,{value:N,onChange:s=>l(s.target.value),placeholder:"Add a short note",className:"min-h-20 resize-y bg-background",disabled:u||n},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:145,columnNumber:11},this),e.jsxDEV("div",{className:"mt-3 flex items-center justify-end gap-2",children:[e.jsxDEV(i,{type:"button",size:"sm",variant:"outline",disabled:u||n,onClick:()=>{h(!1),l(""),r(void 0)},children:"Dismiss"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:153,columnNumber:13},this),e.jsxDEV(i,{type:"button",size:"sm",disabled:u||n||!N.trim(),onClick:()=>{p("down",{...E?{allowSharing:!0}:{},reason:N})},children:n?"Saving...":"Save note"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:166,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:152,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:143,columnNumber:9},this):null,e.jsxDEV(S,{open:!!t,onOpenChange:s=>{!s&&!n&&(f(null),m(null))},children:e.jsxDEV(R,{children:[e.jsxDEV(T,{children:[e.jsxDEV(P,{children:"Save your feedback sharing preference"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:194,columnNumber:13},this),e.jsxDEV(C,{children:"Choose whether voted AI outputs can be shared with Paperclip Labs. This answer becomes the default for future thumbs up and thumbs down votes."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:195,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:193,columnNumber:11},this),e.jsxDEV("div",{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsxDEV("p",{children:"This vote is always saved locally."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OutputFeedbackButtons.tsx",lineNumber:201,columnNumber:13},this),e.jsxDEV("p",{children:["Choose ",e.jsxDEV("span",{className:"font-medium text-foreground",children:Line truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
import{r as g,j as e,Q as V,L as S}from"./iframe-aoIC7NDi.js";import{u as k,a as P,P as w,D as y,b as K,c as B,S as A,v as _,d as I,C}from"./sortable.esm-1LKzu1X4.js";import{P as R}from"./PriorityIcon-BJIUslvt.js";import{I as T}from"./Identity-qezU2VU6.js";import{S as s}from"./skeleton-B0nw-fyt.js";const v=["backlog","todo","in_progress","in_review","blocked","done","cancelled"];function $(a){return a.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function q({status:a,issues:r,agents:i,liveIssueIds:n}){const{setNodeRef:o,isOver:m}=B({id:a}),u=r.length===0;return e.jsxDEV("div",{className:`flex flex-col shrink-0 transition-[width,min-width] ${u&&!m?"min-w-[48px] w-[48px]":"min-w-[260px] w-[260px]"}`,children:[e.jsxDEV("div",{className:`flex items-center gap-2 px-2 py-2 mb-1 ${u&&!m?"justify-center":""}`,children:[e.jsxDEV(V,{status:a},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:71,columnNumber:9},this),(!u||m)&&e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:$(a)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:74,columnNumber:13},this),e.jsxDEV("span",{className:"text-xs text-muted-foreground/60 ml-auto tabular-nums",children:r.length},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:77,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:73,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:70,columnNumber:7},this),e.jsxDEV("div",{ref:o,className:`flex-1 min-h-[120px] rounded-md p-1 space-y-1 transition-colors ${m?"bg-accent/40":"bg-muted/20"}`,children:e.jsxDEV(A,{items:r.map(c=>c.id),strategy:_,children:r.map(c=>e.jsxDEV(E,{issue:c,agents:i,isLive:n==null?void 0:n.has(c.id)},c.id,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:94,columnNumber:13},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:89,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:83,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:69,columnNumber:5},this)}function E({issue:a,agents:r,isLive:i,isOverlay:n}){const{attributes:o,listeners:m,setNodeRef:u,transform:c,transition:N,isDragging:f}=I({id:a.id,data:{issue:a}}),x={transform:C.Transform.toString(c),transition:N},h=t=>{var l;return!t||!r?null:((l=r.find(p=>p.id===t))==null?void 0:l.name)??null};return e.jsxDEV("div",{ref:u,style:x,...o,...m,className:`rounded-md border bg-card p-2.5 cursor-grab active:cursor-grabbing transition-shadow ${f&&!n?"opacity-30":""} ${n?"shadow-lg ring-1 ring-primary/20":"hover:shadow-sm"}`,children:e.jsxDEV(S,{to:`/issues/${a.identifier??a.id}`,disableIssueQuicklook:!0,className:"block no-underline text-inherit",onClick:t=>{f&&t.preventDefault()},children:[e.jsxDEV("div",{className:"flex items-start gap-1.5 mb-1.5",children:[e.jsxDEV("span",{className:"text-xs text-muted-foreground font-mono shrink-0",children:a.identifier??a.id.slice(0,8)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:159,columnNumber:11},this),i&&e.jsxDEV("span",{className:"relative flex h-2 w-2 shrink-0 mt-0.5",children:[e.jsxDEV("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:164,columnNumber:15},this),e.jsxDEV("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:165,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:163,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:158,columnNumber:9},this),e.jsxDEV("p",{className:"text-sm leading-snug line-clamp-2 mb-2",children:a.title},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:169,columnNumber:9},this),e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV(R,{priority:a.priority},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:171,columnNumber:11},this),a.assigneeAgentId&&(()=>{const t=h(a.assigneeAgentId);return t?e.jsxDEV(T,{name:t,size:"xs"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:175,columnNumber:15},this):e.jsxDEV("span",{className:"text-xs text-muted-foreground font-mono",children:a.assigneeAgentId.slice(0,8)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/KanbanBoard.tsx",lineNumber:177,columnNLine truncated
|
||||
| "issues-list"
|
||||
| "detail"
|
||||
| "dashboard"
|
||||
| "approvals"
|
||||
| "costs"
|
||||
| "inbox"
|
||||
| "org-chart"`,elements:[{name:"literal",value:'"list"'},{name:"literal",value:'"issues-list"'},{name:"literal",value:'"detail"'},{name:"literal",value:'"dashboard"'},{name:"literal",value:'"approvals"'},{name:"literal",value:'"costs"'},{name:"literal",value:'"inbox"'},{name:"literal",value:'"org-chart"'}]},description:"",defaultValue:{value:'"list"',computed:!1}}}};export{L as K,O as P};
|
||||
@@ -0,0 +1,17 @@
|
||||
import{c as a}from"./createLucideIcon-D2uUVdtm.js";import{r as l,j as e,c}from"./iframe-aoIC7NDi.js";import{D as u,a as m,b as h,c as x,d as f}from"./dialog-6DTSoM1_.js";import{T as N}from"./AgentIconPicker-B29UI7uB.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const b=[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]],g=a("apple",b);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const y=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],U=a("loader-circle",y);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const v=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],P=a("monitor",v),D=[{id:"mac",label:"macOS",icon:g},{id:"windows",label:"Windows",icon:P},{id:"linux",label:"Linux",icon:N}],I={mac:{steps:["Open Finder and navigate to the folder.","Right-click (or Control-click) the folder.",'Hold the Option (⌥) key — "Copy" changes to "Copy as Pathname".','Click "Copy as Pathname", then paste here.'],tip:"You can also open Terminal, type cd, drag the folder into the terminal window, and press Enter. Then type pwd to see the full path."},windows:{steps:["Open File Explorer and navigate to the folder.","Click in the address bar at the top — the full path will appear.","Copy the path, then paste here."],tip:'Alternatively, hold Shift and right-click the folder, then select "Copy as path".'},linux:{steps:["Open a terminal and navigate to the directory with cd.","Run pwd to print the full path.","Copy the output and paste here."],tip:"In most file managers, Ctrl+L reveals the full path in the address bar."}};function M(){const s=navigator.userAgent.toLowerCase();return s.includes("mac")?"mac":s.includes("win")?"windows":"linux"}function p({open:s,onOpenChange:n}){const[o,d]=l.useState(M),r=I[o];return e.jsxDEV(u,{open:s,onOpenChange:n,children:e.jsxDEV(m,{className:"sm:max-w-md",children:[e.jsxDEV(h,{children:[e.jsxDEV(x,{className:"text-base",children:"How to get a full path"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:72,columnNumber:11},this),e.jsxDEV(f,{children:["Paste the absolute path (e.g."," ",e.jsxDEV("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"/Users/you/project"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:75,columnNumber:13},this),") into the input field."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:73,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:71,columnNumber:9},this),e.jsxDEV("div",{className:"flex gap-1 rounded-md border border-border p-0.5",children:D.map(t=>e.jsxDEV("button",{type:"button",className:c("flex flex-1 items-center justify-center gap-1.5 rounded px-2 py-1 text-xs transition-colors",o===t.id?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),onClick:()=>d(t.id),children:[e.jsxDEV(t.icon,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:94,columnNumber:15},this),t.label]},t.id,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:83,columnNumber:13},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:81,columnNumber:9},this),e.jsxDEV("ol",{className:"space-y-2 text-sm",children:r.steps.map((t,i)=>e.jsxDEV("li",{className:"flex gap-2",children:[e.jsxDEV("span",{className:"text-muted-foreground font-mono text-xs mt-0.5 shrink-0",children:[i+1,"."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:104,columnNumber:15},this),e.jsxDEV("span",{children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:107,columnNumber:15},this)]},i,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:103,columnNumber:13},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:101,columnNumber:9},this),r.tip&&e.jsxDEV("p",{className:"text-xs text-muted-foreground border-l-2 border-border pl-3",children:r.tip},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:113,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:70,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:69,columnNumber:5},this)}function w({className:s}){const[n,o]=l.useState(!1);return e.jsxDEV(e.Fragment,{children:[e.jsxDEV("button",{type:"button",className:c("inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs text-muted-foreground hover:bg-accent/50 transition-colors shrink-0",s),onClick:()=>o(!0),children:"Choose"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:130,columnNumber:7},this),e.jsxDEV(p,{open:n,onOpenChange:o},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:140,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PathInstructionsModal.tsx",lineNumber:129,columnNumber:5},this)}pLine truncated
|
||||
Drop-in replacement for the old showDirectoryPicker buttons.`,methods:[],displayName:"ChoosePathButton",props:{className:{required:!1,tsType:{name:"string"},description:""}}};export{w as C,U as L,p as P};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as b,s as o,j as e,c as a,P as h,b as y,d as g,B as P}from"./iframe-aoIC7NDi.js";import{A as v,M as I,a as j}from"./minus-S7Yk3xbG.js";import{T as D}from"./triangle-alert-XSXGBeLN.js";const l={critical:{icon:D,color:o.critical,label:"Critical"},high:{icon:j,color:o.high,label:"High"},medium:{icon:I,color:o.medium,label:"Medium"},low:{icon:v,color:o.low,label:"Low"}},E=["critical","high","medium","low"];function U({priority:m,onChange:t,className:u,showLabel:n}){const[d,p]=b.useState(!1),i=l[m]??l.medium,N=i.icon,r=e.jsxDEV("span",{className:a("inline-flex items-center justify-center shrink-0",i.color,t&&!n&&"cursor-pointer",u),children:e.jsxDEV(N,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:38,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:30,columnNumber:5},this);if(!t)return n?e.jsxDEV("span",{className:"inline-flex items-center gap-1.5",children:[r,e.jsxDEV("span",{className:"text-sm",children:i.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:42,columnNumber:94},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:42,columnNumber:37},this):r;const f=n?e.jsxDEV("button",{className:"inline-flex items-center gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[r,e.jsxDEV("span",{className:"text-sm",children:i.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:47,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:45,columnNumber:5},this):r;return e.jsxDEV(h,{open:d,onOpenChange:p,children:[e.jsxDEV(y,{asChild:!0,children:f},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:53,columnNumber:7},this),e.jsxDEV(g,{className:"w-36 p-1",align:"start",children:E.map(s=>{const c=l[s],x=c.icon;return e.jsxDEV(P,{variant:"ghost",size:"sm",className:a("w-full justify-start gap-2 text-xs",s===m&&"bg-accent"),onClick:()=>{t(s),p(!1)},children:[e.jsxDEV(x,{className:a("h-3.5 w-3.5",c.color)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:69,columnNumber:15},this),c.label]},s,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:59,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:54,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PriorityIcon.tsx",lineNumber:52,columnNumber:5},this)}U.__docgenInfo={description:"",methods:[],displayName:"PriorityIcon",props:{priority:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(priority: string) => void",signature:{arguments:[{type:{name:"string"},name:"priority"}],return:{name:"void"}}},description:""},className:{required:!1,tsType:{name:"string"},description:""},showLabel:{required:!1,tsType:{name:"boolean"},description:""}}};export{U as P};
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e,c as a}from"./iframe-aoIC7NDi.js";function m(s){return s>90?"bg-red-400":s>70?"bg-yellow-400":"bg-green-400"}function c({label:s,percentUsed:i,leftLabel:o,rightLabel:r,showDeficitNotch:n=!1,className:l}){const t=Math.min(100,Math.max(0,i)),u=Math.min(t,97);return e.jsxDEV("div",{className:a("space-y-1.5",l),children:[e.jsxDEV("div",{className:"flex items-center justify-between gap-2",children:[e.jsxDEV("span",{className:"text-xs text-muted-foreground",children:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:36,columnNumber:9},this),e.jsxDEV("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxDEV("span",{className:"text-xs font-medium tabular-nums",children:o},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:38,columnNumber:11},this),r&&e.jsxDEV("span",{className:"text-xs text-muted-foreground tabular-nums",children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:40,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:37,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:35,columnNumber:7},this),e.jsxDEV("div",{className:"relative h-2 w-full border border-border overflow-hidden",children:[e.jsxDEV("div",{className:a("absolute inset-y-0 left-0 transition-[width,background-color] duration-150",m(t)),style:{width:`${t}%`}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:48,columnNumber:9},this),n&&t>0&&e.jsxDEV("div",{className:"absolute inset-y-0 w-[2px] bg-destructive z-10",style:{left:`${u}%`}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:46,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/QuotaBar.tsx",lineNumber:33,columnNumber:5},this)}c.__docgenInfo={description:"",methods:[],displayName:"QuotaBar",props:{label:{required:!0,tsType:{name:"string"},description:""},percentUsed:{required:!0,tsType:{name:"number"},description:""},leftLabel:{required:!0,tsType:{name:"string"},description:""},rightLabel:{required:!1,tsType:{name:"string"},description:""},showDeficitNotch:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},className:{required:!1,tsType:{name:"string"},description:""}}};export{c as Q};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as g,j as e,P as v,b as k,c as n,d as T}from"./iframe-aoIC7NDi.js";import{r as w}from"./agent-config-primitives-DS6dQaBU.js";import{A as l}from"./AgentIconPicker-B29UI7uB.js";import{U as u}from"./MarkdownEditor-BtfKiA3v.js";function R({agents:m,value:t,onChange:c,disabled:i=!1,excludeAgentIds:d=[],disabledEmptyLabel:N="Reports to: N/A (CEO)",chooseLabel:f="Reports to..."}){const[x,a]=g.useState(!1),b=new Set(d),h=m.filter(r=>r.status!=="terminated"&&!b.has(r.id)),s=t?m.find(r=>r.id===t):null,o=(s==null?void 0:s.status)==="terminated",p=!!(t&&!s);return e.jsxDEV(v,{open:x,onOpenChange:a,children:[e.jsxDEV(k,{asChild:!0,children:e.jsxDEV("button",{type:"button",className:n("inline-flex max-w-full min-w-0 items-center gap-1.5 overflow-hidden rounded-md border border-border px-2 py-1 text-xs hover:bg-accent/50 transition-colors",o&&"border-amber-600/45 bg-amber-500/5",i&&"opacity-60 cursor-not-allowed"),disabled:i,children:p?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(u,{className:"h-3 w-3 shrink-0 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:53,columnNumber:15},this),e.jsxDEV("span",{className:"min-w-0 truncate text-muted-foreground",children:"Unknown manager (stale ID)"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:54,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:52,columnNumber:13},this):s?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{icon:s.icon,className:"h-3 w-3 shrink-0 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:58,columnNumber:15},this),e.jsxDEV("span",{className:n("min-w-0 truncate",o&&"text-amber-900 dark:text-amber-200"),children:`Reports to ${s.name}${o?" (terminated)":""}`},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:59,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:57,columnNumber:13},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(u,{className:"h-3 w-3 shrink-0 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:70,columnNumber:15},this),e.jsxDEV("span",{className:"min-w-0 truncate",children:i?N:f},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:71,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:69,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:42,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:41,columnNumber:7},this),e.jsxDEV(T,{className:"w-48 p-1",align:"start",children:[e.jsxDEV("button",{type:"button",className:n("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",t===null&&"bg-accent"),onClick:()=>{c(null),a(!1)},children:"No manager"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:79,columnNumber:9},this),o&&e.jsxDEV("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden px-2 py-1.5 text-xs text-muted-foreground border-b border-border mb-0.5",children:[e.jsxDEV(l,{icon:s.icon,className:"shrink-0 h-3 w-3"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:94,columnNumber:13},this),e.jsxDEV("span",{className:"min-w-0 truncate",children:["Current: ",s.name," (terminated)"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:95,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:93,columnNumber:11},this),p&&e.jsxDEV("div",{className:"px-2 py-1.5 text-xs text-muted-foreground border-b border-border mb-0.5",children:"Saved manager is missing from this company. Choose a new manager or clear."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:101,columnNumber:11},this),h.map(r=>e.jsxDEV("button",{type:"button",className:n("flex items-center gap-2 w-full min-w-0 px-2 py-1.5 text-xs rounded hover:bg-accent/50 overflow-hidden",r.id===t&&"bg-accent"),onClick:()=>{c(r.id),a(!1)},children:[e.jsxDEV(l,{icon:r.icon,className:"shrink-0 h-3 w-3 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:118,columnNumber:13},this),e.jsxDEV("span",{className:"min-w-0 truncate",children:r.name},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReportsToPicker.tsx",lineNumber:119,columnNumber:13},this),e.jsxDEV("span",{className:"text-muted-foreground ml-auto shrink-0",children:w[r.role]??r.role},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ReLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as s,j as m}from"./iframe-aoIC7NDi.js";import{I as p}from"./IssueChatThread-Do6zl-jD.js";const l=[],f=[],E=[],h=[],T=async()=>{};function R(n){return n.status==="queued"||n.status==="running"}const I=s.memo(function({run:e,transcript:a,hasOutput:r,companyId:i}){const t=R(e),o=s.useMemo(()=>t?[e]:E,[t,e]),u=s.useMemo(()=>t?h:[{runId:e.id,status:e.status,agentId:e.agentId,agentName:e.agentName,createdAt:e.createdAt,startedAt:e.startedAt,finishedAt:e.finishedAt}],[t,e]),d=s.useMemo(()=>new Map([[e.id,a]]),[e.id,a]);return m.jsxDEV(p,{comments:l,linkedRuns:u,timelineEvents:f,liveRuns:o,companyId:i,onAdd:T,showComposer:!1,showJumpToLatest:!1,variant:"embedded",emptyMessage:t?"Waiting for run output...":"No run output captured.",enableLiveTranscriptPolling:!1,transcriptsByRunId:d,hasOutputForRun:c=>c===e.id&&r,includeSucceededRunsWithoutOutput:!0},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/RunChatSurface.tsx",lineNumber:53,columnNumber:5},this)});I.__docgenInfo={description:"",methods:[],displayName:"RunChatSurface",props:{run:{required:!0,tsType:{name:"LiveRunForIssue"},description:""},transcript:{required:!0,tsType:{name:"Array",elements:[{name:"TranscriptEntry"}],raw:"TranscriptEntry[]"},description:""},hasOutput:{required:!0,tsType:{name:"boolean"},description:""},companyId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""}}};export{I as R};
|
||||
@@ -0,0 +1 @@
|
||||
import{j as s,c as t,t as a,v as n}from"./iframe-aoIC7NDi.js";function r({status:e}){return s.jsxDEV("span",{className:t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap shrink-0",a[e]??n),children:e.replace(/_/g," ")},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/StatusBadge.tsx",lineNumber:6,columnNumber:5},this)}r.__docgenInfo={description:"",methods:[],displayName:"StatusBadge",props:{status:{required:!0,tsType:{name:"string"},description:""}}};export{r as S};
|
||||
@@ -0,0 +1,9 @@
|
||||
import{s as Re,l as pe,_ as te,a as Bt,r as Pt}from"./DocsRenderer-LL677BLK-C2eW-rkQ.js";import{R as z,r as b,z as Mt,y as $e,C as _t,D as ft}from"./iframe-aoIC7NDi.js";import"./preload-helper-Dp1pzeXC.js";import"./react-18-D7zDPu8g.js";import"./index-DUUcyzlS.js";import"./index-DrFu-skq.js";var Ht=ft({"../../node_modules/react-fast-compare/index.js"(e,t){var r=typeof Element<"u",o=typeof Map=="function",n=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function f(a,i){if(a===i)return!0;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(a.constructor!==i.constructor)return!1;var u,l,p;if(Array.isArray(a)){if(u=a.length,u!=i.length)return!1;for(l=u;l--!==0;)if(!f(a[l],i[l]))return!1;return!0}var c;if(o&&a instanceof Map&&i instanceof Map){if(a.size!==i.size)return!1;for(c=a.entries();!(l=c.next()).done;)if(!i.has(l.value[0]))return!1;for(c=a.entries();!(l=c.next()).done;)if(!f(l.value[1],i.get(l.value[0])))return!1;return!0}if(n&&a instanceof Set&&i instanceof Set){if(a.size!==i.size)return!1;for(c=a.entries();!(l=c.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(i)){if(u=a.length,u!=i.length)return!1;for(l=u;l--!==0;)if(a[l]!==i[l])return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof i.valueOf=="function")return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof i.toString=="function")return a.toString()===i.toString();if(p=Object.keys(a),u=p.length,u!==Object.keys(i).length)return!1;for(l=u;l--!==0;)if(!Object.prototype.hasOwnProperty.call(i,p[l]))return!1;if(r&&a instanceof Element)return!1;for(l=u;l--!==0;)if(!((p[l]==="_owner"||p[l]==="__v"||p[l]==="__o")&&a.$$typeof)&&!f(a[p[l]],i[p[l]]))return!1;return!0}return a!==a&&i!==i}t.exports=function(a,i){try{return f(a,i)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}}}}),Nt=ft({"../../node_modules/warning/warning.js"(e,t){var r=function(){};o=function(n,s){var f=arguments.length;s=new Array(f>1?f-1:0);for(var a=1;a<f;a++)s[a-1]=arguments[a];var i=0,u="Warning: "+n.replace(/%s/g,function(){return s[i++]});typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}},r=function(n,s,f){var a=arguments.length;f=new Array(a>2?a-2:0);for(var i=2;i<a;i++)f[i-2]=arguments[i];if(s===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");n||o.apply(null,[s].concat(f))};var o;t.exports=r}}),Vt=$e(Pt(),1);const{deprecate:lt}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{global:qt}=__STORYBOOK_MODULE_GLOBAL__;b.createContext();b.createContext();var Ke=function(e){return e.reduce(function(t,r){var o=r[0],n=r[1];return t[o]=n,t},{})},Je=typeof window<"u"&&window.document&&window.document.createElement?b.useLayoutEffect:b.useEffect,k="top",H="bottom",N="right",B="left",je="auto",ye=[k,H,N,B],ie="start",ge="end",zt="clippingParents",ct="viewport",ce="popper",It="reference",Qe=ye.reduce(function(e,t){return e.concat([t+"-"+ie,t+"-"+ge])},[]),pt=[].concat(ye,[je]).reduce(function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ge])},[]),Ut="beforeRead",Yt="read",Xt="afterRead",Ft="beforeMain",Gt="main",Kt="afterMain",Jt="beforeWrite",Qt="write",Zt="afterWrite",er=[Ut,Yt,Xt,Ft,Gt,Kt,Jt,Qt,Zt];function U(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ne(e){var t=P(e).Element;return e instanceof t||e instanceof Element}function _(e){var t=P(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ke(e){if(typeof ShadowRoot>"u")return!1;var t=P(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},s=t.elements[r];!_(s)||!U(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(f){var a=n[f];a===!1?s.removeAttribute(f):s.setAttribute(f,a===!0?"":a)}))})}function rr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],s=t.attributes[o]||{},f=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),a=f.reduce(function(i,u){return i[u]="",i},{});!_(n)||!U(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(i){n.removeAttribute(i)}))})}}var dt={name:"applyStyles",enabled:!0,phase:"write",fn:tr,effect:rr,requires:["computeStyles"]};function I(e){return e.split("-")[0]}var re=Math.max,Te=Math.min,ae=Math.round;function We(){var e=navigator.usLine truncated
|
||||
drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
|
||||
drop-shadow(0 1px 3px rgba(0,0,0,0.1))
|
||||
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{}),Rt=z.forwardRef(({placement:e="top",hasChrome:t=!0,children:r,arrowProps:o={},tooltipRef:n,color:s,withArrows:f,...a},i)=>z.createElement(Zr,{"data-testid":"tooltip",hasChrome:t,ref:i,...a,color:s},t&&f&&z.createElement(Qr,{placement:e,...o,color:s}),r));Rt.displayName="Tooltip";var en=Re.div`
|
||||
display: inline-block;
|
||||
cursor: ${e=>{var t;return e.trigger==="hover"||(t=e.trigger)!=null&&t.includes("hover")?"default":"pointer"}};
|
||||
`,tn=Re.g`
|
||||
cursor: ${e=>{var t;return e.trigger==="hover"||(t=e.trigger)!=null&&t.includes("hover")?"default":"pointer"}};
|
||||
`,Ct=({svg:e=!1,trigger:t="click",closeOnOutsideClick:r=!1,placement:o="top",modifiers:n=[{name:"preventOverflow",options:{padding:8}},{name:"offset",options:{offset:[8,8]}},{name:"arrow",options:{padding:8}}],hasChrome:s=!0,defaultVisible:f=!1,withArrows:a,offset:i,tooltip:u,children:l,closeOnTriggerHidden:p,mutationObserverOptions:c,delayHide:v=t==="hover"?200:0,visible:g,interactive:d,delayShow:O=t==="hover"?400:0,strategy:E,followCursor:L,onVisibleChange:W,portalContainer:m,...w})=>{let y=e?tn:en,{getArrowProps:T,getTooltipProps:S,setTooltipRef:x,setTriggerRef:R,visible:C,state:j}=Jr({trigger:t,placement:o,defaultVisible:f,delayHide:v,interactive:d,closeOnOutsideClick:r,closeOnTriggerHidden:p,onVisibleChange:W,delayShow:O,followCursor:L,mutationObserverOptions:c,visible:g,offset:i},{modifiers:n,strategy:E}),$=(typeof m=="string"?me.querySelector(m):m)||me.body,V=C?z.createElement(Rt,{placement:j==null?void 0:j.placement,ref:x,hasChrome:s,arrowProps:T(),withArrows:a,...S()},typeof u=="function"?u({onHide:()=>W(!1)}):u):null;return z.createElement(z.Fragment,null,z.createElement(y,{trigger:t,ref:R,...w},l),C&&Mt.createPortal(V,$))},rn=({startOpen:e=!1,onVisibleChange:t,...r})=>{let[o,n]=b.useState(e),s=b.useCallback(f=>{t&&t(f)===!1||n(f)},[t]);return b.useEffect(()=>{let f=()=>s(!1),a=l=>{l.key==="Escape"&&f()};me.addEventListener("keydown",a,!1);let i=Array.from(me.getElementsByTagName("iframe")),u=[];return i.forEach(l=>{let p=()=>{try{l.contentWindow.document&&(l.contentWindow.document.addEventListener("click",f),u.push(()=>{try{l.contentWindow.document.removeEventListener("click",f)}catch{}}))}catch{}};p(),l.addEventListener("load",p),u.push(()=>{l.removeEventListener("load",p)})}),()=>{me.removeEventListener("keydown",a),u.forEach(l=>{l()})}}),z.createElement(Ct,{...r,visible:o,onVisibleChange:s})},ln=e=>(lt("WithTooltipPure is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."),z.createElement(Ct,{"data-deprecated":"WithTooltipPure",...e})),cn=e=>(lt("WithToolTipState is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."),z.createElement(rn,{"data-deprecated":"WithToolTipState",...e}));export{Rt as Tooltip,cn as WithToolTipState,rn as WithTooltip,ln as WithTooltipPure};
|
||||
@@ -0,0 +1 @@
|
||||
import{e as x,c as b,g as m,k as P,h as p,j as w,l as N,m as c,n as I,t as A,o as M}from"./_baseUniq-7kyoN_aU.js";import{aL as g,ar as E,aM as F,aN as T,aO as _,aP as l,aQ as $,aR as B,aS as S,aT as y}from"./mermaid.core-BRRy2yZG.js";var L=/\s/;function R(n){for(var r=n.length;r--&&L.test(n.charAt(r)););return r}var G=/^\s+/;function H(n){return n&&n.slice(0,R(n)+1).replace(G,"")}var o=NaN,q=/^[-+]0x[0-9a-f]+$/i,z=/^0b[01]+$/i,C=/^0o[0-7]+$/i,K=parseInt;function Q(n){if(typeof n=="number")return n;if(x(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=H(n);var t=z.test(n);return t||C.test(n)?K(n.slice(2),t?2:8):q.test(n)?o:+n}var v=1/0,W=17976931348623157e292;function X(n){if(!n)return n===0?n:0;if(n=Q(n),n===v||n===-v){var r=n<0?-1:1;return r*W}return n===n?n:0}function Y(n){var r=X(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?b(n):[]}var O=Object.prototype,D=O.hasOwnProperty,dn=E(function(n,r){n=Object(n);var t=-1,i=r.length,a=i>2?r[2]:void 0;for(a&&F(r[0],r[1],a)&&(i=1);++t<i;)for(var f=r[t],e=T(f),s=-1,d=e.length;++s<d;){var u=e[s],h=n[u];(h===void 0||_(h,O[u])&&!D.call(n,u))&&(n[u]=f[u])}return n});function un(n){var r=n==null?0:n.length;return r?n[r-1]:void 0}function J(n){return function(r,t,i){var a=Object(r);if(!l(r)){var f=m(t);r=P(r),t=function(s){return f(a[s],s,a)}}var e=n(r,t,i);return e>-1?a[f?r[e]:e]:void 0}}var U=Math.max;function Z(n,r,t){var i=n==null?0:n.length;if(!i)return-1;var a=t==null?0:Y(t);return a<0&&(a=U(i+a,0)),p(n,m(r),a)}var hn=J(Z);function V(n,r){var t=-1,i=l(n)?Array(n.length):[];return w(n,function(a,f,e){i[++t]=r(a,f,e)}),i}function gn(n,r){var t=$(n)?N:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&c(n,r,nn)}function rn(n,r){return n<r}function tn(n,r,t){for(var i=-1,a=n.length;++i<a;){var f=n[i],e=r(f);if(e!=null&&(s===void 0?e===e&&!x(e):t(e,s)))var s=e,d=f}return d}function on(n){return n&&n.length?tn(n,B,rn):void 0}function an(n,r,t,i){if(!g(n))return n;r=I(r,n);for(var a=-1,f=r.length,e=f-1,s=n;s!=null&&++a<f;){var d=A(r[a]),u=t;if(d==="__proto__"||d==="constructor"||d==="prototype")return n;if(a!=e){var h=s[d];u=void 0,u===void 0&&(u=g(h)?h:S(r[a+1])?[]:{})}y(s,d,u),s=s[d]}return n}function vn(n,r,t){for(var i=-1,a=r.length,f={};++i<a;){var e=r[i],s=M(n,e);t(s,e)&&an(f,I(e,n),s)}return f}export{rn as a,tn as b,V as c,vn as d,on as e,fn as f,hn as g,mn as h,dn as i,Y as j,un as l,gn as m,X as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{bd as S,be as Rn,aQ as T,bf as w,aP as sn,bg as xn,bh as mn,bi as Mn,bj as un,bk as x,aN as N,bl as Cn,bm as on,bn as Fn,bo as E,bb as gn,bp as R,aL as ln,bq as Dn,br as D,bs as Gn,bt as Nn,bu as _,aT as Un,bv as Bn,aO as Kn,bw as Q,bx as jn,by as Hn,aS as qn,aR as cn,b9 as Yn,bz as M}from"./mermaid.core-BRRy2yZG.js";var Zn="[object Symbol]";function U(n){return typeof n=="symbol"||S(n)&&Rn(n)==Zn}function bn(n,r){for(var e=-1,t=n==null?0:n.length,f=Array(t);++e<t;)f[e]=r(n[e],e,n);return f}var X=w?w.prototype:void 0,J=X?X.toString:void 0;function dn(n){if(typeof n=="string")return n;if(T(n))return bn(n,dn)+"";if(U(n))return J?J.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Qn(){}function pn(n,r){for(var e=-1,t=n==null?0:n.length;++e<t&&r(n[e],e,n)!==!1;);return n}function Xn(n,r,e,t){for(var f=n.length,i=e+-1;++i<f;)if(r(n[i],i,n))return i;return-1}function Jn(n){return n!==n}function Wn(n,r,e){for(var t=e-1,f=n.length;++t<f;)if(n[t]===r)return t;return-1}function zn(n,r,e){return r===r?Wn(n,r,e):Xn(n,Jn,e)}function Vn(n,r){var e=n==null?0:n.length;return!!e&&zn(n,r,0)>-1}function $(n){return sn(n)?xn(n):mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function B(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||U(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=Mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:B(n,r)?[n]:fr(ar(n))}function m(n){if(typeof n=="string"||U(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&e<t;)n=n[m(r[e++])];return e&&e==t?n:void 0}function sr(n,r,e){var t=n==null?void 0:yn(n,r);return t===void 0?e:t}function K(n,r){for(var e=-1,t=r.length,f=n.length;++e<t;)n[f+e]=r[e];return n}var W=w?w.isConcatSpreadable:void 0;function ur(n){return T(n)||un(n)||!!(W&&n&&n[W])}function Ot(n,r,e,t,f){var i=-1,a=n.length;for(e||(e=ur),f||(f=[]);++i<a;){var s=n[i];e(s)?K(f,s):t||(f[f.length]=s)}return f}function or(n,r,e,t){var f=-1,i=n==null?0:n.length;for(t&&i&&(e=n[++f]);++f<i;)e=r(e,n[f],f,n);return e}function gr(n,r){return n&&x(r,$(r),n)}function lr(n,r){return n&&x(r,N(r),n)}function Tn(n,r){for(var e=-1,t=n==null?0:n.length,f=0,i=[];++e<t;){var a=n[e];r(a,e,n)&&(i[f++]=a)}return i}function hn(){return[]}var cr=Object.prototype,br=cr.propertyIsEnumerable,z=Object.getOwnPropertySymbols,j=z?function(n){return n==null?[]:(n=Object(n),Tn(z(n),function(r){return br.call(n,r)}))}:hn;function dr(n,r){return x(n,j(n),r)}var pr=Object.getOwnPropertySymbols,wn=pr?function(n){for(var r=[];n;)K(r,j(n)),n=Cn(n);return r}:hn;function Ar(n,r){return x(n,wn(n),r)}function On(n,r,e){var t=r(n);return T(n)?t:K(t,e(n))}function G(n){return On(n,$,j)}function yr(n){return On(n,N,wn)}var Tr=Object.prototype,hr=Tr.hasOwnProperty;function wr(n){var r=n.length,e=new n.constructor(r);return r&&typeof n[0]=="string"&&hr.call(n,"index")&&(e.index=n.index,e.input=n.input),e}function Or(n,r){var e=r?on(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var $r=/\w*$/;function _r(n){var r=new n.constructor(n.source,$r.exec(n));return r.lastIndex=n.lastIndex,r}var V=w?w.prototype:void 0,k=V?V.valueOf:void 0;function Sr(n){return k?Object(k.call(n)):{}}var Er="[object Boolean]",Pr="[object Date]",Ir="[object Map]",vr="[object Number]",Lr="[object RegExp]",Rr="[object Set]",xr="[object String]",mr="[object Symbol]",Mr="[object ArrayBuffer]",Cr="[object DataView]",Fr="[object Float32Array]",Dr="[object Float64Array]",Gr="[object Int8Array]",Nr="[object Int16Array]",Ur="[object Int32Array]",Br="[object Uint8Array]",Kr="[object Uint8ClampedArray]",jr="[object Uint16Array]",Hr="[object Uint32Array]";function qr(n,r,e){var t=n.constructor;switch(r){case Mr:return on(n);case Er:case Pr:return new t(+n);case Cr:return Or(n,e);case Fr:case Dr:case Gr:case Nr:case Ur:case Br:case Kr:case jr:case Hr:return Fn(n,e);case Ir:return new t;case vr:case xr:return new t(n);case Lr:return _r(n);case Rr:return new t;case mr:return Sr(n)}}var Yr="[object Map]";function Zr(n){return S(n)&&E(n)==Yr}var nn=R&&R.isMap,Qr=nn?gn(nn):Zr,Xr="[object Set]";function Jr(n){return S(n)&&E(n)==Xr}var rn=R&&R.isSet,Wr=rn?gn(rn):Jr,zr=1,Vr=2,kr=4,$n="[object Arguments]",ne="[object Array]",re="[object Boolean]",ee="[object Date]",te="[object Error]",_n="[object Function]",ie="[object GeneratorFunction]",fe="[object Map]",ae="[object Number]",Sn="[object Object]",se="[object RegExp]",ue="[object Set]",oe="[object String]",ge="[object Symbol]",le="[object WeakMap]",ce="[object ArrayBuffer]",be="[objecLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as s}from"./iframe-aoIC7NDi.js";function a(e){const t=new URLSearchParams;e.state&&t.set("state",e.state),e.limit&&t.set("limit",String(e.limit)),e.offset&&t.set("offset",String(e.offset));const i=t.toString();return i?`?${i}`:""}const o={createCompanyInvite:(e,t={})=>s.post(`/companies/${e}/invites`,t),createOpenClawInvitePrompt:(e,t={})=>s.post(`/companies/${e}/openclaw/invite-prompt`,t),getInvite:e=>s.get(`/invites/${e}`),getInviteOnboarding:e=>s.get(`/invites/${e}/onboarding`),acceptInvite:(e,t)=>s.post(`/invites/${e}/accept`,t),listInvites:(e,t={})=>s.get(`/companies/${e}/invites${a(t)}`),revokeInvite:e=>s.post(`/invites/${e}/revoke`,{}),listJoinRequests:(e,t="pending_approval",i)=>s.get(`/companies/${e}/join-requests?status=${t}${i?`&requestType=${i}`:""}`),listMembers:e=>s.get(`/companies/${e}/members`),listUserDirectory:e=>s.get(`/companies/${e}/user-directory`),updateMember:(e,t,i)=>s.patch(`/companies/${e}/members/${t}`,i),updateMemberPermissions:(e,t,i)=>s.patch(`/companies/${e}/members/${t}/permissions`,i),updateMemberAccess:(e,t,i)=>s.patch(`/companies/${e}/members/${t}/role-and-grants`,i),archiveMember:(e,t,i={})=>s.post(`/companies/${e}/members/${t}/archive`,i),approveJoinRequest:(e,t)=>s.post(`/companies/${e}/join-requests/${t}/approve`,{}),rejectJoinRequest:(e,t)=>s.post(`/companies/${e}/join-requests/${t}/reject`,{}),claimJoinRequestApiKey:(e,t)=>s.post(`/join-requests/${e}/claim-api-key`,{claimSecret:t}),getBoardClaimStatus:(e,t)=>s.get(`/board-claim/${e}?code=${encodeURIComponent(t)}`),claimBoard:(e,t)=>s.post(`/board-claim/${e}/claim`,{code:t}),getCliAuthChallenge:(e,t)=>s.get(`/cli-auth/challenges/${e}?token=${encodeURIComponent(t)}`),approveCliAuthChallenge:(e,t)=>s.post(`/cli-auth/challenges/${e}/approve`,{token:t}),cancelCliAuthChallenge:(e,t)=>s.post(`/cli-auth/challenges/${e}/cancel`,{token:t}),searchAdminUsers:e=>s.get(`/admin/users?query=${encodeURIComponent(e)}`),promoteInstanceAdmin:e=>s.post(`/admin/users/${e}/promote-instance-admin`,{}),demoteInstanceAdmin:e=>s.post(`/admin/users/${e}/demote-instance-admin`,{}),getUserCompanyAccess:e=>s.get(`/admin/users/${e}/company-access`),setUserCompanyAccess:(e,t)=>s.put(`/admin/users/${e}/company-access`,{companyIds:t}),getCurrentBoardAccess:()=>s.get("/cli-auth/me")};export{o as a};
|
||||
@@ -0,0 +1,14 @@
|
||||
import{j as e,c as p,r as l,aO as D,T as j,K as k,M as U}from"./iframe-aoIC7NDi.js";import{T as V}from"./toggle-switch-D46zFA7i.js";import{g as I}from"./dialog-6DTSoM1_.js";import{C as g,T as q,a as _,b as L,S,c as H}from"./AgentIconPicker-B29UI7uB.js";import{B as O}from"./message-square-CCO5PzL9.js";import{c as y}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const R=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],M=y("circle-question-mark",R);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const P=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],A=y("mouse-pointer-2",P);function w({className:t}){return e.jsxDEV(e.Fragment,{children:[e.jsxDEV("img",{src:"/brands/opencode-logo-light-square.svg",alt:"OpenCode",className:p("dark:hidden",t)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OpenCodeLogoIcon.tsx",lineNumber:10,columnNumber:7},this),e.jsxDEV("img",{src:"/brands/opencode-logo-dark-square.svg",alt:"OpenCode",className:p("hidden dark:block",t)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/OpenCodeLogoIcon.tsx",lineNumber:15,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/OpenCodeLogoIcon.tsx",lineNumber:9,columnNumber:5},this)}w.__docgenInfo={description:"",methods:[],displayName:"OpenCodeLogoIcon",props:{className:{required:!1,tsType:{name:"string"},description:""}}};function T({className:t}){return e.jsxDEV("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:p(t),children:[e.jsxDEV("line",{x1:"12",y1:"6",x2:"12",y2:"23"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:25,columnNumber:7},this),e.jsxDEV("path",{d:"M12 8 C10 9 9.5 11 10.5 13 C11.5 15 10 17 12 18"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:27,columnNumber:7},this),e.jsxDEV("path",{d:"M12 8 C14 9 14.5 11 13.5 13 C12.5 15 14 17 12 18"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:29,columnNumber:7},this),e.jsxDEV("circle",{cx:"10",cy:"8",r:"0.8",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:31,columnNumber:7},this),e.jsxDEV("circle",{cx:"14",cy:"8",r:"0.8",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:32,columnNumber:7},this),e.jsxDEV("path",{d:"M12 6 L8 3 L6 5 L9 6",strokeWidth:"1.2"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:34,columnNumber:7},this),e.jsxDEV("path",{d:"M12 6 L16 3 L18 5 L15 6",strokeWidth:"1.2"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:35,columnNumber:7},this),e.jsxDEV("line",{x1:"7.5",y1:"4",x2:"7",y2:"5.2",strokeWidth:"1"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:37,columnNumber:7},this),e.jsxDEV("line",{x1:"16.5",y1:"4",x2:"17",y2:"5.2",strokeWidth:"1"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:38,columnNumber:7},this),e.jsxDEV("circle",{cx:"12",cy:"6.5",r:"1.2"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:40,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/HermesIcon.tsx",lineNumber:15,columnNumber:5},this)}T.__docgenInfo={description:`Hermes caduceus icon — winged staff with two intertwined serpents.\r
|
||||
Replaces the generic Zap icon for the hermes_local adapter type.\r
|
||||
\r
|
||||
⚕️ inspired but as the proper caduceus (Hermes' symbol): staff + two snakes + wings.`,methods:[],displayName:"HermesIcon",props:{className:{required:!1,tsType:{name:"string"},description:""}}};const C={_local:"local",_gateway:"gateway"};function b(t){for(const[r,s]of Object.entries(C))if(t.endsWith(r))return s;return null}function h(t,r){return r?`${t} (${r})`:t}const N={claude_local:{label:"Claude Code",description:"Local Claude agent",icon:S,recommended:!0},codex_local:{label:"Codex",description:"Local Codex agent",icon:L,recommended:!0},gemini_local:{label:"Gemini CLI",description:"Local Gemini agent",icon:_},opencode_local:{label:"OpenCode",description:"Local multi-provider agent",icon:w},hermes_local:{label:"Hermes Agent",description:"Local Hermes CLI agent",icon:T},pi_local:{label:"Pi",description:"Local Pi agent",icon:q},cursor:{label:"Cursor",description:"Local Cursor agent",icon:A},openclaw_gateway:{label:"OpenClaw Gateway",description:"Invoke OpenClaw via gateway protocol",icon:O,comingSoon:!0,disabledLabel:"Configure OpenClaw within the App"},process:{label:"Process",description:"Internal process adapter",icon:g,comingSoon:!0},http:{label:"HTTP",description:"Internal HTTP adapter",icon:g,comingSoon:!0}};function E(t){let r=t;for(const s of Object.keys(C))if(r.endsWith(s)){r=r.slice(0,-s.length);break}return r.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function re(t){var s;const r=((s=N[t])==null?void 0:s.label)??E(t);return h(r,b(t))}function F(){const t={};for(const[r,s]of Object.entries(N))t[r]=h(s.label,b(r));return t}function se(t){const r=N[t];if(r)return r;const s=b(t);return{label:h(E(t),s),description:s?`External ${s} adapter`:"External adapter",icon:g}}const ie={name:"Display name for this agent.",title:"Job title shown in the org chart.",reportsTo:"The agent this one reports to in the org hierarchy.",capabilities:"Describes what this agent can do. Shown in the org chart and used for task routing.",adapterType:"How this agent runs: local CLI (Claude/Codex/OpenCode), OpenClaw Gateway, spawned process, or generic HTTP webhook.",cwd:"Deprecated legacy working directory fallback for local adapters. Existing agents may still carry this value, but new configurations should use project workspaces instead.",promptTemplate:"Sent on every heartbeat. Keep this small and dynamic. Use it for current-task framing, not large static instructions. Supports {{ agent.id }}, {{ agent.name }}, {{ agent.role }} and other template variables.",model:"Override the default model used by the adapter.",thinkingEffort:"Control model reasoning depth. Supported values vary by adapter/model.",chrome:"Enable Claude's Chrome integration by passing --chrome.",dangerouslySkipPermissions:"Run unattended by auto-approving adapter permission prompts when supported.",dangerouslyBypassSandbox:"Run Codex without sandbox restrictions. Required for filesystem/network access.",search:"Enable Codex web search capability during runs.",fastMode:"Enable Codex Fast mode. This burns credits/tokens much faster and is currently supported on GPT-5.4 only.",workspaceStrategy:"How Paperclip should realize an execution workspace for this agent. Keep project_primary for normal cwd execution, or use git_worktree for issue-scoped isolated checkouts.",runtimeServicesJson:"Optional workspace runtime service definitions. Use this for shared app servers, workers, or other long-lived companion processes attached to the workspace.",maxTurnsPerRun:"Maximum number of agentic turns (tool calls) per heartbeat run.",command:"The command to execute (e.g. node, python).",localCommand:"Override the path to the CLI command you want the adapter to call (e.g. /usr/local/bin/claude, codex, opencode).",args:"Command-line arguments, comma-separated.",extraArgs:"Extra CLI arguments for local adapters, comma-separated.",envVars:"Environment variables injected into the adapter process. Use plain values or secret references.",bootstrapPrompt:"Only sent when Paperclip starts a fresh session. Use this for stable setup guidance that should not be repeated on every heartbeat.",payloadTemplateJson:"Optional JSON merged into remote adapter request payloads before Paperclip adds its standard wake and workspace fields.",webhookUrl:"The URL that receives POST requests when the agent is invoked.",heartbeatInterval:"Run this agent automatically on a timer. Useful for periodic tasks like checking for new work.",intervalSec:"Seconds between automatic heartbeat invocations.",timeoutSec:"Maximum seconds a run can take before being terminated. 0 means no timeout.",graceSec:"Seconds to wait after sending interrupt before force-killing the process.",wakeOnDemand:"Allow this agent to be woken by assignments, API calls, UI actions, or automated systems.",cooldownSec:"Minimum seconds between consecutive heartbeat runs.",maxConcurrentRuns:"Maximum number of heartbeat runs that can execute simultaneously for this agent."},ne=F(),oe=D;function d({text:t}){return e.jsxDEV(j,{chiLine truncated
|
||||
@@ -0,0 +1,16 @@
|
||||
import{h as W,q as D,r as b,j as e,L as le,a6 as Fe,c as N,a7 as vt,V as Qe,u as Ye,i as pe,B,b3 as yt,P as ge,b as Ne,d as xe,aO as At,b4 as Se,b5 as Et,aI as Pe,b6 as Dt,H as ee}from"./iframe-aoIC7NDi.js";import{h as Ct}from"./heartbeats-R23LJy38.js";import{I as Je}from"./Identity-qezU2VU6.js";import{R as jt}from"./RunChatSurface-BY0lSkJs.js";import{u as Ut}from"./IssueChatThread-Do6zl-jD.js";import{E as Vt}from"./external-link-DMByQIwj.js";import{a as te}from"./agents-CZiu7Lc2.js";import{s as Te}from"./secrets-I7WObUYx.js";import{a as kt}from"./assets-BTLyf0Xx.js";import{l as wt,g as Ft,D as _e,a as Ie,b as Re,c as Oe,C as St}from"./registry-7D9NZbk8.js";import{i as Pt,u as Tt,b as Le,c as _t}from"./use-disabled-adapters-BvVPjiIT.js";import{g as It,a as me,F as y,h as f,D as Z,b as re,T as Me,c as Rt,d as Ge,O as Be,e as qe,f as Ot}from"./agent-config-primitives-DS6dQaBU.js";import{u as Lt,d as ze}from"./use-adapter-capabilities-CyVDSXkx.js";import{M as ie}from"./MarkdownEditor-BtfKiA3v.js";import{C as Mt}from"./PathInstructionsModal-D4Fgn9Ki.js";import{R as Bt}from"./ReportsToPicker-CN_6V3BL.js";import{E as qt,R as Ht}from"./EnvVarEditor-BM1jLlQe.js";import{F as Kt}from"./folder-open-D-CLSWj-.js";import{H as oe,A as ce,e as Wt}from"./AgentIconPicker-B29UI7uB.js";import{g as he}from"./dialog-6DTSoM1_.js";import{S as $t}from"./StatusBadge-BRp0i6cu.js";import{S as Xe}from"./separator-kEtKd1Ay.js";import{P as Ze}from"./play-DGAXIo5V.js";import{c as ve}from"./createLucideIcon-D2uUVdtm.js";import{B as K}from"./badge-CQZT8Hmw.js";import{C as ye,a as Ae,b as Ee,c as De,d as Ce}from"./card-CztzpO7x.js";import{S as Qt,a as Yt,b as Jt,c as Gt,d as be}from"./select-De3TClhU.js";import"./preload-helper-Dp1pzeXC.js";import"./avatar-Cx9l3K2h.js";import"./index-DUUcyzlS.js";import"./recent-selections-CD1WKLHy.js";import"./dropdown-menu-DRraIghT.js";import"./MarkdownBody-suYvEMx0.js";import"./InlineEntitySelector-BOnceYYg.js";import"./textarea-CGN-n--7.js";import"./index-BWXhrlcm.js";import"./PriorityIcon-BJIUslvt.js";import"./minus-S7Yk3xbG.js";import"./triangle-alert-XSXGBeLN.js";import"./circle-x-D1djpUMR.js";import"./circle-check-B6ZHio0H.js";import"./copy-CPgBejOM.js";import"./ellipsis-BM07d3s-.js";import"./square-CTiUZDc0.js";import"./arrow-right-BmL7S7RJ.js";import"./circle-pause-DnJAMYCY.js";import"./paperclip-B7aTkTtY.js";import"./thumbs-up-DOKJqPYr.js";import"./lightbulb-CWoAXyu4.js";import"./toggle-switch-D46zFA7i.js";import"./message-square-CCO5PzL9.js";import"./x-CIQWKcou.js";import"./input-DeZ-mgkh.js";import"./database-Dx6aEk21.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const zt=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Xt=ve("pause",zt);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zt=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],es=ve("pen-line",Zt);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ts=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ss=ve("settings-2",ts),rs=4,is=4,os=15e3,ns=64e3,as=40,ls=[];function ms(t){return t.status==="queued"||t.status==="running"}function et({companyId:t}){const{data:r}=W({queryKey:[...D.liveRuns(t),"dashboard"],queryFn:()=>Ct.liveRunsForCompany(t,rs)}),o=r??[],s=b.useMemo(()=>o.slice(0,is),[o]),n=Math.max(0,o.length-s.length),{data:x}=W({queryKey:[...D.issues.list(t),"with-routine-executions"],queryFn:()=>vt.list(t,{includeRoutineExecutions:!0}),enabled:s.length>0}),m=b.useMemo(()=>{const a=new Map;for(const S of x??[])a.set(S.id,S);return a},[x]),{transcriptByRun:F,hasOutputForRun:$}=Ut({runs:s,companyId:t,maxChunksPerRun:as,logPollIntervalMs:os,logReadLimitBytes:ns,enableRealtimeUpdates:!1});return e.jsxDEV("div",{children:[e.jsxDEV("h3",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Agents"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:64,columnNumber:7},this),o.length===0?e.jsxDEV("div",{className:"rounded-xl border border-border p-4",children:e.jsxDEV("p",{className:"text-sm text-muted-foreground",children:"No recent agent runs."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:69,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:68,columnNumber:9},this):e.jsxDEV("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 sm:gap-4 xl:grid-cols-4",children:s.map(a=>e.jsxDEV(cs,{companyId:t,run:a,issue:a.issueId?m.get(a.issueId):void 0,transcript:F.get(a.id)??ls,hasOutput:$(a.id),isActive:ms(a)},a.id,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:74,columnNumber:13},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:72,columnNumber:9},this),n>0&&e.jsxDEV("div",{className:"mt-3 flex justify-end text-xs text-muted-foreground",children:e.jsxDEV(le,{to:"/agents",className:"hover:text-foreground hover:underline",children:[n," more active/recent run",n===1?"":"s"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:88,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:63,columnNumber:5},this)}const cs=b.memo(function({companyId:r,run:o,issue:s,transcript:n,hasOutput:x,isActive:m}){return e.jsxDEV("div",{className:N("flex h-[320px] flex-col overflow-hidden rounded-xl border shadow-sm",m?"border-cyan-500/25 bg-cyan-500/[0.04] shadow-[0_16px_40px_rgba(6,182,212,0.08)]":"border-border bg-background/70"),children:[e.jsxDEV("div",{className:"border-b border-border/60 px-3 py-3",children:[e.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[e.jsxDEV("div",{className:"min-w-0",children:[e.jsxDEV("div",{className:"flex items-center gap-2",children:[m?e.jsxDEV("span",{className:"relative flex h-2.5 w-2.5 shrink-0",children:[e.jsxDEV("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-cyan-400 opacity-70"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:125,columnNumber:19},this),e.jsxDEV("span",{className:"relative inline-flex h-2.5 w-2.5 rounded-full bg-cyan-500"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:126,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:124,columnNumber:17},this):e.jsxDEV("span",{className:"inline-flex h-2.5 w-2.5 rounded-full bg-muted-foreground/35"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:129,columnNumber:17},this),e.jsxDEV(Je,{name:o.agentName,size:"sm",className:"[&>span:last-child]:!text-[11px]"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:131,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:122,columnNumber:13},this),e.jsxDEV("div",{className:"mt-2 flex items-center gap-2 text-[11px] text-muted-foreground",children:e.jsxDEV("span",{children:m?"Live now":o.finishedAt?`Finished ${Fe(o.finishedAt)}`:`Started ${Fe(o.createdAt)}`},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:134,columnNumber:15},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:133,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActiveAgentsPanel.tsx",lineNumber:121,columnNumbeLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as s,A as p,n as c,o as l}from"./iframe-aoIC7NDi.js";function u(e,t){if(!t)return e;const n=e.includes("?")?"&":"?";return`${e}${n}companyId=${encodeURIComponent(t)}`}function o(e,t,n=""){return u(`/agents/${encodeURIComponent(e)}${n}`,t)}const d={list:e=>s.get(`/companies/${e}/agents`),org:e=>s.get(`/companies/${e}/org`),listConfigurations:e=>s.get(`/companies/${e}/agent-configurations`),get:async(e,t)=>{try{return await s.get(o(e,t))}catch(n){if(!(n instanceof p)||n.status!==409||!t||c(e))throw n;const i=l(e);if(!i)throw n;const a=(await s.get(`/companies/${t}/agents`)).filter(r=>r.status!=="terminated"&&l(r.urlKey)===i);if(a.length!==1)throw n;return s.get(o(a[0].id,t))}},getConfiguration:(e,t)=>s.get(o(e,t,"/configuration")),listConfigRevisions:(e,t)=>s.get(o(e,t,"/config-revisions")),getConfigRevision:(e,t,n)=>s.get(o(e,n,`/config-revisions/${t}`)),rollbackConfigRevision:(e,t,n)=>s.post(o(e,n,`/config-revisions/${t}/rollback`),{}),create:(e,t)=>s.post(`/companies/${e}/agents`,t),hire:(e,t)=>s.post(`/companies/${e}/agent-hires`,t),update:(e,t,n)=>s.patch(o(e,n),t),updatePermissions:(e,t,n)=>s.patch(o(e,n,"/permissions"),t),instructionsBundle:(e,t)=>s.get(o(e,t,"/instructions-bundle")),updateInstructionsBundle:(e,t,n)=>s.patch(o(e,n,"/instructions-bundle"),t),instructionsFile:(e,t,n)=>s.get(o(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),saveInstructionsFile:(e,t,n)=>s.put(o(e,n,"/instructions-bundle/file"),t),deleteInstructionsFile:(e,t,n)=>s.delete(o(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),pause:(e,t)=>s.post(o(e,t,"/pause"),{}),resume:(e,t)=>s.post(o(e,t,"/resume"),{}),approve:(e,t)=>s.post(o(e,t,"/approve"),{}),terminate:(e,t)=>s.post(o(e,t,"/terminate"),{}),remove:(e,t)=>s.delete(o(e,t)),listKeys:(e,t)=>s.get(o(e,t,"/keys")),skills:(e,t)=>s.get(o(e,t,"/skills")),syncSkills:(e,t,n)=>s.post(o(e,n,"/skills/sync"),{desiredSkills:t}),createKey:(e,t,n)=>s.post(o(e,n,"/keys"),{name:t}),revokeKey:(e,t,n)=>s.delete(o(e,n,`/keys/${encodeURIComponent(t)}`)),runtimeState:(e,t)=>s.get(o(e,t,"/runtime-state")),taskSessions:(e,t)=>s.get(o(e,t,"/task-sessions")),resetSession:(e,t,n)=>s.post(o(e,n,"/runtime-state/reset-session"),{taskKey:t??null}),adapterModels:(e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/models`),detectModel:(e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/detect-model`),testEnvironment:(e,t,n)=>s.post(`/companies/${e}/adapters/${t}/test-environment`,n),invoke:(e,t)=>s.post(o(e,t,"/heartbeat/invoke"),{}),wakeup:(e,t,n)=>s.post(o(e,n,"/wakeup"),t),loginWithClaude:(e,t)=>s.post(o(e,t,"/claude-login"),{}),availableSkills:()=>s.get("/skills/available")};export{d as a};
|
||||
@@ -0,0 +1 @@
|
||||
var l={"+":["conjugate","add"],"−":["negate","subtract"],"×":["signOf","multiply"],"÷":["reciprocal","divide"],"⌈":["ceiling","greaterOf"],"⌊":["floor","lesserOf"],"∣":["absolute","residue"],"⍳":["indexGenerate","indexOf"],"?":["roll","deal"],"⋆":["exponentiate","toThePowerOf"],"⍟":["naturalLog","logToTheBase"],"○":["piTimes","circularFuncs"],"!":["factorial","binomial"],"⌹":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"≤":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"≥":[null,"greaterThanOrEqual"],"≠":[null,"notEqual"],"≡":["depth","match"],"≢":[null,"notMatch"],"∈":["enlist","membership"],"⍷":[null,"find"],"∪":["unique","union"],"∩":[null,"intersection"],"∼":["not","without"],"∨":[null,"or"],"∧":[null,"and"],"⍱":[null,"nor"],"⍲":[null,"nand"],"⍴":["shapeOf","reshape"],",":["ravel","catenate"],"⍪":[null,"firstAxisCatenate"],"⌽":["reverse","rotate"],"⊖":["axis1Reverse","axis1Rotate"],"⍉":["transpose",null],"↑":["first","take"],"↓":[null,"drop"],"⊂":["enclose","partitionWithAxis"],"⊃":["diclose","pick"],"⌷":[null,"index"],"⍋":["gradeUp",null],"⍒":["gradeDown",null],"⊤":["encode",null],"⊥":["decode",null],"⍕":["format","formatByExample"],"⍎":["execute",null],"⊣":["stop","left"],"⊢":["pass","right"]},t=/[\.\/⌿⍀¨⍣]/,a=/⍬/,i=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,u=/←/,o=/[⍝#].*$/,s=function(r){var n;return n=!1,function(e){return n=e,e===r?n==="\\":!0}};const f={name:"apl",startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(r,n){var e;return r.eatSpace()?null:(e=r.next(),e==='"'||e==="'"?(r.eatWhile(s(e)),r.next(),n.prev=!0,"string"):/[\[{\(]/.test(e)?(n.prev=!1,null):/[\]}\)]/.test(e)?(n.prev=!0,null):a.test(e)?(n.prev=!1,"atom"):/[¯\d]/.test(e)?(n.func?(n.func=!1,n.prev=!1):n.prev=!0,r.eatWhile(/[\w\.]/),"number"):t.test(e)||u.test(e)?"operator":i.test(e)?(n.func=!0,n.prev=!1,l[e]?"variableName.function.standard":"variableName.function"):o.test(e)?(r.skipToEnd(),"comment"):e==="∘"&&r.peek()==="."?(r.next(),"variableName.function"):(r.eatWhile(/[\w\$_]/),n.prev=!0,"keyword"))}};export{f as apl};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as o}from"./iframe-aoIC7NDi.js";const e={list:(s,p)=>o.get(`/companies/${s}/approvals${p?`?status=${encodeURIComponent(p)}`:""}`),create:(s,p)=>o.post(`/companies/${s}/approvals`,p),get:s=>o.get(`/approvals/${s}`),approve:(s,p)=>o.post(`/approvals/${s}/approve`,{decisionNote:p}),reject:(s,p)=>o.post(`/approvals/${s}/reject`,{decisionNote:p}),requestRevision:(s,p)=>o.post(`/approvals/${s}/request-revision`,{decisionNote:p}),resubmit:(s,p)=>o.post(`/approvals/${s}/resubmit`,{payload:p}),listComments:s=>o.get(`/approvals/${s}/comments`),addComment:(s,p)=>o.post(`/approvals/${s}/comments`,{body:p}),listIssues:s=>o.get(`/approvals/${s}/issues`)};export{e as a};
|
||||
@@ -0,0 +1 @@
|
||||
import{M as ln,N as an,O as Y,P as O,Q,R as un,S as y,T as tn,V as j,W as _,X as rn,Y as o,Z as on,$ as sn,a0 as fn}from"./mermaid.core-BRRy2yZG.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*u<y))return u=(n*(h-R)-d*(l-v))/u,[l+u*E,h+u*i]}function H(l,h,D,S,v,R,V){var a=l-D,E=h-S,i=(V?R:-R)/j(a*a+E*E),n=i*E,d=-i*a,u=l+n,s=h+d,f=D+n,c=S+d,W=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,A=m*m+g*g,T=v-R,P=u*c-f*s,I=(g<0?-1:1)*j(on(0,T*T*A-P*P)),M=(P*g-m*I)/A,N=(-P*m-g*I)/A,w=(P*g+m*I)/A,p=(-P*m+g*I)/A,x=M-W,e=N-t,r=w-W,X=p-t;return x*x+e*e>r*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(W<an)if(q=pn(Z,$,J,K,F,G,B,C)){var L=Z-q[0],U=$-q[1],k=F-q[0],b=G-q[1],nn=1/O(fn((L*k+U*b)/(j(L*L+U*U)*j(k*k+b*b)))/2),en=j(q[0]*q[0]+q[1]*q[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}I>y?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(Z,$),a.arc(0,0,s,m,g,!t)):a.moveTo(Z,$),!(u>y)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,A,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[Y(d)*n,O(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:Q(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:Q(+n),i):h},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Q(+n),i):D},i.padRadius=function(n){return arguments.length?(S=n==null?null:typeof n=="function"?n:Q(+n),i):S},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:Q(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Q(+n),i):R},i.padAngle=function(n){return arguments.length?(V=typeof n=="function"?n:Q(+n),i):V},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|
||||
@@ -0,0 +1,36 @@
|
||||
import{_ as dt,K as Ze,ac as ke,l as Se,b as qe,a as Qe,q as Je,t as Ke,g as je,s as _e,z as tr,F as er,G as rr,H as ir,c as Ee,am as me,aI as pe,i as ar,d as nr,y as or,aJ as sr,aK as hr}from"./mermaid.core-BRRy2yZG.js";import{p as lr}from"./chunk-4BX2VUAB-Ds5vk7IO.js";import{p as fr}from"./treemap-GDKQZRPO-DgoZf2I3.js";import{c as Fe}from"./cytoscape.esm-BQaXIfA_.js";import{aa as cr}from"./iframe-aoIC7NDi.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DrFu-skq.js";import"./_baseUniq-7kyoN_aU.js";import"./_basePickBy-BopQxIEc.js";import"./clone-BASZBmHw.js";var he={exports:{}},le={exports:{}},fe={exports:{}},gr=fe.exports,we;function ur(){return we||(we=1,(function(I,D){(function(P,N){I.exports=N()})(gr,function(){return(function(A){var P={};function N(u){if(P[u])return P[u].exports;var h=P[u]={i:u,l:!1,exports:{}};return A[u].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=P,N.i=function(u){return u},N.d=function(u,h,a){N.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(h,"a",h),h},N.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},N.p="",N(N.s=28)})([(function(A,P,N){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,A.exports=u}),(function(A,P,N){var u=N(2),h=N(8),a=N(9);function r(f,i,g){u.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=i}r.prototype=Object.create(u.prototype);for(var e in u)r[e]=u[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,i){for(var g=this.getOtherEnd(f),t=i.getGraphManager().getRoot();;){if(g.getOwner()==i)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r}),(function(A,P,N){function u(h){this.vGraphObject=h}A.exports=u}),(function(A,P,N){var u=N(2),h=N(10),a=N(13),r=N(0),e=N(16),f=N(5);function i(t,o,s,c){s==null&&c==null&&(c=o),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,s!=null&&o!=null?this.rect=new a(o.x,o.y,s.width,s.height):this.rect=new a}i.prototype=Object.create(u.prototype);for(var g in u)i[g]=u[g];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.gLine truncated
|
||||
.edge {
|
||||
stroke-width: ${I.archEdgeWidth};
|
||||
stroke: ${I.archEdgeColor};
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
fill: ${I.archEdgeArrowColor};
|
||||
}
|
||||
|
||||
.node-bkg {
|
||||
fill: none;
|
||||
stroke: ${I.archGroupBorderColor};
|
||||
stroke-width: ${I.archGroupBorderWidth};
|
||||
stroke-dasharray: 8;
|
||||
}
|
||||
.node-icon-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.node-icon-text > div {
|
||||
color: #fff;
|
||||
margin: 1px;
|
||||
height: fit-content;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
`,"getStyles"),Rr=Ir,re=dt(I=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${I}</g>`,"wrapIcon"),ne={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:re('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:re('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:re('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miLine truncated
|
||||
translate(${v}, ${L-p.height/2})
|
||||
translate(${E*R.width/2}, ${y*R.height/2})
|
||||
rotate(${-1*E*y*45}, 0, ${p.height/2})
|
||||
`)}}}}}))},"drawEdges"),Fr=dt(async function(I,D,A){const N=A.getConfigField("padding")*.75,u=A.getConfigField("fontSize"),a=A.getConfigField("iconSize")/2;await Promise.all(D.nodes().map(async r=>{const e=ie(r);if(e.type==="group"){const{h:f,w:i,x1:g,y1:t}=r.boundingBox(),o=I.append("rect");o.attr("id",`group-${e.id}`).attr("x",g+a).attr("y",t+a).attr("width",i).attr("height",f).attr("class","node-bkg");const s=I.append("g");let c=g,l=t;if(e.icon){const T=s.append("g");T.html(`<g>${await pe(e.icon,{height:N,width:N,fallbackPrefix:ne.prefix})}</g>`),T.attr("transform","translate("+(c+a+1)+", "+(l+a+1)+")"),c+=N,l+=u/2-1-2}if(e.label){const T=s.append("g");await me(T,e.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},Ee()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(c+a+4)+", "+(l+a+2)+")")}A.setElementForId(e.id,o)}}))},"drawGroups"),br=dt(async function(I,D,A){const P=Ee();for(const N of A){const u=D.append("g"),h=I.getConfigField("iconSize");if(N.title){const f=u.append("g");await me(f,N.title,{useHtmlLabels:!1,width:h*1.5,classes:"architecture-service-label"},P),f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),f.attr("transform","translate("+h/2+", "+h+")")}const a=u.append("g");if(N.icon)a.html(`<g>${await pe(N.icon,{height:h,width:h,fallbackPrefix:ne.prefix})}</g>`);else if(N.iconText){a.html(`<g>${await pe("blank",{height:h,width:h,fallbackPrefix:ne.prefix})}</g>`);const g=a.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html(ar(N.iconText,P)),t=parseInt(window.getComputedStyle(g.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;g.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/t)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+N.id).attr("d",`M0 ${h} v${-h} q0,-5 5,-5 h${h} q5,0 5,5 v${h} H0 Z`);u.attr("id",`service-${N.id}`).attr("class","architecture-service");const{width:r,height:e}=u.node().getBBox();N.width=r,N.height=e,I.setElementForId(N.id,u)}return 0},"drawServices"),Pr=dt(function(I,D,A){A.forEach(P=>{const N=D.append("g"),u=I.getConfigField("iconSize");N.append("g").append("rect").attr("id","node-"+P.id).attr("fill-opacity","0").attr("width",u).attr("height",u),N.attr("class","architecture-junction");const{width:a,height:r}=N._groups[0][0].getBBox();N.width=a,N.height=r,I.setElementForId(P.id,N)})},"drawJunctions");sr([{name:ne.prefix,icons:ne}]);Fe.use(mr);function Ue(I,D,A){I.forEach(P=>{D.add({group:"nodes",data:{type:"service",id:P.id,icon:P.icon,label:P.title,parent:P.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-service"})})}dt(Ue,"addServices");function Ye(I,D,A){I.forEach(P=>{D.add({group:"nodes",data:{type:"junction",id:P.id,parent:P.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ye,"addJunctions");function Xe(I,D){D.nodes().map(A=>{const P=ie(A);if(P.type==="group")return;P.x=A.position().x,P.y=A.position().y,I.getElementById(P.id).attr("transform","translate("+(P.x||0)+","+(P.y||0)+")")})}dt(Xe,"positionNodes");function He(I,D){I.forEach(A=>{D.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}dt(He,"addGroups");function We(I,D){I.forEach(A=>{const{lhsId:P,rhsId:N,lhsInto:u,lhsGroup:h,rhsInto:a,lhsDir:r,rhsDir:e,rhsGroup:f,title:i}=A,g=Te(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${P}-${N}`,label:i,source:P,sourceDir:r,sourceArrow:u,sourceGroup:h,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:a,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};D.add({group:"edges",data:t,classes:g})})}dt(We,"addEdges");function Ve(I,D,A){const P=dt((a,r)=>Object.entries(a).reduce((e,[f,i])=>{var o;let g=0;const t=Object.entries(i);if(t.length===1)return e[f]=t[0][1],e;for(let s=0;s<t.length-1;s++)for(let c=s+1;c<t.length;c++){const[l,T]=t[s],[d,v]=t[c];if(((o=A[l])==null?void 0:o[d])===r)e[f]??(e[f]=[]),e[f]=[...e[f],...T,...v];else if(l==="default"||d==="default")e[f]??(e[f]=[]),e[f]=[...e[f],...T,...v];else{const S=`${f}-${g++}`;e[S]=T;const C=`${f}-${g++}`;e[C]=v}}return e},{}),"flattenAlignments"),N=D.map(a=>{const r={},e={};return Object.entries(a).forEach(([f,[i,g]])=>{var o,s,c;const t=((o=I.getNode(f))==null?void 0:o.in)??"default";r[g]??(r[g]={}),(s=r[g])[t]??(s[t]=[]),r[g][t].push(f),e[i]??(e[i]={}),(c=e[i])[t]??(c[t]=[]),e[i][t].push(f)}),{horiz:Object.values(P(r,"horizontal")).filter(f=>f.length>1),vert:Object.values(P(e,"vertical")).filter(f=>f.length>1)}}),[u,h]=N.reduce(([a,r],{horiz:e,vert:f})=>[[...a,...e],[...r,...f]],[[],[]]);return{horizontal:u,vertLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as e}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const c=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],a=e("archive",c);export{a as A};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as o}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as o}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const r=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],c=o("arrow-right",r);export{c as A};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as o}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const t=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],a=o("arrow-up-right",t);export{a as A};
|
||||
@@ -0,0 +1 @@
|
||||
function t(e){var r=e.match(/^\s*\S/);return e.skipToEnd(),r?"error":null}const i={name:"asciiarmor",token:function(e,r){var n;if(r.state=="top")return e.sol()&&(n=e.match(/^-----BEGIN (.*)?-----\s*$/))?(r.state="headers",r.type=n[1],"tag"):t(e);if(r.state=="headers"){if(e.sol()&&e.match(/^\w+:/))return r.state="header","atom";var o=t(e);return o&&(r.state="body"),o}else{if(r.state=="header")return e.skipToEnd(),r.state="headers","string";if(r.state=="body")return e.sol()&&(n=e.match(/^-----END (.*)?-----\s*$/))?n[1]!=r.type?"error":(r.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error");if(r.state=="end")return t(e)}},blankLine:function(e){e.state=="headers"&&(e.state="body")},startState:function(){return{state:"top",type:null}}};export{i as asciiArmor};
|
||||
@@ -0,0 +1 @@
|
||||
function u(i){for(var s={},c=i.split(" "),T=0;T<c.length;++T)s[c[T]]=!0;return s}const o={keywords:u("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),cmipVerbs:u("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),compareTypes:u("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),status:u("current deprecated mandatory obsolete"),tags:u("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),storage:u("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminString TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),modifier:u("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),accessTypes:u("not-accessible accessible-for-notify read-only read-create read-write"),multiLineStrings:!0};function g(i){var s=i.keywords||o.keywords,c=i.cmipVerbs||o.cmipVerbs,T=i.compareTypes||o.compareTypes,N=i.status||o.status,d=i.tags||o.tags,f=i.storage||o.storage,m=i.modifier||o.modifier,C=i.accessTypes||o.accessTypes;i.multiLineStrings||o.multiLineStrings;var R=i.indentStatements!==!1,A=/[\|\^]/,E;function y(e,n){var t=e.next();if(t=='"'||t=="'")return n.tokenize=D(t),n.tokenize(e,n);if(/[\[\]\(\){}:=,;]/.test(t))return E=t,"punctuation";if(t=="-"&&e.eat("-"))return e.skipToEnd(),"comment";if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(A.test(t))return e.eatWhile(A),"operator";e.eatWhile(/[\w\-]/);var r=e.current();return s.propertyIsEnumerable(r)?"keyword":c.propertyIsEnumerable(r)?"variableName":T.propertyIsEnumerable(r)?"atom":N.propertyIsEnumerable(r)?"comment":d.propertyIsEnumerable(r)?"typeName":f.propertyIsEnumerable(r)||m.propertyIsEnumerable(r)||C.propertyIsEnumerable(r)?"modifier":"variableName"}function D(e){return function(n,t){for(var r=!1,S,O=!1;(S=n.next())!=null;){if(S==e&&!r){var I=n.peek();I&&(I=I.toLowerCase(),(I=="b"||I=="h"||I=="o")&&n.next()),O=!0;break}r=!r&&S=="\\"}return O&&(t.tokenize=null),"string"}}function p(e,n,t,r,S){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=S}function a(e,n,t){var r=e.indented;return e.context&&e.context.type=="statement"&&(r=e.context.indented),e.context=new p(r,n,t,null,e.context)}function l(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}return{name:"asn1",startState:function(){return{tokenize:null,context:new p(-2,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;E=null;var r=(n.tokenize||y)(e,n);if(r=="comment")return r;if(t.align==null&&(t.align=!0),(E==";"||E==":"||E==",")&&t.type=="statement")l(n);else if(E=="{")a(n,e.column(),"}");else if(E=="[")a(n,e.column(),"]");else if(E=="(")a(n,e.column(),")");else if(E=="}"){for(;t.type=="statement";)t=l(n);for(t.type=="}"&&(t=l(n));t.type=="statement";)t=l(n)}else E==t.type?l(n):R&&((t.type=="}"||t.type=="top")&&E!=";"||t.type=="statement"&&E=="newstatement")&&a(n,e.column(),"statement");return n.startOfLine=!1,r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"--"}}}}export{g as asn1};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as s}from"./iframe-aoIC7NDi.js";const m={uploadImage:async(t,a,e)=>{const n=await a.arrayBuffer(),o=new File([n],a.name,{type:a.type}),r=new FormData;return e&&e.trim().length>0&&r.append("namespace",e.trim()),r.append("file",o),s.postForm(`/companies/${t}/assets/images`,r)},uploadCompanyLogo:async(t,a)=>{const e=await a.arrayBuffer(),n=new File([e],a.name,{type:a.type}),o=new FormData;return o.append("file",n),s.postForm(`/companies/${t}/logo`,o)}};export{m as a};
|
||||
@@ -0,0 +1 @@
|
||||
var t=["exten","same","include","ignorepat","switch"],o=["#include","#exec"],c=["addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi","alarmreceiver","amd","answer","authenticate","background","backgrounddetect","bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent","changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge","congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge","dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility","datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa","dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy","externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif","goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete","ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus","jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme","meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete","minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode","mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish","originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce","parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones","privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten","readfile","receivefax","receivefax","receivefax","record","removequeuemember","resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun","saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax","sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags","setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel","slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground","speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound","speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor","stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec","trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate","vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring","waitforsilence","waitmusiconhold","waituntil","while","zapateller"];function l(e,n){var i="",a=e.next();if(n.blockComment)return a=="-"&&e.match("-;",!0)?n.blockComment=!1:e.skipTo("--;")?(e.next(),e.next(),e.next(),n.blockComment=!1):e.skipToEnd(),"comment";if(a==";")return e.match("--",!0)&&!e.match("-",!1)?(n.blockComment=!0,"comment"):(e.skipToEnd(),"comment");if(a=="[")return e.skipTo("]"),e.eat("]"),"header";if(a=='"')return e.skipTo('"'),"string";if(a=="'")return e.skipTo("'"),"string.special";if(a=="#"&&(e.eatWhile(/\w/),i=e.current(),o.indexOf(i)!==-1))return e.skipToEnd(),"strong";if(a=="$"){var r=e.peek();if(r=="{")return e.skipTo("}"),e.eat("}"),"variableName.special"}if(e.eatWhile(/\w/),i=e.current(),t.indexOf(i)!==-1){switch(n.extenStart=!0,i){case"same":n.extenSame=!0;break;case"include":case"switch":case"ignorepat":n.extenInclude=!0;break}return"atom"}}const s={name:"asterisk",startState:function(){return{blockComment:!1,extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(e,n){var i="";if(e.eatSpace())return null;if(n.extenStart)return e.eatWhile(/[^\s]/),i=e.current(),/^=>?$/.test(i)?(n.extenExten=!0,n.extenStart=!1,"strong"):(n.extenStart=!1,e.skipToEnd(),"error");if(n.extenExten)return n.extenExten=!1,n.extenPriority=!0,e.eatWhile(/[^,]/),n.extenInclude&&(e.skipToEnd(),n.extenPriority=!1,n.extenInclude=!1),n.extenSame&&(n.extenPriority=!1,n.extenSame=!1,n.extenApplication=!0),"tag";if(n.extenPriority)return n.extenPriority=!1,n.extenApplication=!0,e.next(),n.extenSame?null:(e.eatWhile(/[^,]/),"number");if(n.extenApplication){if(e.eatWhile(/,/),i=e.current(),i===",")return null;if(e.eatWhile(/\w/),i=e.current().toLowerCase(),n.extenApplication=!1,c.indexOf(i)!==-1)return"def"}else return l(e,n);return null},languageData:{commentTokens:{line:";",block:{open:";--",close:"--;"}}}};export{s as asterisk};
|
||||
@@ -0,0 +1 @@
|
||||
var g=Object.defineProperty;var l=(t,e,s)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var i=(t,e,s)=>l(t,typeof e!="symbol"?e+"":e,s);import{e as o,f as a}from"./iframe-aoIC7NDi.js";class m extends Error{constructor(s,n,r,f=null){super(s);i(this,"status");i(this,"code");i(this,"body");this.name="AuthApiError",this.status=n,this.code=f,this.body=r}}function u(t){const e=a.safeParse(t);if(e.success)return e.data;if(!t||typeof t!="object")return null;const s=a.safeParse(t.data);return s.success?s.data:null}function h(t,e){const s=t!=null&&t.error&&typeof t.error=="object"?t.error:null,n=typeof(s==null?void 0:s.code)=="string"?s.code:typeof(t==null?void 0:t.code)=="string"?t.code:null,r=typeof(s==null?void 0:s.message)=="string"&&s.message.trim().length>0?s.message:typeof(t==null?void 0:t.message)=="string"&&t.message.trim().length>0?t.message:typeof(t==null?void 0:t.error)=="string"&&t.error.trim().length>0?t.error:`Request failed: ${e}`;return new m(r,e,t,n)}async function c(t,e){const s=await fetch(`/api/auth${t}`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await s.json().catch(()=>null);if(!s.ok)throw h(n,s.status);return n}async function w(t,e,s){const n=await fetch(`/api/auth${t}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}),r=await n.json().catch(()=>null);if(!n.ok)throw h(r,n.status);return s(r)}const j={getSession:async()=>{const t=await fetch("/api/auth/get-session",{credentials:"include",headers:{Accept:"application/json"}});if(t.status===401)return null;const e=await t.json().catch(()=>null);if(!t.ok)throw new Error(`Failed to load session (${t.status})`);const s=u(e);return s||(e&&typeof e=="object"?u(e.data):null)},signInEmail:async t=>{await c("/sign-in/email",t)},signUpEmail:async t=>{await c("/sign-up/email",t)},getProfile:async()=>{const t=await fetch("/api/auth/profile",{credentials:"include",headers:{Accept:"application/json"}}),e=await t.json().catch(()=>null);if(!t.ok)throw new Error((e==null?void 0:e.error)??`Failed to load profile (${t.status})`);return o.parse(e)},updateProfile:async t=>w("/profile",t,e=>o.parse(e)),signOut:async()=>{await c("/sign-out",{})}};export{j as a};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as i,N as c,O as f,a9 as _,a0 as m,a2 as y,j as v,c as p}from"./iframe-aoIC7NDi.js";import{s as z}from"./index-DUUcyzlS.js";function j(){return z.useSyncExternalStore(w,()=>!0,()=>!1)}function w(){return()=>{}}var g="Avatar",[R]=y(g),[C,N]=R(g),b=i.forwardRef((a,e)=>{const{__scopeAvatar:r,...s}=a,[n,t]=i.useState("idle");return c.jsx(C,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:t,children:c.jsx(f.span,{...s,ref:e})})});b.displayName=g;var E="AvatarImage",L=i.forwardRef((a,e)=>{const{__scopeAvatar:r,src:s,onLoadingStatusChange:n=()=>{},...t}=a,u=N(E,r),o=k(s,t),l=_(d=>{n(d),u.onImageLoadingStatusChange(d)});return m(()=>{o!=="idle"&&l(o)},[o,l]),o==="loaded"?c.jsx(f.img,{...t,ref:e,src:s}):null});L.displayName=E;var S="AvatarFallback",h=i.forwardRef((a,e)=>{const{__scopeAvatar:r,delayMs:s,...n}=a,t=N(S,r),[u,o]=i.useState(s===void 0);return i.useEffect(()=>{if(s!==void 0){const l=window.setTimeout(()=>o(!0),s);return()=>window.clearTimeout(l)}},[s]),u&&t.imageLoadingStatus!=="loaded"?c.jsx(f.span,{...n,ref:e}):null});h.displayName=S;function A(a,e){return a?e?(a.src!==e&&(a.src=e),a.complete&&a.naturalWidth>0?"loaded":"loading"):"error":"idle"}function k(a,{referrerPolicy:e,crossOrigin:r}){const s=j(),n=i.useRef(null),t=s?(n.current||(n.current=new window.Image),n.current):null,[u,o]=i.useState(()=>A(t,a));return m(()=>{o(A(t,a))},[t,a]),m(()=>{const l=I=>()=>{o(I)};if(!t)return;const d=l("loaded"),x=l("error");return t.addEventListener("load",d),t.addEventListener("error",x),e&&(t.referrerPolicy=e),typeof r=="string"&&(t.crossOrigin=r),()=>{t.removeEventListener("load",d),t.removeEventListener("error",x)}},[t,r,e]),u}var F=b,M=L,V=h;function D({className:a,size:e="default",...r}){return v.jsxDEV(F,{"data-slot":"avatar","data-size":e,className:p("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6 data-[size=xs]:size-5",a),...r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/avatar.tsx",lineNumber:14,columnNumber:5},this)}function P({className:a,...e}){return v.jsxDEV(M,{"data-slot":"avatar-image",className:p("aspect-square size-full object-cover",a),...e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/avatar.tsx",lineNumber:31,columnNumber:5},this)}function T({className:a,...e}){return v.jsxDEV(V,{"data-slot":"avatar-fallback",className:p("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs group-data-[size=xs]/avatar:text-[10px]",a),...e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/avatar.tsx",lineNumber:44,columnNumber:5},this)}D.__docgenInfo={description:"",methods:[],displayName:"Avatar",props:{size:{required:!1,tsType:{name:"union",raw:'"default" | "xs" | "sm" | "lg"',elements:[{name:"literal",value:'"default"'},{name:"literal",value:'"xs"'},{name:"literal",value:'"sm"'},{name:"literal",value:'"lg"'}]},description:"",defaultValue:{value:'"default"',computed:!1}}}};P.__docgenInfo={description:"",methods:[],displayName:"AvatarImage"};T.__docgenInfo={description:"",methods:[],displayName:"AvatarFallback"};export{D as A,P as a,T as b};
|
||||
@@ -0,0 +1,30 @@
|
||||
import{aa as QR}from"./iframe-aoIC7NDi.js";function eT(mr,Zr){for(var E=0;E<Zr.length;E++){const et=Zr[E];if(typeof et!="string"&&!Array.isArray(et)){for(const O in et)if(O!=="default"&&!(O in mr)){const _=Object.getOwnPropertyDescriptor(et,O);_&&Object.defineProperty(mr,O,_.get?_:{enumerable:!0,get:()=>et[O]})}}}return Object.freeze(Object.defineProperty(mr,Symbol.toStringTag,{value:"Module"}))}var Si={exports:{}};/*! axe v4.11.3
|
||||
* Copyright (c) 2015 - 2026 Deque Systems, Inc.
|
||||
*
|
||||
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This entire copyright notice must appear in every copy of this file you
|
||||
* distribute or in any file that contains substantial portions of this source
|
||||
* code.
|
||||
*/var tT=Si.exports,Np;function rT(){return Np||(Np=1,(function(mr){(function Zr(E){var et=E,O=E.document,_=_||{};_.version="4.11.3",M(mr)==="object"&&mr.exports&&typeof Zr.toString=="function"&&(_.source="("+Zr.toString()+')(typeof window === "object" ? window : this);',mr.exports=_),typeof E.getComputedStyle=="function"&&(E.axe=_);var Bp=["precision","format","inGamut"],qp=["space"],jp=["algorithm"],$p=["method"],zp=["maxDeltaE","deltaEMethod","steps","maxSteps"],Vp=["node"],Hp=["relatedNodes"],Gp=["node"],Up=["variant"],Wp=["matches"],Yp=["chromium"],Kp=["noImplicit"],Xp=["noPresentational"],Zp=["node"],Jp=["environmentData"],Qp=["environmentData"],em=["environmentData"],tm=["environmentData"],rm=["environmentData"];function am(F){return ps(F)||ls(F)||Za(F)||fs()}function ki(F){var T=typeof Map=="function"?new Map:void 0;return ki=function(W){if(W===null||!nm(W))return W;if(typeof W!="function")throw new TypeError("Super expression must either be null or a function");if(T!==void 0){if(T.has(W))return T.get(W);T.set(W,_e)}function _e(){return ss(W,arguments,Qr(this).constructor)}return _e.prototype=Object.create(W.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),ea(_e,W)},ki(F)}function nm(F){try{return Function.toString.call(F).indexOf("[native code]")!==-1}catch{return typeof F=="function"}}function Jr(F,T,B){return(T=hs(T))in F?Object.defineProperty(F,T,{value:B,enumerable:!0,configurable:!0,writable:!0}):F[T]=B,F}function ss(F,T,B){if(Oi())return Reflect.construct.apply(null,arguments);var W=[null];W.push.apply(W,T);var _e=new(F.bind.apply(F,W));return B&&ea(_e,B.prototype),_e}function je(F,T){if(F==null)return{};var B,W,_e=im(F,T);if(Object.getOwnPropertySymbols){var Ne=Object.getOwnPropertySymbols(F);for(W=0;W<Ne.length;W++)B=Ne[W],T.indexOf(B)===-1&&{}.propertyIsEnumerable.call(F,B)&&(_e[B]=F[B])}return _e}function im(F,T){if(F==null)return{};var B={};for(var W in F)if({}.hasOwnProperty.call(F,W)){if(T.indexOf(W)!==-1)continue;B[W]=F[W]}return B}function Ka(F,T,B){return T=Qr(T),om(F,Oi()?Reflect.construct(T,B||[],Qr(F).constructor):T.apply(F,B))}function om(F,T){if(T&&(M(T)=="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return um(F)}function um(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function Oi(){try{var F=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Oi=function(){return!!F})()}function Qr(F){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},Qr(F)}function Xa(F,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(T&&T.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),Object.defineProperty(F,"prototype",{writable:!1}),T&&ea(F,T)}function ea(F,T){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,W){return B.__proto__=W,B},ea(F,T)}function de(){return de=Object.assign?Object.assign.bind():function(F){for(var T=1;T<arguments.length;T++){var B=arguments[T];for(var W in B)({}).hasOwnProperty.call(B,W)&&(F[W]=B[W])}return F},de.apply(null,arguments)}function ee(F){return lm(F)||ls(F)||Za(F)||sm()}function sm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ls(F){if(typeof Symbol<"u"&&F[Symbol.iterator]!=null||F["@@iterator"]!=null)return Array.from(F)}function lm(F){if(Array.isArray(F))return Ja(F)}function Zt(F,T,B){ds(F,T),T.set(F,B)}function cs(F,T){ds(F,T),T.add(F)}function ds(F,T){if(T.has(F))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wt(F,T){return F.get(Tr(F,T))}function at(F,T,B){return F.set(Tr(F,T),B),B}function Tr(F,T,B){if(typeof F=="function"?F===T:F.has(T))return arguments.length<3?T:B;throw new TypeError("Private element is not present on this object")}function H(F,T){return ps(F)||cm(F,T)||Za(F,T)||fs()}function fs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cm(F,T){var B=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(B!=null){var W,_e,Ne,Ke,pt=[],He=!0,tt=!1;try{if(Ne=(B=B.call(F)).next,T===0){if(Object(B)!==B)return;He=!1}else for(;!(He=(W=Ne.call(B)).done)&&(pt.push(W.value),pt.length!==T);He=!0);}catch(ta){tt=!0,_e=ta}finally{try{if(!He&&B.return!=null&&(Ke=B.return(),Object(Ke)!==Ke))return}finally{if(tt)throw _e}}return pt}}function ps(F){if(Array.isArray(F))return F}function _t(F,T){if(!(F instanceof T))throw new TypeError("Cannot call a class as a function")}function ms(F,T){for(var B=0;B<T.length;B++){var W=T[B];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(F,hs(W.key),W)}}function xt(F,T,B){return T&&ms(F.prototype,T),B&&ms(F,B),Object.defineProperty(F,"prototype",{writable:!1}),F}function hs(F){var T=dm(F,"string");return M(T)=="symbol"?T:T+""}function dm(F,T){if(M(F)!="object"||!F)return F;var B=F[Symbol.toPrimitive];if(B!==void 0){var W=B.call(F,T);if(M(W)!="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(F)}function xe(F,T){var B=typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(!B){if(Array.isArray(F)||(B=Za(F))||T){B&&(F=B);var W=0,_e=function(){};return{s:_e,n:function(){return W>=F.length?{done:!0}:{done:!1,value:F[W++]}},e:function(tt){throw tt},f:_e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ne,Ke=!0,pt=!1;return{s:function(){B=B.call(F)},n:function(){var tt=B.next();return Ke=tt.done,tt},e:function(tt){pt=!0,Ne=tt},f:function(){try{Ke||B.return==null||B.return()}finally{if(pt)throw Ne}}}}function Za(F,T){if(F){if(typeof F=="string")return Ja(F,T);var B={}.toString.call(F).slice(8,-1);return B==="Object"&&F.constructor&&(B=F.constructor.name),B==="Map"||B==="Set"?Array.from(F):B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B)?Ja(F,T):void 0}}function Ja(F,T){(T==null||T>F.length)&&(T=F.length);for(var B=0,W=Array(T);B<T;B++)W[B]=F[B];return W}function M(F){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},M(F)}(function(F,T,B,W,_e,Ne,Ke,pt,He,tt,ta){var fm=Object.create,ra=Object.defineProperty,pm=Object.getPrototypeOf,mm=Object.prototype.hasOwnProperty,hm=Object.getOwnPropertyNames,vm=Object.getOwnPropertyDescriptor,gm=function(t,r,a){return r in t?ra(t,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[r]=a},bm=function(t){return ra(t,"__esModule",{value:!0})},y=function(t,r){return function(){return r||t((r={exports:{}}).exports,r),r.exports}},Et=function(t,r){for(var a in r)ra(t,a,{get:r[a],enumerable:!0})},ym=function(t,r,a){if(r&&M(r)==="object"||typeof r=="function"){var n=xe(hm(r)),i;try{var o=function(){var s=i.value;!mm.call(t,s)&&s!=="default"&&ra(t,s,{get:function(){return r[s]},enumerable:!(a=vm(r,s))||a.enumerable})};for(n.s();!(i=n.n()).done;)o()}catch(u){n.e(u)}finally{n.f()}}return t},Ot=function(t){return ym(bm(ra(t!=null?fm(pm(t)):{},"default",t&&t.__esModule&&"default"in t?{get:function(){return t.default},enumerable:!0}:{value:t,enumerable:!0})),t)},vs=function(t,r,a){return gm(t,M(r)!=="symbol"?r+"":r,a),a},Dm=y(function(e,t){(function(r,a){M(e)==="object"&&typeof t<"u"?t.exports=a():r.ES6Promise=a()})(e,function(){function r(R){var I=M(R);return R!==null&&(I==="object"||I==="function")}function a(R){return typeof R=="function"}var n=void 0;Array.isArray?n=Array.isArray:n=function(I){return Object.prototype.toString.call(I)==="[object Array]"};var i=n,o=0,u=void 0,s=void 0,l=function(I,j){C[o]=I,C[o+1]=j,o+=2,o===2&&(s?s(S):z())};function c(R){s=R}function d(R){l=R}var f=typeof E<"u"?E:void 0,p=f||{},m=p.MutationObserver||p.WebKitMutationObserver,h=typeof self>"u"&&typeof process<"u"&&{}.toString.call(process)==="[object process]",v=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function g(){return function(){return process.nextTick(S)}}function b(){return typeof u<"u"?function(){u(S)}:x()}function D(){var R=0,I=new m(S),j=O.createTextNode("");return I.observe(j,{characterData:!0}),function(){j.data=R=++R%2}}function w(){var R=new MessageChannel;return R.port1.onmessage=S,function(){return R.port2.postMessage(0)}}function x(){var R=setTimeout;return function(){return R(S,1)}}var C=new Array(1e3);function S(){for(var R=0;R<o;R+=2){var I=C[R],j=C[R+1];I(j),C[R]=void 0,C[R+1]=void 0}o=0}function P(){try{var R=Function("return this")().require("vertx");return u=R.runOnLoop||R.runOnContext,b()}catch{return x()}}var z=void 0;h?z=g():m?z=D():v?z=w():f===void 0?z=P():z=x();function k(R,I){var j=this,X=new this.constructor(V);X[$]===void 0&&Re(X);var oe=j._state;if(oe){var fe=arguments[oe-1];l(function(){return Ae(oe,X,fe,j._result)})}else me(j,X,R,I);return X}function L(R){var I=this;if(R&&M(R)==="object"&&R.constructor===I)return R;var j=new I(V);return U(j,R),j}var $=Math.random().toString(36).substring(2);function V(){}var Q=void 0,ie=1,K=2;function re(){return new TypeError("You cannot resolve a promise with itself")}function q(){return new TypeError("A promises callback cannot return that same promise.")}function J(R,I,j,X){try{R.call(I,j,X)}catch(oe){return oe}}function A(R,I,j){l(function(X){var oe=!1,fe=J(j,I,function(Ve){oe||(oe=!0,I!==Ve?U(X,Ve):Y(X,Ve))},function(Ve){oe||(oe=!0,Z(X,Ve))},"Settle: "+(X._label||" unknown promise"));!oe&&fe&&(oe=!0,Z(X,fe))},R)}function G(R,I){I._state===ie?Y(R,I._result):I._state===K?Z(R,I._result):me(I,void 0,function(j){return U(R,j)},function(j){return Z(R,j)})}function N(R,I,j){I.constructor===R.constructor&&j===k&&I.constructor.resolve===L?G(R,I):j===void 0?Y(R,I):a(j)?A(R,I,j):Y(R,I)}function U(R,I){if(R===I)Z(R,re());else if(r(I)){var j=void 0;try{j=I.then}catch(X){Z(R,X);return}N(R,I,j)}else Y(R,I)}function ne(R){R._onerror&&R._onerror(R._result),De(R)}function Y(R,I){R._state===Q&&(R._result=I,R._state=ie,R._subscribers.length!==0&&l(De,R))}function Z(R,I){R._state===Q&&(R._state=K,R._result=I,l(ne,R))}function me(R,I,j,X){var oe=R._subscribers,fe=oe.length;R._onerror=null,oe[fe]=I,oe[fe+ie]=j,oe[fe+K]=X,fe===0&&R._state&&l(De,R)}function De(R){var I=R._subscribers,j=R._state;if(I.length!==0){for(var
Line truncated
|
||||
`,r:"\r",t:" ",f:"\f","\\":"\\","'":"'"},e.doubleQuotesEscapeChars={n:`
|
||||
`,r:"\r",t:" ",f:"\f","\\":"\\",'"':'"'}}),xh=y(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=js();function r(a,n,i,o,u,s){var l=a.length,c="";function d(b,D){var w="";for(n++,c=a.charAt(n);n<l;){if(c===b)return n++,w;if(c==="\\"){n++,c=a.charAt(n);var x=void 0;if(c===b)w+=b;else if((x=D[c])!==void 0)w+=x;else if(t.isHex(c)){var C=c;for(n++,c=a.charAt(n);t.isHex(c);)C+=c,n++,c=a.charAt(n);c===" "&&(n++,c=a.charAt(n)),w+=String.fromCharCode(parseInt(C,16));continue}else w+=c}else w+=c;n++,c=a.charAt(n)}return w}function f(){var b="";for(c=a.charAt(n);n<l;){if(t.isIdent(c))b+=c;else if(c==="\\"){if(n++,n>=l)throw Error("Expected symbol but end of file reached.");if(c=a.charAt(n),t.identSpecialChars[c])b+=c;else if(t.isHex(c)){var D=c;for(n++,c=a.charAt(n);t.isHex(c);)D+=c,n++,c=a.charAt(n);c===" "&&(n++,c=a.charAt(n)),b+=String.fromCharCode(parseInt(D,16));continue}else b+=c}else return b;n++,c=a.charAt(n)}return b}function p(){c=a.charAt(n);for(var b=!1;c===" "||c===" "||c===`
|
||||
`||c==="\r"||c==="\f";)b=!0,n++,c=a.charAt(n);return b}function m(){var b=h();if(n<l)throw Error('Rule expected but "'+a.charAt(n)+'" found.');return b}function h(){var b=v();if(!b)return null;var D=b;for(c=a.charAt(n);c===",";){if(n++,p(),D.type!=="selectors"&&(D={type:"selectors",selectors:[b]}),b=v(),!b)throw Error('Rule expected after ",".');D.selectors.push(b)}return D}function v(){p();var b={type:"ruleSet"},D=g();if(!D)return null;for(var w=b;D&&(D.type="rule",w.rule=D,w=D,p(),c=a.charAt(n),!(n>=l||c===","||c===")"));)if(u[c]){var x=c;if(n++,p(),D=g(),!D)throw Error('Rule expected after "'+x+'".');D.nestingOperator=x}else D=g(),D&&(D.nestingOperator=null);return b}function g(){for(var b=null;n<l;)if(c=a.charAt(n),c==="*")n++,(b=b||{}).tagName="*";else if(t.isIdentStart(c)||c==="\\")(b=b||{}).tagName=f();else if(c===".")n++,b=b||{},(b.classNames=b.classNames||[]).push(f());else if(c==="#")n++,(b=b||{}).id=f();else if(c==="["){n++,p();var D={name:f()};if(p(),c==="]")n++;else{var w="";if(o[c]&&(w=c,n++,c=a.charAt(n)),n>=l)throw Error('Expected "=" but end of file reached.');if(c!=="=")throw Error('Expected "=" but "'+c+'" found.');D.operator=w+"=",n++,p();var x="";if(D.valueType="string",c==='"')x=d('"',t.doubleQuotesEscapeChars);else if(c==="'")x=d("'",t.singleQuoteEscapeChars);else if(s&&c==="$")n++,x=f(),D.valueType="substitute";else{for(;n<l&&c!=="]";)x+=c,n++,c=a.charAt(n);x=x.trim()}if(p(),n>=l)throw Error('Expected "]" but end of file reached.');if(c!=="]")throw Error('Expected "]" but "'+c+'" found.');n++,D.value=x}b=b||{},(b.attrs=b.attrs||[]).push(D)}else if(c===":"){n++;var C=f(),S={name:C};if(c==="("){n++;var P="";if(p(),i[C]==="selector")S.valueType="selector",P=h();else{if(S.valueType=i[C]||"string",c==='"')P=d('"',t.doubleQuotesEscapeChars);else if(c==="'")P=d("'",t.singleQuoteEscapeChars);else if(s&&c==="$")n++,P=f(),S.valueType="substitute";else{for(;n<l&&c!==")";)P+=c,n++,c=a.charAt(n);P=P.trim()}p()}if(n>=l)throw Error('Expected ")" but end of file reached.');if(c!==")")throw Error('Expected ")" but "'+c+'" found.');n++,S.value=P}b=b||{},(b.pseudos=b.pseudos||[]).push(S)}else break;return b}return m()}e.parseCssSelector=r}),Eh=y(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=js();function r(a){var n="";switch(a.type){case"ruleSet":for(var i=a.rule,o=[];i;)i.nestingOperator&&o.push(i.nestingOperator),o.push(r(i)),i=i.rule;n=o.join(" ");break;case"selectors":n=a.selectors.map(r).join(", ");break;case"rule":a.tagName&&(a.tagName==="*"?n="*":n=t.escapeIdentifier(a.tagName)),a.id&&(n+="#"+t.escapeIdentifier(a.id)),a.classNames&&(n+=a.classNames.map(function(u){return"."+t.escapeIdentifier(u)}).join("")),a.attrs&&(n+=a.attrs.map(function(u){return"operator"in u?u.valueType==="substitute"?"["+t.escapeIdentifier(u.name)+u.operator+"$"+u.value+"]":"["+t.escapeIdentifier(u.name)+u.operator+t.escapeStr(u.value)+"]":"["+t.escapeIdentifier(u.name)+"]"}).join("")),a.pseudos&&(n+=a.pseudos.map(function(u){return u.valueType?u.valueType==="selector"?":"+t.escapeIdentifier(u.name)+"("+r(u.value)+")":u.valueType==="substitute"?":"+t.escapeIdentifier(u.name)+"($"+u.value+")":u.valueType==="numeric"?":"+t.escapeIdentifier(u.name)+"("+u.value+")":":"+t.escapeIdentifier(u.name)+"("+t.escapeIdentifier(u.value)+")":":"+t.escapeIdentifier(u.name)}).join(""));break;default:throw Error('Unknown entity type: "'+a.type+'".')}return n}e.renderEntity=r}),Ah=y(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=xh(),r=Eh(),a=(function(){function n(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return n.prototype.registerSelectorPseudos=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];this.pseudos[l]="selector"}return this},n.prototype.unregisterSelectorPseudos=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];delete this.pseudos[l]}return this},n.prototype.registerNumericPseudos=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];this.pseudos[l]="numeric"}return this},n.prototype.unregisterNumericPseudos=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];delete this.pseudos[l]}return this},n.prototype.registerNestingOperators=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];this.ruleNestingOperators[l]=!0}return this},n.prototype.unregisterNestingOperators=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];delete this.ruleNestingOperators[l]}return this},n.prototype.registerAttrEqualityMods=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var u=0,s=i;u<s.length;u++){var l=s[u];this.attrEqualityMods[l]=!0}return this},n.prototype.unregisterAttrE
Line truncated
|
||||
Consider to rely on 'then' or 'done' mode instead.`);S&&(delete c[p],d[p]=C,l.emit("setasync",p,S))},b=function(){v=!0,c[p]&&(delete c[p],delete f[p],l.delete(p))},D=s;if(D||(D="then"),D==="then"){var w=function(){i(b)};h=h.then(function(x){i(g.bind(this,x))},w),typeof h.finally=="function"&&h.finally(w)}else if(D==="done"){if(typeof h.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");h.done(g,b)}else if(D==="done:finally"){if(typeof h.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof h.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");h.done(g),h.finally(b)}}),l.on("get",function(p,m,h){var v;if(c[p]){++c[p];return}v=f[p];var g=function(){l.emit("getasync",p,m,h)};n(v)?typeof v.done=="function"?v.done(g):v.then(function(){i(g)}):g()}),l.on("delete",function(p){if(delete f[p],c[p]){delete c[p];return}if(hasOwnProperty.call(d,p)){var m=d[p];delete d[p],l.emit("deleteasync",p,[m])}}),l.on("clear",function(){var p=d;d=o(null),c=o(null),f=o(null),l.emit("clearasync",e(p,function(m){return[m]}))})}}),Rv=y(function(){var e=Qt(),t=cn(),r=br(),a=Function.prototype.apply;r.dispose=function(n,i,o){var u;if(e(n),o.async&&r.async||o.promise&&r.promise){i.on("deleteasync",u=function(l,c){a.call(n,null,c)}),i.on("clearasync",function(s){t(s,function(l,c){u(c,l)})});return}i.on("delete",u=function(l,c){n(c)}),i.on("clear",function(s){t(s,function(l,c){u(c,l)})})}}),Tv=y(function(e,t){t.exports=2147483647}),Sv=y(function(e,t){var r=gr(),a=Tv();t.exports=function(n){if(n=r(n),n>a)throw new TypeError(n+" exceeds maximum possible timeout");return n}}),kv=y(function(){var e=Vi(),t=cn(),r=Gi(),a=Xs(),n=Sv(),i=br(),o=Function.prototype,u=Math.max,s=Math.min,l=Object.create;i.maxAge=function(c,d,f){var p,m,h,v;c=n(c),c&&(p=l(null),m=f.async&&i.async||f.promise&&i.promise?"async":"",d.on("set"+m,function(g){p[g]=setTimeout(function(){d.delete(g)},c),typeof p[g].unref=="function"&&p[g].unref(),v&&(v[g]&&v[g]!=="nextTick"&&clearTimeout(v[g]),v[g]=setTimeout(function(){delete v[g]},h),typeof v[g].unref=="function"&&v[g].unref())}),d.on("delete"+m,function(g){clearTimeout(p[g]),delete p[g],v&&(v[g]!=="nextTick"&&clearTimeout(v[g]),delete v[g])}),f.preFetch&&(f.preFetch===!0||isNaN(f.preFetch)?h=.333:h=u(s(Number(f.preFetch),1),0),h&&(v={},h=(1-h)*c,d.on("get"+m,function(g,b,D){v[g]||(v[g]="nextTick",r(function(){var w;v[g]==="nextTick"&&(delete v[g],d.delete(g),f.async&&(b=e(b),b.push(o)),w=d.memoized.apply(D,b),f.promise&&a(w)&&(typeof w.done=="function"?w.done(o,o):w.then(o,o)))}))}))),d.on("clear"+m,function(){t(p,function(g){clearTimeout(g)}),p={},v&&(t(v,function(g){g!=="nextTick"&&clearTimeout(g)}),v={})}))}}),Ov=y(function(e,t){var r=gr(),a=Object.create,n=Object.prototype.hasOwnProperty;t.exports=function(i){var o=0,u=1,s=a(null),l=a(null),c=0,d;return i=r(i),{hit:function(p){var m=l[p],h=++c;if(s[h]=p,l[p]=h,!m)return++o,o<=i?void 0:(p=s[u],d(p),p);if(delete s[m],u===m)for(;!n.call(s,++u););},delete:d=function(p){var m=l[p];if(m&&(delete s[m],delete l[p],--o,u===m)){if(!o){c=0,u=1;return}for(;!n.call(s,++u););}},clear:function(){o=0,u=1,s=a(null),l=a(null),c=0}}}}),Mv=y(function(){var e=gr(),t=Ov(),r=br();r.max=function(a,n,i){var o,u,s;a=e(a),a&&(u=t(a),o=i.async&&r.async||i.promise&&r.promise?"async":"",n.on("set"+o,s=function(c){c=u.hit(c),c!==void 0&&n.delete(c)}),n.on("get"+o,s),n.on("delete"+o,u.delete),n.on("clear"+o,u.clear))}}),Pv=y(function(){var e=yr(),t=br(),r=Object.create,a=Object.defineProperties;t.refCounter=function(n,i,o){var u,s;u=r(null),s=o.async&&t.async||o.promise&&t.promise?"async":"",i.on("set"+s,function(l,c){u[l]=c||1}),i.on("get"+s,function(l){++u[l]}),i.on("delete"+s,function(l){delete u[l]}),i.on("clear"+s,function(){u={}}),a(i.memoized,{deleteRef:e(function(){var l=i.get(arguments);return l===null||!u[l]?null:--u[l]?!1:(i.delete(l),!0)}),getRefCount:e(function(){var l=i.get(arguments);return l===null||!u[l]?0:u[l]})})}}),Iv=y(function(e,t){var r=$s(),a=zs(),n=fv();t.exports=function(i){var o=r(arguments[1]),u;return o.normalizer||(u=o.length=a(o.length,i.length,o.async),u!==0&&(o.primitive?u===!1?o.normalizer=pv():u>1&&(o.normalizer=mv()(u)):u===!1?o.normalizer=bv()():u===1?o.normalizer=yv()():o.normalizer=Dv()(u))),o.async&&wv(),o.promise&&Cv(),o.dispose&&Rv(),o.maxAge&&kv(),o.max&&Mv(),o.refCounter&&Pv(),n(i,o)}}),Nv=[{name:"NA",value:"inapplicable",priority:0,group:"inapplicable"},{name:"PASS",value:"passed",priority:1,group:"passes"},{name:"CANTTELL",value:"cantTell",priority:2,group:"incomplete"},{name:"FAIL",value:"failed",priority:3,group:"violations"}],Ct={helpUrlBase:"https://dequeuniversity.com/rules/",gridSize:200,selectorSimilarFilterLimit:700,results:[],resultGroups:[],resultGroupMap:{},impact:Object.freeze(["minor","moderate","serious","critical"]),preload:Object.freeze
Line truncated
|
||||
`+e.stack.replace(e.message,"")),new a(t)}function Pc(){var e="axeAPI",t="";return typeof _<"u"&&_._audit&&_._audit.application&&(e=_._audit.application),typeof _<"u"&&(t=_.version),e+"."+t}function ko(e){Nc(e),ve(E.parent===e,"Source of the response must be the parent window.")}function Ic(e){Nc(e),ve(e.parent===E,"Respondable target must be a frame in the current window")}function Nc(e){ve(E!==e,"Messages can not be sent to the same window.")}var _a={};function Fy(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;ve(!Object.prototype.hasOwnProperty.call(_a,e),"A replyHandler already exists for this message channel."),_a[e]={replyHandler:t,sendToParent:r}}function Cy(e){return Object.prototype.hasOwnProperty.call(_a,e)?_a[e]:void 0}function Ry(e){delete _a[e]}var Nn=[];function Oo(){var e="".concat(_r(),":").concat(_r());return Nn.includes(e)?Oo():(Nn.push(e),e)}function Ty(e){return Nn.includes(e)?!1:(Nn.push(e),!0)}function Mo(e,t,r,a){if(r?ko(e):Ic(e),t.message instanceof Error&&!r)return _.log(t.message),!1;var n=_y(de({messageId:Oo()},t)),i=_._audit.allowedOrigins;return!i||!i.length?!1:(typeof a=="function"&&Fy(t.channelId,a,r),i.forEach(function(o){try{e.postMessage(n,o)}catch(u){throw u instanceof e.DOMException?new Error('allowedOrigins value "'.concat(o,'" is not a valid origin')):u}}),!0)}function Sy(e,t,r){if(!e.parent!==E)return _.log(t);try{Mo(e,{topic:null,channelId:r,message:t,messageId:Oo(),keepalive:!0},!0)}catch(a){return _.log(a)}}function Lc(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return function(n,i,o){var u={channelId:t,message:n,keepalive:i};Mo(e,u,r,o)}}function ky(e){var t=_._audit.allowedOrigins;return t&&t.includes("*")||t.includes(e)}function Oy(e,t){var r=e.origin,a=e.data,n=e.source;try{var i=xy(a)||{},o=i.channelId,u=i.message,s=i.messageId;if(!ky(r)||!Ty(s))return;if(u instanceof Error&&n.parent!==E)return _.log(u),!1;try{if(i.topic){var l=Lc(n,o);ko(n),t(i,l)}else My(n,i)}catch(c){Sy(n,c,o)}}catch(c){return _.log(c),!1}}function My(e,t){var r=t.channelId,a=t.message,n=t.keepalive,i=Cy(r)||{},o=i.replyHandler,u=i.sendToParent;if(o){u?ko(e):Ic(e);var s=Lc(e,r,u);!n&&r&&Ry(r);try{o(a,n,s)}catch(l){_.log(l),s(l,n)}}}var Py={open:function(t){if(typeof E.addEventListener=="function"){var r=function(n){Oy(n,t)};return E.addEventListener("message",r,!1),function(){E.removeEventListener("message",r,!1)}}},post:function(t,r,a){return typeof E.addEventListener!="function"?!1:Mo(t,r,!1,a)}};function Bc(e){e.updateMessenger(Py)}var Ln,qc,Bn={};function St(e,t,r,a,n){var i={topic:t,message:r,channelId:"".concat(_r(),":").concat(_r()),keepalive:a};return qc(e,i,n)}function Iy(e,t){var r=e.topic,a=e.message,n=e.keepalive,i=Object.prototype.hasOwnProperty.call(Bn,r)?Bn[r]:void 0;if(i)try{i(a,n,t)}catch(o){_.log(o),t(o,n)}}St.updateMessenger=function(t){var r=t.open,a=t.post;ve(typeof r=="function","open callback must be a function"),ve(typeof a=="function","post callback must be a function"),Ln&&Ln();var n=r(Iy);n?(ve(typeof n=="function","open callback must return a cleanup function"),Ln=n):Ln=null,qc=a},St.subscribe=function(t,r){ve(typeof r=="function","Subscriber callback must be a function"),ve(!Object.prototype.hasOwnProperty.call(Bn,t),"Topic ".concat(t," is already registered to.")),Bn[t]=r},St.isInFrame=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;return!!t.frameElement},Bc(St);function jc(e,t,r,a){var n,i,o=e.contentWindow,u=(n=(i=t.options)===null||i===void 0?void 0:i.pingWaitTime)!==null&&n!==void 0?n:500;if(!o){Dr("Frame does not have a content window",e),r(null);return}if(u===0){$c(e,t,r,a);return}var s=setTimeout(function(){s=setTimeout(function(){t.debug?a(zc("No response from frame",e)):r(null)},0)},u);St(o,"axe.ping",null,void 0,function(){clearTimeout(s),$c(e,t,r,a)})}function $c(e,t,r,a){var n,i,o=(n=(i=t.options)===null||i===void 0?void 0:i.frameWaitTime)!==null&&n!==void 0?n:6e4,u=e.contentWindow,s=setTimeout(function(){a(zc("Axe in frame timed out",e))},o);St(u,"axe.start",t,void 0,function(l){clearTimeout(s),l instanceof Error?a(l):r(l)})}function zc(e,t){var r;return _._tree&&(r=yo(t)),new Error(e+": "+(r||t))}var xa=null,Ea={update:function(t){ve(M(t)==="object","serializer must be an object"),xa=t},toSpec:function(t){return Ea.dqElmToSpec(new bt(t))},dqElmToSpec:function(t,r){var a;return t instanceof bt?(r&&(t=Ny(t,r)),typeof((a=xa)===null||a===void 0?void 0:a.toSpec)=="function"?xa.toSpec(t):t.toJSON()):t},mergeSpecs:function(t,r){var a;return typeof((a=xa)===null||a===void 0?void 0:a.mergeSpecs)=="function"?xa.mergeSpecs(t,r):bt.mergeSpecs(t,r)},mapRawResults:function(t){return t.map(function(r){return de({},r,{nodes:Ea.mapRawNodeResults(r.nodes)})})},mapRawNodeResults:function(t){return t==null?void 0:t.map(function(r){var a=r.node,n=je(r,Vp);n.node=Ea.dqElmToSpec(a);for(var i=0,o=["any","all","none"];i<o.length;i++){var u=o[i];n[u]=n[u].map(function(s){var l=s.relatedNodes,c=je(s,H
Line truncated
|
||||
`).replace(/\u00A0/g," ").replace(/[\s]{2,}/g," ").trim():""}var ae=t2,Md=function(){return ue.get("sectioningContentSelector",function(){return Qo("sectioning").map(function(t){return"".concat(t,":not([role])")}).join(", ")+" , [role=article], [role=complementary], [role=navigation], [role=region]"})},Pd=function(){return ue.get("sectioningContentPlusMainSelector",function(){return Md()+" , main:not([role]), [role=main]"})};function tu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.checkTitle,a=r===void 0?!1:r;return!!(ae(ka(e))||ae(Oa(e))||a&&(e==null?void 0:e.props.nodeType)===1&&ae(e.attr("title")))}var r2={a:function(t){return t.hasAttr("href")?"link":null},area:function(t){return t.hasAttr("href")?"link":null},article:"article",aside:function(t){return st(t.parent,Md())&&!tu(t,{checkTitle:!0})?null:"complementary"},body:"document",button:"button",datalist:"listbox",dd:"definition",dfn:"term",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",footer:function(t){var r=st(t,Pd());return r?null:"contentinfo"},form:function(t){return tu(t)?"form":null},h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:function(t){var r=st(t,Pd());return r?null:"banner"},hr:"separator",img:function(t){var r=t.hasAttr("alt")&&!t.attr("alt"),a=sr().find(function(n){return t.hasAttr(n)});return r&&!a&&!Be(t)?"presentation":"img"},input:function(t){var r;if(t.hasAttr("list")){var a=Nt(t.actualNode,"list").filter(function(n){return!!n})[0];r=a&&a.nodeName.toLowerCase()==="datalist"}switch(t.props.type){case"checkbox":return"checkbox";case"number":return"spinbutton";case"radio":return"radio";case"range":return"slider";case"search":return r?"combobox":"searchbox";case"button":case"image":case"reset":case"submit":return"button";case"text":case"tel":case"url":case"email":case"":return r?"combobox":"textbox";default:return"textbox"}},li:"listitem",main:"main",math:"math",menu:"list",meter:"meter",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",search:"search",section:function(t){return tu(t)?"region":null},select:function(t){return t.hasAttr("multiple")||parseInt(t.attr("size"))>1?"listbox":"combobox"},summary:"button",table:"table",tbody:"rowgroup",td:function(t){var r=st(t,"table"),a=pe(r);return["grid","treegrid"].includes(a)?"gridcell":"cell"},textarea:"textbox",tfoot:"rowgroup",th:function(t){if(zr(t))return"columnheader";if(Vr(t))return"rowheader"},thead:"rowgroup",tr:"row",ul:"list"},ru=r2;function a2(e,t){var r=M(t);if(Array.isArray(t)&&typeof e<"u")return t.includes(e);if(r==="function")return!!t(e);if(e!=null){if(t instanceof RegExp)return t.test(e);if(/^\/.*\/$/.test(t)){var a=t.substring(1,t.length-1);return new RegExp(a).test(e)}}return t===e}var Er=a2;function n2(e,t){return Er(!!We(e),t)}var Id=n2;function i2(e,t){var r=M(t);if(r!=="object"||Array.isArray(t)||t instanceof RegExp)throw new Error("Expect matcher to be an object");return Object.keys(t).every(function(a){return Er(e(a),t[a])})}var au=i2;function o2(e,t){return e=he(e).vNode,au(function(r){return e.attr(r)},t)}var Nd=o2;function Ld(e,t){return!!t(e)}function u2(e,t){return Er(pe(e),t)}var Bd=u2;function s2(e,t){return Er(Lt(e),t)}var qd=s2;function l2(e,t){return e=he(e).vNode,Er(e.props.nodeName,t)}var jd=l2;function c2(e,t){return e=he(e).vNode,au(function(r){return e.props[r]},t)}var $d=c2;function d2(e,t){return Er(le(e),t)}var zd=d2,Vd={hasAccessibleName:Id,attributes:Nd,condition:Ld,explicitRole:Bd,implicitRole:qd,nodeName:jd,properties:$d,semanticRole:zd};function Hd(e,t){return e=he(e).vNode,Array.isArray(t)?t.some(function(r){return Hd(e,r)}):typeof t=="string"?xo(e,t):Object.keys(t).every(function(r){if(!Vd[r])throw new Error('Unknown matcher type "'.concat(r,'"'));var a=Vd[r],n=t[r];return a(e,n)})}var Gd=Hd;function f2(e,t){return Gd(e,t)}var ct=f2;ct.hasAccessibleName=Id,ct.attributes=Nd,ct.condition=Ld,ct.explicitRole=Bd,ct.fromDefinition=Gd,ct.fromFunction=au,ct.fromPrimative=Er,ct.implicitRole=qd,ct.nodeName=jd,ct.properties=$d,ct.semanticRole=zd;var Pa=ct;function p2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.noMatchAccessibleName,a=r===void 0?!1:r,n=ge.htmlElms[e.props.nodeName];if(!n)return{};if(!n.variant)return n;var i=n.variant,o=je(n,Up);for(var u in i)if(!(!i.hasOwnProperty(u)||u==="default")){for(var s=i[u],l=s.matches,c=je(s,Wp),d=Array.isArray(l)?l:[l],f=0;f<d.length&&a;f++)if(d[f].hasOwnProperty("hasAccessibleName"))return n;if(Pa(e,l))for(var p in c)c.hasOwnProperty(p)&&(o[p]=c[p])}for(var m in i.default)i.default.hasOwnProperty(m)&&typeof o[m]>"u"&&(o[m]=i.default[m]);return o}var lr=p2;function m2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.chromium,a=e instanceof Ge?e:ce(e);if(e=a.actualNode,!a)throw new ReferenceError("Cannot get implicit role of a node outside the current scope.");var n=a.props.nodeName,i=ru[n];if(!i&&r){var o=lr(a),u=o.
Line truncated
|
||||
|
||||
`)}var Au=uw;function Fu(){var e=_._audit.data.incompleteFallbackMessage;return typeof e=="function"&&(e=e()),typeof e!="string"?"":e}var M1=se.resultGroups;function ja(e,t){var r=_.utils.aggregateResult(e);return M1.forEach(function(a){t.resultTypes&&!t.resultTypes.includes(a)&&(r[a]||[]).forEach(function(n){Array.isArray(n.nodes)&&n.nodes.length>0&&(n.nodes=[n.nodes[0]])}),r[a]=(r[a]||[]).map(function(n){return n=Object.assign({},n),Array.isArray(n.nodes)&&n.nodes.length>0&&(n.nodes=n.nodes.map(function(i){if(M(i.node)==="object"){var o=P1(i.node,t);Object.assign(i,o)}return delete i.result,delete i.node,sw(i,t),i})),M1.forEach(function(i){return delete n[i]}),delete n.pageLevel,delete n.result,n})}),r}function sw(e,t){["any","all","none"].forEach(function(r){Array.isArray(e[r])&&e[r].filter(function(a){return Array.isArray(a.relatedNodes)}).forEach(function(a){a.relatedNodes=a.relatedNodes.map(function(n){return P1(n,t)})})})}function P1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;e=yt.dqElmToSpec(e,t);var r={};if(_._audit.noHtml)r.html=null;else{var a;r.html=(a=e.source)!==null&&a!==void 0?a:"Undefined"}if(t.elementRef&&!e.fromFrame){var n;r.element=(n=e.element)!==null&&n!==void 0?n:null}if(t.selectors!==!1||e.fromFrame){var i;r.target=(i=e.selector)!==null&&i!==void 0?i:[":root"]}if(t.ancestry){var o;r.ancestry=(o=e.ancestry)!==null&&o!==void 0?o:[":root"]}if(t.xpath){var u;r.xpath=(u=e.xpath)!==null&&u!==void 0?u:["/"]}return r}var lw=/\$\{\s?data\s?\}/g;function li(e,t){if(typeof t=="string")return e.replace(lw,t);for(var r in t)if(t.hasOwnProperty(r)){var a=new RegExp("\\${\\s?data\\."+r+"\\s?}","g"),n=typeof t[r]>"u"?"":String(t[r]);e=e.replace(a,n)}return e}function I1(e,t){if(e){if(Array.isArray(t)){if(t.values=t.join(", "),typeof e.singular=="string"&&typeof e.plural=="string"){var r=t.length===1?e.singular:e.plural;return li(r,t)}return li(e,t)}if(typeof e=="string")return li(e,t);if(typeof t=="string"){var a=e[t];return li(a,t)}var n=e.default||Fu();return t&&t.messageKey&&e[t.messageKey]&&(n=e[t.messageKey]),I1(n,t)}}var Cu=I1;function cw(e,t,r){var a=_._audit.data.checks[e];if(!a)throw new Error("Cannot get message for unknown check: ".concat(e,"."));if(!a.messages[t])throw new Error('Check "'.concat(e,'"" does not have a "').concat(t,'" message.'));return Cu(a.messages[t],r)}var dw=cw;function fw(e,t,r){var a=((r.rules&&r.rules[t]||{}).checks||{})[e.id],n=(r.checks||{})[e.id],i=e.enabled,o=e.options;return n&&(n.hasOwnProperty("enabled")&&(i=n.enabled),n.hasOwnProperty("options")&&(o=n.options)),a&&(a.hasOwnProperty("enabled")&&(i=a.enabled),a.hasOwnProperty("options")&&(o=a.options)),{enabled:i,options:o,absolutePaths:r.absolutePaths}}var ci=fw;function dr(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E;return t&&M(t)==="object"?t:M(r)!=="object"?{}:{testEngine:{name:"axe-core",version:_.version},testRunner:{name:_._audit.brand},testEnvironment:pw(r),timestamp:new Date().toISOString(),url:(e=r.location)===null||e===void 0?void 0:e.href}}function pw(e){if(!e.navigator||M(e.navigator)!=="object")return{};var t=e.navigator,r=e.innerHeight,a=e.innerWidth,n=mw(e)||{},i=n.angle,o=n.type;return{userAgent:t.userAgent,windowWidth:a,windowHeight:r,orientationAngle:i,orientationType:o}}function mw(e){var t=e.screen;return t.orientation||t.msOrientation||t.mozOrientation}function N1(e,t){var r=t.focusable,a=t.page;return{node:e,include:[],exclude:[],initiator:!1,focusable:r&&hw(e),size:vw(e),page:a}}function hw(e){var t=jt(e.getAttribute("tabindex"));return t===null||t>=0}function vw(e){var t=parseInt(e.getAttribute("width"),10),r=parseInt(e.getAttribute("height"),10);if(isNaN(t)||isNaN(r)){var a=e.getBoundingClientRect();t=isNaN(t)?a.width:t,r=isNaN(r)?a.height:r}return{width:t,height:r}}function gw(e){if(Tu(e)){var t=" must be used inside include or exclude. It should not be on the same object.";fr(!qt(e,"fromFrames"),"fromFrames"+t),fr(!qt(e,"fromShadowDom"),"fromShadowDom"+t)}else if(fi(e))e={include:e,exclude:[]};else return{include:[O],exclude:[]};var r=L1(e.include);r.length===0&&r.push(O);var a=L1(e.exclude);return{include:r,exclude:a}}function L1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];Ru(e)||(e=[e]);for(var r=0;r<e.length;r++){var a=bw(e[r]);a&&t.push(a)}return t}function bw(e){return e instanceof E.Node?e:typeof e=="string"?[e]:(Su(e)?(Dw(e),e=e.fromFrames):pi(e)&&(e=[e]),yw(e))}function yw(e){if(Array.isArray(e)){var t=[],r=xe(e),a;try{for(r.s();!(a=r.n()).done;){var n=a.value;if(pi(n)&&(ww(n),n=n.fromShadowDom),typeof n!="string"&&!_w(n))return;t.push(n)}}catch(i){r.e(i)}finally{r.f()}return t}}function Dw(e){fr(Array.isArray(e.fromFrames),"fromFrames property must be an array"),fr(e.fromFrames.every(function(t){return!qt(t,"fromFrames")}),"Invalid context; fromFrames selector must be appended, rather than nested")
Line truncated
|
||||
See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`))}function B1(e,t){for(var r=[],a=0,n=e[t].length;a<n;a++){var i=e[t][a];if(i instanceof E.Node)if(i.documentElement instanceof E.Node)r.push(e.flatTree[0]);else if(i.host instanceof E.Node){var o=Array.from(i.children).map(function(s){return ce(s)});r.push.apply(r,ee(o))}else r.push(ce(i));else if(i&&i.length)if(i.length>1)xw(e,t,i);else{var u=Bu(i[0]);r.push.apply(r,ee(u.map(function(s){return ce(s)})))}}return r.filter(function(s){return s})}function xw(e,t,r){e.frames=e.frames||[];var a=r.shift(),n=Bu(a);n.forEach(function(i){var o=e.frames.find(function(u){return u.node===i});o||(o=N1(i,e),e.frames.push(o)),o[t].push(r)})}function di(e,t){var r,a,n,i,o=this;e=Gt(e),this.frames=[],this.page=typeof((r=e)===null||r===void 0?void 0:r.page)=="boolean"?e.page:void 0,this.initiator=typeof((a=e)===null||a===void 0?void 0:a.initiator)=="boolean"?e.initiator:!0,this.focusable=typeof((n=e)===null||n===void 0?void 0:n.focusable)=="boolean"?e.focusable:!0,this.size=M((i=e)===null||i===void 0?void 0:i.size)==="object"?e.size:{},e=gw(e),this.flatTree=t??xu(Cw(e)),this.exclude=e.exclude,this.include=e.include,this.include=B1(this,"include"),this.exclude=B1(this,"exclude"),Lu("frame, iframe",this).forEach(function(u){Ou(u,o)&&Ew(o,u.actualNode)}),typeof this.page>"u"&&(this.page=Aw(this),this.frames.forEach(function(u){u.page=o.page})),Fw(this),Array.isArray(this.include)||(this.include=Array.from(this.include)),this.include.sort(Pu)}function Ew(e,t){!Se(t)||Aa(e.frames,"node",t)||e.frames.push(N1(t,e))}function Aw(e){var t=e.include;return t.length===1&&t[0].actualNode===O.documentElement}function Fw(e){if(e.include.length===0&&e.frames.length===0){var t=St.isInFrame()?"frame":"page";throw new Error("No elements found for include in "+t+" Context")}}function Cw(e){for(var t=e.include,r=e.exclude,a=Array.from(t).concat(Array.from(r)),n=0;n<a.length;n++){var i=a[n];if(i instanceof E.Element)return i.ownerDocument.documentElement;if(i instanceof E.Document)return i.documentElement}return O.documentElement}function Rw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t.iframes===!1)return[];var r=new di(e),a=r.frames;return a.map(function(n){var i=n.node,o=je(n,Zp);o.initiator=!1;var u=Mn(i);return{frameSelector:u,frameContext:o}})}function q1(e){var t=_._audit.rules.find(function(r){var a=r.id;return a===e});if(!t)throw new Error("Cannot find rule by id: ".concat(e));return t}function Tw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e.scrollWidth>e.clientWidth+t,a=e.scrollHeight>e.clientHeight+t;if(r||a){var n=E.getComputedStyle(e),i=j1(n,"overflow-x"),o=j1(n,"overflow-y");if(r&&i||a&&o)return{elm:e,top:e.scrollTop,left:e.scrollLeft}}}function j1(e,t){var r=e.getPropertyValue(t);return["scroll","auto"].includes(r)}var Kt=Fe(Tw);function $1(e){return Array.from(e.children||e.childNodes||[]).reduce(function(t,r){var a=Kt(r);return a&&t.push(a),t.concat($1(r))},[])}function Sw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E,t=e.document.documentElement,r=[e.pageXOffset!==void 0?{elm:e,top:e.pageYOffset,left:e.pageXOffset}:{elm:t,top:t.scrollTop,left:t.scrollLeft}];return r.concat($1(O.body))}var kw=Sw;function Ow(){return Gt(ge)}function Mw(e){if(!e)throw new Error("axe.utils.getStyleSheetFactory should be invoked with an argument");return function(t){var r=t.data,a=t.isCrossOrigin,n=a===void 0?!1:a,i=t.shadowId,o=t.root,u=t.priority,s=t.isLink,l=s===void 0?!1:s,c=e.createElement("style");if(l){var d=e.createTextNode('@import "'.concat(r.href,'"'));c.appendChild(d)}else c.appendChild(e.createTextNode(r));return e.head.appendChild(c),{sheet:c.sheet,isCrossOrigin:n,shadowId:i,root:o,priority:u}}}var z1=Mw,dt;function Pw(e){if(dt&&dt.parentNode)return dt.styleSheet===void 0?dt.appendChild(O.createTextNode(e)):dt.styleSheet.cssText+=e,dt;if(e){var t=O.head||O.getElementsByTagName("head")[0];return dt=O.createElement("style"),dt.type="text/css",dt.styleSheet===void 0?dt.appendChild(O.createTextNode(e)):dt.styleSheet.cssText=e,t.appendChild(dt),dt}}var Iw=Pw;function Ru(e){return!!e&&M(e)==="object"&&typeof e.length=="number"&&!(e instanceof E.Node)}function qt(e,t){return!e||M(e)!=="object"?!1:Object.prototype.hasOwnProperty.call(e,t)}function V1(e){return Tu(e)||fi(e)}function Tu(e){return["include","exclude"].some(function(t){return qt(e,t)&&fi(e[t])})}function fi(e){return typeof e=="string"||e instanceof E.Node||Su(e)||pi(e)||Ru(e)}function Su(e){return qt(e,"fromFrames")}function pi(e){return qt(e,"fromShadowDom")}function H1(e,t){var r=ce(e);if(e.nodeType===9)return!1;if(e.nodeType===11&&(e=e.host),r&&r._isHidden!==null)return r._isHidden;var a=E.getComputedStyle(e,null);if(!a||!e.parentNode||a.getPropertyValue("display")==="none"||!t&&a.getPropertyValue("visibility")==="hidden"||e.getAttribute("aria-hidden")==="true")return!0;var n=e.assignedSlot?e.assignedSlot:e.parentNode,i=H1(n,!0);return r
Line truncated
|
||||
[aria-controls~="`).concat(i,'"][role~="combobox"]:not(select)'));return Array.from(u).some(Rf)}var Rf=function(t){return t&&le(t)==="combobox"};function ax(e){for(;e=e.parent;)if(le(e,{noPresentational:!0})!==null)return e;return null}function nx(e){return e=ce(e),ti(e)}var Tf=nx;function ix(e){var t=ge.ariaRoles[e];return!t||!Array.isArray(t.requiredAttrs)?[]:ee(t.requiredAttrs)}var Sf=ix;function ox(e){var t=ge.ariaRoles[e];return!t||!Array.isArray(t.requiredContext)?null:ee(t.requiredContext)}var Uu=ox;function ux(e){var t=ge.ariaRoles[e];return!t||!Array.isArray(t.requiredOwned)?null:ee(t.requiredOwned)}var Wu=ux;function sx(e,t){e=e instanceof Ge?e:ce(e);var r,a,n=e.attr(t),i=ge.ariaAttrs[t];if(!i||i.allowEmpty&&(!n||n.trim()===""))return!0;switch(i.type){case"boolean":return["true","false"].includes(n.toLowerCase());case"nmtoken":return typeof n=="string"&&i.values.includes(n.toLowerCase());case"nmtokens":return a=rt(n),a.reduce(function(s,l){return s&&i.values.includes(l)},a.length!==0);case"idref":try{var o=Xe(e.actualNode);return!!(n&&o.getElementById(n))}catch{throw new TypeError("Cannot resolve id references for partial DOM")}case"idrefs":return Nt(e,t).some(function(s){return!!s});case"string":return n.trim()!=="";case"decimal":return r=n.match(/^[-+]?([0-9]*)\.?([0-9]*)$/),!!(r&&(r[1]||r[2]));case"int":var u=typeof i.minValue<"u"?i.minValue:-1/0;return/^[-+]?[0-9]+$/.test(n)&&parseInt(n)>=u}}var kf=sx;function lx(e){var t=ge.ariaAttrs[e];return!!t}var _i=lx;function cx(e){var t=$u(e),r=this,a=[];t.forEach(function(u){var s=u.getAttribute("headers");s&&(a=a.concat(s.split(/\s+/)));var l=u.getAttribute("aria-labelledby");l&&(a=a.concat(l.split(/\s+/)))});var n=t.filter(function(u){return ae(u.textContent)===""?!1:u.nodeName.toUpperCase()==="TH"||["rowheader","columnheader"].indexOf(pe(u))!==-1}),i=Yt(e),o=!0;return n.forEach(function(u){if(!(u.getAttribute("id")&&a.includes(u.getAttribute("id")))){var s=Jn(u,i),l=!1;zr(u)&&(l=zu("down",s,i).find(function(c){return!zr(c)&&yi(c,i).includes(u)})),!l&&Vr(u)&&(l=zu("right",s,i).find(function(c){return!Vr(c)&&yi(c,i).includes(u)})),l||r.relatedNodes(u),o=o&&l}}),o?!0:void 0}var dx=cx,Va=["cell-header-not-in-table","cell-header-not-th","header-refs-self","empty-hdrs"],Of=Va[0],Mf=Va[1],Pf=Va[2],Yu=Va[3];function fx(e){for(var t=[],r={},a=0;a<e.rows.length;a++)for(var n=e.rows[a],i=0;i<n.cells.length;i++){var o=n.cells[i];t.push(o);var u=o.getAttribute("id");u&&(r[u]=le(o))}var s=Jr(Jr(Jr(Jr({},Pf,new Set),Of,new Set),Mf,new Set),Yu,new Set);t.forEach(function(f){if(!(!f.hasAttribute("headers")||!Se(f))){var p=f.getAttribute("headers").trim();if(!p){s[Yu].add(f);return}var m=f.getAttribute("id"),h=rt(p);h.forEach(function(v){m&&v===m?s[Pf].add(f):r[v]?["columnheader","rowheader"].includes(r[v])||s[Mf].add(f):s[Of].add(f)})}});var l=xe(Va),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;if(s[d].size>0)return this.relatedNodes(ee(s[d])),d===Yu?void 0:(this.data({messageKey:d}),!1)}}catch(f){l.e(f)}finally{l.f()}return!0}function px(e){var t=[],r=$u(e),a=Yt(e);return r.forEach(function(n){if(ni(n)&&yf(n)&&!Tf(n)){var i=yi(n,a).some(function(o){return o!==null&&!!ni(o)});i||t.push(n)}}),t.length?(this.relatedNodes(t),!1):!0}var mx=px;function hx(e,t){var r=e.getAttribute("scope").toLowerCase();return t.values.indexOf(r)!==-1}var vx=hx,gx=bx;function bx(e,t,r){if(r.children!==void 0){var a=r.attr("summary"),n=r.children.find(yx),i=n?ae(cr(n)):!1;return!i||!a?!1:ae(a).toLowerCase()===ae(i).toLowerCase()}}function yx(e){return e.props.nodeName==="caption"}function Dx(e){return w1(O)?e.nodeName.toUpperCase()==="TH":!0}var wx=Dx;function _x(e){var t=Yt(e),r=t[0];return t.length<=1||r.length<=1||e.rows.length<=1?!0:r.reduce(function(a,n,i){return a||n!==r[i+1]&&r[i+1]!==void 0},!1)}var xx=_x;function Ex(e,t,r){if(r.children){var a=r.children.find(function(i){var o=i.props;return o.nodeName==="title"});if(!a)return this.data({messageKey:"noTitle"}),!1;try{var n=cr(a,{includeHidden:!0}).trim();if(n==="")return this.data({messageKey:"emptyTitle"}),!1}catch{return}return!0}}var Ax=Ex,If={};Et(If,{getAriaRolesByType:function(){return Gr},getAriaRolesSupportingNameFromContent:function(){return Hu},getElementSpec:function(){return lr},getElementsByContentType:function(){return Qo},getGlobalAriaAttrs:function(){return sr},implicitHtmlRoles:function(){return ru}});function Fx(e,t,r){var a=pe(r);if(["presentation","none"].includes(a)&&["iframe","frame"].includes(r.props.nodeName)&&r.hasAttr("title"))return this.data({messageKey:"iframe",nodeName:r.props.nodeName}),!1;var n=le(r);if(["presentation","none"].includes(n))return this.data({role:n}),!0;if(!["presentation","none"].includes(a))return!1;var i=sr().some(function(s){return r.hasAttr(s)}),o=Be(r),u;return i&&!o?u="globalAria":!i&&o?u="focusable":u="both",this.data({messageKey:u,role:n}),!1}function Cx(e,t,r){var a=r.props.nodeName,n=(r.attr("type")||"").toLowerCase(),i=r.attr("value");return i&&this.data({messagLine truncated
|
||||
`+_e.split(`
|
||||
`).join(`
|
||||
`);return B}},none:{failureMessage:function(T){var B="Fix all of the following:",W=T;if(W)for(var _e,Ne=-1,Ke=W.length-1;Ne<Ke;)_e=W[Ne+=1],B+=`
|
||||
`+_e.split(`
|
||||
`).join(`
|
||||
`);return B}}},incompleteFallbackMessage:"axe couldn't tell the reason. Time to break out the element inspector!"},rules:[{id:"accesskeys",impact:"serious",selector:"[accesskey]",excludeHidden:!1,tags:["cat.keyboard","best-practice"],all:[],any:[],none:["accesskeys"]},{id:"area-alt",impact:"critical",selector:"map area[href]",excludeHidden:!1,tags:["cat.text-alternatives","wcag2a","wcag244","wcag412","section508","section508.22.a","TTv5","TT6.a","EN-301-549","EN-9.2.4.4","EN-9.4.1.2","ACT","RGAAv4","RGAA-1.1.2"],actIds:["c487ae"],all:[],any:[{options:{attribute:"alt"},id:"non-empty-alt"},"aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-allowed-attr",impact:"critical",matches:"aria-allowed-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5c01ea"],all:[{options:{validTreeRowAttrs:["aria-posinset","aria-setsize","aria-expanded","aria-level"]},id:"aria-allowed-attr"},"aria-allowed-attr-elm"],any:[],none:["aria-unsupported-attr"]},{id:"aria-allowed-role",impact:"minor",excludeHidden:!1,selector:"[role]",matches:"aria-allowed-role-matches",tags:["cat.aria","best-practice"],all:[],any:[{options:{allowImplicit:!0,ignoredTags:[]},id:"aria-allowed-role"}],none:[]},{id:"aria-braille-equivalent",reviewOnFail:!0,impact:"serious",selector:"[aria-brailleroledescription], [aria-braillelabel]",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2"],all:["braille-roledescription-equivalent","braille-label-equivalent"],any:[],none:[]},{id:"aria-command-name",impact:"serious",selector:'[role="link"], [role="button"], [role="menuitem"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag412","TTv5","TT6.a","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.9.1"],actIds:["97a4e1"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-conditional-attr",impact:"serious",matches:"aria-allowed-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5c01ea"],all:[{options:{invalidTableRowAttrs:["aria-posinset","aria-setsize","aria-expanded","aria-level"]},id:"aria-conditional-attr"}],any:[],none:[]},{id:"aria-deprecated-role",impact:"minor",selector:"[role]",matches:"no-empty-role-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["674b10"],all:[],any:[],none:["deprecatedrole"]},{id:"aria-dialog-name",impact:"serious",selector:'[role="dialog"], [role="alertdialog"]',matches:"no-naming-method-matches",tags:["cat.aria","best-practice"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-hidden-body",impact:"critical",selector:"body",excludeHidden:!1,matches:"is-initiator-matches",tags:["cat.aria","wcag2a","wcag131","wcag412","EN-301-549","EN-9.1.3.1","EN-9.4.1.2","RGAAv4","RGAA-10.8.1"],all:[],any:["aria-hidden-body"],none:[]},{id:"aria-hidden-focus",impact:"serious",selector:'[aria-hidden="true"]',matches:"aria-hidden-focus-matches",excludeHidden:!1,tags:["cat.name-role-value","wcag2a","wcag412","TTv5","TT6.a","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-10.8.1"],actIds:["6cfa84"],all:["focusable-modal-open","focusable-disabled","focusable-not-tabbable"],any:[],none:[]},{id:"aria-input-field-name",impact:"serious",selector:'[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag412","TTv5","TT5.c","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.1.1"],actIds:["e086e5"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:["no-implicit-explicit-label"]},{id:"aria-meter-name",impact:"serious",selector:'[role="meter"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag111","EN-301-549","EN-9.1.1.1","RGAAv4","RGAA-11.1.1"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-progressbar-name",impact:"serious",selector:'[role="progressbar"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag111","EN-301-549","EN-9.1.1.1","RGAAv4","RGAA-11.1.1"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-prohibited-attr",impact:"serious",matches:"aria-allowed-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5c01ea"],all:[],any:[],none:[{options:{elementsAllowedAriaLabel:["applet","input"]},id:"aria-prohibited-attr"}]},{id:"aria-required-attr",impact:"critical",selector:"[role]",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["4e8ab6"],all:[],any:["aria-required-attr"],none:[]},{id:"aria-required-children",impact:"critical",selector:"[role]",matches:"aria-re
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as s,S as o,c as n,p as d}from"./iframe-aoIC7NDi.js";const u=d("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function c({className:r,variant:e="default",asChild:a=!1,...t}){const i=a?o:"span";return s.jsxDEV(i,{"data-slot":"badge","data-variant":e,className:n(u({variant:e}),r),...t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/badge.tsx",lineNumber:39,columnNumber:5},this)}c.__docgenInfo={description:"",methods:[],displayName:"Badge",props:{asChild:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},variant:{defaultValue:{value:'"default"',computed:!1},required:!1}}};export{c as B};
|
||||
@@ -0,0 +1,122 @@
|
||||
import{g as de}from"./chunk-FMBD7UC4-C_jnrFWB.js";import{_ as d,H as st,d as R,e as ge,l as m,z as ue,B as pe,ak as fe,a9 as xe,aa as ye,c as z,a6 as be,al as Z,am as Ht,an as we,u as et,k as me,ao as Le,ap as yt,i as bt,aq as Se}from"./mermaid.core-BRRy2yZG.js";import{c as ve}from"./clone-BASZBmHw.js";import{G as Ee}from"./graph-BX-ooOdw.js";import{c as _e}from"./channel-qcnZjLXr.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";import"./_baseUniq-7kyoN_aU.js";var wt=(function(){var e=d(function(N,x,g,p){for(g=g||{},p=N.length;p--;g[N[p]]=x);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],o=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],y=[1,23],b=[1,24],L=[8,10,15,16,21,28,29,30,31,39,43,46],E=[8,10,15,16,21,27,28,29,30,31,39,43,46],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,p,w,S,c,_){var f=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[f-1]),w.setHierarchy(c[f-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[f]),typeof c[f].length=="number"?this.$=c[f]:this.$=[c[f]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[f-1]),this.$=[c[f-1]].concat(c[f]);break;case 14:w.getLogger().debug("Rule: link: ",c[f],x),this.$={edgeTypeStr:c[f],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[f-3],c[f-1],c[f]),this.$={edgeTypeStr:c[f],label:c[f-1]};break;case 18:const A=parseInt(c[f]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[f-2],c[f-1],c[f]," typestr: ",c[f-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[f-1].edgeTypeStr);this.$=[{id:c[f-2].id,label:c[f-2].label,type:c[f-2].type,directions:c[f-2].directions},{id:c[f-2].id+"-"+c[f].id,start:c[f-2].id,end:c[f].id,label:c[f-1].label,type:"edge",directions:c[f].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[f].id,label:c[f].label,type:w.typeStr2Type(c[f].typeStr),directions:c[f].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[f-1],c[f]),this.$={id:c[f-1].id,label:c[f-1].label,type:w.typeStr2Type(c[f-1].typeStr),directions:c[f-1].directions,widthInColumns:parseInt(c[f],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[f]),this.$={id:c[f].id,label:c[f].label,type:w.typeStr2Type(c[f].typeStr),directions:c[f].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[f]),this.$={type:"column-setting",columns:c[f]==="auto"?-1:parseInt(c[f])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[f-2],c[f-1]),w.generateId(),this.$={...c[f-2],type:"composite",children:c[f-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[f-2],c[f-1],c[f]);const P=w.generateId();this.$={id:P,type:"composite",label:"",children:c[f-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[f]),this.$={id:c[f]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[f-1],c[f]),this.$={id:c[f-1],label:c[f].label,typeStr:c[f].typeStr,directions:c[f].directions};break;case 31:w.getLoggerLine truncated
|
||||
`+M.showPosition()+`
|
||||
Expecting `+nt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":xt="Parse error on line "+(A+1)+": Unexpected "+(Y==P?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(xt,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:pt,expected:nt})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+Y);switch(U[0]){case 1:p.push(Y),S.push(M.yytext),c.push(M.yylloc),p.push(U[1]),Y=null,O=M.yyleng,f=M.yytext,A=M.yylineno,pt=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],tt.$=S[S.length-q],tt._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&(tt._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),ft=this.performAction.apply(tt,[f,O,A,Q.yy,U[1],S,c].concat(J)),typeof ft<"u")return ft;q&&(p=p.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),p.push(this.productions_[U[1]][0]),S.push(tt.$),c.push(tt._$),Ct=_[p[p.length-2]][p[p.length-1]],p.push(Ct);break;case 3:return!0}}return!0},"parse")},T=(function(){var N={EOF:1,parseError:d(function(g,p){if(this.yy.parser)this.yy.parser.parseError(g,p);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,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:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.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),x},"input"),unput:d(function(x){var g=x.length,p=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=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),p.length-1&&(this.yylineno-=p.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:p?(p.length===w.length?this.yylloc.first_column:0)+w[w.length-p.length].length-p[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:d(function(){return this._more=!0,this},"more"),reject:d(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).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
||||
`+g+"^"},"showPosition"),test_match:d(function(x,g){var p,w,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],p=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var c in S)this[c]=S[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,p,w;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),c=0;c<S.length;c++)if(p=this._input.match(this.rules[S[c]]),p&&(!g||p[0].length>g[0].length)){if(g=p,w=c,this.options.backtrack_lexer){if(x=this.test_match(p,S[c]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,S[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,p,w,S){switch(w){case 0:return g.getLogger().debug("Found block-beta"),10;case 1:return g.getLogger().debug("Found id-block"),29;case 2:return g.getLogger().debug("Found block"),10;case 3:g.getLogger().debug(".",p.yytext);break;case 4:g.getLogger().debug("_",p.yytext);break;case 5:return 5;case 6:return p.yytext=-1,28;case 7:return p.yytext=p.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",p.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:g.getLogger().debug("LEX: POPPING STR:",p.yytext),this.popState();break;case 13:return g.getLogger().debug("LEX: STR end:",p.yytext),"STR";case 14:return p.yytext=p.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",p.yytext),21;case 15:return p.yytext="1",g.getLogger().debug("COLUMNS (LEX)",p.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.p
Line truncated
|
||||
font-family: ${e.fontFamily};
|
||||
color: ${e.nodeTextColor||e.textColor};
|
||||
}
|
||||
.cluster-label text {
|
||||
fill: ${e.titleColor};
|
||||
}
|
||||
.cluster-label span,p {
|
||||
color: ${e.titleColor};
|
||||
}
|
||||
|
||||
|
||||
|
||||
.label text,span,p {
|
||||
fill: ${e.nodeTextColor||e.textColor};
|
||||
color: ${e.nodeTextColor||e.textColor};
|
||||
}
|
||||
|
||||
.node rect,
|
||||
.node circle,
|
||||
.node ellipse,
|
||||
.node polygon,
|
||||
.node path {
|
||||
fill: ${e.mainBkg};
|
||||
stroke: ${e.nodeBorder};
|
||||
stroke-width: 1px;
|
||||
}
|
||||
.flowchart-label text {
|
||||
text-anchor: middle;
|
||||
}
|
||||
// .flowchart-label .text-outer-tspan {
|
||||
// text-anchor: middle;
|
||||
// }
|
||||
// .flowchart-label .text-inner-tspan {
|
||||
// text-anchor: start;
|
||||
// }
|
||||
|
||||
.node .label {
|
||||
text-align: center;
|
||||
}
|
||||
.node.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.arrowheadPath {
|
||||
fill: ${e.arrowheadColor};
|
||||
}
|
||||
|
||||
.edgePath .path {
|
||||
stroke: ${e.lineColor};
|
||||
stroke-width: 2.0px;
|
||||
}
|
||||
|
||||
.flowchart-link {
|
||||
stroke: ${e.lineColor};
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.edgeLabel {
|
||||
background-color: ${e.edgeLabelBackground};
|
||||
rect {
|
||||
opacity: 0.5;
|
||||
background-color: ${e.edgeLabelBackground};
|
||||
fill: ${e.edgeLabelBackground};
|
||||
}
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* For html labels only */
|
||||
.labelBkg {
|
||||
background-color: ${lt(e.edgeLabelBackground,.5)};
|
||||
// background-color:
|
||||
}
|
||||
|
||||
.node .cluster {
|
||||
// fill: ${lt(e.mainBkg,.5)};
|
||||
fill: ${lt(e.clusterBkg,.5)};
|
||||
stroke: ${lt(e.clusterBorder,.2)};
|
||||
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.cluster text {
|
||||
fill: ${e.titleColor};
|
||||
}
|
||||
|
||||
.cluster span,p {
|
||||
color: ${e.titleColor};
|
||||
}
|
||||
/* .cluster div {
|
||||
color: ${e.titleColor};
|
||||
} */
|
||||
|
||||
div.mermaidTooltip {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
max-width: 200px;
|
||||
padding: 2px;
|
||||
font-family: ${e.fontFamily};
|
||||
font-size: 12px;
|
||||
background: ${e.tertiaryColor};
|
||||
border: 1px solid ${e.border2};
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.flowchartTitleText {
|
||||
text-anchor: middle;
|
||||
font-size: 18px;
|
||||
fill: ${e.textColor};
|
||||
}
|
||||
${de()}
|
||||
`,"getStyles"),Ve=je,Ge=d((e,t,a,i)=>{t.forEach(l=>{sr[l](e,a,i)})},"insertMarkers"),Ze=d((e,t,a)=>{m.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),qe=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Je=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Qe=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$e=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),tr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),er=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),rr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t
Line truncated
|
||||
outsidePoint: ${JSON.stringify(t)}
|
||||
insidePoint : ${JSON.stringify(a)}
|
||||
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,l=e.y,s=Math.abs(i-a.x),r=e.width/2;let n=a.x<t.x?r-s:r+s;const o=e.height/2,u=Math.abs(t.y-a.y),h=Math.abs(t.x-a.x);if(Math.abs(l-t.y)*r>Math.abs(i-t.x)*o){let y=a.y<t.y?t.y-o-l:l-o-t.y;n=h*y/u;const b={x:a.x<t.x?a.x+n:a.x-h+n,y:a.y<t.y?a.y+u-y:a.y-u+y};return n===0&&(b.x=t.x,b.y=t.y),h===0&&(b.x=t.x),u===0&&(b.y=t.y),m.debug(`abc89 topp/bott calc, Q ${u}, q ${y}, R ${h}, r ${n}`,b),b}else{a.x<t.x?n=t.x-r-i:n=i-r-t.x;let y=u*n/h,b=a.x<t.x?a.x+h-n:a.x-h+n,L=a.y<t.y?a.y+y:a.y-y;return m.debug(`sides calc abc89, Q ${u}, q ${y}, R ${h}, r ${n}`,{_x:b,_y:L}),n===0&&(b=t.x,L=t.y),h===0&&(b=t.x),u===0&&(L=t.y),{x:b,y:L}}},"intersection"),zt=d((e,t)=>{m.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],l=!1;return e.forEach(s=>{if(!gr(t,s)&&!l){const r=ur(t,i,s);let n=!1;a.forEach(o=>{n=n||o.x===r.x&&o.y===r.y}),a.some(o=>o.x===r.x&&o.y===r.y)||a.push(r),l=!0}else i=s,l||a.push(s)}),a},"cutPathAtIntersect"),pr=d(function(e,t,a,i,l,s,r){let n=a.points;m.debug("abc88 InsertEdge: edge=",a,"e=",t);let o=!1;const u=s.node(t.v);var h=s.node(t.w);h!=null&&h.intersect&&(u!=null&&u.intersect)&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(h.intersect(n[n.length-1]))),a.toCluster&&(m.debug("to cluster abc88",i[a.toCluster]),n=zt(a.points,i[a.toCluster].node),o=!0),a.fromCluster&&(m.debug("from cluster abc88",i[a.fromCluster]),n=zt(n.reverse(),i[a.fromCluster].node).reverse(),o=!0);const y=n.filter(x=>!Number.isNaN(x.y));let b=ye;a.curve&&(l==="graph"||l==="flowchart")&&(b=a.curve);const{x:L,y:E}=fe(a),D=xe().x(L).y(E).curve(b);let v;switch(a.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(a.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",a.id).attr("class"," "+v+(a.classes?" "+a.classes:"")).attr("style",a.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=be(!0)),cr(T,a,k,r,l);let N={};return o&&(N.updatedPath=n),N.originalPath=a.points,N},"insertEdge"),fr=d(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),xr=d((e,t,a)=>{const i=fr(e),l=2,s=t.height+2*a.padding,r=s/l,n=t.width+2*r+a.padding,o=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:r,y:0},{x:n/2,y:2*o},{x:n-r,y:0},{x:n,y:0},{x:n,y:-s/3},{x:n+2*o,y:-s/2},{x:n,y:-2*s/3},{x:n,y:-s},{x:n-r,y:-s},{x:n/2,y:-s-2*o},{x:r,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*o,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:r,y:0},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:r,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:r,y:-s},{x:n-r,y:-s},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-r},{x:n,y:-s+r},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-r},{x:0,y:-s+r},{x:n,y:-s}]:i.has("right")&&i.has("left")?[{x:r,y:0},{x:r,y:-o},{x:n-r,y:-o},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:n-r,y:-s+o},{x:r,y:-s+o},{x:r,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:r,y:-o},{x:r,y:-s+o},{x:0,y:-s+o},{x:n/2,y:-s},{x:n,y:-s+o},{x:n-r,y:-s+o},{x:n-r,y:-o},{x:n,y:-o}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-r},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-r},{x:n,y:-s}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-s}]:i.has("right")?[{x:r,y:-o},{x:r,y:-o},{x:n-r,y:-o},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:n-r,y:-s+o},{x:r,y:-s+o},{x:r,y:-s+o}]:i.has("left")?[{x:r,y:0},{x:r,y:-o},{x:n-r,y:-o},{x:n-r,y:-s+o},{x:r,y:-s+o},{x:r,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:r,y:-o},{x:r,y:-s+o},{x:0,y:-s+o},{x:n/2,y:-s},{x:n,y:-s+o},{x:n-r,y:-s+o},{x:n-r,y:-o}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:r,y:-o},{x:r,y:-s+o},{x:n-r,y:-s+o},{x:n-r,y:-o},{x:n,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Jt(e,t){return e.intersect(t)}d(Jt,"intersectNode");var yr=Jt;function Qt(e,t,a,i){var l=e.x,s=e.y,r=l-i.x,n=s-i.y,o=Math.sqrt(t*t*n*n+a*a*r*r),u=Math.abs(t*a*r/o);i.x<l&&(u=-u);var h=Math.abs(t*a*n/o);return i.y<s&&(h=-h),{x:l+u,y:s+h}}d(Qt,"intersectEllipse");var $t=Qt;function te(e,t,a){return $t(e,t,t,a)}d(te,"intersectCircle");var br=te;function ee(e,t,a,i){var l,s,r,n,o,u,h,y,b,L,E,D,v,T,k;if(l=t.y-e.y,r=e.x-t.x,o=t.x*e.y-e.x*t.y,b=l*a.x+r*a.y+o,L=l*i.x+r*i.y+o,!(b!==0&&L!==0&&vt(b,L))&&(s=i.y-a.y,n=a.x-i.x,u=i.x*a.y-a.x*i.y,h=s*e.x+n*e.y+u,y=s*t.x+n*t.y+u,!(h!==0&&y!==0&&vt(h,y))&&(E=l*n-s*r,E!==0)))return D=Math.abs(E/2),v=r*u-n*o,T=v<0?(v-D)/E:(v+D)/E,v=s*o-l*u,k=v<0?(v-D)/E:(v+D)/E,{x:T,y:k}}d(ee,"intersectLi
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
var f="><+-.,[]".split("");const r={name:"brainfuck",startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(i,n){if(i.eatSpace())return null;i.sol()&&(n.commentLine=!1);var e=i.next().toString();if(f.indexOf(e)!==-1){if(n.commentLine===!0)return i.eol()&&(n.commentLine=!1),"comment";if(e==="]"||e==="[")return e==="["?n.left++:n.right++,"bracket";if(e==="+"||e==="-")return"keyword";if(e==="<"||e===">")return"atom";if(e==="."||e===",")return"def"}else return n.commentLine=!0,i.eol()&&(n.commentLine=!1),"comment";i.eol()&&(n.commentLine=!1)}};export{r as brainfuck};
|
||||
@@ -0,0 +1,26 @@
|
||||
import{j as e,r as S,b9 as T,ba as f,ab as c,bb as ye,B as be,bc as re,c as je,bd as De,be as Re,l as Me}from"./iframe-aoIC7NDi.js";import{C as v,a as g,b as C,c as y,d as j}from"./card-CztzpO7x.js";import{D as Oe}from"./database-Dx6aEk21.js";import{c as Q}from"./createLucideIcon-D2uUVdtm.js";import{Q as se}from"./QuotaBar-DCWKvQkx.js";import{B as I}from"./badge-CQZT8Hmw.js";import{I as Le}from"./input-DeZ-mgkh.js";import{C as $e}from"./circle-pause-DnJAMYCY.js";import{A as Ke}from"./arrow-up-right-B6HuQbI2.js";import{B as qe}from"./BudgetSidebarMarker-BHgQjRCo.js";import{S as U}from"./skeleton-B0nw-fyt.js";import{C as We}from"./circle-check-B6ZHio0H.js";import{T as He}from"./triangle-alert-XSXGBeLN.js";import{W as Ee}from"./wallet-cards-Bwd8-yMp.js";import"./preload-helper-Dp1pzeXC.js";import"./dollar-sign-C1pMKyuM.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ze=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ze=Q("credit-card",ze);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ge=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Je=Q("gauge",Ge);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ye=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],Xe=Q("landmark",Ye);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const es=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],ss=Q("octagon-alert",es);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ts=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],Ue=Q("receipt-text",ts),is=[{title:"Inference ledger",description:"Request-scoped usage and billed runs from cost_events.",icon:Oe,points:["tokens + billed dollars","provider, biller, model","subscription and overage aware"],tone:"from-sky-500/12 via-sky-500/6 to-transparent"},{title:"Finance ledger",description:"Account-level charges that are not one prompt-response pair.",icon:Ue,points:["top-ups, refunds, fees","Bedrock provisioned or training charges","credit expiries and adjustments"],tone:"from-amber-500/14 via-amber-500/6 to-transparent"},{title:"Live quotas",description:"Provider or biller windows that can stop traffic in real time.",icon:Je,points:["provider quota windows","biller credit systems","errors surfaced directly"],tone:"from-emerald-500/14 via-emerald-500/6 to-transparent"}];function Ve(){return e.jsxDEV(v,{className:"relative overflow-hidden border-border/70",children:[e.jsxDEV("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(244,114,182,0.08),transparent_35%),radial-gradient(circle_at_bottom_right,rgba(56,189,248,0.1),transparent_32%)]"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:31,columnNumber:7},this),e.jsxDEV(g,{className:"relative px-5 pt-5 pb-2",children:[e.jsxDEV(C,{className:"text-sm font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:"Accounting model"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:33,columnNumber:9},this),e.jsxDEV(y,{className:"max-w-2xl text-sm leading-6",children:"Paperclip now separates request-level inference usage from account-level finance events. That keeps provider reporting honest when the biller is OpenRouter, Cloudflare, Bedrock, or another intermediary."},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:32,columnNumber:7},this),e.jsxDEV(j,{className:"relative grid gap-3 px-5 pb-5 md:grid-cols-3",children:is.map(s=>{const t=s.icon;return e.jsxDEV("div",{className:`rounded-2xl border border-border/70 bg-gradient-to-br ${s.tone} p-4 shadow-sm`,children:[e.jsxDEV("div",{className:"mb-3 flex items-center gap-3",children:[e.jsxDEV("div",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-border/70 bg-background/80",children:e.jsxDEV(t,{className:"h-4 w-4 text-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:51,columnNumber:19},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:50,columnNumber:17},this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"text-sm font-semibold",children:s.title},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:54,columnNumber:19},this),e.jsxDEV("div",{className:"text-xs text-muted-foreground",children:s.description},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:55,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:53,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:49,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-1.5 text-xs text-muted-foreground",children:s.points.map(i=>e.jsxDEV("div",{children:i},i,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:60,columnNumber:19},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:58,columnNumber:15},this)]},s.title,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:45,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:41,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/AccountingModelCard.tsx",lineNumber:30,columnNumber:5},this)}Ve.__docgenInfo={description:"",methods:[],displayName:"AccountingModelCard"};function ke({row:s,weekSpendCents:t,budgetMonthlyCents:i,totalCompanySpendCents:u,providerRows:n}){const m=S.useMemo(()=>{const a=new Line truncated
|
||||
@@ -0,0 +1,10 @@
|
||||
import{g as Se,d as De}from"./chunk-TZMSLE5B-DTLPcw-1.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as g,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./mermaid.core-BRRy2yZG.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";var Ft=(function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2Line truncated
|
||||
`+D.showPosition()+`
|
||||
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=(function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,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:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=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),v.length-1&&(this.yylineno-=v.length-1);var R=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:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
||||
`+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;h<R.length;h++)if(v=this._input.match(this.rules[R[h]]),v&&(!m||v[0].length>m[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\bLine truncated
|
||||
stroke: ${e.personBorder};
|
||||
fill: ${e.personBkg};
|
||||
}
|
||||
`,"getStyles"),P0=D0,Y0={parser:Ue,db:te,renderer:ye,styles:P0,init:g(({c4:e,wrap:t})=>{ye.setConf(e),te.setWrap(t)},"init")};export{Y0 as diagram};
|
||||
@@ -0,0 +1 @@
|
||||
import{j as s,c as r}from"./iframe-aoIC7NDi.js";function t({className:e,...a}){return s.jsxDEV("div",{"data-slot":"card",className:r("bg-card text-card-foreground flex flex-col gap-6 border py-6 shadow-sm",e),...a},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/card.tsx",lineNumber:7,columnNumber:5},this)}function o({className:e,...a}){return s.jsxDEV("div",{"data-slot":"card-header",className:r("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...a},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/card.tsx",lineNumber:20,columnNumber:5},this)}function d({className:e,...a}){return s.jsxDEV("div",{"data-slot":"card-title",className:r("leading-none font-semibold",e),...a},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/card.tsx",lineNumber:33,columnNumber:5},this)}function i({className:e,...a}){return s.jsxDEV("div",{"data-slot":"card-description",className:r("text-muted-foreground text-sm",e),...a},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/card.tsx",lineNumber:43,columnNumber:5},this)}function n({className:e,...a}){return s.jsxDEV("div",{"data-slot":"card-content",className:r("px-6",e),...a},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/card.tsx",lineNumber:66,columnNumber:5},this)}t.__docgenInfo={description:"",methods:[],displayName:"Card"};o.__docgenInfo={description:"",methods:[],displayName:"CardHeader"};d.__docgenInfo={description:"",methods:[],displayName:"CardTitle"};i.__docgenInfo={description:"",methods:[],displayName:"CardDescription"};n.__docgenInfo={description:"",methods:[],displayName:"CardContent"};export{t as C,o as a,d as b,i as c,n as d};
|
||||
@@ -0,0 +1 @@
|
||||
import{U as a,C as n}from"./mermaid.core-BRRy2yZG.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
||||
@@ -0,0 +1,34 @@
|
||||
import{r as u,E as gt,j as e,B as se,F as L,c as Oe,G as We,l as vt,H as A,J as G}from"./iframe-aoIC7NDi.js";import{A as Me,b as Qe}from"./avatar-Cx9l3K2h.js";import{I as Ce}from"./Identity-qezU2VU6.js";import{I as yt}from"./InlineEntitySelector-BOnceYYg.js";import{M as Tt}from"./MarkdownBody-suYvEMx0.js";import{M as kt}from"./MarkdownEditor-BtfKiA3v.js";import{O as Ct}from"./OutputFeedbackButtons-BJ51GtnJ.js";import{A as Dt}from"./ApprovalCard-DsForM_Y.js";import{A as De}from"./AgentIconPicker-B29UI7uB.js";import{f as ze}from"./recent-selections-CD1WKLHy.js";import{r as Et,I as re}from"./IssueChatThread-Do6zl-jD.js";import{P as Ee}from"./slots-CQxVu2Nr.js";import{P as Vt}from"./paperclip-B7aTkTtY.js";import{A as Ve}from"./arrow-right-BmL7S7RJ.js";import{C as jt}from"./dialog-6DTSoM1_.js";import{C as Ut}from"./copy-CPgBejOM.js";import{R as It}from"./RunChatSurface-BY0lSkJs.js";import{B as wt}from"./badge-CQZT8Hmw.js";import{C as He,a as Je,b as Ge,c as Ye,d as Xe}from"./card-CztzpO7x.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DUUcyzlS.js";import"./createLucideIcon-D2uUVdtm.js";import"./index-BWXhrlcm.js";import"./textarea-CGN-n--7.js";import"./thumbs-up-DOKJqPYr.js";import"./shield-check-Do8XLHtm.js";import"./lightbulb-CWoAXyu4.js";import"./user-plus-Bh0OVGC-.js";import"./circle-check-B6ZHio0H.js";import"./circle-x-D1djpUMR.js";import"./input-DeZ-mgkh.js";import"./message-square-CCO5PzL9.js";import"./database-Dx6aEk21.js";import"./heartbeats-R23LJy38.js";import"./registry-7D9NZbk8.js";import"./agent-config-primitives-DS6dQaBU.js";import"./toggle-switch-D46zFA7i.js";import"./PathInstructionsModal-D4Fgn9Ki.js";import"./dropdown-menu-DRraIghT.js";import"./PriorityIcon-BJIUslvt.js";import"./minus-S7Yk3xbG.js";import"./triangle-alert-XSXGBeLN.js";import"./ellipsis-BM07d3s-.js";import"./square-CTiUZDc0.js";import"./circle-pause-DnJAMYCY.js";import"./auth-CKnQTD4n.js";import"./x-CIQWKcou.js";const At=800;function St(t){try{return localStorage.getItem(t)??""}catch{return""}}function Rt(t,s){try{s.trim()?localStorage.setItem(t,s):localStorage.removeItem(t)}catch{}}function qt(t){try{localStorage.removeItem(t)}catch{}}function _t(t){if(!t||t==="__none__")return{assigneeAgentId:null,assigneeUserId:null};if(t.startsWith("agent:")){const s=t.slice(6);return s?{assigneeAgentId:s,assigneeUserId:null}:null}if(t.startsWith("user:")){const s=t.slice(5);return s?{assigneeAgentId:null,assigneeUserId:s}:null}return null}function Pt(t,s){return(t==="done"||t==="cancelled"||t==="blocked")&&s.startsWith("agent:")}function je(t){return t?t.replace(/_/g," "):"None"}function Ue(t,s,n){var l;return t.agentId?((l=s==null?void 0:s.get(t.agentId))==null?void 0:l.name)??t.agentId.slice(0,8):t.userId?ze(t.userId,n)??"Board":"Unassigned"}function Zt(t,s,n,l){var p;return t==="agent"?((p=n==null?void 0:n.get(s))==null?void 0:p.name)??s.slice(0,8):t==="system"?"System":ze(s,l)??"Board"}function Ke(t){const s=t.trim().split(/\s+/);return s.length>=2?(s[0][0]+s[s.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function $t(t){switch(t){case"timed_out":return"timed out";default:return t.replace(/_/g," ")}}function et(t){return t.finishedAt??t.startedAt??t.createdAt}function Lt(t){switch(t){case"succeeded":return"text-green-700 dark:text-green-300";case"failed":case"error":return"text-red-700 dark:text-red-300";case"timed_out":return"text-orange-700 dark:text-orange-300";case"running":return"text-cyan-700 dark:text-cyan-300";case"queued":case"pending":return"text-amber-700 dark:text-amber-300";case"cancelled":return"text-muted-foreground";default:return"text-foreground"}}async function Ft(t){if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(t);return}const s=document.createElement("textarea");s.value=t,s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s);try{if(s.select(),!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{document.body.removeChild(s)}}function Bt({text:t}){const[s,n]=u.useState("idle"),l=u.useRef(null);u.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const p=s==="copied"?"Copied":s==="failed"?"Copy failed":"Copy";return e.jsxDEV("button",{type:"button",className:Oe("inline-flex min-h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors",s==="copied"?"bg-green-100 text-green-700 dark:bg-green-500/15 dark:text-green-300":s==="failed"?"bg-destructive/10 text-destructive":"text-muted-foreground hover:bg-accent/60 hover:text-foreground"),title:p,"aria-label":"Copy comment as markdown",onClick:()=>{Ft(t).then(()=>n("copied")).catch(()=>n("failed")),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{n("idle"),l.current=null},1500)},children:[s==="copied"?e.jsxDEV(jt,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:278,columnNumber:30},this):e.jsxDEV(Ut,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/papeLine truncated
|
||||
|
||||
${y}`:y)}else N&&await N(a)}finally{fe(!1),W.current&&(W.current.value="")}}}async function Nt(r,a,d){if(b){xe(r);try{await b(r,a,d)}finally{xe(null)}}}const xt=!pe&&!!_.trim();return e.jsxDEV("div",{className:"space-y-4",children:[e.jsxDEV("h3",{className:"text-sm font-semibold",children:["Timeline (",ye.length+s.length,")"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:854,columnNumber:7},this),e.jsxDEV(Wt,{timeline:ye,agentMap:c,currentUserId:F,companyId:f,projectId:C,onApproveApproval:R,onRejectApproval:q,pendingApprovalAction:h,feedbackVoteByTargetId:ht,feedbackDataSharingPreference:p,onVote:b?Nt:void 0,votingTargetId:dt,highlightCommentId:be,feedbackTermsUrl:S},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:856,columnNumber:7},this),lt,s.length>0&&e.jsxDEV("div",{className:"space-y-3",children:[e.jsxDEV("div",{className:"flex items-center justify-between gap-2",children:[e.jsxDEV("h4",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-amber-700 dark:text-amber-300",children:["Queued Comments (",s.length,")"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:878,columnNumber:13},this),ue&&((ke=s[0])!=null&&ke.queueTargetRunId)?e.jsxDEV(se,{size:"sm",variant:"outline",className:"border-red-300 text-red-700 hover:bg-red-50 hover:text-red-800 dark:border-red-500/40 dark:text-red-300 dark:hover:bg-red-500/10",disabled:ce===s[0].queueTargetRunId,onClick:()=>void ue(s[0].queueTargetRunId),children:ce===s[0].queueTargetRunId?"Interrupting...":"Interrupt"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:882,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:877,columnNumber:11},this),e.jsxDEV("div",{className:"space-y-3",children:s.map(r=>e.jsxDEV(tt,{comment:r,agentMap:c,companyId:f,projectId:C,highlightCommentId:be,queued:!0},r.id,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:895,columnNumber:15},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:893,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:876,columnNumber:9},this),de?e.jsxDEV("div",{className:"rounded-md border border-amber-300/70 bg-amber-50/80 px-3 py-2 text-sm text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:de},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:910,columnNumber:9},this):e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(kt,{ref:pt,value:_,onChange:P,placeholder:"Leave a comment...",mentions:ft,onSubmit:Te,imageUploadHandler:i,contentClassName:"min-h-[60px] text-sm"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:915,columnNumber:11},this),e.jsxDEV("div",{className:"flex items-center justify-end gap-3",children:[(i||N)&&e.jsxDEV("div",{className:"mr-auto flex items-center gap-3",children:[e.jsxDEV("input",{ref:W,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",className:"hidden",onChange:bt},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:928,columnNumber:17},this),e.jsxDEV(se,{variant:"ghost",size:"icon-sm",onClick:()=>{var r;return(r=W.current)==null?void 0:r.click()},disabled:ct,title:"Attach image",children:e.jsxDEV(Vt,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:942,columnNumber:19},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:935,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:927,columnNumber:15},this),me&&le.length>0&&e.jsxDEV(yt,{value:O,options:le,placeholder:"Assignee",noneLabel:"No assignee",searchPlaceholder:"Search assignees...",emptyMessage:"No assignees found.",onChange:te,className:"text-xs h-8",renderTriggerValue:r=>{if(!r)return e.jsxDEV("span",{className:"text-muted-foreground",children:"Assignee"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:957,columnNumber:39},this);const a=r.id.startsWith("agent:")?r.id.slice(6):null,d=a?c==null?void 0:c.get(a):null;return e.jsxDEV(e.Fragment,{children:[d?e.jsxDEV(De,{icon:d.icon,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:963,columnNumber:25},this):null,e.jsxDEV("span",{className:"truncate",children:r.label},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:965,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/CommentThread.tsx",lineNumber:961,columnNumb
Line truncated
|
||||
approvalId: string;
|
||||
action: "approve" | "reject";
|
||||
} | null`,elements:[{name:"signature",type:"object",raw:`{
|
||||
approvalId: string;
|
||||
action: "approve" | "reject";
|
||||
}`,signature:{properties:[{key:"approvalId",value:{name:"string",required:!0}},{key:"action",value:{name:"union",raw:'"approve" | "reject"',elements:[{name:"literal",value:'"approve"'},{name:"literal",value:'"reject"'}],required:!0}}]}},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},onVote:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
||||
commentId: string,
|
||||
vote: FeedbackVoteValue,
|
||||
options?: { allowSharing?: boolean; reason?: string },
|
||||
) => Promise<void>`,signature:{arguments:[{type:{name:"string"},name:"commentId"},{type:{name:"FeedbackVoteValue"},name:"vote"},{type:{name:"signature",type:"object",raw:"{ allowSharing?: boolean; reason?: string }",signature:{properties:[{key:"allowSharing",value:{name:"boolean",required:!1}},{key:"reason",value:{name:"string",required:!1}}]}},name:"options"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},onAdd:{required:!0,tsType:{name:"signature",type:"function",raw:"(body: string, reopen?: boolean, reassignment?: CommentReassignment) => Promise<void>",signature:{arguments:[{type:{name:"string"},name:"body"},{type:{name:"boolean"},name:"reopen"},{type:{name:"CommentReassignment"},name:"reassignment"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},issueStatus:{required:!1,tsType:{name:"string"},description:""},agentMap:{required:!1,tsType:{name:"Map",elements:[{name:"string"},{name:"Agent"}],raw:"Map<string, Agent>"},description:""},currentUserId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},imageUploadHandler:{required:!1,tsType:{name:"signature",type:"function",raw:"(file: File) => Promise<string>",signature:{arguments:[{type:{name:"File"},name:"file"}],return:{name:"Promise",elements:[{name:"string"}],raw:"Promise<string>"}}},description:""},onAttachImage:{required:!1,tsType:{name:"signature",type:"function",raw:"(file: File) => Promise<void>",signature:{arguments:[{type:{name:"File"},name:"file"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:"Callback to attach an image file to the parent issue (not inline in a comment)."},draftKey:{required:!1,tsType:{name:"string"},description:""},liveRunSlot:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},enableReassign:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},reassignOptions:{required:!1,tsType:{name:"Array",elements:[{name:"InlineEntityOption"}],raw:"InlineEntityOption[]"},description:"",defaultValue:{value:"[]",computed:!1}},currentAssigneeValue:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},suggestedAssigneeValue:{required:!1,tsType:{name:"string"},description:""},mentions:{required:!1,tsType:{name:"Array",elements:[{name:"MentionOption"}],raw:"MentionOption[]"},description:""},onInterruptQueued:{required:!1,tsType:{name:"signature",type:"function",raw:"(runId: string) => Promise<void>",signature:{arguments:[{type:{name:"string"},name:"runId"}],return:{name:"Promise",elements:[{name:"void"}],raw:"Promise<void>"}}},description:""},interruptingQueuedRunId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},composerDisabledReason:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}}}};const j="company-storybook",w="project-board-ui",oe="issue-chat-comments",k="user-board",m=A.find(t=>t.id==="agent-codex")??A[0],x=A.find(t=>t.id==="agent-qa")??A[1],ne=A.find(t=>t.id==="agent-cto")??A[2],Mt=new Map([["user-board","Riley Board"],["user-product","Mara Product"]]);function ae({eyebrow:t,title:s,children:n}){return e.jsxDEV("section",{className:"paperclip-story__frame overflow-hidden",children:[e.jsxDEV("div",{className:"flex flex-wrap items-start justify-between gap-3 border-b border-border px-5 py-4",children:e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"paperclip-story__label",children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:43,columnNumber:11},this),e.jsxDEV("h2",{className:"mt-1 text-xl font-semibold",children:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:42,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:41,columnNumber:7},this),e.jsxDEV("div",{className:"p-5",children:n},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:47,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:40,columnNumber:10},this)}function I({title:t,description:s,children:n}){return e.jsxDEV(He,{className:"shadow-none",children:[e.jsxDEV(Je,{children:[e.jsxDEV(Ge,{children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:61,columnNumber:9},this),e.jsxDEV(Ye,{children:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:
Line truncated
|
||||
`),createdAt:new Date("2026-04-20T13:28:00.000Z")}),g({id:"comment-mentions-agent",authorAgentId:m.id,authorUserId:null,body:"@QAChecker I added the fixture coverage. Please focus browser review on links, code blocks, and the queued comment treatment.",createdAt:new Date("2026-04-20T13:35:00.000Z"),runId:"run-markdown-01",runAgentId:m.id})],Ht=g({id:"comment-queued-board",body:"@CodexCoder after this run finishes, add a compact embedded variant too.",createdAt:new Date("2026-04-20T13:39:00.000Z"),clientId:"client-queued-storybook",clientStatus:"queued",queueState:"queued",queueTargetRunId:"run-live-chat-01"}),Jt=[Y({id:"event-system-checkout",createdAt:new Date("2026-04-20T13:04:00.000Z"),actorType:"system",actorId:"paperclip",statusChange:{from:"todo",to:"in_progress"}}),Y({id:"event-board-reassign",createdAt:new Date("2026-04-20T13:18:00.000Z"),actorType:"user",actorId:k,assigneeChange:{from:{agentId:m.id,userId:null},to:{agentId:x.id,userId:null}},statusChange:void 0})],Gt=[{runId:"run-comment-thread-01",status:"succeeded",agentId:m.id,createdAt:new Date("2026-04-20T13:07:00.000Z"),startedAt:new Date("2026-04-20T13:07:00.000Z"),finishedAt:new Date("2026-04-20T13:11:00.000Z")},{runId:"run-comment-thread-02",status:"running",agentId:x.id,createdAt:new Date("2026-04-20T13:22:00.000Z"),startedAt:new Date("2026-04-20T13:22:00.000Z"),finishedAt:null}],Yt=[{id:"feedback-chat-comment-01",companyId:j,issueId:oe,targetType:"issue_comment",targetId:"comment-issue-agent",authorUserId:k,vote:"up",reason:null,sharedWithLabs:!1,sharedAt:null,consentVersion:null,redactionSummary:null,createdAt:new Date("2026-04-20T13:52:00.000Z"),updatedAt:new Date("2026-04-20T13:52:00.000Z")}],X={id:"run-live-chat-01",status:"running",invocationSource:"manual",triggerDetail:"comment",createdAt:"2026-04-20T13:40:00.000Z",startedAt:"2026-04-20T13:40:02.000Z",finishedAt:null,agentId:m.id,agentName:m.name,adapterType:"codex_local",issueId:oe},ie=[{kind:"assistant",ts:"2026-04-20T13:40:08.000Z",text:"I am wiring the chat and comments Storybook coverage now."},{kind:"thinking",ts:"2026-04-20T13:40:12.000Z",text:"Need fixtures that exercise MarkdownBody, assistant-ui messages, and the embedded run transcript path without reaching the API."},{kind:"tool_call",ts:"2026-04-20T13:40:18.000Z",name:"rg",toolUseId:"tool-live-rg",input:{query:"IssueChatThread",cwd:"ui/src"}},{kind:"tool_result",ts:"2026-04-20T13:40:20.000Z",toolUseId:"tool-live-rg",content:`ui/src/components/IssueChatThread.tsx
|
||||
ui/src/components/RunChatSurface.tsx`,isError:!1},{kind:"assistant",ts:"2026-04-20T13:40:31.000Z",text:["The live run should render code blocks as part of the assistant response:","","```tsx","<RunChatSurface run={run} transcript={entries} hasOutput />","```"].join(`
|
||||
`)},{kind:"tool_call",ts:"2026-04-20T13:40:44.000Z",name:"apply_patch",toolUseId:"tool-live-patch",input:{file:"ui/storybook/stories/chat-comments.stories.tsx",action:"add fixtures"}},{kind:"tool_result",ts:"2026-04-20T13:40:49.000Z",toolUseId:"tool-live-patch",content:"Added Storybook scenarios for comment thread, run chat, and issue chat.",isError:!1}],Xt=[g({id:"comment-issue-board",body:"Please turn the comment thread into a reviewable chat surface. I need to see operator messages, agent output, system events, and live run progress together.",createdAt:new Date("2026-04-20T13:44:00.000Z")}),g({id:"comment-issue-agent",authorAgentId:m.id,authorUserId:null,body:"I kept the existing component contracts and added fixtures with realistic Paperclip work: checkout, comments, linked runs, and review feedback.",createdAt:new Date("2026-04-20T13:50:00.000Z"),runId:"run-issue-chat-01",runAgentId:m.id}),g({id:"comment-issue-queued",body:"@QAChecker please do a quick visual pass after the Storybook build is green.",createdAt:new Date("2026-04-20T13:56:00.000Z"),clientId:"client-issue-queued",clientStatus:"queued",queueState:"queued",queueTargetRunId:X.id})],Kt=[Y({id:"event-issue-checkout",createdAt:new Date("2026-04-20T13:42:00.000Z"),actorType:"system",actorId:"paperclip",statusChange:{from:"todo",to:"in_progress"}}),Y({id:"event-issue-assignee",createdAt:new Date("2026-04-20T13:43:00.000Z"),actorType:"user",actorId:k,statusChange:void 0,assigneeChange:{from:{agentId:null,userId:null},to:{agentId:m.id,userId:null}}})],es=[{runId:"run-issue-chat-01",status:"succeeded",agentId:m.id,agentName:m.name,adapterType:"codex_local",createdAt:new Date("2026-04-20T13:46:00.000Z"),startedAt:new Date("2026-04-20T13:46:00.000Z"),finishedAt:new Date("2026-04-20T13:51:00.000Z"),hasStoredOutput:!0}],Ie=new Map([["run-issue-chat-01",[{kind:"thinking",ts:"2026-04-20T13:46:10.000Z",text:"Checking the existing Storybook organization before adding a new product group."},{kind:"tool_call",ts:"2026-04-20T13:46:16.000Z",name:"read_file",toolUseId:"tool-issue-read",input:{path:"ui/storybook/stories/overview.stories.tsx"}},{kind:"tool_result",ts:"2026-04-20T13:46:19.000Z",toolUseId:"tool-issue-read",content:"The coverage map already lists Chat & comments as a planned section.",isError:!1},{kind:"assistant",ts:"2026-04-20T13:49:00.000Z",text:"Added the story file and kept every fixture local to the story so product data fixtures stay stable."},{kind:"diff",ts:"2026-04-20T13:49:04.000Z",changeType:"file_header",text:"diff --git a/ui/storybook/stories/chat-comments.stories.tsx b/ui/storybook/stories/chat-comments.stories.tsx"},{kind:"diff",ts:"2026-04-20T13:49:05.000Z",changeType:"add",text:"+export const FullSurfaceMatrix: Story = {};"}]],[X.id,ie]]);function M({comments:t,queuedComments:s=[],timelineEvents:n=[]}){return e.jsxDEV(st,{comments:t,queuedComments:s,linkedRuns:Gt,timelineEvents:n,companyId:j,projectId:w,issueStatus:"in_progress",agentMap:G,currentUserId:k,onAdd:async()=>{},enableReassign:!0,reassignOptions:nt,currentAssigneeValue:`agent:${m.id}`,suggestedAssigneeValue:`agent:${m.id}`,mentions:rt,onInterruptQueued:async()=>{}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:396,columnNumber:10},this)}function ot(){return e.jsxDEV(ae,{eyebrow:"CommentThread",title:"Timeline comments across empty, single, long, markdown, and queued states",children:e.jsxDEV("div",{className:"grid gap-5 xl:grid-cols-2",children:[e.jsxDEV(I,{title:"Empty thread",description:"No timeline entries yet, with the composer ready for the first comment.",children:e.jsxDEV(M,{comments:[]},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:402,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:401,columnNumber:9},this),e.jsxDEV(I,{title:"Single board comment",description:"A minimal operator request with timestamp and composer controls.",children:e.jsxDEV(M,{comments:it},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:405,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:404,columnNumber:9},this),e.jsxDEV(I,{title:"Long mixed-author thread",description:"Board, product, agent, linked run, and system timeline entries in one stack.",children:e.jsxDEV(M,{comments:Qt,timelineEvents:Jt},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:408,columnNumber:11},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/chat-comments.stories.tsx",lineNumber:407,columnNumber:9},this),e.jsxDEV(I,{title:"Markdown, code, mentions, and links",description:"Markdown rendering with code fences, @mentions, links, and a queued reply.",children:e.jsxDEV(M,{comments:zt,queuedComments:[Ht]},void 0,!1,{fileName:"/U
Line truncated
|
||||
render: () => <div className="paperclip-story">
|
||||
<main className="paperclip-story__inner">
|
||||
<CommentThreadMatrix />
|
||||
</main>
|
||||
</div>
|
||||
}`,...(_e=(qe=z.parameters)==null?void 0:qe.docs)==null?void 0:_e.source}}};var Pe,Ze,$e;H.parameters={...H.parameters,docs:{...(Pe=H.parameters)==null?void 0:Pe.docs,source:{originalSource:`{
|
||||
render: () => <div className="paperclip-story">
|
||||
<main className="paperclip-story__inner">
|
||||
<RunChatMatrix />
|
||||
</main>
|
||||
</div>
|
||||
}`,...($e=(Ze=H.parameters)==null?void 0:Ze.docs)==null?void 0:$e.source}}};var Le,Fe,Be;J.parameters={...J.parameters,docs:{...(Le=J.parameters)==null?void 0:Le.docs,source:{originalSource:`{
|
||||
render: () => <div className="paperclip-story">
|
||||
<main className="paperclip-story__inner">
|
||||
<IssueChatMatrix />
|
||||
</main>
|
||||
</div>
|
||||
}`,...(Be=(Fe=J.parameters)==null?void 0:Fe.docs)==null?void 0:Be.source}}};const Gs=["FullSurfaceMatrix","CommentThreads","LiveRunChat","IssueChatWithTimeline"];export{z as CommentThreads,Q as FullSurfaceMatrix,J as IssueChatWithTimeline,H as LiveRunChat,Gs as __namedExportsOrder,Js as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as l}from"./mermaid.core-BRRy2yZG.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as a,d as o}from"./mermaid.core-BRRy2yZG.js";var d=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{d as g};
|
||||
@@ -0,0 +1,165 @@
|
||||
import{g as et}from"./chunk-FMBD7UC4-C_jnrFWB.js";import{g as tt}from"./chunk-55IACEB6-DYYxgzyj.js";import{s as st}from"./chunk-QN33PNHL-CBl9gU19.js";import{_ as f,l as Oe,c as F,p as it,r as at,u as we,d as ee,b as nt,a as rt,s as ut,g as lt,q as ct,t as ot,k as v,z as ht,y as dt,i as pt,a8 as R}from"./mermaid.core-BRRy2yZG.js";var Ve=(function(){var s=f(function(I,c,h,p){for(h=h||{},p=I.length;p--;h[I[p]]=c);return h},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],r=[1,42],o=[1,26],A=[1,24],g=[1,25],D=[1,32],L=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],Te=[1,30],ke=[1,31],b=[1,44],E=[1,46],y=[1,43],T=[1,47],De=[1,9],d=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],ne=[1,62],Fe=[1,63],Be=[1,64],z=[1,8,9,41],Pe=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],re=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ue=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],_e=[1,100],Y=[1,117],Q=[1,113],W=[1,109],j=[1,115],X=[1,110],q=[1,111],H=[1,112],J=[1,114],Z=[1,116],Re=[22,48,60,61,82,86,87,88,89,90],Se=[1,8,9,39,41,44],le=[1,8,9,22],Ge=[1,145],Ue=[1,8,9,61],N=[1,8,9,22,48,60,61,82,86,87,88,89,90],Ne={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,h,p,n,C,e,$){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:n.addRelation(e[t]);break;case 20:e[t-1].title=n.cleanupLabel(e[t]),n.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),n.setAccTitle(this.$);break;case 32Line truncated
|
||||
`+k.showPosition()+`
|
||||
Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ie="Parse error on line "+(oe+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ie,{text:k.match,token:this.terminals_[B]||B,line:k.yylineno,loc:xe,expected:de})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+B);switch(S[0]){case 1:p.push(B),C.push(k.yytext),e.push(k.yylloc),p.push(S[1]),B=null,ze=k.yyleng,t=k.yytext,oe=k.yylineno,xe=k.yylloc;break;case 2:if(x=this.productions_[S[1]][1],M.$=C[C.length-x],M._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Ze&&(M._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),ve=this.performAction.apply(M,[t,ze,oe,O.yy,S[1],C,e].concat(Je)),typeof ve<"u")return ve;x&&(p=p.slice(0,-1*x*2),C=C.slice(0,-1*x),e=e.slice(0,-1*x)),p.push(this.productions_[S[1]][0]),C.push(M.$),e.push(M._$),Qe=$[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},qe=(function(){var I={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(c,h){return this.yy=h||this.yy||{},this._input=c,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:f(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var h=c.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:f(function(c){var h=c.length,p=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=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),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===n.length?this.yylloc.first_column:0)+n[n.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(c){this.unput(this.match.slice(c))},"less"),pastInput:f(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var c=this.pastInput(),h=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
||||
`+h+"^"},"showPosition"),test_match:f(function(c,h){var p,n,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),n=c[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],p=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var e in C)this[e]=C[e];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,h,p,n;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),e=0;e<C.length;e++)if(p=this._input.match(this.rules[C[e]]),p&&(!h||p[0].length>h[0].length)){if(h=p,n=e,this.options.backtrack_lexer){if(c=this.test_match(p,C[e]),c!==!1)return c;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(c=this.test_match(h,C[n]),c!==!1?c:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:f(function(h,p,n,C){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 77;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 69;case 69:return 69;case 70:return 71;case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:return 89;case 85:return 89;case 86:return 90;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:return 48;case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06DLine truncated
|
||||
fill: ${s.nodeBorder||s.classText};
|
||||
stroke: none;
|
||||
font-family: ${s.fontFamily};
|
||||
font-size: 10px;
|
||||
|
||||
.title {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.nodeLabel, .edgeLabel {
|
||||
color: ${s.classText};
|
||||
}
|
||||
.edgeLabel .label rect {
|
||||
fill: ${s.mainBkg};
|
||||
}
|
||||
.label text {
|
||||
fill: ${s.classText};
|
||||
}
|
||||
|
||||
.labelBkg {
|
||||
background: ${s.mainBkg};
|
||||
}
|
||||
.edgeLabel .label span {
|
||||
background: ${s.mainBkg};
|
||||
}
|
||||
|
||||
.classTitle {
|
||||
font-weight: bolder;
|
||||
}
|
||||
.node rect,
|
||||
.node circle,
|
||||
.node ellipse,
|
||||
.node polygon,
|
||||
.node path {
|
||||
fill: ${s.mainBkg};
|
||||
stroke: ${s.nodeBorder};
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
|
||||
.divider {
|
||||
stroke: ${s.nodeBorder};
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
g.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
g.classGroup rect {
|
||||
fill: ${s.mainBkg};
|
||||
stroke: ${s.nodeBorder};
|
||||
}
|
||||
|
||||
g.classGroup line {
|
||||
stroke: ${s.nodeBorder};
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.classLabel .box {
|
||||
stroke: none;
|
||||
stroke-width: 0;
|
||||
fill: ${s.mainBkg};
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.classLabel .label {
|
||||
fill: ${s.nodeBorder};
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.relation {
|
||||
stroke: ${s.lineColor};
|
||||
stroke-width: 1;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.dashed-line{
|
||||
stroke-dasharray: 3;
|
||||
}
|
||||
|
||||
.dotted-line{
|
||||
stroke-dasharray: 1 2;
|
||||
}
|
||||
|
||||
#compositionStart, .composition {
|
||||
fill: ${s.lineColor} !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#compositionEnd, .composition {
|
||||
fill: ${s.lineColor} !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#dependencyStart, .dependency {
|
||||
fill: ${s.lineColor} !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#dependencyStart, .dependency {
|
||||
fill: ${s.lineColor} !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#extensionStart, .extension {
|
||||
fill: transparent !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#extensionEnd, .extension {
|
||||
fill: transparent !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#aggregationStart, .aggregation {
|
||||
fill: transparent !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#aggregationEnd, .aggregation {
|
||||
fill: transparent !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#lollipopStart, .lollipop {
|
||||
fill: ${s.mainBkg} !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
#lollipopEnd, .lollipop {
|
||||
fill: ${s.mainBkg} !important;
|
||||
stroke: ${s.lineColor} !important;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.edgeTerminals {
|
||||
font-size: 11px;
|
||||
line-height: initial;
|
||||
}
|
||||
|
||||
.classTitleText {
|
||||
text-anchor: middle;
|
||||
font-size: 18px;
|
||||
fill: ${s.textColor};
|
||||
}
|
||||
${et()}
|
||||
`,"getStyles"),Dt=At,ft=f((s,i="TB")=>{if(!s.doc)return i;let a=i;for(const u of s.doc)u.stmt==="dir"&&(a=u.value);return a},"getDir"),gt=f(function(s,i){return i.db.getClasses()},"getClasses"),Ct=f(async function(s,i,a,u){Oe.info("REF0:"),Oe.info("Drawing class diagram (v3)",i);const{securityLevel:l,state:r,layout:o}=F(),A=u.db.getData(),g=tt(i,l);A.type=u.type,A.layoutAlgorithm=it(o),A.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,A.rankSpacing=(r==null?void 0:r.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=i,await at(A,g);const D=8;we.insertTitle(g,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,u.db.getDiagramTitle()),st(g,D,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),Ft={getClasses:gt,draw:Ct,getDir:ft};export{kt as C,Tt as a,Ft as c,Dt as s};
|
||||
@@ -0,0 +1,220 @@
|
||||
import{g as te}from"./chunk-55IACEB6-DYYxgzyj.js";import{s as ee}from"./chunk-QN33PNHL-CBl9gU19.js";import{_ as f,l as b,c as F,r as se,u as ie,a as re,b as ae,g as ne,s as oe,q as le,t as ce,ab as he,k as z,z as ue}from"./mermaid.core-BRRy2yZG.js";var vt=(function(){var e=f(function(V,o,h,n){for(h=h||{},n=V.length;n--;h[V[n]]=o);return h},"o"),t=[1,2],s=[1,3],a=[1,4],i=[2,4],l=[1,9],d=[1,11],S=[1,16],p=[1,17],T=[1,18],_=[1,19],m=[1,33],k=[1,20],A=[1,21],$=[1,22],x=[1,23],R=[1,24],u=[1,26],L=[1,27],I=[1,28],N=[1,29],G=[1,30],P=[1,31],B=[1,32],at=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],K=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(o,h,n,g,E,r,Z){var c=r.length-1;switch(E){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const tt=r[c-1];tt.description=g.trimColon(r[c]),this.$=tt;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var U=r[c],X=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");U=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,Line truncated
|
||||
`+D.showPosition()+`
|
||||
Expecting `+ft.join(", ")+", got '"+(this.terminals_[C]||C)+"'":bt="Parse error on line "+(U+1)+": Unexpected "+(C==tt?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(bt,{text:D.match,token:this.terminals_[C]||C,line:D.yylineno,loc:_t,expected:ft})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+C);switch(w[0]){case 1:n.push(C),E.push(D.yytext),r.push(D.yylloc),n.push(w[1]),C=null,X=D.yyleng,c=D.yytext,U=D.yylineno,_t=D.yylloc;break;case 2:if(Y=this.productions_[w[1]][1],J.$=E[E.length-Y],J._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},Qt&&(J._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(J,[c,X,U,j.yy,w[1],E,r].concat(Tt)),typeof mt<"u")return mt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),r=r.slice(0,-1*Y)),n.push(this.productions_[w[1]][0]),E.push(J.$),r.push(J._$),Ot=Z[n[n.length-2]][n[n.length-1]],n.push(Ot);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(h,n){if(this.yy.parser)this.yy.parser.parseError(h,n);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var g=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),n.length-1&&(this.yylineno-=n.length-1);var E=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:n?(n.length===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
||||
`+h+"^"},"showPosition"),test_match:f(function(o,h){var n,g,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],n=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in E)this[r]=E[r];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,n,g;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),r=0;r<E.length;r++)if(n=this._input.match(this.rules[E[r]]),n&&(!h||n[0].length>h[0].length)){if(h=n,g=r,this.options.backtrack_lexer){if(o=this.test_match(n,E[r]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,E[g]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(h,n,g,E){switch(g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 70:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return n.yytext=n.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?
Line truncated
|
||||
defs #statediagram-barbEnd {
|
||||
fill: ${e.transitionColor};
|
||||
stroke: ${e.transitionColor};
|
||||
}
|
||||
g.stateGroup text {
|
||||
fill: ${e.nodeBorder};
|
||||
stroke: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
g.stateGroup text {
|
||||
fill: ${e.textColor};
|
||||
stroke: none;
|
||||
font-size: 10px;
|
||||
|
||||
}
|
||||
g.stateGroup .state-title {
|
||||
font-weight: bolder;
|
||||
fill: ${e.stateLabelColor};
|
||||
}
|
||||
|
||||
g.stateGroup rect {
|
||||
fill: ${e.mainBkg};
|
||||
stroke: ${e.nodeBorder};
|
||||
}
|
||||
|
||||
g.stateGroup line {
|
||||
stroke: ${e.lineColor};
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.transition {
|
||||
stroke: ${e.transitionColor};
|
||||
stroke-width: 1;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.stateGroup .composit {
|
||||
fill: ${e.background};
|
||||
border-bottom: 1px
|
||||
}
|
||||
|
||||
.stateGroup .alt-composit {
|
||||
fill: #e0e0e0;
|
||||
border-bottom: 1px
|
||||
}
|
||||
|
||||
.state-note {
|
||||
stroke: ${e.noteBorderColor};
|
||||
fill: ${e.noteBkgColor};
|
||||
|
||||
text {
|
||||
fill: ${e.noteTextColor};
|
||||
stroke: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.stateLabel .box {
|
||||
stroke: none;
|
||||
stroke-width: 0;
|
||||
fill: ${e.mainBkg};
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.edgeLabel .label rect {
|
||||
fill: ${e.labelBackgroundColor};
|
||||
opacity: 0.5;
|
||||
}
|
||||
.edgeLabel {
|
||||
background-color: ${e.edgeLabelBackground};
|
||||
p {
|
||||
background-color: ${e.edgeLabelBackground};
|
||||
}
|
||||
rect {
|
||||
opacity: 0.5;
|
||||
background-color: ${e.edgeLabelBackground};
|
||||
fill: ${e.edgeLabelBackground};
|
||||
}
|
||||
text-align: center;
|
||||
}
|
||||
.edgeLabel .label text {
|
||||
fill: ${e.transitionLabelColor||e.tertiaryTextColor};
|
||||
}
|
||||
.label div .edgeLabel {
|
||||
color: ${e.transitionLabelColor||e.tertiaryTextColor};
|
||||
}
|
||||
|
||||
.stateLabel text {
|
||||
fill: ${e.stateLabelColor};
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.node circle.state-start {
|
||||
fill: ${e.specialStateColor};
|
||||
stroke: ${e.specialStateColor};
|
||||
}
|
||||
|
||||
.node .fork-join {
|
||||
fill: ${e.specialStateColor};
|
||||
stroke: ${e.specialStateColor};
|
||||
}
|
||||
|
||||
.node circle.state-end {
|
||||
fill: ${e.innerEndBackground};
|
||||
stroke: ${e.background};
|
||||
stroke-width: 1.5
|
||||
}
|
||||
.end-state-inner {
|
||||
fill: ${e.compositeBackground||e.background};
|
||||
// stroke: ${e.background};
|
||||
stroke-width: 1.5
|
||||
}
|
||||
|
||||
.node rect {
|
||||
fill: ${e.stateBkg||e.mainBkg};
|
||||
stroke: ${e.stateBorder||e.nodeBorder};
|
||||
stroke-width: 1px;
|
||||
}
|
||||
.node polygon {
|
||||
fill: ${e.mainBkg};
|
||||
stroke: ${e.stateBorder||e.nodeBorder};;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
#statediagram-barbEnd {
|
||||
fill: ${e.lineColor};
|
||||
}
|
||||
|
||||
.statediagram-cluster rect {
|
||||
fill: ${e.compositeTitleBackground};
|
||||
stroke: ${e.stateBorder||e.nodeBorder};
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.cluster-label, .nodeLabel {
|
||||
color: ${e.stateLabelColor};
|
||||
// line-height: 1;
|
||||
}
|
||||
|
||||
.statediagram-cluster rect.outer {
|
||||
rx: 5px;
|
||||
ry: 5px;
|
||||
}
|
||||
.statediagram-state .divider {
|
||||
stroke: ${e.stateBorder||e.nodeBorder};
|
||||
}
|
||||
|
||||
.statediagram-state .title-state {
|
||||
rx: 5px;
|
||||
ry: 5px;
|
||||
}
|
||||
.statediagram-cluster.statediagram-cluster .inner {
|
||||
fill: ${e.compositeBackground||e.background};
|
||||
}
|
||||
.statediagram-cluster.statediagram-cluster-alt .inner {
|
||||
fill: ${e.altBackground?e.altBackground:"#efefef"};
|
||||
}
|
||||
|
||||
.statediagram-cluster .inner {
|
||||
rx:0;
|
||||
ry:0;
|
||||
}
|
||||
|
||||
.statediagram-state rect.basic {
|
||||
rx: 5px;
|
||||
ry: 5px;
|
||||
}
|
||||
.statediagram-state rect.divider {
|
||||
stroke-dasharray: 10,10;
|
||||
fill: ${e.altBackground?e.altBackground:"#efefef"};
|
||||
}
|
||||
|
||||
.note-edge {
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
|
||||
.statediagram-note rect {
|
||||
fill: ${e.noteBkgColor};
|
||||
stroke: ${e.noteBorderColor};
|
||||
stroke-width: 1px;
|
||||
rx: 0;
|
||||
ry: 0;
|
||||
}
|
||||
.statediagram-note rect {
|
||||
fill: ${e.noteBkgColor};
|
||||
stroke: ${e.noteBorderColor};
|
||||
stroke-width: 1px;
|
||||
rx: 0;
|
||||
ry: 0;
|
||||
}
|
||||
|
||||
.statediagram-note text {
|
||||
fill: ${e.noteTextColor};
|
||||
}
|
||||
|
||||
.statediagram-note .nodeLabel {
|
||||
color: ${e.noteTextColor};
|
||||
}
|
||||
.statediagram .edgeLabel {
|
||||
color: red; // ${e.noteTextColor};
|
||||
}
|
||||
|
||||
#dependencyStart, #dependencyEnd {
|
||||
fill: ${e.lineColor};
|
||||
stroke: ${e.lineColor};
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.statediagramTitleText {
|
||||
text-anchor: middle;
|
||||
font-size: 18px;
|
||||
fill: ${e.textColor};
|
||||
}
|
||||
`,"getStyles"),Ue=Pe;export{Me as S,Be as a,Ve as b,Ue as s};
|
||||
@@ -0,0 +1,15 @@
|
||||
import{_ as e}from"./mermaid.core-BRRy2yZG.js";var l=e(()=>`
|
||||
/* Font Awesome icon styling - consolidated */
|
||||
.label-icon {
|
||||
display: inline-block;
|
||||
height: 1em;
|
||||
overflow: visible;
|
||||
vertical-align: -0.125em;
|
||||
}
|
||||
|
||||
.node .label-icon path {
|
||||
fill: currentColor;
|
||||
stroke: revert;
|
||||
stroke-width: revert;
|
||||
}
|
||||
`,"getIconStyles");export{l as g};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as a,e as w,l as x}from"./mermaid.core-BRRy2yZG.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as s}from"./mermaid.core-BRRy2yZG.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as n,n as o,j as l}from"./mermaid.core-BRRy2yZG.js";var x=n((s,t)=>{const e=s.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((s,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(s,e).lower()},"drawBackgroundRect"),g=n((s,t)=>{const e=t.text.replace(o," "),r=s.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const a=r.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),r},"drawText"),h=n((s,t,e,r)=>{const a=s.append("image");a.attr("x",t),a.attr("y",e);const i=l.sanitizeUrl(r);a.attr("xlink:href",i)},"drawImage"),m=n((s,t,e,r)=>{const a=s.append("use");a.attr("x",t),a.attr("y",e);const i=l.sanitizeUrl(r);a.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{d as a,p as b,m as c,x as d,h as e,g as f,y as g};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as e}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=e("circle-alert",c);export{y as C};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],r=c("circle-check",e);export{r as C};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],y=c("circle-pause",e);export{y as C};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],o=c("circle-x",e);export{o as C};
|
||||
@@ -0,0 +1 @@
|
||||
import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-BVh-HCbT.js";import{_ as i}from"./mermaid.core-BRRy2yZG.js";import"./chunk-FMBD7UC4-C_jnrFWB.js";import"./chunk-55IACEB6-DYYxgzyj.js";import"./chunk-QN33PNHL-CBl9gU19.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
|
||||
@@ -0,0 +1 @@
|
||||
import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-BVh-HCbT.js";import{_ as i}from"./mermaid.core-BRRy2yZG.js";import"./chunk-FMBD7UC4-C_jnrFWB.js";import"./chunk-55IACEB6-DYYxgzyj.js";import"./chunk-QN33PNHL-CBl9gU19.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
|
||||
@@ -0,0 +1 @@
|
||||
function O(e,n,t,l,s,d){this.indented=e,this.column=n,this.type=t,this.info=l,this.align=s,this.prev=d}function D(e,n,t,l){var s=e.indented;return e.context&&e.context.type=="statement"&&t!="statement"&&(s=e.context.indented),e.context=new O(s,n,t,l,null,e.context)}function x(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}function V(e,n,t){if(n.prevToken=="variable"||n.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,t))||n.typeAtEndOfLine&&e.column()==e.indentation())return!0}function P(e){for(;;){if(!e||e.type=="top")return!0;if(e.type=="}"&&e.prev.info!="namespace")return!1;e=e.prev}}function h(e){var n=e.statementIndentUnit,t=e.dontAlignCalls,l=e.keywords||{},s=e.types||{},d=e.builtin||{},b=e.blockKeywords||{},_=e.defKeywords||{},w=e.atoms||{},y=e.hooks||{},te=e.multiLineStrings,re=e.indentStatements!==!1,ie=e.indentSwitch!==!1,F=e.namespaceSeparator,oe=e.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ae=e.numberStart||/[\d\.]/,le=e.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,j=e.isOperatorChar||/[+\-*&%=<>!?|\/]/,B=e.isIdentifierChar||/[\w\$_\xa1-\uffff]/,U=e.isReservedIdentifier||!1,p,E;function K(i,a){var c=i.next();if(y[c]){var o=y[c](i,a);if(o!==!1)return o}if(c=='"'||c=="'")return a.tokenize=ce(c),a.tokenize(i,a);if(ae.test(c)){if(i.backUp(1),i.match(le))return"number";i.next()}if(oe.test(c))return p=c,null;if(c=="/"){if(i.eat("*"))return a.tokenize=A,A(i,a);if(i.eat("/"))return i.skipToEnd(),"comment"}if(j.test(c)){for(;!i.match(/^\/[\/*]/,!1)&&i.eat(j););return"operator"}if(i.eatWhile(B),F)for(;i.match(F);)i.eatWhile(B);var u=i.current();return m(l,u)?(m(b,u)&&(p="newstatement"),m(_,u)&&(E=!0),"keyword"):m(s,u)?"type":m(d,u)||U&&U(u)?(m(b,u)&&(p="newstatement"),"builtin"):m(w,u)?"atom":"variable"}function ce(i){return function(a,c){for(var o=!1,u,v=!1;(u=a.next())!=null;){if(u==i&&!o){v=!0;break}o=!o&&u=="\\"}return(v||!(o||te))&&(c.tokenize=null),"string"}}function A(i,a){for(var c=!1,o;o=i.next();){if(o=="/"&&c){a.tokenize=null;break}c=o=="*"}return"comment"}function $(i,a){e.typeFirstDefinitions&&i.eol()&&P(a.context)&&(a.typeAtEndOfLine=V(i,a,i.pos))}return{name:e.name,startState:function(i){return{tokenize:null,context:new O(-i,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(i,a){var c=a.context;if(i.sol()&&(c.align==null&&(c.align=!1),a.indented=i.indentation(),a.startOfLine=!0),i.eatSpace())return $(i,a),null;p=E=null;var o=(a.tokenize||K)(i,a);if(o=="comment"||o=="meta")return o;if(c.align==null&&(c.align=!0),p==";"||p==":"||p==","&&i.match(/^\s*(?:\/\/.*)?$/,!1))for(;a.context.type=="statement";)x(a);else if(p=="{")D(a,i.column(),"}");else if(p=="[")D(a,i.column(),"]");else if(p=="(")D(a,i.column(),")");else if(p=="}"){for(;c.type=="statement";)c=x(a);for(c.type=="}"&&(c=x(a));c.type=="statement";)c=x(a)}else p==c.type?x(a):re&&((c.type=="}"||c.type=="top")&&p!=";"||c.type=="statement"&&p=="newstatement")&&D(a,i.column(),"statement",i.current());if(o=="variable"&&(a.prevToken=="def"||e.typeFirstDefinitions&&V(i,a,i.start)&&P(a.context)&&i.match(/^\s*\(/,!1))&&(o="def"),y.token){var u=y.token(i,a,o);u!==void 0&&(o=u)}return o=="def"&&e.styleDefs===!1&&(o="variable"),a.startOfLine=!1,a.prevToken=E?"def":o||p,$(i,a),o},indent:function(i,a,c){if(i.tokenize!=K&&i.tokenize!=null||i.typeAtEndOfLine&&P(i.context))return null;var o=i.context,u=a&&a.charAt(0),v=u==o.type;if(o.type=="statement"&&u=="}"&&(o=o.prev),e.dontIndentStatements)for(;o.type=="statement"&&e.dontIndentStatements.test(o.info);)o=o.prev;if(y.indent){var q=y.indent(i,o,a,c.unit);if(typeof q=="number")return q}var se=o.prev&&o.prev.info=="switch";if(e.allmanIndentation&&/[{(]/.test(u)){for(;o.type!="top"&&o.type!="}";)o=o.prev;return o.indented}return o.type=="statement"?o.indented+(u=="{"?0:n||c.unit):o.align&&(!t||o.type!=")")?o.column+(v?0:1):o.type==")"&&!v?o.indented+(n||c.unit):o.indented+(v?0:c.unit)+(!v&&se&&!/^(?:case|default)\b/.test(a)?c.unit:0)},languageData:{indentOnInput:ie?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:Object.keys(l).concat(Object.keys(s)).concat(Object.keys(d)).concat(Object.keys(w)),...e.languageData}}}function r(e){for(var n={},t=e.split(" "),l=0;l<t.length;++l)n[t[l]]=!0;return n}function m(e,n){return typeof e=="function"?e(n):e.propertyIsEnumerable(n)}var T="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",H="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try
Line truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const o=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],r=c("clock-3",o);export{r as C};
|
||||
@@ -0,0 +1 @@
|
||||
var d=["false","nil","true"],l=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],u=["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-stLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{b as r}from"./_baseUniq-7kyoN_aU.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
||||
@@ -0,0 +1 @@
|
||||
var c=/({)?[a-zA-Z0-9_]+(})?/;function t(n,i){for(var e,r,u=!1;!n.eol()&&(e=n.next())!=i.pending;){if(e==="$"&&r!="\\"&&i.pending=='"'){u=!0;break}r=e}return u&&n.backUp(1),e==i.pending?i.continueString=!1:i.continueString=!0,"string"}function f(n,i){var e=n.next();return e==="$"?n.match(c)?"variableName.special":"variable":i.continueString?(n.backUp(1),t(n,i)):n.match(/(\s+)?\w+\(/)||n.match(/(\s+)?\w+\ \(/)?(n.backUp(1),"def"):e=="#"?(n.skipToEnd(),"comment"):e=="'"||e=='"'?(i.pending=e,t(n,i)):e=="("||e==")"?"bracket":e.match(/[0-9]/)?"number":(n.eatWhile(/[\w-]/),null)}const a={name:"cmake",startState:function(){var n={};return n.inDefinition=!1,n.inInclude=!1,n.continueString=!1,n.pending=!1,n},token:function(n,i){return n.eatSpace()?null:f(n,i)}};export{a as cmake};
|
||||
@@ -0,0 +1 @@
|
||||
var M="builtin",e="comment",C="string",D="atom",G="number",n="keyword",i="header",B="def",t="link";function L(E){for(var T={},I=E.split(" "),R=0;R<I.length;++R)T[I[R]]=!0;return T}var S=L("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "),U=L("ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALIAS ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT ATTRIBUTE AUTHOR AUTO AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP BEFORE BELL BINARY BIT BITS BLANK BLINK BLOCK BOOLEAN BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-0 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EBCDIC EGI EJECT ELSE EMI EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE END-XML ENTER ENTRY ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL FILE-STREAM FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID INVOKE IS JUST JUSTIFIED KANJI KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE LOCALE LOCALLY LOCK MEMBER MEMORY MERGE MESSAGE METACLASS MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PARSE PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PREFIX PRESENT PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS RECURSIVE REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REPOSITORY REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO REVERSED REWIND REWRITE RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TYPE TYPEDEF UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING VLR WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE XML XML-CODE XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL "),P=L("- * ** / + < <= = > >= "),N={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,symbol:/[\w*+\-]/};function F(E,T){return E==="0"&&T.eat(/x/i)?(T.eatWhileLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
var k="error";function p(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var g=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,y=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,h=/^[_A-Za-z$][_A-Za-z$0-9]*/,w=/^@[_A-Za-z$][_A-Za-z$0-9]*/,z=p(["and","or","not","is","isnt","in","instanceof","typeof"]),l=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],a=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],x=p(l.concat(a));l=p(l);var b=/^('{3}|\"{3}|['\"])/,A=/^(\/{3}|\/)/,S=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],O=p(S);function u(e,n){if(e.sol()){n.scope.align===null&&(n.scope.align=!1);var i=n.scope.offset;if(e.eatSpace()){var f=e.indentation();return f>i&&n.scope.type=="coffee"?"indent":f<i?"dedent":null}else i>0&&v(e,n)}if(e.eatSpace())return null;var r=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return n.tokenize=R,n.tokenize(e,n);if(r==="#")return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var c=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(c=!0),e.match(/^-?\d+\.\d*/)&&(c=!0),e.match(/^-?\.\d+/)&&(c=!0),c)return e.peek()=="."&&e.backUp(1),"number";var o=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(o=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(o=!0),e.match(/^-?0(?![\dx])/i)&&(o=!0),o)return"number"}if(e.match(b))return n.tokenize=t(e.current(),!1,"string"),n.tokenize(e,n);if(e.match(A)){if(e.current()!="/"||e.match(/^.*\//,!1))return n.tokenize=t(e.current(),!0,"string.special"),n.tokenize(e,n);e.backUp(1)}return e.match(g)||e.match(z)?"operator":e.match(y)?"punctuation":e.match(O)?"atom":e.match(w)||n.prop&&e.match(h)?"property":e.match(x)?"keyword":e.match(h)?"variable":(e.next(),k)}function t(e,n,i){return function(f,r){for(;!f.eol();)if(f.eatWhile(/[^'"\/\\]/),f.eat("\\")){if(f.next(),n&&f.eol())return i}else{if(f.match(e))return r.tokenize=u,i;f.eat(/['"\/]/)}return n&&(r.tokenize=u),i}}function R(e,n){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){n.tokenize=u;break}e.eatWhile("#")}return"comment"}function d(e,n,i="coffee"){for(var f=0,r=!1,c=null,o=n.scope;o;o=o.prev)if(o.type==="coffee"||o.type=="}"){f=o.offset+e.indentUnit;break}i!=="coffee"?(r=null,c=e.column()+e.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:f,type:i,prev:n.scope,align:r,alignOffset:c}}function v(e,n){if(n.scope.prev)if(n.scope.type==="coffee"){for(var i=e.indentation(),f=!1,r=n.scope;r;r=r.prev)if(i===r.offset){f=!0;break}if(!f)return!0;for(;n.scope.prev&&n.scope.offset!==i;)n.scope=n.scope.prev;return!1}else return n.scope=n.scope.prev,!1}function E(e,n){var i=n.tokenize(e,n),f=e.current();f==="return"&&(n.dedent=!0),((f==="->"||f==="=>")&&e.eol()||i==="indent")&&d(e,n);var r="[({".indexOf(f);if(r!==-1&&d(e,n,"])}".slice(r,r+1)),l.exec(f)&&d(e,n),f=="then"&&v(e,n),i==="dedent"&&v(e,n))return k;if(r="])}".indexOf(f),r!==-1){for(;n.scope.type=="coffee"&&n.scope.prev;)n.scope=n.scope.prev;n.scope.type==f&&(n.scope=n.scope.prev)}return n.dedent&&e.eol()&&(n.scope.type=="coffee"&&n.scope.prev&&(n.scope=n.scope.prev),n.dedent=!1),i=="indent"||i=="dedent"?null:i}const Z={name:"coffeescript",startState:function(){return{tokenize:u,scope:{offset:0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,n){var i=n.scope.align===null&&n.scope;i&&e.sol()&&(i.align=!1);var f=E(e,n);return f&&f!="comment"&&(i&&(i.align=!0),n.prop=f=="punctuation"&&e.current()=="."),f},indent:function(e,n){if(e.tokenize!=u)return 0;var i=e.scope,f=n&&"])}".indexOf(n.charAt(0))>-1;if(f)for(;i.type=="coffee"&&i.prev;)i=i.prev;var r=f&&i.type===n.charAt(0);return i.align?i.alignOffset-(r?1:0):(r?i.prev:i).offset},languageData:{commentTokens:{line:"#"}}};export{Z as coffeeScript};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as o,X as w,N as c,O as g,Y as A,Z as S,$,a0 as M,a1 as L,a2 as k,j as x}from"./iframe-aoIC7NDi.js";var f="Collapsible",[F]=k(f),[U,v]=F(f),I=o.forwardRef((e,a)=>{const{__scopeCollapsible:l,open:s,defaultOpen:t,disabled:r,onOpenChange:i,...b}=e,[d,p]=w({prop:s,defaultProp:t??!1,onChange:i,caller:f});return c.jsx(U,{scope:l,disabled:r,contentId:A(),open:d,onOpenToggle:o.useCallback(()=>p(m=>!m),[p]),children:c.jsx(g.div,{"data-state":h(d),"data-disabled":r?"":void 0,...b,ref:a})})});I.displayName=f;var D="CollapsibleTrigger",O=o.forwardRef((e,a)=>{const{__scopeCollapsible:l,...s}=e,t=v(D,l);return c.jsx(g.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":h(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...s,ref:a,onClick:L(e.onClick,t.onOpenToggle)})});O.displayName=D;var N="CollapsibleContent",T=o.forwardRef((e,a)=>{const{forceMount:l,...s}=e,t=v(N,e.__scopeCollapsible);return c.jsx(S,{present:l||t.open,children:({present:r})=>c.jsx(V,{...s,ref:a,present:r})})});T.displayName=N;var V=o.forwardRef((e,a)=>{const{__scopeCollapsible:l,present:s,children:t,...r}=e,i=v(N,l),[b,d]=o.useState(s),p=o.useRef(null),m=$(a,p),R=o.useRef(0),y=R.current,_=o.useRef(0),E=_.current,C=i.open||b,P=o.useRef(C),u=o.useRef(void 0);return o.useEffect(()=>{const n=requestAnimationFrame(()=>P.current=!1);return()=>cancelAnimationFrame(n)},[]),M(()=>{const n=p.current;if(n){u.current=u.current||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName},n.style.transitionDuration="0s",n.style.animationName="none";const j=n.getBoundingClientRect();R.current=j.height,_.current=j.width,P.current||(n.style.transitionDuration=u.current.transitionDuration,n.style.animationName=u.current.animationName),d(s)}},[i.open,s]),c.jsx(g.div,{"data-state":h(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!C,...r,ref:m,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style},children:C&&t})});function h(e){return e?"open":"closed"}var B=I;function G({...e}){return x.jsxDEV(B,{"data-slot":"collapsible",...e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/collapsible.tsx",lineNumber:8,columnNumber:10},this)}function q({...e}){return x.jsxDEV(O,{"data-slot":"collapsible-trigger",...e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/collapsible.tsx",lineNumber:15,columnNumber:5},this)}function H({...e}){return x.jsxDEV(T,{"data-slot":"collapsible-content",...e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ui/collapsible.tsx",lineNumber:26,columnNumber:5},this)}G.__docgenInfo={description:"",methods:[],displayName:"Collapsible"};q.__docgenInfo={description:"",methods:[],displayName:"CollapsibleTrigger"};H.__docgenInfo={description:"",methods:[],displayName:"CollapsibleContent"};export{G as C,q as a,H as b};
|
||||
@@ -0,0 +1 @@
|
||||
var u=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,c=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,f=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,d=/[^\s'`,@()\[\]";]/,l;function i(e){for(var n;n=e.next();)if(n=="\\")e.next();else if(!d.test(n)){e.backUp(1);break}return e.current()}function o(e,n){if(e.eatSpace())return l="ws",null;if(e.match(f))return"number";var t=e.next();if(t=="\\"&&(t=e.next()),t=='"')return(n.tokenize=p)(e,n);if(t=="(")return l="open","bracket";if(t==")")return l="close","bracket";if(t==";")return e.skipToEnd(),l="ws","comment";if(/['`,@]/.test(t))return null;if(t=="|")return e.skipTo("|")?(e.next(),"variableName"):(e.skipToEnd(),"error");if(t=="#"){var t=e.next();return t=="("?(l="open","bracket"):/[+\-=\.']/.test(t)||/\d/.test(t)&&e.match(/^\d*#/)?null:t=="|"?(n.tokenize=x)(e,n):t==":"?(i(e),"meta"):t=="\\"?(e.next(),i(e),"string.special"):"error"}else{var r=i(e);return r=="."?null:(l="symbol",r=="nil"||r=="t"||r.charAt(0)==":"?"atom":n.lastType=="open"&&(u.test(r)||c.test(r))?"keyword":r.charAt(0)=="&"?"variableName.special":"variableName")}}function p(e,n){for(var t=!1,r;r=e.next();){if(r=='"'&&!t){n.tokenize=o;break}t=!t&&r=="\\"}return"string"}function x(e,n){for(var t,r;t=e.next();){if(t=="#"&&r=="|"){n.tokenize=o;break}r=t}return l="ws","comment"}const s={name:"commonlisp",startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:o}},token:function(e,n){e.sol()&&typeof n.ctx.indentTo!="number"&&(n.ctx.indentTo=n.ctx.start+1),l=null;var t=n.tokenize(e,n);return l!="ws"&&(n.ctx.indentTo==null?l=="symbol"&&c.test(e.current())?n.ctx.indentTo=n.ctx.start+e.indentUnit:n.ctx.indentTo="next":n.ctx.indentTo=="next"&&(n.ctx.indentTo=e.column()),n.lastType=l),l=="open"?n.ctx={prev:n.ctx,start:e.column(),indentTo:null}:l=="close"&&(n.ctx=n.ctx.prev||n.ctx),t},indent:function(e){var n=e.ctx.indentTo;return typeof n=="number"?n:e.ctx.start+1},languageData:{commentTokens:{line:";;",block:{open:"#|",close:"|#"}},closeBrackets:{brackets:["(","[","{",'"']}}};export{s as commonLisp};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{j as s,G as te,c as n,L as re,aH as oe,r as S,ab as v,B as ie,aI as $,J as C,aJ as ae,aK as T,aL as le,aM as ne,aN as ce,H as ue}from"./iframe-aoIC7NDi.js";import{I as B}from"./Identity-qezU2VU6.js";import{I as de,a as M}from"./IssueRow-C0pXSOHV.js";import{P as me}from"./plus-CDL1BsFh.js";import{M as pe}from"./minus-S7Yk3xbG.js";import{S as fe,A as be}from"./ApprovalCard-DsForM_Y.js";import{C as D,a as k,b as P,c as V,d as w}from"./card-CztzpO7x.js";import{I as Ne}from"./input-DeZ-mgkh.js";import{T as Z}from"./triangle-alert-XSXGBeLN.js";import{W as xe}from"./wallet-WSUTMqK7.js";import{C as he}from"./circle-pause-DnJAMYCY.js";import{P as q}from"./PriorityIcon-BJIUslvt.js";import{S as L}from"./StatusBadge-BRp0i6cu.js";import{B as m}from"./badge-CQZT8Hmw.js";import{C as ve}from"./clock-3-DibS2MoT.js";import{c as ge}from"./createLucideIcon-D2uUVdtm.js";import{C as ye}from"./circle-check-B6ZHio0H.js";import{W as je}from"./wallet-cards-Bwd8-yMp.js";import{I as Ee}from"./inbox-Yzkzd-Oo.js";import{E as Ue}from"./lightbulb-CWoAXyu4.js";import"./preload-helper-Dp1pzeXC.js";import"./avatar-Cx9l3K2h.js";import"./index-DUUcyzlS.js";import"./x-CIQWKcou.js";import"./shield-check-Do8XLHtm.js";import"./user-plus-Bh0OVGC-.js";import"./circle-x-D1djpUMR.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const De=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],ke=ge("git-pull-request",De);function H(e,t){const r=e==null?void 0:e[t];return Array.isArray(r)?r.filter(o=>!!o&&typeof o=="object"):[]}function z({label:e,icon:t,items:r,strikethrough:o}){return r.length===0?null:s.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsxDEV("span",{"aria-label":e,className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[t,s.jsxDEV("span",{className:"sr-only",children:e},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:31,columnNumber:7},this),r.map(i=>s.jsxDEV(de,{strikethrough:o,issue:{id:i.id,identifier:i.identifier??null,title:i.title??i.identifier??i.id}},`${e}:${i.id}`,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:39,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:30,columnNumber:5},this)}function ee({event:e}){const t=H(e.details,"addedReferencedIssues"),r=H(e.details,"removedReferencedIssues");return t.length===0&&r.length===0?null:s.jsxDEV("div",{className:"mt-2 space-y-1",children:[s.jsxDEV(z,{label:"Added references",icon:s.jsxDEV(me,{className:"h-3 w-3 text-green-600 dark:text-green-400","aria-hidden":"true"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:62,columnNumber:15},this),items:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:60,columnNumber:7},this),s.jsxDEV(z,{label:"Removed references",icon:s.jsxDEV(pe,{className:"h-3 w-3 text-red-600 dark:text-red-400","aria-hidden":"true"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:67,columnNumber:15},this),items:r,strikethrough:!0},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/IssueReferenceActivitySummary.tsx",lineNumber:59,columnNumber:5},this)}ee.__docgenInfo={description:"",methods:[],displayName:"IssueReferenceActivitySummary",props:{event:{required:!0,tsType:{name:"Pick",elements:[{name:"ActivityEvent"},{name:"literal",value:'"details"'}],raw:'Pick<ActivityEvent, "details">'},description:""}}};const Ve={"issue.created":"created","issue.updated":"updated","issue.checked_out":"checked out","issue.released":"released","issue.comment_added":"commented on","issue.comment_cancelled":"cancelled a queued comment on","issue.attachment_added":"attached file to","issue.attachment_removed":"removed attachment from","issue.document_created":"created document for","issue.document_updated":"updated document on","issue.document_deleted":"deleted document from","issue.commented":"commented on","issue.deleted":"deleted","agent.created":"created","agent.updated":"updated","agent.paused":"paused","agent.resumed":"resumed","agent.terminated":"terminated","agent.key_created":"created API key for","agent.budget_updated":"updated budget for","agent.runtime_session_reset":"reset session for","heartbeat.invoked":"invoked heartbeat for","heartbeat.cancelled":"cancelled heartbeat for","approval.created":"requested approval","approval.approved":"approved","approval.rejected":"rejected","project.created":"created","project.updated":"updated","project.deleted":"deleted","goal.created":"created","goal.updated":"updated","goal.deleted":"deleted","cost.reported":"reported cost for","cost.recorded":"recorded cost for","company.created":"created company","company.updated":"updated company","company.archived":"archived","company.budget_updated":"updated budget for"};function I(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function b(e){return typeof e!="string"?String(e??"none"):e.replace(/_/g," ")}function we(e){const t=I(e);return t?t.type==="agent"||t.type==="user":!1}function Ce(e){return I(e)!==null}function W(e,t){const r=e==null?void 0:e[t];return Array.isArray(r)?r.filter(we):[]}function O(e,t){const r=e==null?void 0:e[t];return Array.isArray(r)?r.filter(Ce):[]}function Be(e,t={}){var o;if(!e||e==="local-board")return"Board";if(t.currentUserId&&e===t.currentUserId)return"You";const r=(o=t.userProfileMap)==null?void 0:o.get(e);return r?r.label:`user ${e.slice(0,5)}`}function G(e,t){var r,o;if(e.type==="agent"){const i=e.agentId??"";return((o=(r=t.agentMap)==null?void 0:r.get(i))==null?void 0:o.name)??"agent"}return Be(e.userId,t)}function K(e){return e.identifier?e.identifier:e.title?e.title:e.id?e.id.slice(0,8)Line truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as V,l as $,d as lt}from"./mermaid.core-BRRy2yZG.js";import{c as tt}from"./cytoscape.esm-BQaXIfA_.js";import{aa as gt}from"./iframe-aoIC7NDi.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DrFu-skq.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,T){G.exports=T()})(ut,function(){return(function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)})([(function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototyLine truncated
|
||||
@@ -0,0 +1,41 @@
|
||||
import{r as s}from"./iframe-aoIC7NDi.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim();/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const C=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const f=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const i=t=>{const e=f(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const h=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const g=s.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:u,...c},p)=>s.createElement("svg",{ref:p,...w,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",n),...!a&&!h(c)&&{"aria-hidden":"true"},...c},[...u.map(([m,d])=>s.createElement(m,d)),...Array.isArray(a)?a:[a]]));/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const b=(t,e)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(g,{ref:a,iconNode:e,className:l(`lucide-${C(i(t))}`,`lucide-${t}`,o),...n}));return r.displayName=i(t),r};export{b as c};
|
||||
@@ -0,0 +1 @@
|
||||
function l(n,e){return new RegExp((e?"":"^")+"(?:"+n.join("|")+")"+(e?"$":"\\b"))}function o(n,e,r){return r.tokenize.push(n),n(e,r)}var v=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,z=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,g=/^(?:\[\][?=]?)/,b=/^(?:\.(?:\.{2})?|->|[?:])/,p=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,d=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,E=l(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),S=l(["true","false","nil","self"]),T=["def","fun","macro","class","module","struct","lib","enum","union","do","for"],A=l(T),s=["if","unless","case","while","until","begin","then"],O=l(s),x=["end","else","elsif","rescue","ensure"],K=l(x),I=["\\)","\\}","\\]"],D=new RegExp("^(?:"+I.join("|")+")$"),w={def:y,fun:y,macro:N,class:c,module:c,struct:c,lib:c,enum:c,union:c},k={"[":"]","{":"}","(":")","<":">"};function _(n,e){if(n.eatSpace())return null;if(e.lastToken!="\\"&&n.match("{%",!1))return o(f("%","%"),n,e);if(e.lastToken!="\\"&&n.match("{{",!1))return o(f("{","}"),n,e);if(n.peek()=="#")return n.skipToEnd(),"comment";var r;if(n.match(p))return n.eat(/[?!]/),r=n.current(),n.eat(":")?"atom":e.lastToken=="."?"property":E.test(r)?(A.test(r)?!(r=="fun"&&e.blocks.indexOf("lib")>=0)&&!(r=="def"&&e.lastToken=="abstract")&&(e.blocks.push(r),e.currentIndent+=1):(e.lastStyle=="operator"||!e.lastStyle)&&O.test(r)?(e.blocks.push(r),e.currentIndent+=1):r=="end"&&(e.blocks.pop(),e.currentIndent-=1),w.hasOwnProperty(r)&&e.tokenize.push(w[r]),"keyword"):S.test(r)?"atom":"variable";if(n.eat("@"))return n.peek()=="["?o(h("[","]","meta"),n,e):(n.eat("@"),n.match(p)||n.match(d),"propertyName");if(n.match(d))return"tag";if(n.eat(":"))return n.eat('"')?o(F('"',"atom",!1),n,e):n.match(p)||n.match(d)||n.match(v)||n.match(z)||n.match(g)?"atom":(n.eat(":"),"operator");if(n.eat('"'))return o(F('"',"string",!0),n,e);if(n.peek()=="%"){var t="string",u=!0,i;if(n.match("%r"))t="string.special",i=n.next();else if(n.match("%w"))u=!1,i=n.next();else if(n.match("%q"))u=!1,i=n.next();else if(i=n.match(/^%([^\w\s=])/))i=i[1];else{if(n.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(n.eat("%"))return"operator"}return k.hasOwnProperty(i)&&(i=k[i]),o(F(i,t,u),n,e)}return(r=n.match(/^<<-('?)([A-Z]\w*)\1/))?o(Z(r[2],!r[1]),n,e):n.eat("'")?(n.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),n.eat("'"),"atom"):n.eat("0")?(n.eat("x")?n.match(/^[0-9a-fA-F_]+/):n.eat("o")?n.match(/^[0-7_]+/):n.eat("b")&&n.match(/^[01_]+/),"number"):n.eat(/^\d/)?(n.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):n.match(v)?(n.eat("="),"operator"):n.match(z)||n.match(b)?"operator":(r=n.match(/[({[]/,!1))?(r=r[0],o(h(r,k[r],null),n,e)):n.eat("\\")?(n.next(),"meta"):(n.next(),null)}function h(n,e,r,t){return function(u,i){if(!t&&u.match(n))return i.tokenize[i.tokenize.length-1]=h(n,e,r,!0),i.currentIndent+=1,r;var a=_(u,i);return u.current()===e&&(i.tokenize.pop(),i.currentIndent-=1,a=r),a}}function f(n,e,r){return function(t,u){return!r&&t.match("{"+n)?(u.currentIndent+=1,u.tokenize[u.tokenize.length-1]=f(n,e,!0),"meta"):t.match(e+"}")?(u.currentIndent-=1,u.tokenize.pop(),"meta"):_(t,u)}}function N(n,e){if(n.eatSpace())return null;var r;if(r=n.match(p)){if(r=="def")return"keyword";n.eat(/[?!]/)}return e.tokenize.pop(),"def"}function y(n,e){return n.eatSpace()?null:(n.match(p)?n.eat(/[!?]/):n.match(v)||n.match(z)||n.match(g),e.tokenize.pop(),"def")}function c(n,e){return n.eatSpace()?null:(n.match(d),e.tokenize.pop(),"def")}function F(n,e,r){return function(t,u){for(var i=!1;t.peek();)if(i)t.next(),i=!1;else{if(t.match("{%",!1))return u.tokenize.push(f("%","%")),e;if(t.match("{{",!1))return u.tokenize.push(f("{","}")),e;if(r&&t.match("#{",!1))return u.tokenize.push(h("#{","}","meta")),e;var a=t.next();if(a==n)return u.tokenize.pop(),e;i=r&&a=="\\"}return e}}function Z(n,e){return function(r,t){if(r.sol()&&(r.eatSpace(),r.match(n)))return t.tokenize.pop(),"string";for(var u=!1;r.peek();)if(u)r.next(),u=!1;else{if(r.match("{%",!1))return t.tokenize.push(f("%","%")),"string";if(r.match("{{",!1))return t.tokenize.push(f("{","}")),"string";if(e&&r.match("#{",!1))return t.tokenize.push(h("#{","}","meta")),"string";u=r.next()=="\\"&&e}return"string"}}const P={name:"crystal",startState:function(){return{tokenize:[_],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(n,e){var r=e.tokenize[e.tokenize.length-1](n,e),t=n.current();return r&&r!="comment"&&(e.lastToken=t,e.lastStyle=r),r},indent:function(n,e,r){return e=e.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),K.test(e)||D.test(e)?r.unit*(n.curreLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
function y(i){i={...ae,...i};var l=i.inline,m=i.tokenHooks,b=i.documentTypes||{},G=i.mediaTypes||{},J=i.mediaFeatures||{},Q=i.mediaValueKeywords||{},O=i.propertyKeywords||{},F=i.nonStandardPropertyKeywords||{},R=i.fontProperties||{},ee=i.counterDescriptors||{},N=i.colorKeywords||{},V=i.valueKeywords||{},g=i.allowNested,re=i.lineComment,oe=i.supportsAtComponent===!0,W=i.highlightNonStandardPropertyKeywords!==!1,w,n;function c(e,o){return w=o,e}function ie(e,o){var r=e.next();if(m[r]){var t=m[r](e,o);if(t!==!1)return t}if(r=="@")return e.eatWhile(/[\w\\\-]/),c("def",e.current());if(r=="="||(r=="~"||r=="|")&&e.eat("="))return c(null,"compare");if(r=='"'||r=="'")return o.tokenize=$(r),o.tokenize(e,o);if(r=="#")return e.eatWhile(/[\w\\\-]/),c("atom","hash");if(r=="!")return e.match(/^\s*\w*/),c("keyword","important");if(/\d/.test(r)||r=="."&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),c("number","unit");if(r==="-"){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),c("number","unit");if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?c("def","variable-definition"):c("variableName","variable");if(e.match(/^\w+-/))return c("meta","meta")}else return/[,+>*\/]/.test(r)?c(null,"select-op"):r=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?c("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?c(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(o.tokenize=te),c("variableName.function","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),c("property","word")):c(null,null)}function $(e){return function(o,r){for(var t=!1,d;(d=o.next())!=null;){if(d==e&&!t){e==")"&&o.backUp(1);break}t=!t&&d=="\\"}return(d==e||!t&&e!=")")&&(r.tokenize=null),c("string","string")}}function te(e,o){return e.next(),e.match(/^\s*[\"\')]/,!1)?o.tokenize=null:o.tokenize=$(")"),c(null,"(")}function D(e,o,r){this.type=e,this.indent=o,this.prev=r}function s(e,o,r,t){return e.context=new D(r,o.indentation()+(t===!1?0:o.indentUnit),e.context),r}function u(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,o,r){return a[r.context.type](e,o,r)}function h(e,o,r,t){for(var d=t||1;d>0;d--)r.context=r.context.prev;return k(e,o,r)}function L(e){var o=e.current().toLowerCase();V.hasOwnProperty(o)?n="atom":N.hasOwnProperty(o)?n="keyword":n="variable"}var a={};return a.top=function(e,o,r){if(e=="{")return s(r,o,"block");if(e=="}"&&r.context.prev)return u(r);if(oe&&/@component/i.test(e))return s(r,o,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,o,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,o,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&e.charAt(0)=="@")return s(r,o,"at");if(e=="hash")n="builtin";else if(e=="word")n="tag";else{if(e=="variable-definition")return"maybeprop";if(e=="interpolation")return s(r,o,"interpolation");if(e==":")return"pseudo";if(g&&e=="(")return s(r,o,"parens")}return r.context.type},a.block=function(e,o,r){if(e=="word"){var t=o.current().toLowerCase();return O.hasOwnProperty(t)?(n="property","maybeprop"):F.hasOwnProperty(t)?(n=W?"string.special":"property","maybeprop"):g?(n=o.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(n="error","maybeprop")}else return e=="meta"?"block":!g&&(e=="hash"||e=="qualifier")?(n="error","block"):a.top(e,o,r)},a.maybeprop=function(e,o,r){return e==":"?s(r,o,"prop"):k(e,o,r)},a.prop=function(e,o,r){if(e==";")return u(r);if(e=="{"&&g)return s(r,o,"propBlock");if(e=="}"||e=="{")return h(e,o,r);if(e=="(")return s(r,o,"parens");if(e=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(o.current()))n="error";else if(e=="word")L(o);else if(e=="interpolation")return s(r,o,"interpolation");return"prop"},a.propBlock=function(e,o,r){return e=="}"?u(r):e=="word"?(n="property","maybeprop"):r.context.type},a.parens=function(e,o,r){return e=="{"||e=="}"?h(e,o,r):e==")"?u(r):e=="("?s(r,o,"parens"):e=="interpolation"?s(r,o,"interpolation"):(e=="word"&&L(o),"parens")},a.pseudo=function(e,o,r){return e=="meta"?"pseudo":e=="word"?(n="variableName.constant",r.context.type):k(e,o,r)},a.documentTypes=function(e,o,r){return e=="word"&&b.hasOwnProperty(o.current())?(n="tag",r.context.type):a.atBlock(e,o,r)},a.atBlock=function(e,o,r){if(e=="(")return s(r,o,"atBlock_parens");if(e=="}"||e==";")return h(e,o,r);if(e=="{")return u(r)&&s(r,o,g?"block":"top");if(e=="interpolation")return s(r,o,"interpolation");if(e=="word"){var t=o.current().toLowerCase();t=="only"||t=="not"||t=="and"||t=="or"?n="keyword":G.hasOwnProperty(t)?n="attribute":J.hasOwnProperty(t)?n="property":Q.hasOwnProperty(t)?n="keyword":O.hasOwnProperty(t)?n="property":F.hasOwnProperty(t)?n=W?"string.special":"property":V.hasOwnProperty(t)?n="atom":N.hasOwnProperty(t)?n="keyword":n="error"}return r.context.type},a.atComponentBlock=function(e,o,r){return e=="}"?h(e,o,r):e=="{"?u(r)&&s(r,Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
var l=function(n){return new RegExp("^(?:"+n.join("|")+")$","i")},p=function(n){i=null;var e=n.next();if(e==='"')return n.match(/^.*?"/),"string";if(e==="'")return n.match(/^.*?'/),"string";if(/[{}\(\),\.;\[\]]/.test(e))return i=e,"punctuation";if(e==="/"&&n.eat("/"))return n.skipToEnd(),"comment";if(u.test(e))return n.eatWhile(u),null;if(n.eatWhile(/[_\w\d]/),n.eat(":"))return n.eatWhile(/[\w\d_\-]/),"atom";var t=n.current();return d.test(t)?"builtin":f.test(t)?"def":h.test(t)||x.test(t)?"keyword":"variable"},o=function(n,e,t){return n.context={prev:n.context,indent:n.indent,col:t,type:e}},c=function(n){return n.indent=n.context.indent,n.context=n.context.prev},i,d=l(["abs","acos","allShortestPaths","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endnode","exp","extract","filter","floor","haversin","head","id","keys","labels","last","left","length","log","log10","lower","ltrim","max","min","node","nodes","percentileCont","percentileDisc","pi","radians","rand","range","reduce","rel","relationship","relationships","replace","reverse","right","round","rtrim","shortestPath","sign","sin","size","split","sqrt","startnode","stdev","stdevp","str","substring","sum","tail","tan","timestamp","toFloat","toInt","toString","trim","type","upper"]),f=l(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),h=l(["as","asc","ascending","assert","by","case","commit","constraint","create","csv","cypher","delete","desc","descending","detach","distinct","drop","else","end","ends","explain","false","fieldterminator","foreach","from","headers","in","index","is","join","limit","load","match","merge","null","on","optional","order","periodic","profile","remove","return","scan","set","skip","start","starts","then","true","union","unique","unwind","using","when","where","with","call","yield"]),x=l(["access","active","assign","all","alter","as","catalog","change","copy","create","constraint","constraints","current","database","databases","dbms","default","deny","drop","element","elements","exists","from","grant","graph","graphs","if","index","indexes","label","labels","management","match","name","names","new","node","nodes","not","of","on","or","password","populated","privileges","property","read","relationship","relationships","remove","replace","required","revoke","role","roles","set","show","start","status","stop","suspended","to","traverse","type","types","user","users","with","write"]),u=/[*+\-<>=&|~%^]/;const g={name:"cypher",startState:function(){return{tokenize:p,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=n.indentation()),n.eatSpace())return null;var t=e.tokenize(n,e);if(t!=="comment"&&e.context&&e.context.align==null&&e.context.type!=="pattern"&&(e.context.align=!0),i==="(")o(e,")",n.column());else if(i==="[")o(e,"]",n.column());else if(i==="{")o(e,"}",n.column());else if(/[\]\}\)]/.test(i)){for(;e.context&&e.context.type==="pattern";)c(e);e.context&&i===e.context.type&&c(e)}else i==="."&&e.context&&e.context.type==="pattern"?c(e):/atom|string|variable/.test(t)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",n.column()):e.context.type==="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return t},indent:function(n,e,t){var a=e&&e.charAt(0),r=n.context;if(/[\]\}]/.test(a))for(;r&&r.type==="pattern";)r=r.prev;var s=r&&a===r.type;return r?r.type==="keywords"?null:r.align?r.col+(s?0:1):r.indent+(s?0:t.unit):0}};export{g as cypher};
|
||||
@@ -0,0 +1,331 @@
|
||||
function Bs(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t<e;t++)a[t]=r[t];return a}function ec(r){if(Array.isArray(r))return r}function rc(r){if(Array.isArray(r))return Bs(r)}function ht(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function tc(r,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,jl(a.key),a)}}function gt(r,e,t){return e&&tc(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function kr(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Xs(r))||e){t&&(r=t);var a=0,n=function(){};return{s:n,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function Jl(r,e,t){return(e=jl(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ac(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function nc(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,s,o=[],l=!0,u=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(a=i.call(t)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){u=!0,n=v}finally{try{if(!l&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}function ic(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Je(r,e){return ec(r)||nc(r,e)||Xs(r,e)||ic()}function mn(r){return rc(r)||ac(r)||Xs(r)||sc()}function oc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function jl(r){var e=oc(r,"string");return typeof e=="symbol"?e:e+""}function ar(r){"@babel/helpers - typeof";return ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(r)}function Xs(r,e){if(r){if(typeof r=="string")return Bs(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Bs(r,e):void 0}}var rr=typeof window>"u"?null:window,To=rr?rr.navigator:null;rr&&rr.document;var uc=ar(""),ev=ar({}),lc=ar(function(){}),vc=typeof HTMLElement>"u"?"undefined":ar(HTMLElement),La=function(e){return e&&e.instanceString&&Ue(e.instanceString)?e.instanceString():null},ge=function(e){return e!=null&&ar(e)==uc},Ue=function(e){return e!=null&&ar(e)===lc},_e=function(e){return!Dr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Le=function(e){return e!=null&&ar(e)===ev&&!_e(e)&&e.constructor===Object},fc=function(e){return e!=null&&ar(e)===ev},ae=function(e){return e!=null&&ar(e)===ar(1)&&!isNaN(e)},cc=function(e){return ae(e)&&Math.floor(e)===e},bn=function(e){if(vc!=="undefined")return e!=null&&e instanceof HTMLElement},Dr=function(e){return Ia(e)||rv(e)},Ia=function(e){return La(e)==="collection"&&e._private.single},rv=function(e){return La(e)==="collection"&&!e._private.single},Ys=function(e){return La(e)==="core"},tv=function(e){return La(e)==="stylesheet"},dc=function(e){return La(e)==="event"},ut=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},hc=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},gc=function(e){return Le(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},pc=function(e){return fc(e)&&Ue(e.then)},yc=function(){return To&&To.userAgent.match(/msie|trident|edge/i)},Qt=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")});var a=function(){var i=this,s=arguments,o,l=t.apply(i,s),u=a.cache;return(o=u[l])||(o=u[l]=e.apply(i,s)),o};return a.cache={},a},Zs=Qt(function(r){return r.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Mn=Qt(function(r){return r.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),av=Qt(function(r,e){return r+e[0].toUpperCase()+e.substring(1)},function(r,e){return r+"$"+e}),So=function(e){return ut(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},at=function(e,t){return e.slice(-1*t.length)===t},tr="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",mc="rgb[a]?\\(("+tr+"[%]?)\\s*,\\s*("+tr+"[%]?)\\s*,\\s*("+tr+"[%]?)(?:\\s*,\\s*("+tr+"))?\\)",bc="rgb[a]?\\((?:"+tr+"[%]?)\\s*,\\s*(?:"+tr+"[%]?)\\s*,\\s*(?:"+tr+"[%]?)(?:\\s*,\\s*(?:"+tr+"))?\\)",wc="hsl[a]?\\(("+tr+")\\s*,\\s*("+tr+"[%])\\s*,\\s*("+tr+"[%])(?:\\s*,\\s*("+tr+"))?\\)",xc="hsl[a]?\\((?:"+tr+")\\s*,\\s*(?:"+tr+"[%])\\s*,\\s*(?:"+tr+"[%])(?:\\s*,\\s*(?:"+tr+"))?\\)",Ec="\\#[0-9a-fA-F]{3}",Cc="\\#[0-9a-fA-F]{6}",nv=function(e,t){return e<t?-1:e>t?1:0},Tc=function(e,t){return-1*nv(e,t)},be=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t<e.length;t++){var a=e[t];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];r[s]=a[s]}}return r},Sc=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var t=e.length===4,a,n,i,s=16;return t?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},kc=function(e){var t,a,n,i,s,o,l,u;function v(d,y,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?d+(y-d)*6*g:g<1/2?y:g<2/3?d+(y-d)*(2/3-g)*6:d}var f=new RegExp("^"+wc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}t=[o,l,u,s]}return t},Dc=function(e){var t,a=new RegExp("^"+mc+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;t.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)re
Line truncated
|
||||
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
|
||||
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
|
||||
Licensed under The MIT License (http://opensource.org/licenses/MIT)
|
||||
*/var Bv=0,Pv=1,Av=2,Nr=function(e){if(!(this instanceof Nr))return new Nr(e);this.id="Thenable/1.0.7",this.state=Bv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Nr.prototype={fulfill:function(e){return su(this,Pv,"fulfillValue",e)},reject:function(e){return su(this,Av,"rejectReason",e)},then:function(e,t){var a=this,n=new Nr;return a.onFulfilled.push(uu(e,n,"fulfill")),a.onRejected.push(uu(t,n,"reject")),Rv(a),n.proxy}};var su=function(e,t,a,n){return e.state===Bv&&(e.state=t,e[a]=n,Rv(e)),e},Rv=function(e){e.state===Pv?ou(e,"onFulfilled",e.fulfillValue):e.state===Av&&ou(e,"onRejected",e.rejectReason)},ou=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o<n.length;o++)n[o](a)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},uu=function(e,t,a){return function(n){if(typeof e!="function")t[a].call(t,n);else{var i;try{i=e(n)}catch(s){t.reject(s);return}Mv(t,i)}}},Mv=function(e,t){if(e===t||e.proxy===t){e.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(ar(t)==="object"&&t!==null||typeof t=="function")try{a=t.then}catch(i){e.reject(i);return}if(typeof a=="function"){var n=!1;try{a.call(t,function(i){n||(n=!0,i===t?e.reject(new TypeError("circular thenable chain")):Mv(e,i))},function(i){n||(n=!0,e.reject(i))})}catch(i){n||e.reject(i)}return}e.fulfill(t)};Nr.all=function(r){return new Nr(function(e,t){for(var a=new Array(r.length),n=0,i=function(l,u){a[l]=u,n++,n===r.length&&e(a)},s=0;s<r.length;s++)(function(o){var l=r[o],u=l!=null&&l.then!=null;if(u)l.then(function(f){i(o,f)},function(f){t(f)});else{var v=l;i(o,v)}})(s)})};Nr.resolve=function(r){return new Nr(function(e,t){e(r)})};Nr.reject=function(r){return new Nr(function(e,t){t(r)})};var ta=typeof Promise<"u"?Promise:Nr,Is=function(e,t,a){var n=Ys(e),i=!n,s=this._private=be({duration:1e3},t,a);if(s.target=e,s.style=s.style||s.css,s.started=!1,s.playing=!1,s.hooked=!1,s.applying=!1,s.progress=0,s.completes=[],s.frames=[],s.complete&&Ue(s.complete)&&s.completes.push(s.complete),i){var o=e.position();s.startPosition=s.startPosition||{x:o.x,y:o.y},s.startStyle=s.startStyle||e.cy().style().getAnimationStartStyle(e,s.style)}if(n){var l=e.pan();s.startPan={x:l.x,y:l.y},s.startZoom=e.zoom()}this.length=1,this[0]=this},Pt=Is.prototype;be(Pt,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t,a=e.target._private.animation;e.queue?t=a.queue:t=a.current,t.push(this),Dr(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return e===void 0?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,a=t.playing;return e===void 0?t.progress:(a&&this.pause(),t.progress=e,t.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var a=function(u,v){var f=e[u];f!=null&&(e[u]=e[v],e[v]=f)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var i=e.style[n],s=i.name,o=e.startStyle[s];e.startStyle[s]=i,e.style[n]=o}return t&&this.play(),this},promise:function(e){var t=this._private,a;switch(e){case"frame":a=t.frames;break;default:case"complete":case"completed":a=t.completes}return new ta(function(n,i){a.push(function(){n()})})}});Pt.complete=Pt.completed;Pt.run=Pt.play;Pt.running=Pt.playing;var Rh={animated:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return!1;var s=n[0];if(s)return s._private.animation.current.length>0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s<n.length;s++){var o=n[s];o._private.animation.queue=[]}return this}},delay:function(){return function(t,a){var n=this._private.cy||this;return n.styleEnabled()?this.animate({delay:t,duration:t,complete:a}):this}},delayAnimation:function(){return function(t,a){var n=this._private.cy||this;return n.styleEnabled()?this.animation({delay:t,duration:t,complete:a}):this}},animation:functLine truncated
|
||||
Event object based on jQuery events, MIT license
|
||||
|
||||
https://jquery.org/license/
|
||||
https://tldrlegal.com/license/mit-license
|
||||
https://github.com/jquery/jquery/blob/master/src/event.js
|
||||
*/var Xv=function(e,t){this.recycle(e,t)};function ca(){return!1}function en(){return!0}Xv.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=ca,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?en:ca):e!=null&&e.type?t=e:this.type=e,t!=null&&(this.originalEvent=t.originalEvent,this.type=t.type!=null?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=en;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=en;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=en,this.stopPropagation()},isDefaultPrevented:ca,isPropagationStopped:ca,isImmediatePropagationStopped:ca};var Yv=/^([^.]+)(\.(?:[^.]+))?$/,ip=".*",Zv={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},cl=Object.keys(Zv),sp={};function Gn(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sp,e=arguments.length>1?arguments[1]:void 0,t=0;t<cl.length;t++){var a=cl[t];this[a]=r[a]||Zv[a]}this.context=e||this.context,this.listeners=[],this.emitting=0}var dt=Gn.prototype,Qv=function(e,t,a,n,i,s,o){Ue(n)&&(i=n,n=null),o&&(s==null?s=o:s=be({},s,o));for(var l=_e(a)?a:a.split(/\s+/),u=0;u<l.length;u++){var v=l[u];if(!ut(v)){var f=v.match(Yv);if(f){var c=f[1],h=f[2]?f[2]:null,d=t(e,v,c,h,n,i,s);if(d===!1)break}}}},dl=function(e,t){return e.addEventFields(e.context,t),new Xv(t.type,t)},op=function(e,t,a){if(dc(a)){t(e,a);return}else if(Le(a)){t(e,dl(e,a));return}for(var n=_e(a)?a:a.split(/\s+/),i=0;i<n.length;i++){var s=n[i];if(!ut(s)){var o=s.match(Yv);if(o){var l=o[1],u=o[2]?o[2]:null,v=dl(e,{type:l,namespace:u,target:e.context});t(e,v)}}}};dt.on=dt.addListener=function(r,e,t,a,n){return Qv(this,function(i,s,o,l,u,v,f){Ue(v)&&i.listeners.push({event:s,callback:v,type:o,namespace:l,qualifier:u,conf:f})},r,e,t,a,n),this};dt.one=function(r,e,t,a){return this.on(r,e,t,a,{one:!0})};dt.removeListener=dt.off=function(r,e,t,a){var n=this;this.emitting!==0&&(this.listeners=Yc(this.listeners));for(var i=this.listeners,s=function(u){var v=i[u];Qv(n,function(f,c,h,d,y,g){if((v.type===h||r==="*")&&(!d&&v.namespace!==".*"||v.namespace===d)&&(!y||f.qualifierCompare(v.qualifier,y))&&(!g||v.callback===g))return i.splice(u,1),!1},r,e,t,a)},o=i.length-1;o>=0;o--)s(o);return this};dt.removeAllListeners=function(){return this.removeListener("*")};dt.emit=dt.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,_e(e)||(e=[e]),op(this,function(i,s){t!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:t}],n=a.length);for(var o=function(){var v=a[l];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===ip)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&Qc(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l<n;l++)o();i.bubble(i.context)&&!s.isPropagationStopped()&&i.parent(i.context).emit(s,e)},r),this.emitting--,this};var up={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&Ia(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},rn=function(e){return ge(e)?new ft(e):e},Jv={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],a=t._private;a.emitter||(a.emitter=new Gn(up,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,a){for(var n=rn(t),i=0;i<this.length;i++){var s=this[i];s.emitter().on(e,n,a)}return this},removeListener:function(e,t,a){for(var n=rn(t),i=0;i<this.length;i++){var s=this[i];s.emitter().removeListener(e,n,a)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var t=this[e];t.emitter().removeAllListeners()}return this},one:functioLine truncated
|
||||
`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,g=0;g<v.length;g++){var p=v[g],m=this.calculateLabelDimensions(r,p),b=m.width;if(h){var w=p.split("").join(u);p=w}if(b>f){var E=p.matchAll(y),C="",x=0,T=kr(E),k;try{for(T.s();!(k=T.n()).done;){var D=k.value,B=D[0],P=p.substring(x,D.index);x=D.index+B.length;var A=C.length===0?P:C+P+B,R=this.calculateLabelDimensions(r,A),L=R.width;L<=f?C+=P+B:(C&&d.push(C),C=P+B)}}catch(F){T.e(F)}finally{T.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(`
|
||||
`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var I=r.pstyle("text-max-width").pfValue,M="",O="…",V=!1;if(this.calculateLabelDimensions(r,n).width<I)return n;for(var G=0;G<n.length;G++){var N=this.calculateLabelDimensions(r,M+n[G]+O).width;if(N>I)break;M+=n[G],G===n.length-1&&(V=!0)}return V||(M+=O),M}return n};Gr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Gr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=0,s=r.pstyle("font-style").strValue,o=r.pstyle("font-size").pfValue,l=r.pstyle("font-family").strValue,u=r.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var h=0,d=0,y=e.split(`
|
||||
`),g=0;g<y.length;g++){var p=y[g],m=f.measureText(p),b=Math.ceil(m.width),w=o;h=Math.max(b,h),d+=w}return h+=i,d+=i,{width:h,height:d}};Gr.calculateLabelAngle=function(r,e){var t=r._private,a=t.rscratch,n=r.isEdge(),i=e?e+"-":"",s=r.pstyle(i+"text-rotation"),o=s.strValue;return o==="none"?0:n&&o==="autorotate"?a.labelAutoAngle:o==="autorotate"?0:s.pfValue};Gr.calculateLabelAngles=function(r){var e=this,t=r.isEdge(),a=r._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(r),t&&(n.sourceLabelAngle=e.calculateLabelAngle(r,"source"),n.targetLabelAngle=e.calculateLabelAngle(r,"target"))};var wf={},Ll=28,Il=!1;wf.getNodeShape=function(r){var e=this,t=r.pstyle("shape").value;if(t==="cutrectangle"&&(r.width()<Ll||r.height()<Ll))return Il||(Ve("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Il=!0),"rectangle";if(r.isParent())return t==="rectangle"||t==="roundrectangle"||t==="round-rectangle"||t==="cutrectangle"||t==="cut-rectangle"||t==="barrel"?t:"rectangle";if(t==="polygon"){var a=r.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return t};var Xn={};Xn.registerCalculationListeners=function(){var r=this.cy,e=r.collection(),t=this,a=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l<s.length;l++){var u=s[l],v=u._private,f=v.rstyle;f.clean=!1,f.cleanConnected=!1}};t.binder(r).on("bounds.* dirty.*",function(s){var o=s.target;a(o)}).on("style.* background.*",function(s){var o=s.target;a(o,!1)});var n=function(s){if(s){var o=t.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],v=u._private.rstyle;u.isNode()&&!v.cleanConnected&&(a(u.connectedEdges()),v.cleanConnected=!0)}if(o)for(var f=0;f<o.length;f++){var c=o[f];c(s,e)}t.recalculateRenderedStyle(e),e=r.collection()}};t.flushRenderedStyleQueue=function(){n(!0)},t.beforeRender(n,t.beforeRenderPriorities.eleCalcs)};Xn.onUpdateEleCalcs=function(r){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(r)};Xn.recalculateRenderedStyle=function(r,e){var t=function(w){return w._private.rstyle.cleanConnected};if(r.length!==0){var a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<r.length;i++){var s=r[i],o=s._private,l=o.rstyle;s.isEdge()&&(!t(s.source())||!t(s.target()))&&(l.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(b){return!b._private.rstyle.clean&&b.isBundledBezier()})&&(l.clean=!1),!(e&&l.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?n.push(s):a.push(s),l.clean=!0)}for(var u=0;u<n.length;u++){var v=n[u],f=v._private,c=f.rstyle,h=v.position();this.recalculateNodeLabelProjection(v),c.nodeX=h.x,c.nodeY=h.y,c.nodeW=v.pstyle("width").pfValue,c.nodeH=v.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var y=a[d],g=y._private,p=g.rstyle,m=g.rscratch;p.srcX=m.arrowStartX,p.srcY=m.arrowStartY,p.tgtX=m.arrowEndX,p.tgtY=m.arrowEndY,p.midX=m.midX,p.midY=m.midY,p.labelAngle=m.labelAngle,p.sourceLabelAngle=m.sourceLabelAngle,p.targetLabelAngle=m.targetLabelAngle}}}};var Yn={};Yn.updateCachedGrabbedEles=function(){var r=this.cachedZSortedEles;if(r){r.drag=[],r.nondrag=[];for(var e=[],t=0;t<r.length;t++){var a=r[t],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?r.drag.push(a):r.nondrag.push(a)}for(var t=0;t<e.length;t++){var a=e[t];r.drag.push(a)}}};Yn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Yn.getCachedZSortedEles=function(r){if(r||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(ef),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var xf={};[Mt,Bn,yr,Ga,yo,Gr,wf,Xn,Yn].forEach(function(r){be(xf,r)});var Ef={};Ef.getCachedImage=function(r,e,t){var a=this,n=a.imageCache=a.imageCache||{},i=n[r];if(i)return i.image.complete||i.image.addEventListener("load",t),i.image;i=n[r]=n[r]||{};var s=i.image=new Image;s.addEventListener("load",t),s.addEventListener("error",function(){s.error=!0});var o="data:",l=r.substring(0,o.length).toLowerCase()===o;return l||(e=e==="null"?null:e,s.crossOrigin=e),s.src=r,s};var ia={};ia.registerBinding=function(r,e,t,a){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(r)){for(var i=[],s=0;s<r.length;s++){var o=r[s];if(o!==void 0){var l=this.binder(o);i.push(l.on.apply(l,n))}}return i}var l=this.binder(r);return l.on.apply(l,n)};ia.binder=function(r){var e=this,t=e.cy.window(),a=r===t||r===t.document||r===t.document.body||hc(r);if(e.supportsPassiveEvents==null){var n=!1;try{var i=Object.defineProperty({},"passive",{get:function(){return n=!0,!0}});t.addEventListener("test",null,i)}catch{}e.supportsPassiveEvents=n}var s=function(l,u,v){var f=Array.prototype.slice.call(arguments);return a&&e.supportsPassiveEvents&&(f[2]={capture:v??!1,passive:!1,once:!1}),e.bindings.push({target:r,args:f})
Line truncated
|
||||
float circleSD(vec2 p, float r) {
|
||||
return distance(vec2(0), p) - r; // signed distance
|
||||
}
|
||||
`,um=`
|
||||
float rectangleSD(vec2 p, vec2 b) {
|
||||
vec2 d = abs(p)-b;
|
||||
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
|
||||
}
|
||||
`,lm=`
|
||||
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
|
||||
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
|
||||
cr.x = (p.y > 0.0) ? cr.x : cr.y;
|
||||
vec2 q = abs(p) - b + cr.x;
|
||||
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
|
||||
}
|
||||
`,vm=`
|
||||
float ellipseSD(vec2 p, vec2 ab) {
|
||||
p = abs( p ); // symmetry
|
||||
|
||||
// find root with Newton solver
|
||||
vec2 q = ab*(p-ab);
|
||||
float w = (q.x<q.y)? 1.570796327 : 0.0;
|
||||
for( int i=0; i<5; i++ ) {
|
||||
vec2 cs = vec2(cos(w),sin(w));
|
||||
vec2 u = ab*vec2( cs.x,cs.y);
|
||||
vec2 v = ab*vec2(-cs.y,cs.x);
|
||||
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
|
||||
}
|
||||
|
||||
// compute final point and distance
|
||||
float d = length(p-ab*vec2(cos(w),sin(w)));
|
||||
|
||||
// return signed distance
|
||||
return (dot(p/ab,p/ab)>1.0) ? d : -d;
|
||||
}
|
||||
`,Ea={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},An={IGNORE:1,USE_BB:2},Cs=0,Kl=1,Xl=2,Ts=3,_t=4,sn=5,ga=6,pa=7,fm=(function(){function r(e,t,a){ht(this,r),this.r=e,this.gl=t,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Hy,this.atlasManager=new im(e,a),this.batchManager=new sm(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Ea.SCREEN),this.pickingProgram=this._createShaderProgram(Ea.PICKING),this.vao=this._createVAO()}return gt(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addTextureAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"addSimpleShapeRenderType",value:function(t,a){this.simpleShapeOptions.set(t,a)}},{key:"invalidate",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(t,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var a=this.gl,n=`#version 300 es
|
||||
precision highp float;
|
||||
|
||||
uniform mat3 uPanZoomMatrix;
|
||||
uniform int uAtlasSize;
|
||||
|
||||
// instanced
|
||||
in vec2 aPosition; // a vertex from the unit square
|
||||
|
||||
in mat3 aTransform; // used to transform verticies, eg into a bounding box
|
||||
in int aVertType; // the type of thing we are rendering
|
||||
|
||||
// the z-index that is output when using picking mode
|
||||
in vec4 aIndex;
|
||||
|
||||
// For textures
|
||||
in int aAtlasId; // which shader unit/atlas to use
|
||||
in vec4 aTex; // x/y/w/h of texture in atlas
|
||||
|
||||
// for edges
|
||||
in vec4 aPointAPointB;
|
||||
in vec4 aPointCPointD;
|
||||
in vec2 aLineWidth; // also used for node border width
|
||||
|
||||
// simple shapes
|
||||
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
|
||||
in vec4 aColor; // also used for edges
|
||||
in vec4 aBorderColor; // aLineWidth is used for border width
|
||||
|
||||
// output values passed to the fragment shader
|
||||
out vec2 vTexCoord;
|
||||
out vec4 vColor;
|
||||
out vec2 vPosition;
|
||||
// flat values are not interpolated
|
||||
flat out int vAtlasId;
|
||||
flat out int vVertType;
|
||||
flat out vec2 vTopRight;
|
||||
flat out vec2 vBotLeft;
|
||||
flat out vec4 vCornerRadius;
|
||||
flat out vec4 vBorderColor;
|
||||
flat out vec2 vBorderWidth;
|
||||
flat out vec4 vIndex;
|
||||
|
||||
void main(void) {
|
||||
int vid = gl_VertexID;
|
||||
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
|
||||
|
||||
if(aVertType == `.concat(Cs,`) {
|
||||
float texX = aTex.x; // texture coordinates
|
||||
float texY = aTex.y;
|
||||
float texW = aTex.z;
|
||||
float texH = aTex.w;
|
||||
|
||||
if(vid == 1 || vid == 2 || vid == 4) {
|
||||
texX += texW;
|
||||
}
|
||||
if(vid == 2 || vid == 4 || vid == 5) {
|
||||
texY += texH;
|
||||
}
|
||||
|
||||
float d = float(uAtlasSize);
|
||||
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
||||
|
||||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||||
}
|
||||
else if(aVertType == `).concat(_t," || aVertType == ").concat(pa,`
|
||||
|| aVertType == `).concat(sn," || aVertType == ").concat(ga,`) { // simple shapes
|
||||
|
||||
// the bounding box is needed by the fragment shader
|
||||
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
|
||||
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
|
||||
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
|
||||
|
||||
// calculations are done in the fragment shader, just pass these along
|
||||
vColor = aColor;
|
||||
vCornerRadius = aCornerRadius;
|
||||
vBorderColor = aBorderColor;
|
||||
vBorderWidth = aLineWidth;
|
||||
|
||||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||||
}
|
||||
else if(aVertType == `).concat(Kl,`) {
|
||||
vec2 source = aPointAPointB.xy;
|
||||
vec2 target = aPointAPointB.zw;
|
||||
|
||||
// adjust the geometry so that the line is centered on the edge
|
||||
position.y = position.y - 0.5;
|
||||
|
||||
// stretch the unit square into a long skinny rectangle
|
||||
vec2 xBasis = target - source;
|
||||
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
||||
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
|
||||
|
||||
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
||||
vColor = aColor;
|
||||
}
|
||||
else if(aVertType == `).concat(Xl,`) {
|
||||
vec2 pointA = aPointAPointB.xy;
|
||||
vec2 pointB = aPointAPointB.zw;
|
||||
vec2 pointC = aPointCPointD.xy;
|
||||
vec2 pointD = aPointCPointD.zw;
|
||||
|
||||
// adjust the geometry so that the line is centered on the edge
|
||||
position.y = position.y - 0.5;
|
||||
|
||||
vec2 p0, p1, p2, pos;
|
||||
if(position.x == 0.0) { // The left side of the unit square
|
||||
p0 = pointA;
|
||||
p1 = pointB;
|
||||
p2 = pointC;
|
||||
pos = position;
|
||||
} else { // The right side of the unit square, use same approach but flip the geometry upside down
|
||||
p0 = pointD;
|
||||
p1 = pointC;
|
||||
p2 = pointB;
|
||||
pos = vec2(0.0, -position.y);
|
||||
}
|
||||
|
||||
vec2 p01 = p1 - p0;
|
||||
vec2 p12 = p2 - p1;
|
||||
vec2 p21 = p1 - p2;
|
||||
|
||||
// Find the normal vector.
|
||||
vec2 tangent = normalize(normalize(p12) + normalize(p01));
|
||||
vec2 normal = vec2(-tangent.y, tangent.x);
|
||||
|
||||
// Find the vector perpendicular to p0 -> p1.
|
||||
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
|
||||
|
||||
// Determine the bend direction.
|
||||
float sigma = sign(dot(p01 + p21, normal));
|
||||
float width = aLineWidth[0];
|
||||
|
||||
if(sign(pos.y) == -sigma) {
|
||||
// This is an intersecting vertex. Adjust the position so that there's no overlap.
|
||||
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
|
||||
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
||||
} else {
|
||||
// This is a non-intersecting vertex. Treat it like a mitre join.
|
||||
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
|
||||
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
||||
}
|
||||
|
||||
vColor = aColor;
|
||||
}
|
||||
else if(aVertType == `).concat(Ts,` && vid < 3) {
|
||||
// massage the first triangle into an edge arrow
|
||||
if(vid == 0)
|
||||
position = vec2(-0.15, -0.3);
|
||||
if(vid == 1)
|
||||
position = vec2( 0.0, 0.0);
|
||||
if(vid == 2)
|
||||
position = vec2( 0.15, -0.3);
|
||||
|
||||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||||
vColor = aColor;
|
||||
}
|
||||
else {
|
||||
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
|
||||
}
|
||||
|
||||
vAtlasId = aAtlasId;
|
||||
vVertType = aVertType;
|
||||
vIndex = aIndex;
|
||||
}
|
||||
`),i=this.batchManager.getIndexArray(),s=`#version 300 es
|
||||
precision highp float;
|
||||
|
||||
// declare texture unit for each texture atlas in the batch
|
||||
`.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(`
|
||||
`),`
|
||||
|
||||
uniform vec4 uBGColor;
|
||||
uniform float uZoom;
|
||||
|
||||
in vec2 vTexCoord;
|
||||
in vec4 vColor;
|
||||
in vec2 vPosition; // model coordinates
|
||||
|
||||
flat in int vAtlasId;
|
||||
flat in vec4 vIndex;
|
||||
flat in int vVertType;
|
||||
flat in vec2 vTopRight;
|
||||
flat in vec2 vBotLeft;
|
||||
flat in vec4 vCornerRadius;
|
||||
flat in vec4 vBorderColor;
|
||||
flat in vec2 vBorderWidth;
|
||||
|
||||
out vec4 outColor;
|
||||
|
||||
`).concat(om,`
|
||||
`).concat(um,`
|
||||
`).concat(lm,`
|
||||
`).concat(vm,`
|
||||
|
||||
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
|
||||
return vec4(
|
||||
top.rgb + (bot.rgb * (1.0 - top.a)),
|
||||
top.a + (bot.a * (1.0 - top.a))
|
||||
);
|
||||
}
|
||||
|
||||
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
|
||||
// scale to the zoom level so that borders don't look blurry when zoomed in
|
||||
// note 1.5 is an aribitrary value chosen because it looks good
|
||||
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
|
||||
}
|
||||
|
||||
void main(void) {
|
||||
if(vVertType == `).concat(Cs,`) {
|
||||
// look up the texel from the texture unit
|
||||
`).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(`
|
||||
else `),`
|
||||
}
|
||||
else if(vVertType == `).concat(Ts,`) {
|
||||
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
|
||||
outColor = blend(vColor, uBGColor);
|
||||
outColor.a = 1.0; // make opaque, masks out line under arrow
|
||||
}
|
||||
else if(vVertType == `).concat(_t,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
|
||||
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
|
||||
}
|
||||
else if(vVertType == `).concat(_t," || vVertType == ").concat(pa,`
|
||||
|| vVertType == `).concat(sn," || vVertType == ").concat(ga,`) { // use SDF
|
||||
|
||||
float outerBorder = vBorderWidth[0];
|
||||
float innerBorder = vBorderWidth[1];
|
||||
float borderPadding = outerBorder * 2.0;
|
||||
float w = vTopRight.x - vBotLeft.x - borderPadding;
|
||||
float h = vTopRight.y - vBotLeft.y - borderPadding;
|
||||
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
|
||||
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
|
||||
|
||||
float d; // signed distance
|
||||
if(vVertType == `).concat(_t,`) {
|
||||
d = rectangleSD(p, b);
|
||||
} else if(vVertType == `).concat(pa,` && w == h) {
|
||||
d = circleSD(p, b.x); // faster than ellipse
|
||||
} else if(vVertType == `).concat(pa,`) {
|
||||
d = ellipseSD(p, b);
|
||||
} else {
|
||||
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
|
||||
}
|
||||
|
||||
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
|
||||
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
|
||||
if(d > 0.0) {
|
||||
if(d > outerBorder) {
|
||||
discard;
|
||||
} else {
|
||||
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
|
||||
}
|
||||
} else {
|
||||
if(d > innerBorder) {
|
||||
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
|
||||
vec4 innerBorderColor = blend(vBorderColor, vColor);
|
||||
outColor = distInterp(innerBorderColor, outerColor, d);
|
||||
}
|
||||
else {
|
||||
vec4 outerColor;
|
||||
if(innerBorder == 0.0 && outerBorder == 0.0) {
|
||||
outerColor = vec4(0);
|
||||
} else if(innerBorder == 0.0) {
|
||||
outerColor = vBorderColor;
|
||||
} else {
|
||||
outerColor = blend(vBorderColor, vColor);
|
||||
}
|
||||
outColor = distInterp(vColor, outerColor, d - innerBorder);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
outColor = vColor;
|
||||
}
|
||||
|
||||
`).concat(t.picking?`if(outColor.a == 0.0) discard;
|
||||
else outColor = vIndex;`:"",`
|
||||
}
|
||||
`),o=Gy(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.aCornerRadius=a.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=a.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uZoom=a.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l<this.batchManager.getMaxAtlasesPerBatch();l++)o.uTextures.push(a.getUniformLocation(o,"uTexture".concat(l)));return o}},{key:"_createVAO",value:function(){var t=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=t.length/2;var a=this.maxInstances,n=this.gl,i=this.program,s=n.createVertexArray();return n.bindVertexArray(s),Qy(n,"vec2",i.aPosition,t),this.transformBuffer=Jy(n,a,i.aTransform),this.indexBuffer=Fr(n,a,"vec4",i.aIndex),this.vertTypeBuffer=Fr(n,a,"int",i.aVertType),this.atlasIdBuffer=Fr(n,a,"int",i.aAtlasId),this.texBuffer=Fr(n,a,"vec4",i.aTex),this.pointAPointBBuffer=Fr(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Fr(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=Fr(n,a,"vec2",i.aLineWidth),this.colorBuffer=Fr(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=Fr(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=Fr(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),s}},{key:"buffers",get:function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return at(a,"Buffer")}).map(function(a){return t[a]})),this._buffers}},{key:"startFrame",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ea.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,a){return t.visible()?a&&a.isVisible?a.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(n);if(this._isVisible(t,o)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(t);if(l===An.IGNORE)return;if(l==An.USE_BB){this.drawPickingRectangle(t,a,n);return}}var u=i.getAtlasInfo(t,n),v=kr(u),f;try{for(v.s();!(f=v.n()).done;){var c=f.value,h=c.atlas,d=c.tex1,y=c.tex2;s.canAddToCurrentBatch(h)||this.endBatch();for(var g=s.getAtlasIndexForBatch(h),p=0,m=[[d,!0],[y,!1]];p<m.length;p++){var b=Je(m[p],2),w=b[0],E=b[1];if(w.w!=0){var C=this.instanceCount;this.vertTypeBuffer.getView(C)[0]=Cs;var x=this.indexBuffer.getView(C);qt(a,x);var T=this.atlasIdBuffer.getView(C);T[0]=g;var k=this.texBuffer.getView(C);k[0]=w.x,k[1]=w.y,k[2]=w.w,k[3]=w.h;var D=this.transformBuffer.getMatrixView(C);this.setTransformMatrix(t,D,o,c,E),this.instanceCount++,E||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(B){v.e(B)}finally{v.f()}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),i){var l=i.bb,u=i.tex1,v=i.tex2,f=u.w/(u.w+v.w);s||(f=1-f);var c=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(a,c,n,t)}else{var h=n.getBoundingBox(t),d=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(a,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var s,o;$l(t);var l=n.getRotation?n.getRotation(i):0;if(l!==0){var u=n.getRotationPoint(i),v=u.x,f=u.y;yn(t,t,[v,f]),Ul(t,t,l);var c=n.getRotationOffset(i);s=c.x+(a.xOffset||0),o=c.y+(a.yOffset||0)}else s=a.x1,o=a.y1;yn(t,t,[s,o]),Ws(t,t,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(t,a,n,i){var s=t.x1,o=t.y1,l=t.w,u=t.h,v=t.yOffset;a&&(s-=a,o-=a,l+=2*a,u+=2*a);var f=0,c=l*i;return n&&i<1?l=c:!n&&i<1&&(f=l-c,s+=f,l=c),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:v}}},{key:"drawPickingRectangle",value:function(t,a,n){var i=this.atlasManager.getRenderTypeOpts(n),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=_t;var o=this.indexBuffer.getView(s);qt(a,o);var l=this.colorBuffer.getView(s);xt([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,u,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(t,i)){var s=i.shapeProps,o=this._getVertTypeForShape(t,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(t)){this.drawTexture(t,a,n);return}var l=
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
function c(e){for(var n={},t=e.split(" "),i=0;i<t.length;++i)n[t[i]]=!0;return n}var s="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";const l={keywords:c("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters "+s),blockKeywords:c(s),builtin:c("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),atoms:c("exit failure success true false null"),hooks:{"@":function(e,n){return e.eatWhile(/[\w\$_]/),"meta"}}};var w=l.statementIndentUnit,v=l.keywords,x=l.builtin,d=l.blockKeywords,g=l.atoms,p=l.hooks,_=l.multiLineStrings,h=/[+\-*&%=<>!?|\/]/,o;function m(e,n){var t=e.next();if(p[t]){var i=p[t](e,n);if(i!==!1)return i}if(t=='"'||t=="'"||t=="`")return n.tokenize=z(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"){if(e.eat("+"))return n.tokenize=k,k(e,n);if(e.eat("*"))return n.tokenize=y,y(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(h.test(t))return e.eatWhile(h),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();return v.propertyIsEnumerable(r)?(d.propertyIsEnumerable(r)&&(o="newstatement"),"keyword"):x.propertyIsEnumerable(r)?(d.propertyIsEnumerable(r)&&(o="newstatement"),"builtin"):g.propertyIsEnumerable(r)?"atom":"variable"}function z(e){return function(n,t){for(var i=!1,r,u=!1;(r=n.next())!=null;){if(r==e&&!i){u=!0;break}i=!i&&r=="\\"}return(u||!(i||_))&&(t.tokenize=null),"string"}}function y(e,n){for(var t=!1,i;i=e.next();){if(i=="/"&&t){n.tokenize=null;break}t=i=="*"}return"comment"}function k(e,n){for(var t=!1,i;i=e.next();){if(i=="/"&&t){n.tokenize=null;break}t=i=="+"}return"comment"}function b(e,n,t,i,r){this.indented=e,this.column=n,this.type=t,this.align=i,this.prev=r}function f(e,n,t){var i=e.indented;return e.context&&e.context.type=="statement"&&(i=e.context.indented),e.context=new b(i,n,t,null,e.context)}function a(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const E={name:"d",startState:function(e){return{tokenize:null,context:new b(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var i=(n.tokenize||m)(e,n);if(i=="comment"||i=="meta")return i;if(t.align==null&&(t.align=!0),(o==";"||o==":"||o==",")&&t.type=="statement")a(n);else if(o=="{")f(n,e.column(),"}");else if(o=="[")f(n,e.column(),"]");else if(o=="(")f(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=a(n);for(t.type=="}"&&(t=a(n));t.type=="statement";)t=a(n)}else o==t.type?a(n):((t.type=="}"||t.type=="top")&&o!=";"||t.type=="statement"&&o=="newstatement")&&f(n,e.column(),"statement");return n.startOfLine=!1,i},indent:function(e,n,t){if(e.tokenize!=m&&e.tokenize!=null)return null;var i=e.context,r=n&&n.charAt(0);i.type=="statement"&&r=="}"&&(i=i.prev);var u=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:w||t.unit):i.align?i.column+(u?0:1):i.indented+(u?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{E as d};
|
||||
@@ -0,0 +1,4 @@
|
||||
import{_ as X,aw as F,ax as Y,ay as _,az as H,l as i,c as V,aA as z,aB as U,ai as $,an as q,aj as P,ah as K,aC as Q,aD as W,aE as Z}from"./mermaid.core-BRRy2yZG.js";import{G as B}from"./graph-BX-ooOdw.js";import{l as I}from"./layout-Bph3hc0I.js";import{i as x}from"./_baseUniq-7kyoN_aU.js";import{c as L}from"./clone-BASZBmHw.js";import{m as A}from"./_basePickBy-BopQxIEc.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";function E(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return x(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return x(n)||(c.value=n),x(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return x(t.name)||(o.name=t.name),x(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=X(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",E(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,E(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(Line truncated
|
||||
Node.id = `,d,`
|
||||
data=`,w.height,`
|
||||
Parent cluster`,c.height),t.setNode(c.id,w),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,w))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:w,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:w+25,nodesep:m});const N=await j(g,s.graph,n,o,t.node(d),a),S=N.elem;z(s,S),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(S,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(E(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(E(t)));let y=0,{subGraphTitleTotalMargin:p}=q(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=p,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=p,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,N=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=N-m||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",m),await K(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=p/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=p/2);const w=t.node(d.v);var m=t.node(d.w);const N=Q(v,s,f,n,w,m,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(y=s.diff)}),i.warn("Returning from recursive render XAX",u,y),{elem:u,diff:y}},"recursiveRender"),he=X(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const h=g.start,y=h+"---"+h+"---1",p=h+"---"+h+"---2",d=n.node(h);n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(y,d.parentId),n.setNode(p,{domId:p,id:p,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(p,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=h+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=h+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=h,m.toCluster=h),m.id=h+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(h,y,s,h+"-cyclic-special-0"),n.setEdge(y,p,w,h+"-cyclic-special-1"),n.setEdge(p,h,m,h+"-cyc<lic-special-2")}else n.setEdge(g.start,g.end,{...g},g.id)}),i.warn("Graph at first:",JSON.stringify(E(n))),re(n),i.warn("Graph after XAX:",JSON.stringify(E(n)));const c=V();await j(o,n,e.type,e.diagramId,void 0,c)},"render");export{he as render};
|
||||
@@ -0,0 +1,143 @@
|
||||
import{j as e,r as p,c as P,L as Be,B as J,u as He,h as ht,l as ai,q as F,b3 as oi,aQ as xr,V as ni,aR as li,E as ci,bf as di,P as mi,b as ui,d as pi,bg as fi,a7 as bi,aI as Ni,H as hi,bh as qt,b1 as Bt}from"./iframe-aoIC7NDi.js";import{C as xi}from"./CompanyPatternIcon-B7N9Y189.js";import{B as ue}from"./badge-CQZT8Hmw.js";import{X as gr}from"./x-CIQWKcou.js";import{K as gi,P as vi}from"./PageSkeleton-DjhuUHyA.js";import{h as mt}from"./heartbeats-R23LJy38.js";import{I as yi}from"./Identity-qezU2VU6.js";import{R as Ei}from"./RunChatSurface-BY0lSkJs.js";import{S as vr}from"./StatusBadge-BRp0i6cu.js";import{u as Di}from"./IssueChatThread-Do6zl-jD.js";import{S as ji}from"./square-CTiUZDc0.js";import{E as Ui}from"./external-link-DMByQIwj.js";import{g as Kt}from"./goals-D-NT3Fiq.js";import{a as ge}from"./agents-CZiu7Lc2.js";import{a as ki}from"./approvals-YB1A_oFv.js";import{p as Vi}from"./projects-nEl7sKWu.js";import{D as wi,l as Ai,g as xt,C as ve}from"./dialog-6DTSoM1_.js";import{u as zi,e as $t,c as Ci}from"./use-disabled-adapters-BvVPjiIT.js";import{l as Oi,a as Ht,b as Gt,c as Yt,g as Qt,D as Si}from"./registry-7D9NZbk8.js";import{d as $e,u as Wi}from"./use-adapter-capabilities-CyVDSXkx.js";import{g as Ri}from"./agent-config-primitives-DS6dQaBU.js";import{c as Ge}from"./createLucideIcon-D2uUVdtm.js";import{B as Ke}from"./message-square-CCO5PzL9.js";import{L as ut}from"./list-todo-DgOSZ75Z.js";import{R as Xt,c as Pi}from"./AgentIconPicker-B29UI7uB.js";import{A as Ti}from"./arrow-left-ZjUXM4Oc.js";import{L as ie}from"./PathInstructionsModal-D4Fgn9Ki.js";import{A as ye}from"./arrow-right-BmL7S7RJ.js";import{F as _i}from"./folder-open-D-CLSWj-.js";import{F as Ii}from"./file-text-SDab8dIE.js";import{A as yr}from"./archive-CZm0MlFR.js";import{C as vt,a as yt,b as Et,c as Er,d as Dt}from"./card-CztzpO7x.js";import{C as Mi}from"./clock-3-DibS2MoT.js";import{P as Li}from"./play-DGAXIo5V.js";import{F as Fi}from"./folder-kanban-Bkqc5zob.js";import{C as qi}from"./circle-check-B6ZHio0H.js";import{S as Bi}from"./shield-check-Do8XLHtm.js";import"./preload-helper-Dp1pzeXC.js";import"./sortable.esm-1LKzu1X4.js";import"./PriorityIcon-BJIUslvt.js";import"./minus-S7Yk3xbG.js";import"./triangle-alert-XSXGBeLN.js";import"./skeleton-B0nw-fyt.js";import"./avatar-Cx9l3K2h.js";import"./index-DUUcyzlS.js";import"./recent-selections-CD1WKLHy.js";import"./dropdown-menu-DRraIghT.js";import"./MarkdownBody-suYvEMx0.js";import"./MarkdownEditor-BtfKiA3v.js";import"./index-BWXhrlcm.js";import"./InlineEntitySelector-BOnceYYg.js";import"./textarea-CGN-n--7.js";import"./circle-x-D1djpUMR.js";import"./copy-CPgBejOM.js";import"./ellipsis-BM07d3s-.js";import"./circle-pause-DnJAMYCY.js";import"./paperclip-B7aTkTtY.js";import"./thumbs-up-DOKJqPYr.js";import"./workspace-runtime-control-B3oohsJh.js";import"./lightbulb-CWoAXyu4.js";import"./toggle-switch-D46zFA7i.js";import"./input-DeZ-mgkh.js";import"./database-Dx6aEk21.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ki=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],pt=Ge("building-2",Ki);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const $i=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],Dr=Ge("file-code-corner",$i);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Hi=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Gi=Ge("folder",Hi);/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Yi=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Qi=Ge("list-filter",Yi);function pe(){return Array.from({length:14},(t,s)=>{const r=new Date;return r.setDate(r.getDate()-(13-s)),r.toISOString().slice(0,10)})}function Xi(t){const s=new Date(t+"T12:00:00");return`${s.getMonth()+1}/${s.getDate()}`}function Ye({days:t}){return e.jsxDEV("div",{className:"flex gap-[3px] mt-1.5",children:t.map((s,r)=>e.jsxDEV("div",{className:"flex-1 text-center",children:r===0||r===6||r===13?e.jsxDEV("span",{className:"text-[9px] text-muted-foreground tabular-nums",children:Xi(s)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:26,columnNumber:13},this):null},s,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:24,columnNumber:9},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:22,columnNumber:5},this)}function jr({items:t}){return e.jsxDEV("div",{className:"flex flex-wrap gap-x-2.5 gap-y-0.5 mt-2",children:t.map(s=>e.jsxDEV("span",{className:"flex items-center gap-1 text-[9px] text-muted-foreground",children:[e.jsxDEV("span",{className:"h-1.5 w-1.5 rounded-full shrink-0",style:{backgroundColor:s.color}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:39,columnNumber:11},this),s.label]},s.label,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:38,columnNumber:9},this))},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:36,columnNumber:5},this)}function me({title:t,subtitle:s,children:r}){return e.jsxDEV("div",{className:"border border-border rounded-lg p-4 space-y-3",children:[e.jsxDEV("div",{children:[e.jsxDEV("h3",{className:"text-xs font-medium text-muted-foreground",children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:51,columnNumber:9},this),s&&e.jsxDEV("span",{className:"text-[10px] text-muted-foreground/60",children:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:52,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:50,columnNumber:7},this),r]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:49,columnNumber:5},this)}function Ji(t=[]){const s=pe(),r=new Map;for(const c of s)r.set(c,{date:c,succeeded:0,failed:0,other:0,total:0});for(const c of t){const b=new Date(c.createdAt).toISOString().slice(0,10),n=r.get(b);n&&(c.status==="succeeded"?n.succeeded++:c.status==="failed"||c.status==="timed_out"?n.failed++:n.other++,n.total++)}return Array.from(r.values())}function Ur(t){return Array.isArray(t.activity)?t.activity:Array.isArray(t.runs)?Ji(t.runs):[]}function kr(t){const s=Ur(t),r=s.length>0?s.map(a=>a.date):pe(),c=new Map(s.map(a=>[a.date,a])),b=Math.max(...s.map(a=>a.total),1);return s.some(a=>a.total>0)?e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"flex items-end gap-[3px] h-20",children:r.map(a=>{const o=c.get(a)??{succeeded:0,failed:0,other:0,total:0},u=o.total,m=u/b*100;return e.jsxDEV("div",{className:"flex-1 h-full flex flex-col justify-end",title:`${a}: ${u} runs`,children:u>0?e.jsxDEV("div",{className:"flex flex-col-reverse gap-px overflow-hidden",style:{height:`${m}%`,minHeight:2},children:[o.succeeded>0&&e.jsxDEV("div",{className:"bg-emerald-500",style:{flex:o.succeeded}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:108,columnNumber:43},this),o.failed>0&&e.jsxDEV("div",{className:"bg-red-500",style:{flex:o.failed}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:109,columnNumber:40},this),o.other>0&&e.jsxDEV("div",{className:"bg-neutral-500",style:{flex:o.other}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:110,columnNumber:39},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:107,columnNumber:17},this):e.jsxDEV("div",{className:"bg-muted/30 rounded-sm",style:{height:2}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:113,columnNumber:17},this)},a,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:105,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:99,columnNumber:7},this),e.jsxDEV(Ye,{days:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:119,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/ActivityCharts.tsx",lineNumber:98,columnNumber:5},this):e.jsxDEV("p",{className:"text-xs text-muted-foreground",children:"No runs yet"},void 0,!1,{fileName:"/Users/dot
Line truncated
|
||||
`);r.textContent=A,q=A}function _(){const D=Ee[Math.floor(Math.random()*Ee.length)],k=sa(D),L=Math.random();let A=0,E=0,l=0,h=0;L<.68?(A=Math.random()<.5?-k.width-1:u+1,E=Math.random()*Math.max(1,m-k.height),l=A<0?.04+Math.random()*.05:-(.04+Math.random()*.05),h=(Math.random()-.5)*.014):(A=Math.random()*Math.max(1,u-k.width),E=Math.random()<.5?-k.height-1:m+1,l=(Math.random()-.5)*.014,h=E<0?.028+Math.random()*.034:-(.028+Math.random()*.034)),W.push({x:A,y:E,vx:l,vy:h,life:0,maxLife:260+Math.random()*220,drift:(Math.random()-.5)*1.2,sprite:D,width:k.width,height:k.height})}function ee(D,k){const L=Math.round(D.x),A=Math.round(D.y);for(let E=0;E<D.sprite.length;E++){const l=D.sprite[E],h=A+E;if(!(h<0||h>=m))for(let U=0;U<l.length;U++){const z=l[U]??" ";if(z===" ")continue;const I=L+U;if(I<0||I>=u)continue;const B=h*u+I,te=z==="│"||z==="─"?.8:.92;v[B]=Math.max(v[B]??0,k*te),O[B]=z.charCodeAt(0)}}}function R(D){if(!n||(s.current=requestAnimationFrame(R),D-a<ta||u<=0||m<=0))return;const k=Math.min(2,a===0?1:(D-a)/16.6667);a=D,o+=k;const L=u*m,A=Math.max(3,Math.floor(L/2200));for(;W.length<A;)_();for(let l=0;l<v.length;l++)v[l]*=.92;O.fill(0);for(let l=W.length-1;l>=0;l--){const h=W[l];h.life+=k;const U=Math.sin((h.y+h.drift+o*.12)*.09)*.0018,z=Math.cos((h.x-h.drift-o*.09)*.08)*.0014;if(h.vx=(h.vx+U)*.998,h.vy=(h.vy+z)*.998,h.x+=h.vx*k,h.y+=h.vy*k,h.life>=h.maxLife||h.x<-h.width-2||h.x>u+2||h.y<-h.height-2||h.y>m+2){W.splice(l,1);continue}const I=h.life/h.maxLife,B=I<.12?I/.12:I>.88?(1-I)/.12:1;ee(h,B)}for(let l=0;l<u;l++)N[l]=Math.sin(l*.08+o*.06);for(let l=0;l<m;l++)j[l]=Math.cos(l*.1-o*.05);let E="";for(let l=0;l<m;l++){for(let h=0;h<u;h++){const U=l*u+h,z=O[U];if(z>0){E+=String.fromCharCode(z);continue}const I=(N[h]+j[l])*.08+.1,B=Math.max(v[U]??0,I*.45);E+=y(B)}l<m-1&&(E+=`
|
||||
`)}E!==q&&(r.textContent=E,q=E)}function S(){const D=u>0&&m>0;if(c.matches){n&&(n=!1,s.current!==null&&cancelAnimationFrame(s.current),s.current=null),D&&w();return}if(!b||!D){n&&(n=!1,s.current!==null&&cancelAnimationFrame(s.current),s.current=null);return}n||(n=!0,a=0,s.current=requestAnimationFrame(R))}const K=new ResizeObserver(()=>{const D=ss(r);g=D.w,f=D.h,T(),S()});K.observe(r);const M=()=>{b=document.visibilityState!=="hidden",S()};document.addEventListener("visibilitychange",M);const X=()=>{S()};c.addEventListener("change",X);const G=ss(r);return g=G.w,f=G.h,T(),S(),()=>{n=!1,s.current!==null&&cancelAnimationFrame(s.current),K.disconnect(),document.removeEventListener("visibilitychange",M),c.removeEventListener("change",X)}},[]),e.jsxDEV("pre",{ref:t,className:"w-full h-full m-0 p-0 overflow-hidden text-muted-foreground/60 select-none leading-none",style:{fontSize:"11px",fontFamily:"monospace"},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/AsciiArtAnimation.tsx",lineNumber:341,columnNumber:5},this)}jt.__docgenInfo={description:"",methods:[],displayName:"AsciiArtAnimation"};function Ut({leading:t,identifier:s,title:r,subtitle:c,trailing:b,selected:n,to:a,onClick:o,className:u}){const g=P("flex items-center gap-3 px-4 py-2 text-sm border-b border-border last:border-b-0 transition-colors",!!(a||o)&&"cursor-pointer hover:bg-accent/50",n&&"bg-accent/30",u),f=e.jsxDEV(e.Fragment,{children:[t&&e.jsxDEV("div",{className:"flex items-center gap-2 shrink-0",children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:38,columnNumber:19},this),e.jsxDEV("div",{className:"flex-1 min-w-0",children:[e.jsxDEV("div",{className:"flex items-center gap-2",children:[s&&e.jsxDEV("span",{className:"text-xs text-muted-foreground font-mono shrink-0 relative top-[1px]",children:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:42,columnNumber:13},this),e.jsxDEV("span",{className:"truncate",children:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:46,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:40,columnNumber:9},this),c&&e.jsxDEV("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:c},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:49,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:39,columnNumber:7},this),b&&e.jsxDEV("div",{className:"flex items-center gap-2 shrink-0",children:b},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:52,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:37,columnNumber:5},this);return a?e.jsxDEV(Be,{to:a,className:P(g,"no-underline text-inherit"),onClick:o,children:f},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:58,columnNumber:7},this):e.jsxDEV("div",{className:g,onClick:o,children:f},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/EntityRow.tsx",lineNumber:65,columnNumber:5},this)}Ut.__docgenInfo={description:"",methods:[],displayName:"EntityRow",props:{leading:{required:!1,tsType:{name:"ReactNode"},description:""},identifier:{required:!1,tsType:{name:"string"},description:""},title:{required:!0,tsType:{name:"string"},description:""},subtitle:{required:!1,tsType:{name:"string"},description:""},trailing:{required:!1,tsType:{name:"ReactNode"},description:""},selected:{required:!1,tsType:{name:"boolean"},description:""},to:{required:!1,tsType:{name:"string"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},className:{required:!1,tsType:{name:"string"},description:""}}};function zr({filters:t,onRemove:s,onClear:r}){return t.length===0?null:e.jsxDEV("div",{className:"flex items-center gap-2 flex-wrap",children:[t.map(c=>e.jsxDEV(ue,{variant:"secondary",className:"gap-1 pr-1",children:[e.jsxDEV("span",{className:"text-muted-foreground",children:[c.label,":"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/FilterBar.tsx",lineNumber:24,columnNumber:11},this),e.jsxDEV("span",{children:c.value},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/FilterBar.tsx",lineNumber:25,columnNumber:11},this),e.jsxDEV("button",{className:"ml-1 rounded-full hover:bg-accent p-0.5",onClick:()=>s(c.key),children:e.jsxDEV(gr,{className:"h-3 w-3"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/FilterBar.tsx",lineNumber:30,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/FilterBar.tsx",lineNumber:26,columnNumber:11},this)]},c.key,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/FilterBar.tsx",lineNumber:23,columnNumber:9},this)),e.jsx
Line truncated
|
||||
`).trim();return{title:b,description:n.length>0?n:null}}const aa="Onboarding";function rs(t){const s=t.createdAt instanceof Date?t.createdAt:new Date(t.createdAt);return Number.isNaN(s.getTime())?0:s.getTime()}function bt(t){return[...t].sort((s,r)=>rs(s)-rs(r))[0]??null}function oa(t){var b,n,a;const s=t.filter(o=>o.level==="company"),r=s.filter(o=>!o.parentId),c=r.filter(o=>o.status==="active");return((b=bt(c))==null?void 0:b.id)??((n=bt(r))==null?void 0:n.id)??((a=bt(s))==null?void 0:a.id)??null}function na(t){return{name:aa,status:"in_progress",...t?{goalIds:[t]}:{}}}function la(t){const s=t.title.trim(),r=t.description.trim();return{title:s,...r?{description:r}:{},assigneeAgentId:t.assigneeAgentId,projectId:t.projectId,...t.goalId?{goalId:t.goalId}:{},status:"todo"}}function ca(t){return{heartbeat:{enabled:(t==null?void 0:t.heartbeatEnabled)??$e.heartbeatEnabled,intervalSec:(t==null?void 0:t.intervalSec)??$e.intervalSec,wakeOnDemand:!0,cooldownSec:10,maxConcurrentRuns:oi}}}function da(t){var r,c;const s=t.split("/").filter(Boolean);return s.length===1?((r=s[0])==null?void 0:r.toLowerCase())==="onboarding":s.length===2?((c=s[1])==null?void 0:c.toLowerCase())==="onboarding":!1}function ma(t){const{pathname:s,companyPrefix:r,companies:c}=t;if(!da(s))return null;if(!r)return{initialStep:1};const b=c.find(n=>n.issuePrefix.toUpperCase()===r.toUpperCase())??null;return b?{initialStep:2,companyId:b.id}:{initialStep:1}}const is=`You are the CEO. You set the direction for the company.
|
||||
|
||||
- hire a founding engineer
|
||||
- write a hiring plan
|
||||
- break the roadmap into concrete tasks and start delegating work`;function Or(){const{onboardingOpen:t,onboardingOptions:s,closeOnboarding:r}=xr(),{companies:c,setSelectedCompanyId:b,loading:n}=ni(),a=He(),o=li(),u=ci(),{companyPrefix:m}=di(),[g,f]=p.useState(!1),v=zi(),N=m&&n?null:ma({pathname:u.pathname,companyPrefix:m,companies:c}),j=t||N!==null&&!g,O=t?s:N??{},W=O.initialStep??1,q=O.companyId,[y,T]=p.useState(W),[w,_]=p.useState(!1),[ee,R]=p.useState(null),[S,K]=p.useState(!1),[M,X]=p.useState(""),[G,D]=p.useState(""),[k,L]=p.useState(""),[A,E]=p.useState("CEO"),[l,h]=p.useState("claude_local"),[U,z]=p.useState(""),[I,B]=p.useState(""),[te,oe]=p.useState(""),[se,wt]=p.useState(""),[$,Qe]=p.useState(null),[At,re]=p.useState(null),[fe,Xe]=p.useState(!1),[Br,zt]=p.useState(!1),[Je,Ze]=p.useState(!1),[Ct,Kr]=p.useState(!1),[ne,Ot]=p.useState("Hire your first engineer and create a hiring plan"),[et,St]=p.useState(is),Wt=p.useRef(null),Rt=p.useCallback(()=>{const i=Wt.current;i&&(i.style.height="auto",i.style.height=i.scrollHeight+"px")},[]),[C,tt]=p.useState(q??null),[be,Ne]=p.useState(null),[$r,le]=p.useState(null),[ce,st]=p.useState(null),[Hr,rt]=p.useState(null),[Gr,it]=p.useState(null);p.useEffect(()=>{f(!1)},[u.pathname]),p.useEffect(()=>{if(!j)return;const i=O.companyId??null;T(O.initialStep??1),tt(i),Ne(null),le(null),rt(null),st(null),it(null)},[j,O.companyId,O.initialStep]),p.useEffect(()=>{if(!j||!C||be)return;const i=c.find(d=>d.id===C);i&&Ne(i.issuePrefix)},[j,C,be,c]),p.useEffect(()=>{y===3&&Rt()},[y,et,Rt]);const{data:he,error:at,isLoading:Yr,isFetching:Qr}=ht({queryKey:C?F.agents.adapterModels(C,l):["agents","none","adapter-models",l],queryFn:()=>ge.adapterModels(C,l),enabled:!!C&&j&&y===2}),ot=Wi()(l),nt=ot.supportsInstructionsBundle||ot.supportsSkills||ot.supportsLocalAgentJwt,{recommendedAdapters:Xr,moreAdapters:Jr}=p.useMemo(()=>{const i=new Set(["process","http"]),d=Oi().filter(x=>!i.has(x.type)&&!v.has(x.type)).map(x=>({...Ri(x.type),type:x.type}));return{recommendedAdapters:d.filter(x=>x.recommended),moreAdapters:d.filter(x=>!x.recommended)}},[v]),Zr={claude_local:"claude",codex_local:"codex",gemini_local:"gemini",pi_local:"pi",cursor:"agent",opencode_local:"opencode"},de=I.trim()||(Zr[l]??l.replace(/_local$/,""));p.useEffect(()=>{y===2&&(Qe(null),re(null))},[y,l,U,I,te,se]);const Pt=(he??[]).find(i=>i.id===U),ei=($==null?void 0:$.checks.some(i=>i.code==="claude_anthropic_api_key_overrides_subscription"))??!1,ti=l==="claude_local"&&($==null?void 0:$.status)==="fail"&&ei,xe=p.useMemo(()=>{const i=M.trim().toLowerCase();return(he??[]).filter(d=>{if(!i)return!0;const x=$t(d.id,"");return d.id.toLowerCase().includes(i)||d.label.toLowerCase().includes(i)||x.toLowerCase().includes(i)})},[he,M]),si=p.useMemo(()=>{if(l!=="opencode_local")return[{provider:"models",entries:[...xe].sort((d,x)=>d.id.localeCompare(x.id))}];const i=new Map;for(const d of xe){const x=$t(d.id),H=i.get(x)??[];H.push(d),i.set(x,H)}return Array.from(i.entries()).sort(([d],[x])=>d.localeCompare(x)).map(([d,x])=>({provider:d,entries:[...x].sort((H,dt)=>H.id.localeCompare(dt.id))}))},[xe,l]);function Tt(){T(1),_(!1),R(null),D(""),L(""),E("CEO"),h("claude_local"),z(""),B(""),oe(""),wt(""),Qe(null),re(null),Xe(!1),zt(!1),Ze(!1),Ot("Hire your first engineer and create a hiring plan"),St(is),tt(null),Ne(null),le(null),st(null),rt(null),it(null)}function _t(){Tt(),r()}function lt(){const d=Qt(l).buildAdapterConfig({...$e,adapterType:l,model:l==="codex_local"?U||Ht:l==="gemini_local"?U||Gt:l==="cursor"?U||Yt:U,command:I,args:te,url:se,dangerouslySkipPermissions:l==="claude_local"||l==="opencode_local",dangerouslyBypassSandbox:l==="codex_local"?Si:$e.dangerouslyBypassSandbox});if(l==="claude_local"&&Br){const x=typeof d.env=="object"&&d.env!==null&&!Array.isArray(d.env)?{...d.env}:{};x.ANTHROPIC_API_KEY={type:"plain",value:""},d.env=x}return d}async function ct(i){if(!C)return re("Create or select a company before testing adapter environment."),null;Xe(!0),re(null);try{const d=await ge.testEnvironment(C,l,{adapterConfig:i??lt()});return Qe(d),d}catch(d){return re(d instanceof Error?d.message:"Adapter environment test failed"),null}finally{Xe(!1)}}async function It(){_(!0),R(null);try{const i=await fi.create({name:G.trim()});if(tt(i.id),Ne(i.issuePrefix),b(i.id),a.invalidateQueries({queryKey:F.companies.all}),k.trim()){const d=ia(k),x=await Kt.create(i.id,{title:d.title,...d.description?{description:d.description}:{},level:"company",status:"active"});le(x.id),a.invalidateQueries({queryKey:F.goals.list(i.id)})}else le(null);T(2)}catch(i){R(i instanceof Error?i.message:"Failed to create company")}finally{_(!1)}}async function Mt(){if(C){_(!0),R(null);try{if(l==="opencode_local"){const x=U.trim();if(!x){R("OpenCode requires an explicit model in provider/model format.");return}if(at){R(at instanceof Error?at.message:"Failed to load OpenCode models.");return}if(Yr||Qr){R("OpenCode models are still loading. Please wait and try again.");
Line truncated
|
||||
`)){const u=o.trim();if(!u||u.startsWith("#"))continue;if(u.startsWith("- ")&&n){a||(a=[]),a.push(u.slice(2).trim().replace(/^["']|["']$/g,""));continue}n&&a&&(r[n]=a,a=null,n=null);const m=u.match(/^([a-zA-Z_][\w-]*)\s*:\s*(.*)$/);if(m){const g=m[1],f=m[2].trim().replace(/^["']|["']$/g,"");if(f==="null"){n=null;continue}f?(r[g]=f,n=null):n=g}}return n&&a&&(r[n]=a),Object.keys(r).length>0?{data:r,body:b}:null}function kt({nodes:t,selectedFile:s,expandedDirs:r,checkedFiles:c,onToggleDir:b,onSelectFile:n,onToggleCheck:a,renderFileExtra:o,fileRowClassName:u,showCheckboxes:m=!0,wrapLabels:g=!1,depth:f=0}){const v=c??new Set;return e.jsxDEV("div",{children:t.map(N=>{const j=N.kind==="dir"&&r.has(N.path);if(N.kind==="dir"){const y=ae(N.children,"file"),T=[...y].every(_=>v.has(_)),w=[...y].some(_=>v.has(_));return e.jsxDEV("div",{children:[e.jsxDEV("div",{className:P(m?"group grid w-full grid-cols-[auto_minmax(0,1fr)_2.25rem] items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground":"group grid w-full grid-cols-[minmax(0,1fr)_2.25rem] items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground",ns),style:{paddingInlineStart:`${as+f*os-8}px`},children:[m&&e.jsxDEV("label",{className:"flex items-center pl-2",children:e.jsxDEV("input",{type:"checkbox",checked:T,ref:_=>{_&&(_.indeterminate=w&&!T)},onChange:()=>a==null?void 0:a(N.path,"dir"),className:"mr-2 accent-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:224,columnNumber:21},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:223,columnNumber:19},this),e.jsxDEV("button",{type:"button",className:"flex min-w-0 items-center gap-2 py-1 text-left",onClick:()=>b(N.path),children:[e.jsxDEV("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:j?e.jsxDEV(_i,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:240,columnNumber:23},this):e.jsxDEV(Gi,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:242,columnNumber:23},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:238,columnNumber:19},this),e.jsxDEV("span",{className:P("min-w-0",g?"break-all leading-4":"truncate"),children:N.name},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:245,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:233,columnNumber:17},this),e.jsxDEV("button",{type:"button",className:"flex h-9 w-9 items-center justify-center self-center rounded-sm text-muted-foreground opacity-70 transition-[background-color,color,opacity] hover:bg-accent hover:text-foreground group-hover:opacity-100",onClick:()=>b(N.path),children:j?e.jsxDEV(xt,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:255,columnNumber:21},this):e.jsxDEV(Pi,{className:"h-3.5 w-3.5"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:257,columnNumber:21},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:249,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:211,columnNumber:15},this),j&&e.jsxDEV(kt,{nodes:N.children,selectedFile:s,expandedDirs:r,checkedFiles:v,onToggleDir:b,onSelectFile:n,onToggleCheck:a,renderFileExtra:o,fileRowClassName:u,showCheckboxes:m,wrapLabels:g,depth:f+1},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:262,columnNumber:17},this)]},N.path,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:210,columnNumber:13},this)}const O=fa(N.name),W=v.has(N.path),q=u==null?void 0:u(N,W);return e.jsxDEV("div",{className:P("flex w-full items-center gap-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground cursor-pointer",ns,N.path===s&&"text-foreground bg-accent/20",q),style:{paddingInlineStart:`${as+f*os-8}px`},onClick:()=>n(N.path),children:[m&&e.jsxDEV("label",{className:"flex items-center pl-2",children:e.jsxDEV("input",{type:"checkbox",checked:W,onChange:()=>a==null?void 0:a(N.path,"file"),className:"mr-2 accent-foreground"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:300,columnNumber:17},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/PackageFileTree.tsx",lineNumber:299,columnNumber:15},this),e.jsxDEV("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 py-1 text-left",onClick:()=>n(N.path),children:[e.jsxDEV("span",{className:"flex h-4 w-4 shrink-0 items-center justify-cent
Line truncated
|
||||
name: string;
|
||||
path: string;
|
||||
kind: "dir" | "file";
|
||||
children: FileTreeNode[];
|
||||
/** Optional per-node metadata (e.g. import action) */
|
||||
action?: string | null;
|
||||
}`,signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"path",value:{name:"string",required:!0}},{key:"kind",value:{name:"union",raw:'"dir" | "file"',elements:[{name:"literal",value:'"dir"'},{name:"literal",value:'"file"'}],required:!0}},{key:"children",value:{name:"Array",elements:[{name:"FileTreeNode"}],raw:"FileTreeNode[]",required:!0}},{key:"action",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1},description:"Optional per-node metadata (e.g. import action)"}]}}],raw:"FileTreeNode[]"},description:""},selectedFile:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},expandedDirs:{required:!0,tsType:{name:"Set",elements:[{name:"string"}],raw:"Set<string>"},description:""},checkedFiles:{required:!1,tsType:{name:"Set",elements:[{name:"string"}],raw:"Set<string>"},description:""},onToggleDir:{required:!0,tsType:{name:"signature",type:"function",raw:"(path: string) => void",signature:{arguments:[{type:{name:"string"},name:"path"}],return:{name:"void"}}},description:""},onSelectFile:{required:!0,tsType:{name:"signature",type:"function",raw:"(path: string) => void",signature:{arguments:[{type:{name:"string"},name:"path"}],return:{name:"void"}}},description:""},onToggleCheck:{required:!1,tsType:{name:"signature",type:"function",raw:'(path: string, kind: "file" | "dir") => void',signature:{arguments:[{type:{name:"string"},name:"path"},{type:{name:"union",raw:'"file" | "dir"',elements:[{name:"literal",value:'"file"'},{name:"literal",value:'"dir"'}]},name:"kind"}],return:{name:"void"}}},description:""},renderFileExtra:{required:!1,tsType:{name:"signature",type:"function",raw:"(node: FileTreeNode, checked: boolean) => ReactNode",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
||||
name: string;
|
||||
path: string;
|
||||
kind: "dir" | "file";
|
||||
children: FileTreeNode[];
|
||||
/** Optional per-node metadata (e.g. import action) */
|
||||
action?: string | null;
|
||||
}`,signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"path",value:{name:"string",required:!0}},{key:"kind",value:{name:"union",raw:'"dir" | "file"',elements:[{name:"literal",value:'"dir"'},{name:"literal",value:'"file"'}],required:!0}},{key:"children",value:{name:"Array",elements:[{name:"FileTreeNode"}],raw:"FileTreeNode[]",required:!0}},{key:"action",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1},description:"Optional per-node metadata (e.g. import action)"}]}},name:"node"},{type:{name:"boolean"},name:"checked"}],return:{name:"ReactNode"}}},description:"Optional extra content rendered at the end of each file row (e.g. action badge)"},fileRowClassName:{required:!1,tsType:{name:"signature",type:"function",raw:"(node: FileTreeNode, checked: boolean) => string | undefined",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
||||
name: string;
|
||||
path: string;
|
||||
kind: "dir" | "file";
|
||||
children: FileTreeNode[];
|
||||
/** Optional per-node metadata (e.g. import action) */
|
||||
action?: string | null;
|
||||
}`,signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"path",value:{name:"string",required:!0}},{key:"kind",value:{name:"union",raw:'"dir" | "file"',elements:[{name:"literal",value:'"dir"'},{name:"literal",value:'"file"'}],required:!0}},{key:"children",value:{name:"Array",elements:[{name:"FileTreeNode"}],raw:"FileTreeNode[]",required:!0}},{key:"action",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1},description:"Optional per-node metadata (e.g. import action)"}]}},name:"node"},{type:{name:"boolean"},name:"checked"}],return:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]}}},description:"Optional additional className for file rows"},showCheckboxes:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},wrapLabels:{required:!1,tsType:{name:"boolean"},description:"Allow long file and directory names to wrap instead of forcing horizontal overflow.",defaultValue:{value:"false",computed:!1}},depth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}}}};const Na=.32,ha=.88,xa=140;function Wr({children:t,onArchive:s,disabled:r=!1,selected:c=!1,className:b}){const n=p.useRef(null),a=p.useRef(null),o=p.useRef(0),u=p.useRef(null),m=p.useRef(!1),[g,f]=p.useState(0),[v,N]=p.useState(!1),[j,O]=p.useState(!1),[W,q]=p.useState(null);p.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]);const y=()=>{a.current=null,N(!1),f(0)},T=()=>{const S=n.current;if(!S){s();return}N(!1),q(S.offsetHeight),f(-Math.max(o.current,S.offsetWidth)),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{O(!0)})}),u.current=window.setTimeout(()=>{s()},xa)},w=S=>{if(r||S.touches.length!==1)return;const K=S.touches[0],M=n.current;o.current=(M==null?void 0:M.offsetWidth)??0,q((M==null?void 0:M.offsetHeight)??null),O(!1),m.current=!1,a.current={x:K.clientX,y:K.clientY}},_=S=>{if(r||j)return;const K=a.current;if(!K||S.touches.length!==1)return;const M=S.touches[0],X=M.clientX-K.x,G=M.clientY-K.y;if(!v){if(Math.abs(X)<6)return;if(Math.abs(G)>Math.abs(X)){a.current=null;return}m.current=!0}if(X>=0){S.preventDefault(),N(!0),f(0);return}const D=o.current>0?o.current*ha:Number.POSITIVE_INFINITY;S.preventDefault(),N(!0),f(Math.max(X,-D))},ee=()=>{if(r||j)return;if(o.current>0&&Math.abs(g)>=o.current*Na){T();return}y()},R=o.current>0?Math.min(Math.abs(g)/o.current,1):0;return e.jsxDEV("div",{ref:n,className:P("relative overflow-hidden touch-pan-y",b),style:{height:W===null?void 0:j?0:W,opacity:j?0:1,transition:j?"height 200ms ease, opacity 200ms ease":void 0},onTouchStart:w,onTouchMove:_,onTouchEnd:ee,onTouchCancel:ee,onClickCapture:S=>{m.current&&(S.preventDefault(),S.stopPropagation(),m.current=!1)},children:[e.jsxDEV("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-end bg-emerald-600 px-4 text-white",style:{opacity:Math.max(R,.2)},children:e.jsxDEV("span",{className:"inline-flex items-center gap-2 text-sm font-medium",children:[e.jsxDEV(yr,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/SwipeToArchive.tsx",lineNumber:148,columnNumber:11},this),"Archive"]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/SwipeToArchive.tsx",lineNumber:147,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/SwipeToArchive.tsx",lineNumber:142,columnNumber:7},this),e.jsxDEV("div",{"data-inbox-row-surface":!0,className:P("relative will-change-transform",c?"bg-zinc-100 dark:bg-zinc-800":"bg-card"),style:{transform:`translate3d(${g}px, 0, 0)`,transition:v?"none":"transform 180ms ease-out"},children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/src/components/SwipeToArchive.tsx",lineNumber:152,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/src/components/SwipeToArchive.tsx",lineNumber:123,columnNumber:5},this)}Wr.__docgenInfo={description:"",methods:[],displayName:"SwipeToArchive",props:{children:{required:!0,tsType:{name:"ReactNode"},description:""},onArchive:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},selected:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},className:{required:!1,tsType:{name:"string"},description:""}}};const gt="company-storybook",Nt="issue-storybook-1";function Y({children:t}){return e.jsxDEV("div",{className:"paperclip-story",children:e.jsxDEV("main",{className:"paperclip-story__inner space-y-6",children:t},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:32,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:31,columnNumber:10}
Line truncated
|
||||
name: Paperclip Storybook
|
||||
kind: company
|
||||
---
|
||||
Fixture company package for UI review.`,"agents/codexcoder/AGENTS.md":`---
|
||||
name: CodexCoder
|
||||
skills:
|
||||
- frontend-design
|
||||
- paperclip
|
||||
---
|
||||
Ships product UI and verifies changes.`,"agents/qachecker/AGENTS.md":`---
|
||||
name: QAChecker
|
||||
skills:
|
||||
- web-design-guidelines
|
||||
---
|
||||
Reviews browser behavior and acceptance criteria.`,"projects/board-ui/PROJECT.md":`---
|
||||
title: Board UI
|
||||
status: in_progress
|
||||
---
|
||||
Storybook and operator control-plane surfaces.`,"tasks/PAP-1641.md":`---
|
||||
title: Create super-detailed storybooks
|
||||
priority: high
|
||||
---
|
||||
Parent issue for Storybook coverage.`,"tasks/PAP-1677.md":`---
|
||||
title: Data Visualization & Misc stories
|
||||
priority: medium
|
||||
---
|
||||
Fixture task for this story file.`,"skills/frontend-design/SKILL.md":`---
|
||||
name: frontend-design
|
||||
---
|
||||
Design quality guidance.`},Ea=new Map([["COMPANY.md","replace"],["agents/codexcoder/AGENTS.md","update"],["agents/qachecker/AGENTS.md","create"],["tasks/PAP-1677.md","create"]]);function Rr({empty:t=!1}){const s=t?[]:ga,r=t?[]:va;return e.jsxDEV(Y,{children:e.jsxDEV(Q,{eyebrow:"ActivityCharts",title:t?"Empty activity timelines":"Two-week activity timelines",children:e.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxDEV(me,{title:"Run activity",subtitle:"Succeeded, failed, and in-flight heartbeats",children:e.jsxDEV(kr,{runs:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:226,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:225,columnNumber:11},this),e.jsxDEV(me,{title:"Success rate",subtitle:"Daily completion ratio",children:e.jsxDEV(Ar,{runs:s},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:229,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:228,columnNumber:11},this),e.jsxDEV(me,{title:"Issue priority",subtitle:"Created issues by urgency",children:e.jsxDEV(Vr,{issues:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:232,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:231,columnNumber:11},this),e.jsxDEV(me,{title:"Issue status",subtitle:"Created issues by workflow state",children:e.jsxDEV(wr,{issues:r},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:235,columnNumber:13},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:234,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:224,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:223,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:222,columnNumber:10},this)}function Pr({empty:t=!1}){const[s,r]=p.useState(t?[]:ya),c=p.useMemo(()=>new Set(["issue-storybook-1","issue-kanban-backlog"]),[]);return e.jsxDEV(Y,{children:e.jsxDEV(Q,{eyebrow:"KanbanBoard",title:t?"Collapsed empty workflow columns":"Draggable issue cards by status",children:e.jsxDEV(gi,{issues:s,agents:hi,liveIssueIds:c,onUpdateIssue:(b,n)=>{r(a=>a.map(o=>o.id===b?{...o,...n}:o))}},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:250,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:249,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:248,columnNumber:10},this)}function Tr({empty:t=!1}){const[s,r]=p.useState(t?[]:[{key:"status",label:"Status",value:"In progress"},{key:"assignee",label:"Assignee",value:"CodexCoder"},{key:"priority",label:"Priority",value:"High"},{key:"project",label:"Project",value:"Board UI"}]);return e.jsxDEV(Y,{children:e.jsxDEV(Q,{eyebrow:"FilterBar",title:t?"No active filters":"Active removable filter chips",children:e.jsxDEV("div",{className:"rounded-lg border border-dashed border-border bg-background/70 p-4",children:[e.jsxDEV(zr,{filters:s,onRemove:c=>r(b=>b.filter(n=>n.key!==c)),onClear:()=>r([])},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:284,columnNumber:11},this),s.length===0&&e.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsxDEV(Qi,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:286,columnNumber:15},this),"No filters are active."]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:285,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:283,columnNumber:9},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:282,columnNumber:7},this)},void 0,!1,{fileName:"/Users/dotta/paperclip/ui/storybook/stories/data-viz-misc.stories.tsx",lineNumber:281,columnNumber:10},this)}function Vt({empty:t=!1,loading:s=!1}){const r=He();return p.useEffect(()=>{s||(r.setQueryData(F.issues.liveRuns(Nt),t?[]:qt),r.setQueryData(F.issues.activeRun(Nt),t?null:qt[0]))},[t,s,r]),s?e.jsxDEV(Y,{children:e.jsxDEV(Q,{eyebrow:"LiveRunWidget",title:"Loading live run status",children:e.jsxDEV("div",{className:"flex items-center gap-3 rounded-xl border border-border bg-background/70 p-4 text-
Line truncated
|
||||
name: "ActivityCharts / Populated",
|
||||
render: () => <ActivityChartsMatrix />
|
||||
}`,...(ms=(ds=De.parameters)==null?void 0:ds.docs)==null?void 0:ms.source}}};var us,ps,fs;je.parameters={...je.parameters,docs:{...(us=je.parameters)==null?void 0:us.docs,source:{originalSource:`{
|
||||
name: "ActivityCharts / Empty",
|
||||
render: () => <ActivityChartsMatrix empty />
|
||||
}`,...(fs=(ps=je.parameters)==null?void 0:ps.docs)==null?void 0:fs.source}}};var bs,Ns,hs;Ue.parameters={...Ue.parameters,docs:{...(bs=Ue.parameters)==null?void 0:bs.docs,source:{originalSource:`{
|
||||
name: "KanbanBoard / Populated",
|
||||
render: () => <KanbanBoardDemo />
|
||||
}`,...(hs=(Ns=Ue.parameters)==null?void 0:Ns.docs)==null?void 0:hs.source}}};var xs,gs,vs;ke.parameters={...ke.parameters,docs:{...(xs=ke.parameters)==null?void 0:xs.docs,source:{originalSource:`{
|
||||
name: "KanbanBoard / Empty",
|
||||
render: () => <KanbanBoardDemo empty />
|
||||
}`,...(vs=(gs=ke.parameters)==null?void 0:gs.docs)==null?void 0:vs.source}}};var ys,Es,Ds;Ve.parameters={...Ve.parameters,docs:{...(ys=Ve.parameters)==null?void 0:ys.docs,source:{originalSource:`{
|
||||
name: "FilterBar / Populated",
|
||||
render: () => <FilterBarDemo />
|
||||
}`,...(Ds=(Es=Ve.parameters)==null?void 0:Es.docs)==null?void 0:Ds.source}}};var js,Us,ks;we.parameters={...we.parameters,docs:{...(js=we.parameters)==null?void 0:js.docs,source:{originalSource:`{
|
||||
name: "FilterBar / Empty",
|
||||
render: () => <FilterBarDemo empty />
|
||||
}`,...(ks=(Us=we.parameters)==null?void 0:Us.docs)==null?void 0:ks.source}}};var Vs,ws,As;Ae.parameters={...Ae.parameters,docs:{...(Vs=Ae.parameters)==null?void 0:Vs.docs,source:{originalSource:`{
|
||||
name: "LiveRunWidget / Populated",
|
||||
render: () => <LiveRunWidgetStory />
|
||||
}`,...(As=(ws=Ae.parameters)==null?void 0:ws.docs)==null?void 0:As.source}}};var zs,Cs,Os;ze.parameters={...ze.parameters,docs:{...(zs=ze.parameters)==null?void 0:zs.docs,source:{originalSource:`{
|
||||
name: "LiveRunWidget / Loading",
|
||||
render: () => <LiveRunWidgetStory loading />
|
||||
}`,...(Os=(Cs=ze.parameters)==null?void 0:Cs.docs)==null?void 0:Os.source}}};var Ss,Ws,Rs;Ce.parameters={...Ce.parameters,docs:{...(Ss=Ce.parameters)==null?void 0:Ss.docs,source:{originalSource:`{
|
||||
name: "LiveRunWidget / Empty",
|
||||
render: () => <LiveRunWidgetStory empty />
|
||||
}`,...(Rs=(Ws=Ce.parameters)==null?void 0:Ws.docs)==null?void 0:Rs.source}}};var Ps,Ts,_s;Oe.parameters={...Oe.parameters,docs:{...(Ps=Oe.parameters)==null?void 0:Ps.docs,source:{originalSource:`{
|
||||
name: "OnboardingWizard / Company Step",
|
||||
render: () => <OpenOnboardingOnMount initialStep={1} />
|
||||
}`,...(_s=(Ts=Oe.parameters)==null?void 0:Ts.docs)==null?void 0:_s.source}}};var Is,Ms,Ls;Se.parameters={...Se.parameters,docs:{...(Is=Se.parameters)==null?void 0:Is.docs,source:{originalSource:`{
|
||||
name: "OnboardingWizard / Agent Step",
|
||||
render: () => <OpenOnboardingOnMount initialStep={2} />
|
||||
}`,...(Ls=(Ms=Se.parameters)==null?void 0:Ms.docs)==null?void 0:Ls.source}}};var Fs,qs,Bs;We.parameters={...We.parameters,docs:{...(Fs=We.parameters)==null?void 0:Fs.docs,source:{originalSource:`{
|
||||
name: "PackageFileTree / Populated",
|
||||
render: () => <PackageFileTreeDemo />
|
||||
}`,...(Bs=(qs=We.parameters)==null?void 0:qs.docs)==null?void 0:Bs.source}}};var Ks,$s,Hs;Re.parameters={...Re.parameters,docs:{...(Ks=Re.parameters)==null?void 0:Ks.docs,source:{originalSource:`{
|
||||
name: "PackageFileTree / Empty",
|
||||
render: () => <PackageFileTreeDemo empty />
|
||||
}`,...(Hs=($s=Re.parameters)==null?void 0:$s.docs)==null?void 0:Hs.source}}};var Gs,Ys,Qs;Pe.parameters={...Pe.parameters,docs:{...(Gs=Pe.parameters)==null?void 0:Gs.docs,source:{originalSource:`{
|
||||
name: "EntityRow / Populated",
|
||||
render: () => <EntityRowsDemo />
|
||||
}`,...(Qs=(Ys=Pe.parameters)==null?void 0:Ys.docs)==null?void 0:Qs.source}}};var Xs,Js,Zs;Te.parameters={...Te.parameters,docs:{...(Xs=Te.parameters)==null?void 0:Xs.docs,source:{originalSource:`{
|
||||
name: "EntityRow / Empty",
|
||||
render: () => <EntityRowsDemo empty />
|
||||
}`,...(Zs=(Js=Te.parameters)==null?void 0:Js.docs)==null?void 0:Zs.source}}};var er,tr,sr;_e.parameters={..._e.parameters,docs:{...(er=_e.parameters)==null?void 0:er.docs,source:{originalSource:`{
|
||||
name: "SwipeToArchive / Mobile",
|
||||
render: () => <SwipeToArchiveDemo />
|
||||
}`,...(sr=(tr=_e.parameters)==null?void 0:tr.docs)==null?void 0:sr.source}}};var rr,ir,ar;Ie.parameters={...Ie.parameters,docs:{...(rr=Ie.parameters)==null?void 0:rr.docs,source:{originalSource:`{
|
||||
name: "SwipeToArchive / Disabled",
|
||||
render: () => <SwipeToArchiveDemo disabled />
|
||||
}`,...(ar=(ir=Ie.parameters)==null?void 0:ir.docs)==null?void 0:ar.source}}};var or,nr,lr;Me.parameters={...Me.parameters,docs:{...(or=Me.parameters)==null?void 0:or.docs,source:{originalSource:`{
|
||||
name: "CompanyPatternIcon / Sizes",
|
||||
render: () => <CompanyPatternIconMatrix />
|
||||
}`,...(lr=(nr=Me.parameters)==null?void 0:nr.docs)==null?void 0:lr.source}}};var cr,dr,mr;Le.parameters={...Le.parameters,docs:{...(cr=Le.parameters)==null?void 0:cr.docs,source:{originalSource:`{
|
||||
name: "AsciiArtAnimation / Populated",
|
||||
render: () => <AsciiArtAnimationDemo />
|
||||
}`,...(mr=(dr=Le.parameters)==null?void 0:dr.docs)==null?void 0:mr.source}}};var ur,pr,fr;Fe.parameters={...Fe.parameters,docs:{...(ur=Fe.parameters)==null?void 0:ur.docs,source:{originalSource:`{
|
||||
name: "AsciiArtAnimation / Loading",
|
||||
render: () => <AsciiArtAnimationDemo loading />
|
||||
}`,...(fr=(pr=Fe.parameters)==null?void 0:pr.docs)==null?void 0:fr.source}}};var br,Nr,hr;qe.parameters={...qe.parameters,docs:{...(br=qe.parameters)==null?void 0:br.docs,source:{originalSource:`{
|
||||
name: "PageSkeleton / Layouts",
|
||||
render: () => <PageSkeletonMatrix />
|
||||
}`,...(hr=(Nr=qe.parameters)==null?void 0:Nr.docs)==null?void 0:hr.source}}};const To=["ActivityChartsPopulated","ActivityChartsEmpty","KanbanBoardPopulated","KanbanBoardEmpty","FilterBarPopulated","FilterBarEmpty","LiveRunWidgetPopulated","LiveRunWidgetLoading","LiveRunWidgetEmpty","OnboardingWizardCompanyStep","OnboardingWizardAgentStep","PackageFileTreePopulated","PackageFileTreeEmpty","EntityRowPopulated","EntityRowEmpty","SwipeToArchiveMobile","SwipeToArchiveDisabled","CompanyPatternIconSizes","AsciiArtAnimationPopulated","AsciiArtAnimationLoading","PageSkeletonLayouts"];export{je as ActivityChartsEmpty,De as ActivityChartsPopulated,Fe as AsciiArtAnimationLoading,Le as AsciiArtAnimationPopulated,Me as CompanyPatternIconSizes,Te as EntityRowEmpty,Pe as EntityRowPopulated,we as FilterBarEmpty,Ve as FilterBarPopulated,ke as KanbanBoardEmpty,Ue as KanbanBoardPopulated,Ce as LiveRunWidgetEmpty,ze as LiveRunWidgetLoading,Ae as LiveRunWidgetPopulated,Se as OnboardingWizardAgentStep,Oe as OnboardingWizardCompanyStep,Re as PackageFileTreeEmpty,We as PackageFileTreePopulated,qe as PageSkeletonLayouts,Ie as SwipeToArchiveDisabled,_e as SwipeToArchiveMobile,To as __namedExportsOrder,Po as default};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{c as e}from"./createLucideIcon-D2uUVdtm.js";/**
|
||||
* @license lucide-react v0.574.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
|
||||
@@ -0,0 +1 @@
|
||||
function J(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if(!isFinite(n)||n===0)return null;var e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"),i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function K(n){return n=j(Math.abs(n)),n?n[1]:NaN}function Q(n,t){return function(e,i){for(var o=e.length,a=[],c=0,h=n[0],M=0;o>0&&h>0&&(M+h+1>i&&(h=Math.max(1,i-M)),a.push(e.substring(o-=h,o+h)),!((M+=h+1)>i));)h=n[c=(c+1)%n.length];return a.reverse().join(t)}}function V(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $(n){if(!(t=W.exec(n)))throw new Error("invalid format: "+n);var t;return new L({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$.prototype=L.prototype;function L(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _(n){n:for(var t=n.length,e=1,i=-1,o;e<t;++e)switch(n[e]){case".":i=o=e;break;case"0":i===0&&(i=e),o=e;break;default:if(!+n[e])break n;i>0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var N;function v(n,t){var e=j(n,t);if(!e)return N=void 0,n.toPrecision(t);var i=e[0],o=e[1],a=o-(N=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+j(n,Math.max(0,t+a-1))[0]}function X(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const O={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:J,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>X(n*100,t),r:X,s:v,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function R(n){return n}var U=Array.prototype.map,Y=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nn(n){var t=n.grouping===void 0||n.thousands===void 0?R:Q(U.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",a=n.numerals===void 0?R:V(U.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",h=n.minus===void 0?"−":n.minus+"",M=n.nan===void 0?"NaN":n.nan+"";function T(f,g){f=$(f);var b=f.fill,p=f.align,m=f.sign,w=f.symbol,S=f.zero,E=f.width,F=f.comma,y=f.precision,C=f.trim,d=f.type;d==="n"?(F=!0,d="g"):O[d]||(y===void 0&&(y=12),C=!0,d="g"),(S||b==="0"&&p==="=")&&(S=!0,b="0",p="=");var q=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),B=(w==="$"?i:/[%p]/.test(d)?c:"")+(g&&g.suffix!==void 0?g.suffix:""),D=O[d],H=/[defgprs%]/.test(d);y=y===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function G(r){var l=q,u=B,x,I,k;if(d==="c")u=D(r)+u,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?M:D(Math.abs(r),y),C&&(r=_(r)),P&&+r==0&&m!=="+"&&(P=!1),l=(P?m==="("?m:h:m==="-"||m==="("?"":m)+l,u=(d==="s"&&!isNaN(r)&&N!==void 0?Y[8+N/3]:"")+u+(P&&m==="("?")":""),H){for(x=-1,I=r.length;++x<I;)if(k=r.charCodeAt(x),48>k||k>57){u=(k===46?o+r.slice(x+1):r.slice(x))+u,r=r.slice(0,x);break}}}F&&!S&&(r=t(r,1/0));var z=l.length+r.length+u.length,s=z<E?new Array(E-z+1).join(b):"";switch(F&&S&&(r=t(s+r,s.length?E-u.length:1/0),s=""),p){case"<":r=l+r+u+s;break;case"=":r=l+s+r+u;break;case"^":r=s.slice(0,z=s.length>>1)+l+r+u+s.slice(z);break;default:r=s+l+r+u;break}return a(r)}return G.toString=function(){return f+""},G}function Z(f,g){var b=Math.max(-8,Math.min(8,Math.floor(K(g)/3)))*3,p=Math.pow(10,-b),m=T((f=$(f),f.type="f",f),{suffix:Y[8+b/3]});return function(w){return m(p*w)}}return{format:T,formatPrefix:Z}}var A,tn,rn;en({thousands:",",grouping:[3],currency:["$",""]});function en(n){return A=nn(n),tn=A.format,rn=A.formatPrefix,A}export{rn as a,tn as b,K as e,$ as f};
|
||||
@@ -0,0 +1,24 @@
|
||||
import{_ as w,F as te,H as ae,K as he,e as pe,l as J,aZ as P,d as Y,b as ue,a as fe,q as ge,t as me,g as ye,s as Se,G as ve,a_ as xe,z as be}from"./mermaid.core-BRRy2yZG.js";import{s as we}from"./chunk-QN33PNHL-CBl9gU19.js";import{p as Ce}from"./chunk-4BX2VUAB-Ds5vk7IO.js";import{p as Te}from"./treemap-GDKQZRPO-DgoZf2I3.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as U}from"./ordinal-Cboi1Yqb.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";import"./_baseUniq-7kyoN_aU.js";import"./_basePickBy-BopQxIEc.js";import"./clone-BASZBmHw.js";import"./init-Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,d,h,g=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=o.pop();)t.call(a,l,++g,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ee(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new Z(t),n,o=[l],s,d,h,g;n=o.pop();)if((d=a(n.data))&&(g=(d=Array.from(d)).length))for(n.children=d,h=g-1;h>=0;--h)o.push(s=d[h]=new Z(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ge)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ge(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=Q.prototype={constructor:Z,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Re,copy:We,[Symbol.iterator]:Ee};function qe(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(n-a)/t.value;++h<g;)d=s[h],d.y0=l,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function Ye(t,a,l,n,o){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(o-l)/t.value;++h<g;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Ke(t,a,l,n,o,s){for(var d=[],h=a.children,g,c,p=0,b=0,r=h.length,x,S,v=a.value,u,m,N,k,V,E,M;p<r;){x=o-l,S=s-n;do u=h[b++].value;while(!u&&b<r);for(m=N=u,E=Math.max(S/x,x/S)/(v*t),M=u*u*E,V=Math.max(N/M,M/m);b<r;++b){if(u+=c=h[b].value,c<m&&(m=c),c>N&&(N=c),M=u*u*E,k=Math.max(N/M,M/m),k>V){u-=c;break}V=k}d.push(g={value:u,dice:x<S,children:h.slice(p,b)}),g.dice?je(g,l,n,o,v?n+=S*u/v:s):Ye(g,l,n,v?l+=x*u/v:o,s),v-=u,p=b}return d}const Ue=(function t(a){function l(n,o,s,d,h){Ke(a,n,o,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Je(){var t=Ue,a=!1,l=1,n=1,o=[0],s=G,d=G,h=G,g=G,c=G;function p(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,m=r.y1-x;u<S&&(S=u=(S+u)/2),m<v&&(v=m=(v+m)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=m,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=d(r)-x,u-=h(r)-x,m-=g(r)-x,u<S&&(S=u=(S+u)/2),m<v&&(v=m=(v+m)/2),t(r,S,v,u,m))}return p.round=function(r){return arguments.length?(a=!!r,p):a},p.size=function(r){return arguments.length?(l=+r[0],n=+r[1],p):[l,n]},p.tile=function(r){return arguments.length?(t=qe(r),p):t},p.padding=function(r){return arguments.length?p.paddingInner(r).paddingOuter(r):p.paddingInner()},p.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:q(+r),p):s},p.paddingOuter=function(r){return arguments.length?p.paddingTop(r).paddingRight(r).Line truncated
|
||||
.treemapNode.section {
|
||||
stroke: ${a.sectionStrokeColor};
|
||||
stroke-width: ${a.sectionStrokeWidth};
|
||||
fill: ${a.sectionFillColor};
|
||||
}
|
||||
.treemapNode.leaf {
|
||||
stroke: ${a.leafStrokeColor};
|
||||
stroke-width: ${a.leafStrokeWidth};
|
||||
fill: ${a.leafFillColor};
|
||||
}
|
||||
.treemapLabel {
|
||||
fill: ${a.labelColor};
|
||||
font-size: ${a.labelFontSize};
|
||||
}
|
||||
.treemapValue {
|
||||
fill: ${a.valueColor};
|
||||
font-size: ${a.valueFontSize};
|
||||
}
|
||||
.treemapTitle {
|
||||
fill: ${a.titleColor};
|
||||
font-size: ${a.titleFontSize};
|
||||
}
|
||||
`},"getStyles"),it=st,wt={parser:re,get db(){return new ne},renderer:lt,styles:it};export{wt as diagram};
|
||||
@@ -0,0 +1,43 @@
|
||||
import{s as k,g as R,t as F,q as I,a as _,b as E,_ as l,K as D,z as G,F as y,G as z,H as C,l as P,a1 as H}from"./mermaid.core-BRRy2yZG.js";import{p as V}from"./chunk-4BX2VUAB-Ds5vk7IO.js";import{p as W}from"./treemap-GDKQZRPO-DgoZf2I3.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";import"./_baseUniq-7kyoN_aU.js";import"./_basePickBy-BopQxIEc.js";import"./clone-BASZBmHw.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},m=structuredClone(w),B=z.radar,j=l(()=>y({...B,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),q=l(()=>m.curves,"getCurves"),K=l(()=>m.options,"getOptions"),N=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:X(t.entries)}))},"setCurves"),X=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Y=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??h.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??h.ticks,max:((s=t.max)==null?void 0:s.value)??h.max,min:((o=t.min)==null?void 0:o.value)??h.min,graticule:((i=t.graticule)==null?void 0:i.value)??h.graticule}},"setOptions"),Z=l(()=>{G(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:U,setOptions:Y,getConfig:j,clear:Z,setAccTitle:E,getAccTitle:_,setDiagramTitle:I,getDiagramTitle:F,getAccDescription:R,setAccDescription:k},J=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),Q={parse:l(async a=>{const t=await W("radar",a);P.debug(t),J(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=D(t),p=et(u,c),g=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,g,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,u)=>{const p=2*u*Math.PI/o-Math.PI/2,g=n*Math.cos(p),x=n*Math.sin(p);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,u)=>{if(d.entries.length!==n)return;const p=d.entries.map((g,x)=>{const v=2*Math.PI*x/n-Math.PI/2,f=A(g,r,s,c),O=f*Math.cos(v),S=f*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},u={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${u.x},${u.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
|
||||
.radarCurve-${r} {
|
||||
color: ${s};
|
||||
fill: ${s};
|
||||
fill-opacity: ${t.curveOpacity};
|
||||
stroke: ${s};
|
||||
stroke-width: ${t.curveStrokeWidth};
|
||||
}
|
||||
.radarLegendBox-${r} {
|
||||
fill: ${s};
|
||||
fill-opacity: ${t.curveOpacity};
|
||||
stroke: ${s};
|
||||
}
|
||||
`}return e},"genIndexStyles"),ot=l(a=>{const t=H(),e=C(),r=y(t,e.themeVariables),s=y(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return`
|
||||
.radarTitle {
|
||||
font-size: ${t.fontSize};
|
||||
color: ${t.titleColor};
|
||||
dominant-baseline: hanging;
|
||||
text-anchor: middle;
|
||||
}
|
||||
.radarAxisLine {
|
||||
stroke: ${e.axisColor};
|
||||
stroke-width: ${e.axisStrokeWidth};
|
||||
}
|
||||
.radarAxisLabel {
|
||||
dominant-baseline: middle;
|
||||
text-anchor: middle;
|
||||
font-size: ${e.axisLabelFontSize}px;
|
||||
color: ${e.axisColor};
|
||||
}
|
||||
.radarGraticule {
|
||||
fill: ${e.graticuleColor};
|
||||
fill-opacity: ${e.graticuleOpacity};
|
||||
stroke: ${e.graticuleColor};
|
||||
stroke-width: ${e.graticuleStrokeWidth};
|
||||
}
|
||||
.radarLegendText {
|
||||
text-anchor: start;
|
||||
font-size: ${e.legendFontSize}px;
|
||||
dominant-baseline: hanging;
|
||||
}
|
||||
${nt(t,e)}
|
||||
`},"styles"),vt={parser:Q,db:$,renderer:st,styles:it};export{vt as diagram};
|
||||
@@ -0,0 +1,24 @@
|
||||
import{_ as b,F as u,K as B,e as C,l as w,b as S,a as D,q as T,t as z,g as F,s as P,G as E,H as A,z as W}from"./mermaid.core-BRRy2yZG.js";import{p as _}from"./chunk-4BX2VUAB-Ds5vk7IO.js";import{p as N}from"./treemap-GDKQZRPO-DgoZf2I3.js";import"./preload-helper-Dp1pzeXC.js";import"./iframe-aoIC7NDi.js";import"./index-DrFu-skq.js";import"./_baseUniq-7kyoN_aU.js";import"./_basePickBy-BopQxIEc.js";import"./clone-BASZBmHw.js";var L=E.packet,m,v=(m=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=u({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(m,"PacketDB"),m),M=1e4,Y=b((e,t)=>{_(e,t);let o=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??(a=o+1),a!==o+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${o+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),o=i,w.debug(`Packet block ${a} - ${o} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,s]=G({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(r)},"populate"),G=b((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const r=t*o-1,n=t*o;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),o=(r=x.parser)==null?void 0:r.yy;if(!(o instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,o)},"parse")},H=b((e,t,o,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewbox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())I(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((e,t,o,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=o*(r+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),K={draw:H},O={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},j=b(({packet:e}={})=>{const t=u(O,e);return`
|
||||
.packetByte {
|
||||
font-size: ${t.byteFontSize};
|
||||
}
|
||||
.packetByte.start {
|
||||
fill: ${t.startByteColor};
|
||||
}
|
||||
.packetByte.end {
|
||||
fill: ${t.endByteColor};
|
||||
}
|
||||
.packetLabel {
|
||||
fill: ${t.labelColor};
|
||||
font-size: ${t.labelFontSize};
|
||||
}
|
||||
.packetTitle {
|
||||
fill: ${t.titleColor};
|
||||
font-size: ${t.titleFontSize};
|
||||
}
|
||||
.packetBlock {
|
||||
stroke: ${t.blockStrokeColor};
|
||||
stroke-width: ${t.blockStrokeWidth};
|
||||
fill: ${t.blockFillColor};
|
||||
}
|
||||
`},"styles"),et={parser:x,get db(){return new v},renderer:K,styles:j};export{et as diagram};
|
||||
Loaded 100 of 337 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user