@eeshaai/code 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +115 -0
- package/README.md +322 -0
- package/dist/THIRD-PARTY-NOTICES.md +23 -0
- package/dist/claude-agent-sdk/LICENSE.md +1 -0
- package/dist/claude-agent-sdk/sdk.mjs +156 -0
- package/dist/cli.js +23 -0
- package/dist/pluginWorker.js +1610 -0
- package/dist/resources/styles/custom/instructions/design.md +284 -0
- package/dist/resources/styles/custom/instructions/requirements.md +161 -0
- package/dist/resources/styles/custom/instructions/tasks-implement.md +90 -0
- package/dist/resources/styles/custom/instructions/tasks.md +159 -0
- package/dist/resources/styles/custom/process.md +49 -0
- package/dist/resources/styles/custom/prompts/first.md +29 -0
- package/dist/resources/styles/custom/prompts/implement.md +27 -0
- package/dist/resources/styles/custom/prompts/rewrite-note.md +40 -0
- package/dist/resources/styles/custom/prompts/rewrite.md +32 -0
- package/dist/resources/styles/custom/style.yml +46 -0
- package/dist/resources/styles/grammar.md +731 -0
- package/dist/server.js +839 -0
- package/dist/web/chunks/abnfDiagram-VCTEODGH-6KC3BO47.js +2 -0
- package/dist/web/chunks/architecture-7GRP2DOG-JLXNDD4H.js +2 -0
- package/dist/web/chunks/architectureDiagram-5GKGNRK7-QKPCVOD2.js +37 -0
- package/dist/web/chunks/blockDiagram-I7D4REHJ-4XZWNXLB.js +130 -0
- package/dist/web/chunks/c4Diagram-7LVT6UL2-4HJHKNE3.js +39 -0
- package/dist/web/chunks/chunk-2DLEMZHM.js +33 -0
- package/dist/web/chunks/chunk-2RFQIKC6.js +232 -0
- package/dist/web/chunks/chunk-37NHO5VO.js +2 -0
- package/dist/web/chunks/chunk-46RPN6IE.js +3 -0
- package/dist/web/chunks/chunk-4IPDIKAU.js +2 -0
- package/dist/web/chunks/chunk-4KP3BIPB.js +2 -0
- package/dist/web/chunks/chunk-4S2DRQJ6.js +340 -0
- package/dist/web/chunks/chunk-4TORDSRR.js +2 -0
- package/dist/web/chunks/chunk-5KNOHX5X.js +15 -0
- package/dist/web/chunks/chunk-6FQEBIA3.js +133 -0
- package/dist/web/chunks/chunk-6KSWTVXD.js +3 -0
- package/dist/web/chunks/chunk-6TGTE6CF.js +2 -0
- package/dist/web/chunks/chunk-6URXM4C4.js +2 -0
- package/dist/web/chunks/chunk-6VRLULJH.js +2 -0
- package/dist/web/chunks/chunk-7XAOOQR4.js +2 -0
- package/dist/web/chunks/chunk-BUZPUGIT.js +2 -0
- package/dist/web/chunks/chunk-DIRT34TZ.js +2 -0
- package/dist/web/chunks/chunk-FGASMJTA.js +4 -0
- package/dist/web/chunks/chunk-FNIFXWXL.js +2 -0
- package/dist/web/chunks/chunk-FPLIRG3U.js +73 -0
- package/dist/web/chunks/chunk-GQPX4EIC.js +11 -0
- package/dist/web/chunks/chunk-HAKJ3AUV.js +2 -0
- package/dist/web/chunks/chunk-HBEUVMXY.js +2 -0
- package/dist/web/chunks/chunk-HNYXDXPN.js +63 -0
- package/dist/web/chunks/chunk-HX7W7GSO.js +2 -0
- package/dist/web/chunks/chunk-II6WN3ZG.js +2 -0
- package/dist/web/chunks/chunk-JOSXY3EP.js +169 -0
- package/dist/web/chunks/chunk-L34PKG4P.js +2 -0
- package/dist/web/chunks/chunk-LDXBIOBF.js +2 -0
- package/dist/web/chunks/chunk-LHNPPNB7.js +3 -0
- package/dist/web/chunks/chunk-LQ6CTWX6.js +2 -0
- package/dist/web/chunks/chunk-LSVIQRSY.js +2 -0
- package/dist/web/chunks/chunk-M3SWKTLZ.js +2 -0
- package/dist/web/chunks/chunk-MBZYSJFT.js +2 -0
- package/dist/web/chunks/chunk-MZEMPN3C.js +2 -0
- package/dist/web/chunks/chunk-OODDZ447.js +2 -0
- package/dist/web/chunks/chunk-OXLTOJNY.js +3 -0
- package/dist/web/chunks/chunk-PR453BYT.js +2 -0
- package/dist/web/chunks/chunk-QNEZP2TE.js +179 -0
- package/dist/web/chunks/chunk-R7TFKRNM.js +2 -0
- package/dist/web/chunks/chunk-T4HEWXAQ.js +2 -0
- package/dist/web/chunks/chunk-TPXX77KB.js +2 -0
- package/dist/web/chunks/chunk-TPYBIPJG.js +2 -0
- package/dist/web/chunks/chunk-TXNHMPKM.js +89 -0
- package/dist/web/chunks/chunk-VAKN3BTM.js +2 -0
- package/dist/web/chunks/chunk-VY4GEFSG.js +2 -0
- package/dist/web/chunks/chunk-XBYCKXUJ.js +207 -0
- package/dist/web/chunks/chunk-YM7LHP34.js +16 -0
- package/dist/web/chunks/classDiagram-ZZMXUADV-4J5HHZD6.js +2 -0
- package/dist/web/chunks/classDiagram-v2-VYDZK3BY-X6WY2DAS.js +2 -0
- package/dist/web/chunks/cose-bilkent-JH36ORCC-ZPRW5JRW.js +2 -0
- package/dist/web/chunks/cynefin-OW5HDTMX-SVVTQRRB.js +2 -0
- package/dist/web/chunks/cynefinDiagram-5FMLGOSQ-O7GURHJG.js +63 -0
- package/dist/web/chunks/dagre-GXQ25YYZ-WK67O4N6.js +5 -0
- package/dist/web/chunks/diagram-S7CK7UJ4-2CEO2EN2.js +31 -0
- package/dist/web/chunks/diagram-UQ7AKVKN-2Z4VHGF3.js +42 -0
- package/dist/web/chunks/diagram-VSXAHHWV-AN4BOWYB.js +4 -0
- package/dist/web/chunks/diagram-VX7I27RA-VEZ2GXCM.js +25 -0
- package/dist/web/chunks/diagram-Z3DM3KII-TGGNDSLW.js +25 -0
- package/dist/web/chunks/ebnfDiagram-PWID7BFC-7RM57IJV.js +2 -0
- package/dist/web/chunks/erDiagram-RLTQ6QDP-LCATC3YT.js +100 -0
- package/dist/web/chunks/eventmodeling-NTZA5JFV-2SR57JAH.js +2 -0
- package/dist/web/chunks/flowDiagram-HODETNUW-HU6Y2EYQ.js +2 -0
- package/dist/web/chunks/ganttDiagram-EL5Y4UJY-5VPBBF2V.js +293 -0
- package/dist/web/chunks/gitGraph-4MIJSDKK-25JPIQP7.js +2 -0
- package/dist/web/chunks/gitGraphDiagram-WWUBYQGX-HZMAGPIJ.js +107 -0
- package/dist/web/chunks/info-A6RAGUB7-72MROTVX.js +2 -0
- package/dist/web/chunks/infoDiagram-27XIBGKW-BQYTPGNG.js +3 -0
- package/dist/web/chunks/ishikawaDiagram-5VMMS53U-A54WWBPX.js +71 -0
- package/dist/web/chunks/journeyDiagram-3NMN7TZE-XRCTMTR7.js +140 -0
- package/dist/web/chunks/kanban-definition-UXKFOSKX-UW2PQXZF.js +90 -0
- package/dist/web/chunks/katex-B7HWCVTN.js +258 -0
- package/dist/web/chunks/mermaid.core-VL5SQK5M.js +19 -0
- package/dist/web/chunks/mindmap-definition-YA3MSWOX-2H2Z6CVN.js +97 -0
- package/dist/web/chunks/packet-AYTQ26CC-NEGDW4B6.js +2 -0
- package/dist/web/chunks/pegDiagram-XKGWAZYB-KC4BYUN7.js +2 -0
- package/dist/web/chunks/pie-WAS4IAKB-OT3EMGHT.js +2 -0
- package/dist/web/chunks/pieDiagram-E7YTZNPT-54T6XSU5.js +40 -0
- package/dist/web/chunks/quadrantDiagram-AXDQQJYC-3G3RXSTE.js +8 -0
- package/dist/web/chunks/radar-RG4KPBEZ-DCHU5FOQ.js +2 -0
- package/dist/web/chunks/railroad-74A4TZTK-RZX6D7H6.js +2 -0
- package/dist/web/chunks/railroad-abnf-HS5TGJTU-STTFN7R4.js +2 -0
- package/dist/web/chunks/railroad-ebnf-LZEXJU2U-RBXU3IBK.js +2 -0
- package/dist/web/chunks/railroad-peg-WCYAUIDC-OD5BXOH6.js +2 -0
- package/dist/web/chunks/railroadDiagram-O6MQD6OU-3LHKFF5N.js +2 -0
- package/dist/web/chunks/requirementDiagram-BXWQKSXE-M4LF54YT.js +85 -0
- package/dist/web/chunks/sankeyDiagram-P5KCCOFB-USCKKKNT.js +41 -0
- package/dist/web/chunks/sequenceDiagram-WJ2MYXX4-QZ2O4KWV.js +163 -0
- package/dist/web/chunks/sizeCapture-INFHLROL-DZI5JWEV.js +2 -0
- package/dist/web/chunks/stateDiagram-D77RDMKH-EQJNTBF3.js +2 -0
- package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-WSCDKLG6.js +2 -0
- package/dist/web/chunks/swimlanes-42K2YHIH-H7SZ2HG6.js +2 -0
- package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-DFYTBPVS.js +9 -0
- package/dist/web/chunks/timeline-definition-24CTP7MA-4Q2ARIQ6.js +121 -0
- package/dist/web/chunks/treeView-Q6P3EWNA-ADCP6RPT.js +2 -0
- package/dist/web/chunks/treemap-WGGIJYW6-NEV7DUDY.js +2 -0
- package/dist/web/chunks/vennDiagram-4TSXK5OY-WMJVK74C.js +35 -0
- package/dist/web/chunks/wardley-WFR3VGLG-4QZOFDI5.js +2 -0
- package/dist/web/chunks/wardleyDiagram-VM6X3IG4-CLB324RQ.js +79 -0
- package/dist/web/chunks/xychartDiagram-S5SC5T6Z-G5C2R7C2.js +8 -0
- package/dist/web/index.html +24 -0
- package/dist/web/page.css +2 -0
- package/dist/web/page.js +210 -0
- package/package.json +62 -10
- package/cli.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as ut}from"./chunk-MBZYSJFT.js";import{A as D,D as xr,N as j,h as mr,l as hr}from"./chunk-6FQEBIA3.js";import{$ as _r,G as Ar,J as wr,K as Or,L as Br,M as Sr,N as Ir,O as Pr,P as Mr,Q as Wr,R as Er,S as Lr,T as Dr,U as $r,V as Rr,W as Nr,X as Fr,Y as jr,Z as Tr,_ as zr,b as B,h as br}from"./chunk-L34PKG4P.js";import{a as p}from"./chunk-LDXBIOBF.js";import{c as ct,d as s}from"./chunk-R7TFKRNM.js";s();s();function b(r){return r==null||typeof r!="object"&&typeof r!="function"}s();function x(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}s();var T="[object RegExp]",S="[object String]",I="[object Number]",P="[object Boolean]",M="[object Arguments]",z="[object Symbol]",_="[object Date]",v="[object Map]",U="[object Set]",k="[object Array]";var H="[object ArrayBuffer]",q="[object Object]";var K="[object DataView]",V="[object Uint8Array]",X="[object Uint8ClampedArray]",Y="[object Uint16Array]",G="[object Uint32Array]";var J="[object Int8Array]",Z="[object Int16Array]",Q="[object Int32Array]";var C="[object Float32Array]",rr="[object Float64Array]";s();function vr(r){return Array.isArray(r)}s();s();function W(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function A(r){return W(r)}function yt(r){if(b(r))return r;let t=x(r);if(!lt(r))return{};if(vr(r)){let e=Array.from(r);return r.length>0&&typeof r[0]=="string"&&Object.hasOwn(r,"index")&&(e.index=r.index,e.input=r.input),e}if(A(r)){let e=r,n=e.constructor;return new n(e.buffer,e.byteOffset,e.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(r.byteLength);if(t==="[object DataView]"){let e=r,n=e.buffer,m=e.byteOffset,o=e.byteLength,f=new ArrayBuffer(o),a=new Uint8Array(n,m,o);return new Uint8Array(f).set(a),new DataView(f)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){let e=r.constructor,n=new e(r.valueOf());return t==="[object String]"?dt(n,r):fr(n,r),n}if(t==="[object Date]")return new Date(Number(r));if(t==="[object RegExp]"){let e=r,n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(r));if(t==="[object Map]"){let e=r,n=new Map;return e.forEach((m,o)=>{n.set(o,m)}),n}if(t==="[object Set]"){let e=r,n=new Set;return e.forEach(m=>{n.add(m)}),n}if(t==="[object Arguments]"){let e=r,n={};return fr(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}let i={};return ht(i,r),fr(i,r),gt(i,r),i}function lt(r){switch(x(r)){case M:case k:case H:case K:case P:case _:case C:case rr:case J:case Z:case Q:case v:case I:case q:case T:case U:case S:case z:case V:case X:case Y:case G:return!0;default:return!1}}function fr(r,t){for(let i in t)Object.hasOwn(t,i)&&(r[i]=t[i])}function gt(r,t){let i=Object.getOwnPropertySymbols(t);for(let e=0;e<i.length;e++){let n=i[e];Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}}function dt(r,t){let i=t.valueOf().length;for(let e in t)Object.hasOwn(t,e)&&(Number.isNaN(Number(e))||Number(e)>=i)&&(r[e]=t[e])}function ht(r,t){let i=Object.getPrototypeOf(t);i!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(r,i)}s();s();s();var sr=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function E(r){return typeof sr.Buffer<"u"&&sr.Buffer.isBuffer(r)}s();s();function Ur(r){return Number.isSafeInteger(r)&&r>=0}function tr(r){return r!=null&&typeof r!="function"&&Ur(r.length)}s();function $(r){return r!==null&&typeof r=="object"&&x(r)==="[object Arguments]"}s();function kr(r){let t=r?.constructor;return r===(typeof t=="function"?t.prototype:Object.prototype)}function xt(r){if(r==null)return!0;if(tr(r))return typeof r.splice!="function"&&typeof r!="string"&&!E(r)&&!A(r)&&!$(r)?!1:r.length===0;if(typeof r=="object"||typeof r=="function"){if(r instanceof Map||r instanceof Set)return r.size===0;let t=Object.keys(r);return kr(r)?t.filter(i=>i!=="constructor").length===0:t.length===0}return!0}s();s();function er(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let t=r;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}s();function Hr(){}s();function ir(r){return Object.getOwnPropertySymbols(r).filter(t=>Object.prototype.propertyIsEnumerable.call(r,t))}s();function qr(r){return r==="__proto__"}s();function Kr(r,t){return L(r,void 0,r,new Map,t)}function L(r,t,i,e=new Map,n=void 0){let m=n?.(r,t,i,e);if(m!==void 0)return m;if(b(r))return r;if(e.has(r))return e.get(r);if(Array.isArray(r)){let o=new Array(r.length);e.set(r,o);for(let f=0;f<r.length;f++)o[f]=L(r[f],f,i,e,n);return Object.hasOwn(r,"index")&&(o.index=r.index),Object.hasOwn(r,"input")&&(o.input=r.input),o}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let o=new RegExp(r.source,r.flags);return o.lastIndex=r.lastIndex,o}if(r instanceof Map){let o=new Map;e.set(r,o);for(let[f,a]of r)o.set(f,L(a,f,i,e,n));return o}if(r instanceof Set){let o=new Set;e.set(r,o);for(let f of r)o.add(L(f,void 0,i,e,n));return o}if(E(r))return r.subarray();if(W(r)){let o=new(Object.getPrototypeOf(r)).constructor(r.length);e.set(r,o);for(let f=0;f<r.length;f++)o[f]=L(r[f],f,i,e,n);return o}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let o=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return e.set(r,o),l(o,r,i,e,n),o}if(typeof File<"u"&&r instanceof File){let o=new File([r],r.name,{type:r.type});return e.set(r,o),l(o,r,i,e,n),o}if(typeof Blob<"u"&&r instanceof Blob){let o=new Blob([r],{type:r.type});return e.set(r,o),l(o,r,i,e,n),o}if(r instanceof Error){let o=structuredClone(r);return e.set(r,o),o.message=r.message,o.name=r.name,o.stack=r.stack,o.cause=r.cause,o.constructor=r.constructor,l(o,r,i,e,n),o}if(r instanceof Boolean){let o=new Boolean(r.valueOf());return e.set(r,o),l(o,r,i,e,n),o}if(r instanceof Number){let o=new Number(r.valueOf());return e.set(r,o),l(o,r,i,e,n),o}if(r instanceof String){let o=new String(r.valueOf());return e.set(r,o),l(o,r,i,e,n),o}if(typeof r=="object"&&bt(r)){let o=Object.create(Object.getPrototypeOf(r));return e.set(r,o),l(o,r,i,e,n),o}return r}function l(r,t,i=r,e,n){let m=[...Object.keys(t),...ir(t)];for(let o=0;o<m.length;o++){let f=m[o],a=Object.getOwnPropertyDescriptor(r,f);(a==null||a.writable)&&(r[f]=L(t[f],f,i,e,n))}}function bt(r){switch(x(r)){case M:case k:case H:case K:case P:case _:case C:case rr:case J:case Z:case Q:case v:case I:case q:case T:case U:case S:case z:case V:case X:case Y:case G:return!0;default:return!1}}s();function Vr(r,t){return Kr(r,(i,e,n,m)=>{let o=t?.(i,e,n,m);if(o!==void 0)return o;if(typeof r=="object"){if(x(r)==="[object Object]"&&typeof r.constructor!="function"){let f={};return m.set(r,f),l(f,r,n,m),f}switch(Object.prototype.toString.call(r)){case I:case S:case P:{let f=new r.constructor(r?.valueOf());return l(f,r),f}case M:{let f={};return l(f,r),f.length=r.length,f[Symbol.iterator]=r[Symbol.iterator],f}default:return}}})}s();function ar(r){return Vr(r)}s();function R(r){return typeof r=="object"&&r!==null}s();function Xr(r){return R(r)&&tr(r)}s();function w(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");let i=function(...e){let n=t?t.apply(this,e):e[0],m=i.cache;if(m.has(n))return m.get(n);let o=r.apply(this,e);return i.cache=m.set(n,o)||m,o};return i.cache=new(w.Cache||Map),i}w.Cache=Map;s();s();function Yr(r){if(b(r))return r;if(Array.isArray(r)||W(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let t=Object.getPrototypeOf(r);if(t==null)return Object.assign(Object.create(t),r);let i=t.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let e=new i(r);return e.lastIndex=r.lastIndex,e}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let e;return r instanceof AggregateError?e=new i(r.errors,r.message,{cause:r.cause}):e=new i(r.message,{cause:r.cause}),e.stack=r.stack,Object.assign(e,r),e}return typeof File<"u"&&r instanceof File?new i([r],r.name,{type:r.type,lastModified:r.lastModified}):typeof r=="object"?Object.assign(Object.create(t),r):r}function Gr(r,...t){let i=t.slice(0,-1),e=t[t.length-1],n=r;for(let m=0;m<i.length;m++){let o=i[m];n=or(n,o,e,new Map)}return n}function or(r,t,i,e){if(b(r)&&(r=Object(r)),t==null||typeof t!="object")return r;if(e.has(t))return Yr(e.get(t));if(e.set(t,r),Array.isArray(t)){t=t.slice();for(let m=0;m<t.length;m++)t[m]=t[m]??void 0}let n=[...Object.keys(t),...ir(t)];for(let m=0;m<n.length;m++){let o=n[m];if(qr(o))continue;let f=t[o],a=r[o];if($(f)&&(f={...f}),$(a)&&(a={...a}),E(f)&&(f=ar(f)),Array.isArray(f))if(Array.isArray(a)){let g=[],y=Reflect.ownKeys(a);for(let h=0;h<y.length;h++){let d=y[h];g[d]=a[d]}a=g}else if(Xr(a)){let g=[];for(let y=0;y<a.length;y++)g[y]=a[y];a=g}else a=[];let u=i(a,f,o,r,t,e);u!==void 0?r[o]=u:Array.isArray(f)||R(a)&&R(f)&&(er(a)||er(f)||A(a)||A(f))?r[o]=or(a,f,i,e):a==null&&er(f)?r[o]=or({},f,i,e):a==null&&A(f)?r[o]=ar(f):(a===void 0||f!==void 0)&&(r[o]=f)}return r}s();function pr(r,...t){return Gr(r,...t,Hr)}s();var Qr=ct(ut(),1);var At="\u200B",wt={curveBasis:Br,curveBasisClosed:Sr,curveBasisOpen:Ir,curveBumpX:wr,curveBumpY:Or,curveBundle:Pr,curveCardinalClosed:Wr,curveCardinalOpen:Er,curveCardinal:Mr,curveCatmullRomClosed:Dr,curveCatmullRomOpen:$r,curveCatmullRom:Lr,curveLinear:Ar,curveLinearClosed:Rr,curveMonotoneX:Nr,curveMonotoneY:Fr,curveNatural:jr,curveStep:Tr,curveStepAfter:_r,curveStepBefore:zr},Ot=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Bt=p(function(r,t){let i=Cr(r,/(?:init\b)|(?:initialize\b)/),e={};if(Array.isArray(i)){let o=i.map(f=>f.args);hr(o),e=mr(e,[...o])}else e=i.args;if(!e)return;let n=xr(r,t),m="config";return e[m]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),e[n]=e[m],delete e[m]),e},"detectInit"),Cr=p(function(r,t=null){try{let i=new RegExp(`[%]{2}(?![{]${Ot.source})(?=[}][%]{2}).*
|
|
2
|
+
`,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),B.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${r}`);let e,n=[];for(;(e=D.exec(r))!==null;)if(e.index===D.lastIndex&&D.lastIndex++,e&&!t||t&&e[1]?.match(t)||t&&e[2]?.match(t)){let m=e[1]?e[1]:e[2],o=e[3]?e[3].trim():e[4]?JSON.parse(e[4].trim()):null;n.push({type:m,args:o})}return n.length===0?{type:r,args:null}:n.length===1?n[0]:n}catch(i){return B.error(`ERROR: ${i.message} - Unable to parse directive type: '${t}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),ji=p(function(r){return r.replace(D,"")},"removeDirectives"),St=p(function(r,t){for(let[i,e]of t.entries())if(e.match(r))return i;return-1},"isSubstringInArray");function rt(r,t){if(!r)return t;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return wt[i]??t}p(rt,"interpolateToCurve");function tt(r,t){let i=r.trim();if(i)return t.securityLevel!=="loose"?(0,Qr.sanitizeUrl)(i):i}p(tt,"formatUrl");var It=p((r,...t)=>{let i=r.split("."),e=i.length-1,n=i[e],m=window;for(let o=0;o<e;o++)if(m=m[i[o]],!m){B.error(`Function name: ${r} not found in window`);return}m[n](...t)},"runFunc");function cr(r,t){return!r||!t?0:Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}p(cr,"distance");function et(r){let t,i=0;r.forEach(n=>{i+=cr(n,t),t=n});let e=i/2;return ur(r,e)}p(et,"traverseEdge");function it(r){return r.length===1?r[0]:et(r)}p(it,"calcLabelPosition");var Jr=p((r,t=2)=>{let i=Math.pow(10,t);return Math.round(r*i)/i},"roundNumber"),ur=p((r,t)=>{let i,e=t;for(let n of r){if(i){let m=cr(n,i);if(m===0)return i;if(m<e)e-=m;else{let o=e/m;if(o<=0)return i;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Jr((1-o)*i.x+o*n.x,5),y:Jr((1-o)*i.y+o*n.y,5)}}}i=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Pt=p((r,t,i)=>{B.info(`our points ${JSON.stringify(t)}`),t[0]!==i&&(t=t.reverse());let n=ur(t,25),m=r?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),f={x:0,y:0};return f.x=Math.sin(o)*m+(t[0].x+n.x)/2,f.y=-Math.cos(o)*m+(t[0].y+n.y)/2,f},"calcCardinalityPosition");function ot(r,t,i){let e=structuredClone(i);B.info("our points",e),t!=="start_left"&&t!=="start_right"&&e.reverse();let n=25+r,m=ur(e,n),o=10+r*.5,f=Math.atan2(e[0].y-m.y,e[0].x-m.x),a={x:0,y:0};return t==="start_left"?(a.x=Math.sin(f+Math.PI)*o+(e[0].x+m.x)/2,a.y=-Math.cos(f+Math.PI)*o+(e[0].y+m.y)/2):t==="end_right"?(a.x=Math.sin(f-Math.PI)*o+(e[0].x+m.x)/2-5,a.y=-Math.cos(f-Math.PI)*o+(e[0].y+m.y)/2-5):t==="end_left"?(a.x=Math.sin(f)*o+(e[0].x+m.x)/2-5,a.y=-Math.cos(f)*o+(e[0].y+m.y)/2-5):(a.x=Math.sin(f)*o+(e[0].x+m.x)/2,a.y=-Math.cos(f)*o+(e[0].y+m.y)/2),a}p(ot,"calcTerminalLabelPosition");function nt(r){let t="",i="";for(let e of r)e!==void 0&&(e.startsWith("color:")||e.startsWith("text-align:")?i=i+e+";":t=t+e+";");return{style:t,labelStyle:i}}p(nt,"getStylesFromArray");var Zr=0,Mt=p(()=>(Zr++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Zr),"generateId");function mt(r){let t="",i="0123456789abcdef",e=i.length;for(let n=0;n<r;n++)t+=i.charAt(Math.floor(Math.random()*e));return t}p(mt,"makeRandomHex");var Wt=p(r=>mt(r.length),"random"),Et=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Lt=p(function(r,t){let i=t.text.replace(j.lineBreakRegex," "),[,e]=lr(t.fontSize),n=r.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",e),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);let m=n.append("tspan");return m.attr("x",t.x+t.textMargin*2),m.attr("fill",t.fill),m.text(i),n},"drawSimpleText"),Dt=w((r,t,i)=>{if(!r||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),j.lineBreakRegex.test(r)))return r;let e=r.split(" ").filter(Boolean),n=[],m="";return e.forEach((o,f)=>{let a=N(`${o} `,i),u=N(m,i);if(a>t){let{hyphenatedStrings:h,remainingWord:d}=$t(o,t,"-",i);n.push(m,...h),m=d}else u+a>=t?(n.push(m),m=o):m=[m,o].filter(Boolean).join(" ");f+1===e.length&&n.push(m)}),n.filter(o=>o!=="").join(i.joinWith)},(r,t,i)=>`${r}${t}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),$t=w((r,t,i="-",e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},e);let n=[...r],m=[],o="";return n.forEach((f,a)=>{let u=`${o}${f}`;if(N(u,e)>=t){let y=a+1,h=n.length===y,d=`${u}${i}`;m.push(h?u:d),o=""}else o=u}),{hyphenatedStrings:m,remainingWord:o}},(r,t,i="-",e)=>`${r}${t}${i}${e.fontSize}${e.fontWeight}${e.fontFamily}`);function ft(r,t){return yr(r,t).height}p(ft,"calculateTextHeight");function N(r,t){return yr(r,t).width}p(N,"calculateTextWidth");var yr=w((r,t)=>{let{fontSize:i=12,fontFamily:e="Arial",fontWeight:n=400}=t;if(!r)return{width:0,height:0};let[,m]=lr(i),o=["sans-serif",e],f=r.split(j.lineBreakRegex),a=[],u=br("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let g=u.append("svg");for(let h of o){let d=0,O={width:0,height:0,lineHeight:0};for(let pt of f){let gr=Et();gr.text=pt||At;let dr=Lt(g,gr).style("font-size",m).style("font-weight",n).style("font-family",h),F=(dr._groups||dr)[0][0].getBBox();if(F.width===0&&F.height===0)throw new Error("svg element not in render tree");O.width=Math.round(Math.max(O.width,F.width)),d=Math.round(F.height),O.height+=d,O.lineHeight=Math.round(Math.max(O.lineHeight,d))}a.push(O)}g.remove();let y=isNaN(a[1].height)||isNaN(a[1].width)||isNaN(a[1].lineHeight)||a[0].height>a[1].height&&a[0].width>a[1].width&&a[0].lineHeight>a[1].lineHeight?0:1;return a[y]},(r,t)=>`${r}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Rt=class{constructor(r=!1,t){this.count=0,this.count=t?t.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},nr,Nt=p(function(r){return nr=nr||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),nr.innerHTML=r,unescape(nr.textContent)},"entityDecode");function Ft(r){return"str"in r}p(Ft,"isDetailedError");var jt=p((r,t,i,e)=>{if(!e)return;let n=r.node()?.getBBox();n&&r.append("text").text(e).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-i).attr("class",t)},"insertTitle"),lr=p(r=>{if(typeof r=="number")return[r,r+"px"];let t=parseInt(r??"",10);return Number.isNaN(t)?[void 0,void 0]:r===String(t)?[t,r+"px"]:[t,r]},"parseFontSize");function st(r,t){return pr({},r,t)}p(st,"cleanAndMerge");var Ti={assignWithDepth:mr,wrapLabel:Dt,calculateTextHeight:ft,calculateTextWidth:N,calculateTextDimensions:yr,cleanAndMerge:st,detectInit:Bt,detectDirective:Cr,isSubstringInArray:St,interpolateToCurve:rt,calcLabelPosition:it,calcCardinalityPosition:Pt,calcTerminalLabelPosition:ot,formatUrl:tt,getStylesFromArray:nt,generateId:Mt,random:Wt,runFunc:It,entityDecode:Nt,insertTitle:jt,isLabelCoordinateInPath:at,parseFontSize:lr,InitIDGenerator:Rt},zi=p(function(r){let t=r;return t=t.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/#\w+;/g,function(i){let e=i.substring(1,i.length-1);return/^\+?\d+$/.test(e)?"\uFB02\xB0\xB0"+e+"\xB6\xDF":"\uFB02\xB0"+e+"\xB6\xDF"}),t},"encodeEntities"),_i=p(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),vi=p((r,t,{counter:i=0,prefix:e,suffix:n},m)=>m||`${e?`${e}_`:""}${r}_${t}_${i}${n?`_${n}`:""}`,"getEdgeId");function Tt(r){return r??null}p(Tt,"handleUndefinedAttr");function at(r,t){let i=Math.round(r.x),e=Math.round(r.y),n=t.replace(/(\d+\.\d+)/g,m=>Math.round(parseFloat(m)).toString());return n.includes(i.toString())||n.includes(e.toString())}p(at,"isLabelCoordinateInPath");export{yt as a,xt as b,At as c,ji as d,rt as e,nt as f,Mt as g,Wt as h,Dt as i,ft as j,N as k,yr as l,Ft as m,lr as n,st as o,Ti as p,zi as q,_i as r,vi as s,Tt as t};
|
|
3
|
+
//# sourceMappingURL=chunk-LHNPPNB7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t,b as u,c as n,d as i,e as o,g as l,h as d,w as h,y as m}from"./chunk-QNEZP2TE.js";import{d as s}from"./chunk-R7TFKRNM.js";s();var A=class extends m{static{t(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},C=class extends h{static{t(this,"ArchitectureValueConverter")}runCustomConverter(c,r,a){if(c.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(c.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(c.name==="ARCH_TITLE"){let e=r.replace(/^\[|]$/g,"").trim();return(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"').replace(/\\'/g,"'")),e.trim()}}},v={parser:{TokenBuilder:t(()=>new A,"TokenBuilder"),ValueConverter:t(()=>new C,"ValueConverter")}};function p(c=o){let r=i(n(c),l),a=i(u({shared:r}),d,v);return r.ServiceRegistry.register(a),{shared:r,Architecture:a}}t(p,"createArchitectureServices");export{v as a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-LQ6CTWX6.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o,b as s,c as l,d as i,e as d,g as m,t as c,w as p,y as T}from"./chunk-QNEZP2TE.js";import{d as n}from"./chunk-R7TFKRNM.js";n();var u=class extends T{static{o(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},v=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,g=class extends p{static{o(this,"TreemapValueConverter")}runCustomConverter(r,e,t){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR")return e.substring(1,e.length-1);if(r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=v.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}};function f(r){let e=r.validation.TreemapValidator,t=r.validation.ValidationRegistry;if(t){let a={Treemap:e.checkSingleRoot.bind(e)};t.register(a,e)}}o(f,"registerValidationChecks");var h=class{static{o(this,"TreemapValidator")}checkSingleRoot(r,e){let t;for(let a of r.TreemapRows)a.item&&(t===void 0&&a.indent===void 0?t=0:a.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):t!==void 0&&t>=parseInt(a.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},C={parser:{TokenBuilder:o(()=>new u,"TokenBuilder"),ValueConverter:o(()=>new g,"ValueConverter")},validation:{TreemapValidator:o(()=>new h,"TreemapValidator")}};function V(r=d){let e=i(l(r),m),t=i(s({shared:e}),c,C);return e.ServiceRegistry.register(t),f(t),{shared:e,Treemap:t}}o(V,"createTreemapServices");export{C as a,V as b};
|
|
2
|
+
//# sourceMappingURL=chunk-LSVIQRSY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as bt}from"./chunk-R7TFKRNM.js";bt();function Y(a,t,s){if(a&&a.length){let[e,n]=t,o=Math.PI/180*s,r=Math.cos(o),h=Math.sin(o);for(let i of a){let[l,c]=i;i[0]=(l-e)*r-(c-n)*h+e,i[1]=(l-e)*h+(c-n)*r+n}}}function Wt(a,t){return a[0]===t[0]&&a[1]===t[1]}function Et(a,t,s,e=1){let n=s,o=Math.max(t,.1),r=a[0]&&a[0][0]&&typeof a[0][0]=="number"?[a]:a,h=[0,0];if(n)for(let l of r)Y(l,h,n);let i=(function(l,c,d){let p=[];for(let M of l){let m=[...M];Wt(m[0],m[m.length-1])||m.push([m[0][0],m[0][1]]),m.length>2&&p.push(m)}let u=[];c=Math.max(c,.1);let f=[];for(let M of p)for(let m=0;m<M.length-1;m++){let P=M[m],x=M[m+1];if(P[1]!==x[1]){let w=Math.min(P[1],x[1]);f.push({ymin:w,ymax:Math.max(P[1],x[1]),x:w===P[1]?P[0]:x[0],islope:(x[0]-P[0])/(x[1]-P[1])})}}if(f.sort(((M,m)=>M.ymin<m.ymin?-1:M.ymin>m.ymin?1:M.x<m.x?-1:M.x>m.x?1:M.ymax===m.ymax?0:(M.ymax-m.ymax)/Math.abs(M.ymax-m.ymax))),!f.length)return u;let g=[],k=f[0].ymin,b=0;for(;g.length||f.length;){if(f.length){let M=-1;for(let m=0;m<f.length&&!(f[m].ymin>k);m++)M=m;f.splice(0,M+1).forEach((m=>{g.push({s:k,edge:m})}))}if(g=g.filter((M=>!(M.edge.ymax<=k))),g.sort(((M,m)=>M.edge.x===m.edge.x?0:(M.edge.x-m.edge.x)/Math.abs(M.edge.x-m.edge.x))),(d!==1||b%c==0)&&g.length>1)for(let M=0;M<g.length;M+=2){let m=M+1;if(m>=g.length)break;let P=g[M].edge,x=g[m].edge;u.push([[Math.round(P.x),k],[Math.round(x.x),k]])}k+=d,g.forEach((M=>{M.edge.x=M.edge.x+d*M.edge.islope})),b++}return u})(r,o,e);if(n){for(let l of r)Y(l,h,-n);(function(l,c,d){let p=[];l.forEach((u=>p.push(...u))),Y(p,c,d)})(i,h,-n)}return i}function F(a,t){var s;let e=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return t.roughness>=1&&(((s=t.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(o=n),Et(a,n,e,o||1)}var q=class{constructor(t){this.helper=t}fillPolygons(t,s){return this._fillPolygons(t,s)}_fillPolygons(t,s){let e=F(t,s);return{type:"fillSketch",ops:this.renderLines(e,s)}}renderLines(t,s){let e=[];for(let n of t)e.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return e}};function X(a){let t=a[0],s=a[1];return Math.sqrt(Math.pow(t[0]-s[0],2)+Math.pow(t[1]-s[1],2))}var at=class extends q{fillPolygons(t,s){let e=s.hachureGap;e<0&&(e=4*s.strokeWidth),e=Math.max(e,.1);let n=F(t,Object.assign({},s,{hachureGap:e})),o=Math.PI/180*s.hachureAngle,r=[],h=.5*e*Math.cos(o),i=.5*e*Math.sin(o);for(let[l,c]of n)X([l,c])&&r.push([[l[0]-h,l[1]+i],[...c]],[[l[0]+h,l[1]-i],[...c]]);return{type:"fillSketch",ops:this.renderLines(r,s)}}},ot=class extends q{fillPolygons(t,s){let e=this._fillPolygons(t,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),o=this._fillPolygons(t,n);return e.ops=e.ops.concat(o.ops),e}},ht=class{constructor(t){this.helper=t}fillPolygons(t,s){let e=F(t,s=Object.assign({},s,{hachureAngle:0}));return this.dotsOnLines(e,s)}dotsOnLines(t,s){let e=[],n=s.hachureGap;n<0&&(n=4*s.strokeWidth),n=Math.max(n,.1);let o=s.fillWeight;o<0&&(o=s.strokeWidth/2);let r=n/4;for(let h of t){let i=X(h),l=i/n,c=Math.ceil(l)-1,d=i-c*n,p=(h[0][0]+h[1][0])/2-n/4,u=Math.min(h[0][1],h[1][1]);for(let f=0;f<c;f++){let g=u+d+f*n,k=p-r+2*Math.random()*r,b=g-r+2*Math.random()*r,M=this.helper.ellipse(k,b,o,o,s);e.push(...M.ops)}}return{type:"fillSketch",ops:e}}},rt=class{constructor(t){this.helper=t}fillPolygons(t,s){let e=F(t,s);return{type:"fillSketch",ops:this.dashedLine(e,s)}}dashedLine(t,s){let e=s.dashOffset<0?s.hachureGap<0?4*s.strokeWidth:s.hachureGap:s.dashOffset,n=s.dashGap<0?s.hachureGap<0?4*s.strokeWidth:s.hachureGap:s.dashGap,o=[];return t.forEach((r=>{let h=X(r),i=Math.floor(h/(e+n)),l=(h+n-i*(e+n))/2,c=r[0],d=r[1];c[0]>d[0]&&(c=r[1],d=r[0]);let p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<i;u++){let f=u*(e+n),g=f+e,k=[c[0]+f*Math.cos(p)+l*Math.cos(p),c[1]+f*Math.sin(p)+l*Math.sin(p)],b=[c[0]+g*Math.cos(p)+l*Math.cos(p),c[1]+g*Math.sin(p)+l*Math.sin(p)];o.push(...this.helper.doubleLineOps(k[0],k[1],b[0],b[1],s))}})),o}},it=class{constructor(t){this.helper=t}fillPolygons(t,s){let e=s.hachureGap<0?4*s.strokeWidth:s.hachureGap,n=s.zigzagOffset<0?e:s.zigzagOffset,o=F(t,s=Object.assign({},s,{hachureGap:e+n}));return{type:"fillSketch",ops:this.zigzagLines(o,n,s)}}zigzagLines(t,s,e){let n=[];return t.forEach((o=>{let r=X(o),h=Math.round(r/(2*s)),i=o[0],l=o[1];i[0]>l[0]&&(i=o[1],l=o[0]);let c=Math.atan((l[1]-i[1])/(l[0]-i[0]));for(let d=0;d<h;d++){let p=2*d*s,u=2*(d+1)*s,f=Math.sqrt(2*Math.pow(s,2)),g=[i[0]+p*Math.cos(c),i[1]+p*Math.sin(c)],k=[i[0]+u*Math.cos(c),i[1]+u*Math.sin(c)],b=[g[0]+f*Math.cos(c+Math.PI/4),g[1]+f*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(g[0],g[1],b[0],b[1],e),...this.helper.doubleLineOps(b[0],b[1],k[0],k[1],e))}})),n}},S={},ct=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},Gt=0,tt=1,yt=2,Z={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function et(a,t){return a.type===t}function gt(a){let t=[],s=(function(r){let h=new Array;for(;r!=="";)if(r.match(/^([ \t\r\n,]+)/))r=r.substr(RegExp.$1.length);else if(r.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Gt,text:RegExp.$1},r=r.substr(RegExp.$1.length);else{if(!r.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:tt,text:`${parseFloat(RegExp.$1)}`},r=r.substr(RegExp.$1.length)}return h[h.length]={type:yt,text:""},h})(a),e="BOD",n=0,o=s[n];for(;!et(o,yt);){let r=0,h=[];if(e==="BOD"){if(o.text!=="M"&&o.text!=="m")return gt("M0,0"+a);n++,r=Z[o.text],e=o.text}else et(o,tt)?r=Z[e]:(n++,r=Z[o.text],e=o.text);if(!(n+r<s.length))throw new Error("Path data ended short");for(let i=n;i<n+r;i++){let l=s[i];if(!et(l,tt))throw new Error("Param not a number: "+e+","+l.text);h[h.length]=+l.text}if(typeof Z[e]!="number")throw new Error("Bad segment: "+e);{let i={key:e,data:h};t.push(i),n+=r,o=s[n],e==="M"&&(e="L"),e==="m"&&(e="l")}}return t}function Lt(a){let t=0,s=0,e=0,n=0,o=[];for(let{key:r,data:h}of a)switch(r){case"M":o.push({key:"M",data:[...h]}),[t,s]=h,[e,n]=h;break;case"m":t+=h[0],s+=h[1],o.push({key:"M",data:[t,s]}),e=t,n=s;break;case"L":o.push({key:"L",data:[...h]}),[t,s]=h;break;case"l":t+=h[0],s+=h[1],o.push({key:"L",data:[t,s]});break;case"C":o.push({key:"C",data:[...h]}),t=h[4],s=h[5];break;case"c":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"C",data:i}),t=i[4],s=i[5];break}case"Q":o.push({key:"Q",data:[...h]}),t=h[2],s=h[3];break;case"q":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"Q",data:i}),t=i[2],s=i[3];break}case"A":o.push({key:"A",data:[...h]}),t=h[5],s=h[6];break;case"a":t+=h[5],s+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,s]});break;case"H":o.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...h]}),s=h[0];break;case"v":s+=h[0],o.push({key:"V",data:[s]});break;case"S":o.push({key:"S",data:[...h]}),t=h[2],s=h[3];break;case"s":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"S",data:i}),t=i[2],s=i[3];break}case"T":o.push({key:"T",data:[...h]}),t=h[0],s=h[1];break;case"t":t+=h[0],s+=h[1],o.push({key:"T",data:[t,s]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=e,s=n}return o}function Tt(a){let t=[],s="",e=0,n=0,o=0,r=0,h=0,i=0;for(let{key:l,data:c}of a){switch(l){case"M":t.push({key:"M",data:[...c]}),[e,n]=c,[o,r]=c;break;case"C":t.push({key:"C",data:[...c]}),e=c[4],n=c[5],h=c[2],i=c[3];break;case"L":t.push({key:"L",data:[...c]}),[e,n]=c;break;case"H":e=c[0],t.push({key:"L",data:[e,n]});break;case"V":n=c[0],t.push({key:"L",data:[e,n]});break;case"S":{let d=0,p=0;s==="C"||s==="S"?(d=e+(e-h),p=n+(n-i)):(d=e,p=n),t.push({key:"C",data:[d,p,...c]}),h=c[0],i=c[1],e=c[2],n=c[3];break}case"T":{let[d,p]=c,u=0,f=0;s==="Q"||s==="T"?(u=e+(e-h),f=n+(n-i)):(u=e,f=n);let g=e+2*(u-e)/3,k=n+2*(f-n)/3,b=d+2*(u-d)/3,M=p+2*(f-p)/3;t.push({key:"C",data:[g,k,b,M,d,p]}),h=u,i=f,e=d,n=p;break}case"Q":{let[d,p,u,f]=c,g=e+2*(d-e)/3,k=n+2*(p-n)/3,b=u+2*(d-u)/3,M=f+2*(p-f)/3;t.push({key:"C",data:[g,k,b,M,u,f]}),h=d,i=p,e=u,n=f;break}case"A":{let d=Math.abs(c[0]),p=Math.abs(c[1]),u=c[2],f=c[3],g=c[4],k=c[5],b=c[6];d===0||p===0?(t.push({key:"C",data:[e,n,k,b,k,b]}),e=k,n=b):(e!==k||n!==b)&&(Dt(e,n,k,b,d,p,u,f,g).forEach((function(M){t.push({key:"C",data:M})})),e=k,n=b);break}case"Z":t.push({key:"Z",data:[]}),e=o,n=r}s=l}return t}function R(a,t,s){return[a*Math.cos(s)-t*Math.sin(s),a*Math.sin(s)+t*Math.cos(s)]}function Dt(a,t,s,e,n,o,r,h,i,l){let c=(d=r,Math.PI*d/180);var d;let p=[],u=0,f=0,g=0,k=0;if(l)[u,f,g,k]=l;else{[a,t]=R(a,t,-c),[s,e]=R(s,e,-c);let T=(a-s)/2,v=(t-e)/2,_=T*T/(n*n)+v*v/(o*o);_>1&&(_=Math.sqrt(_),n*=_,o*=_);let W=n*n,E=o*o,Ct=W*E-W*v*v-E*T*T,zt=W*v*v+E*T*T,kt=(h===i?-1:1)*Math.sqrt(Math.abs(Ct/zt));g=kt*n*v/o+(a+s)/2,k=kt*-o*T/n+(t+e)/2,u=Math.asin(parseFloat(((t-k)/o).toFixed(9))),f=Math.asin(parseFloat(((e-k)/o).toFixed(9))),a<g&&(u=Math.PI-u),s<g&&(f=Math.PI-f),u<0&&(u=2*Math.PI+u),f<0&&(f=2*Math.PI+f),i&&u>f&&(u-=2*Math.PI),!i&&f>u&&(f-=2*Math.PI)}let b=f-u;if(Math.abs(b)>120*Math.PI/180){let T=f,v=s,_=e;f=i&&f>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Dt(s=g+n*Math.cos(f),e=k+o*Math.sin(f),v,_,n,o,r,0,i,[f,T,g,k])}b=f-u;let M=Math.cos(u),m=Math.sin(u),P=Math.cos(f),x=Math.sin(f),w=Math.tan(b/4),L=4/3*n*w,A=4/3*o*w,V=[a,t],D=[a+L*m,t-A*M],C=[s+L*x,e-A*P],Mt=[s,e];if(D[0]=2*V[0]-D[0],D[1]=2*V[1]-D[1],l)return[D,C,Mt].concat(p);{p=[D,C,Mt].concat(p);let T=[];for(let v=0;v<p.length;v+=3){let _=R(p[v][0],p[v][1],c),W=R(p[v+1][0],p[v+1][1],c),E=R(p[v+2][0],p[v+2][1],c);T.push([_[0],_[1],W[0],W[1],E[0],E[1]])}return T}}var $t={randOffset:function(a,t){return y(a,t)},randOffsetWithRange:function(a,t,s){return J(a,t,s)},ellipse:function(a,t,s,e,n){let o=_t(s,e,n);return lt(a,t,n,o).opset},doubleLineOps:function(a,t,s,e,n){return I(a,t,s,e,n,!0)}};function At(a,t,s,e,n){return{type:"path",ops:I(a,t,s,e,n)}}function N(a,t,s){let e=(a||[]).length;if(e>2){let n=[];for(let o=0;o<e-1;o++)n.push(...I(a[o][0],a[o][1],a[o+1][0],a[o+1][1],s));return t&&n.push(...I(a[e-1][0],a[e-1][1],a[0][0],a[0][1],s)),{type:"path",ops:n}}return e===2?At(a[0][0],a[0][1],a[1][0],a[1][1],s):{type:"path",ops:[]}}function Rt(a,t,s,e,n){return(function(o,r){return N(o,!0,r)})([[a,t],[a+s,t],[a+s,t+e],[a,t+e]],n)}function mt(a,t){if(a.length){let s=typeof a[0][0]=="number"?[a]:a,e=Q(s[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Q(s[0],1.5*(1+.22*t.roughness),Pt(t));for(let o=1;o<s.length;o++){let r=s[o];if(r.length){let h=Q(r,1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:Q(r,1.5*(1+.22*t.roughness),Pt(t));for(let l of h)l.op!=="move"&&e.push(l);for(let l of i)l.op!=="move"&&n.push(l)}}return{type:"path",ops:e.concat(n)}}return{type:"path",ops:[]}}function _t(a,t,s){let e=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(a/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*e)),o=2*Math.PI/n,r=Math.abs(a/2),h=Math.abs(t/2),i=1-s.curveFitting;return r+=y(r*i,s),h+=y(h*i,s),{increment:o,rx:r,ry:h}}function lt(a,t,s,e){let[n,o]=vt(e.increment,a,t,e.rx,e.ry,1,e.increment*J(.1,J(.4,1,s),s),s),r=K(n,null,s);if(!s.disableMultiStroke&&s.roughness!==0){let[h]=vt(e.increment,a,t,e.rx,e.ry,1.5,0,s),i=K(h,null,s);r=r.concat(i)}return{estimatedPoints:o,opset:{type:"path",ops:r}}}function wt(a,t,s,e,n,o,r,h,i){let l=a,c=t,d=Math.abs(s/2),p=Math.abs(e/2);d+=y(.01*d,i),p+=y(.01*p,i);let u=n,f=o;for(;u<0;)u+=2*Math.PI,f+=2*Math.PI;f-u>2*Math.PI&&(u=0,f=2*Math.PI);let g=2*Math.PI/i.curveStepCount,k=Math.min(g/2,(f-u)/2),b=St(k,l,c,d,p,u,f,1,i);if(!i.disableMultiStroke){let M=St(k,l,c,d,p,u,f,1.5,i);b.push(...M)}return r&&(h?b.push(...I(l,c,l+d*Math.cos(u),c+p*Math.sin(u),i),...I(l,c,l+d*Math.cos(f),c+p*Math.sin(f),i)):b.push({op:"lineTo",data:[l,c]},{op:"lineTo",data:[l+d*Math.cos(u),c+p*Math.sin(u)]})),{type:"path",ops:b}}function xt(a,t){let s=Tt(Lt(gt(a))),e=[],n=[0,0],o=[0,0];for(let{key:r,data:h}of s)switch(r){case"M":o=[h[0],h[1]],n=[h[0],h[1]];break;case"L":e.push(...I(o[0],o[1],h[0],h[1],t)),o=[h[0],h[1]];break;case"C":{let[i,l,c,d,p,u]=h;e.push(...jt(i,l,c,d,p,u,o,t)),o=[p,u];break}case"Z":e.push(...I(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]]}return{type:"path",ops:e}}function st(a,t){let s=[];for(let e of a)if(e.length){let n=t.maxRandomnessOffset||0,o=e.length;if(o>2){s.push({op:"move",data:[e[0][0]+y(n,t),e[0][1]+y(n,t)]});for(let r=1;r<o;r++)s.push({op:"lineTo",data:[e[r][0]+y(n,t),e[r][1]+y(n,t)]})}}return{type:"fillPath",ops:s}}function G(a,t){return(function(s,e){let n=s.fillStyle||"hachure";if(!S[n])switch(n){case"zigzag":S[n]||(S[n]=new at(e));break;case"cross-hatch":S[n]||(S[n]=new ot(e));break;case"dots":S[n]||(S[n]=new ht(e));break;case"dashed":S[n]||(S[n]=new rt(e));break;case"zigzag-line":S[n]||(S[n]=new it(e));break;default:n="hachure",S[n]||(S[n]=new q(e))}return S[n]})(t,$t).fillPolygons(a,t)}function Pt(a){let t=Object.assign({},a);return t.randomizer=void 0,a.seed&&(t.seed=a.seed+1),t}function It(a){return a.randomizer||(a.randomizer=new ct(a.seed||0)),a.randomizer.next()}function J(a,t,s,e=1){return s.roughness*e*(It(s)*(t-a)+a)}function y(a,t,s=1){return J(-a,a,t,s)}function I(a,t,s,e,n,o=!1){let r=o?n.disableMultiStrokeFill:n.disableMultiStroke,h=ut(a,t,s,e,n,!0,!1);if(r)return h;let i=ut(a,t,s,e,n,!0,!0);return h.concat(i)}function ut(a,t,s,e,n,o,r){let h=Math.pow(a-s,2)+Math.pow(t-e,2),i=Math.sqrt(h),l=1;l=i<200?1:i>500?.4:-.0016668*i+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>h&&(c=i/10);let d=c/2,p=.2+.2*It(n),u=n.bowing*n.maxRandomnessOffset*(e-t)/200,f=n.bowing*n.maxRandomnessOffset*(a-s)/200;u=y(u,n,l),f=y(f,n,l);let g=[],k=()=>y(d,n,l),b=()=>y(c,n,l),M=n.preserveVertices;return o&&(r?g.push({op:"move",data:[a+(M?0:k()),t+(M?0:k())]}):g.push({op:"move",data:[a+(M?0:y(c,n,l)),t+(M?0:y(c,n,l))]})),r?g.push({op:"bcurveTo",data:[u+a+(s-a)*p+k(),f+t+(e-t)*p+k(),u+a+2*(s-a)*p+k(),f+t+2*(e-t)*p+k(),s+(M?0:k()),e+(M?0:k())]}):g.push({op:"bcurveTo",data:[u+a+(s-a)*p+b(),f+t+(e-t)*p+b(),u+a+2*(s-a)*p+b(),f+t+2*(e-t)*p+b(),s+(M?0:b()),e+(M?0:b())]}),g}function Q(a,t,s){if(!a.length)return[];let e=[];e.push([a[0][0]+y(t,s),a[0][1]+y(t,s)]),e.push([a[0][0]+y(t,s),a[0][1]+y(t,s)]);for(let n=1;n<a.length;n++)e.push([a[n][0]+y(t,s),a[n][1]+y(t,s)]),n===a.length-1&&e.push([a[n][0]+y(t,s),a[n][1]+y(t,s)]);return K(e,null,s)}function K(a,t,s){let e=a.length,n=[];if(e>3){let o=[],r=1-s.curveTightness;n.push({op:"move",data:[a[1][0],a[1][1]]});for(let h=1;h+2<e;h++){let i=a[h];o[0]=[i[0],i[1]],o[1]=[i[0]+(r*a[h+1][0]-r*a[h-1][0])/6,i[1]+(r*a[h+1][1]-r*a[h-1][1])/6],o[2]=[a[h+1][0]+(r*a[h][0]-r*a[h+2][0])/6,a[h+1][1]+(r*a[h][1]-r*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&t.length===2){let h=s.maxRandomnessOffset;n.push({op:"lineTo",data:[t[0]+y(h,s),t[1]+y(h,s)]})}}else e===3?(n.push({op:"move",data:[a[1][0],a[1][1]]}),n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[2][0],a[2][1]]})):e===2&&n.push(...ut(a[0][0],a[0][1],a[1][0],a[1][1],s,!0,!0));return n}function vt(a,t,s,e,n,o,r,h){let i=[],l=[];if(h.roughness===0){a/=4,l.push([t+e*Math.cos(-a),s+n*Math.sin(-a)]);for(let c=0;c<=2*Math.PI;c+=a){let d=[t+e*Math.cos(c),s+n*Math.sin(c)];i.push(d),l.push(d)}l.push([t+e*Math.cos(0),s+n*Math.sin(0)]),l.push([t+e*Math.cos(a),s+n*Math.sin(a)])}else{let c=y(.5,h)-Math.PI/2;l.push([y(o,h)+t+.9*e*Math.cos(c-a),y(o,h)+s+.9*n*Math.sin(c-a)]);let d=2*Math.PI+c-.01;for(let p=c;p<d;p+=a){let u=[y(o,h)+t+e*Math.cos(p),y(o,h)+s+n*Math.sin(p)];i.push(u),l.push(u)}l.push([y(o,h)+t+e*Math.cos(c+2*Math.PI+.5*r),y(o,h)+s+n*Math.sin(c+2*Math.PI+.5*r)]),l.push([y(o,h)+t+.98*e*Math.cos(c+r),y(o,h)+s+.98*n*Math.sin(c+r)]),l.push([y(o,h)+t+.9*e*Math.cos(c+.5*r),y(o,h)+s+.9*n*Math.sin(c+.5*r)])}return[l,i]}function St(a,t,s,e,n,o,r,h,i){let l=o+y(.1,i),c=[];c.push([y(h,i)+t+.9*e*Math.cos(l-a),y(h,i)+s+.9*n*Math.sin(l-a)]);for(let d=l;d<=r;d+=a)c.push([y(h,i)+t+e*Math.cos(d),y(h,i)+s+n*Math.sin(d)]);return c.push([t+e*Math.cos(r),s+n*Math.sin(r)]),c.push([t+e*Math.cos(r),s+n*Math.sin(r)]),K(c,null,i)}function jt(a,t,s,e,n,o,r,h){let i=[],l=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3],c=[0,0],d=h.disableMultiStroke?1:2,p=h.preserveVertices;for(let u=0;u<d;u++)u===0?i.push({op:"move",data:[r[0],r[1]]}):i.push({op:"move",data:[r[0]+(p?0:y(l[0],h)),r[1]+(p?0:y(l[0],h))]}),c=p?[n,o]:[n+y(l[u],h),o+y(l[u],h)],i.push({op:"bcurveTo",data:[a+y(l[u],h),t+y(l[u],h),s+y(l[u],h),e+y(l[u],h),c[0],c[1]]});return i}function j(a){return[...a]}function Ot(a,t=0){let s=a.length;if(s<3)throw new Error("A curve must have at least three points.");let e=[];if(s===3)e.push(j(a[0]),j(a[1]),j(a[2]),j(a[2]));else{let n=[];n.push(a[0],a[0]);for(let h=1;h<a.length;h++)n.push(a[h]),h===a.length-1&&n.push(a[h]);let o=[],r=1-t;e.push(j(n[0]));for(let h=1;h+2<n.length;h++){let i=n[h];o[0]=[i[0],i[1]],o[1]=[i[0]+(r*n[h+1][0]-r*n[h-1][0])/6,i[1]+(r*n[h+1][1]-r*n[h-1][1])/6],o[2]=[n[h+1][0]+(r*n[h][0]-r*n[h+2][0])/6,n[h+1][1]+(r*n[h][1]-r*n[h+2][1])/6],o[3]=[n[h+1][0],n[h+1][1]],e.push(o[1],o[2],o[3])}}return e}function B(a,t){return Math.pow(a[0]-t[0],2)+Math.pow(a[1]-t[1],2)}function qt(a,t,s){let e=B(t,s);if(e===0)return B(a,t);let n=((a[0]-t[0])*(s[0]-t[0])+(a[1]-t[1])*(s[1]-t[1]))/e;return n=Math.max(0,Math.min(1,n)),B(a,z(t,s,n))}function z(a,t,s){return[a[0]+(t[0]-a[0])*s,a[1]+(t[1]-a[1])*s]}function pt(a,t,s,e){let n=e||[];if((function(h,i){let l=h[i+0],c=h[i+1],d=h[i+2],p=h[i+3],u=3*c[0]-2*l[0]-p[0];u*=u;let f=3*c[1]-2*l[1]-p[1];f*=f;let g=3*d[0]-2*p[0]-l[0];g*=g;let k=3*d[1]-2*p[1]-l[1];return k*=k,u<g&&(u=g),f<k&&(f=k),u+f})(a,t)<s){let h=a[t+0];n.length?(o=n[n.length-1],r=h,Math.sqrt(B(o,r))>1&&n.push(h)):n.push(h),n.push(a[t+3])}else{let i=a[t+0],l=a[t+1],c=a[t+2],d=a[t+3],p=z(i,l,.5),u=z(l,c,.5),f=z(c,d,.5),g=z(p,u,.5),k=z(u,f,.5),b=z(g,k,.5);pt([i,p,g,b],0,s,n),pt([b,k,f,d],0,s,n)}var o,r;return n}function Ft(a,t){return U(a,0,a.length,t)}function U(a,t,s,e,n){let o=n||[],r=a[t],h=a[s-1],i=0,l=1;for(let c=t+1;c<s-1;++c){let d=qt(a[c],r,h);d>i&&(i=d,l=c)}return Math.sqrt(i)>e?(U(a,t,l+1,e,o),U(a,l,s,e,o)):(o.length||o.push(r),o.push(h)),o}function nt(a,t=.15,s){let e=[],n=(a.length-1)/3;for(let o=0;o<n;o++)pt(a,3*o,t,e);return s&&s>0?U(e,0,e.length,s):e}var O="none",$=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,s,e){return{shape:t,sets:s||[],options:e||this.defaultOptions}}line(t,s,e,n,o){let r=this._o(o);return this._d("line",[At(t,s,e,n,r)],r)}rectangle(t,s,e,n,o){let r=this._o(o),h=[],i=Rt(t,s,e,n,r);if(r.fill){let l=[[t,s],[t+e,s],[t+e,s+n],[t,s+n]];r.fillStyle==="solid"?h.push(st([l],r)):h.push(G([l],r))}return r.stroke!==O&&h.push(i),this._d("rectangle",h,r)}ellipse(t,s,e,n,o){let r=this._o(o),h=[],i=_t(e,n,r),l=lt(t,s,r,i);if(r.fill)if(r.fillStyle==="solid"){let c=lt(t,s,r,i).opset;c.type="fillPath",h.push(c)}else h.push(G([l.estimatedPoints],r));return r.stroke!==O&&h.push(l.opset),this._d("ellipse",h,r)}circle(t,s,e,n){let o=this.ellipse(t,s,e,e,n);return o.shape="circle",o}linearPath(t,s){let e=this._o(s);return this._d("linearPath",[N(t,!1,e)],e)}arc(t,s,e,n,o,r,h=!1,i){let l=this._o(i),c=[],d=wt(t,s,e,n,o,r,h,!0,l);if(h&&l.fill)if(l.fillStyle==="solid"){let p=Object.assign({},l);p.disableMultiStroke=!0;let u=wt(t,s,e,n,o,r,!0,!1,p);u.type="fillPath",c.push(u)}else c.push((function(p,u,f,g,k,b,M){let m=p,P=u,x=Math.abs(f/2),w=Math.abs(g/2);x+=y(.01*x,M),w+=y(.01*w,M);let L=k,A=b;for(;L<0;)L+=2*Math.PI,A+=2*Math.PI;A-L>2*Math.PI&&(L=0,A=2*Math.PI);let V=(A-L)/M.curveStepCount,D=[];for(let C=L;C<=A;C+=V)D.push([m+x*Math.cos(C),P+w*Math.sin(C)]);return D.push([m+x*Math.cos(A),P+w*Math.sin(A)]),D.push([m,P]),G([D],M)})(t,s,e,n,o,r,l));return l.stroke!==O&&c.push(d),this._d("arc",c,l)}curve(t,s){let e=this._o(s),n=[],o=mt(t,e);if(e.fill&&e.fill!==O)if(e.fillStyle==="solid"){let r=mt(t,Object.assign(Object.assign({},e),{disableMultiStroke:!0,roughness:e.roughness?e.roughness+e.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(r.ops)})}else{let r=[],h=t;if(h.length){let i=typeof h[0][0]=="number"?[h]:h;for(let l of i)l.length<3?r.push(...l):l.length===3?r.push(...nt(Ot([l[0],l[0],l[1],l[2]]),10,(1+e.roughness)/2)):r.push(...nt(Ot(l),10,(1+e.roughness)/2))}r.length&&n.push(G([r],e))}return e.stroke!==O&&n.push(o),this._d("curve",n,e)}polygon(t,s){let e=this._o(s),n=[],o=N(t,!0,e);return e.fill&&(e.fillStyle==="solid"?n.push(st([t],e)):n.push(G([t],e))),e.stroke!==O&&n.push(o),this._d("polygon",n,e)}path(t,s){let e=this._o(s),n=[];if(!t)return this._d("path",n,e);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=e.fill&&e.fill!=="transparent"&&e.fill!==O,r=e.stroke!==O,h=!!(e.simplification&&e.simplification<1),i=(function(c,d,p){let u=Tt(Lt(gt(c))),f=[],g=[],k=[0,0],b=[],M=()=>{b.length>=4&&g.push(...nt(b,d)),b=[]},m=()=>{M(),g.length&&(f.push(g),g=[])};for(let{key:x,data:w}of u)switch(x){case"M":m(),k=[w[0],w[1]],g.push(k);break;case"L":M(),g.push([w[0],w[1]]);break;case"C":if(!b.length){let L=g.length?g[g.length-1]:k;b.push([L[0],L[1]])}b.push([w[0],w[1]]),b.push([w[2],w[3]]),b.push([w[4],w[5]]);break;case"Z":M(),g.push([k[0],k[1]])}if(m(),!p)return f;let P=[];for(let x of f){let w=Ft(x,p);w.length&&P.push(w)}return P})(t,1,h?4-4*(e.simplification||1):(1+e.roughness)/2),l=xt(t,e);if(o)if(e.fillStyle==="solid")if(i.length===1){let c=xt(t,Object.assign(Object.assign({},e),{disableMultiStroke:!0,roughness:e.roughness?e.roughness+e.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else n.push(st(i,e));else n.push(G(i,e));return r&&(h?i.forEach((c=>{n.push(N(c,!1,e))})):n.push(l)),this._d("path",n,e)}opsToPath(t,s){let e="";for(let n of t.ops){let o=typeof s=="number"&&s>=0?n.data.map((r=>+r.toFixed(s))):n.data;switch(n.op){case"move":e+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":e+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":e+=`L${o[0]} ${o[1]} `}}return e.trim()}toPaths(t){let s=t.sets||[],e=t.options||this.defaultOptions,n=[];for(let o of s){let r=null;switch(o.type){case"path":r={d:this.opsToPath(o),stroke:e.stroke,strokeWidth:e.strokeWidth,fill:O};break;case"fillPath":r={d:this.opsToPath(o),stroke:O,strokeWidth:0,fill:e.fill||O};break;case"fillSketch":r=this.fillSketch(o,e)}r&&n.push(r)}return n}fillSketch(t,s){let e=s.fillWeight;return e<0&&(e=s.strokeWidth/2),{d:this.opsToPath(t),stroke:s.fill||O,strokeWidth:e,fill:O}}_mergedShape(t){return t.filter(((s,e)=>e===0||s.op!=="move"))}},ft=class{constructor(t,s){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new $(s)}draw(t){let s=t.sets||[],e=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(let r of s)switch(r.type){case"path":n.save(),n.strokeStyle=e.stroke==="none"?"transparent":e.stroke,n.lineWidth=e.strokeWidth,e.strokeLineDash&&n.setLineDash(e.strokeLineDash),e.strokeLineDashOffset&&(n.lineDashOffset=e.strokeLineDashOffset),this._drawToContext(n,r,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=e.fill||"";let h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,r,o,h),n.restore();break}case"fillSketch":this.fillSketch(n,r,e)}}fillSketch(t,s,e){let n=e.fillWeight;n<0&&(n=e.strokeWidth/2),t.save(),e.fillLineDash&&t.setLineDash(e.fillLineDash),e.fillLineDashOffset&&(t.lineDashOffset=e.fillLineDashOffset),t.strokeStyle=e.fill||"",t.lineWidth=n,this._drawToContext(t,s,e.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,s,e,n="nonzero"){t.beginPath();for(let o of s.ops){let r=typeof e=="number"&&e>=0?o.data.map((h=>+h.toFixed(e))):o.data;switch(o.op){case"move":t.moveTo(r[0],r[1]);break;case"bcurveTo":t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case"lineTo":t.lineTo(r[0],r[1])}}s.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,s,e,n,o){let r=this.gen.line(t,s,e,n,o);return this.draw(r),r}rectangle(t,s,e,n,o){let r=this.gen.rectangle(t,s,e,n,o);return this.draw(r),r}ellipse(t,s,e,n,o){let r=this.gen.ellipse(t,s,e,n,o);return this.draw(r),r}circle(t,s,e,n){let o=this.gen.circle(t,s,e,n);return this.draw(o),o}linearPath(t,s){let e=this.gen.linearPath(t,s);return this.draw(e),e}polygon(t,s){let e=this.gen.polygon(t,s);return this.draw(e),e}arc(t,s,e,n,o,r,h=!1,i){let l=this.gen.arc(t,s,e,n,o,r,h,i);return this.draw(l),l}curve(t,s){let e=this.gen.curve(t,s);return this.draw(e),e}path(t,s){let e=this.gen.path(t,s);return this.draw(e),e}},H="http://www.w3.org/2000/svg",dt=class{constructor(t,s){this.svg=t,this.gen=new $(s)}draw(t){let s=t.sets||[],e=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(H,"g"),r=t.options.fixedDecimalPlaceDigits;for(let h of s){let i=null;switch(h.type){case"path":i=n.createElementNS(H,"path"),i.setAttribute("d",this.opsToPath(h,r)),i.setAttribute("stroke",e.stroke),i.setAttribute("stroke-width",e.strokeWidth+""),i.setAttribute("fill","none"),e.strokeLineDash&&i.setAttribute("stroke-dasharray",e.strokeLineDash.join(" ").trim()),e.strokeLineDashOffset&&i.setAttribute("stroke-dashoffset",`${e.strokeLineDashOffset}`);break;case"fillPath":i=n.createElementNS(H,"path"),i.setAttribute("d",this.opsToPath(h,r)),i.setAttribute("stroke","none"),i.setAttribute("stroke-width","0"),i.setAttribute("fill",e.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||i.setAttribute("fill-rule","evenodd");break;case"fillSketch":i=this.fillSketch(n,h,e)}i&&o.appendChild(i)}return o}fillSketch(t,s,e){let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let o=t.createElementNS(H,"path");return o.setAttribute("d",this.opsToPath(s,e.fixedDecimalPlaceDigits)),o.setAttribute("stroke",e.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),e.fillLineDash&&o.setAttribute("stroke-dasharray",e.fillLineDash.join(" ").trim()),e.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${e.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,s){return this.gen.opsToPath(t,s)}line(t,s,e,n,o){let r=this.gen.line(t,s,e,n,o);return this.draw(r)}rectangle(t,s,e,n,o){let r=this.gen.rectangle(t,s,e,n,o);return this.draw(r)}ellipse(t,s,e,n,o){let r=this.gen.ellipse(t,s,e,n,o);return this.draw(r)}circle(t,s,e,n){let o=this.gen.circle(t,s,e,n);return this.draw(o)}linearPath(t,s){let e=this.gen.linearPath(t,s);return this.draw(e)}polygon(t,s){let e=this.gen.polygon(t,s);return this.draw(e)}arc(t,s,e,n,o,r,h=!1,i){let l=this.gen.arc(t,s,e,n,o,r,h,i);return this.draw(l)}curve(t,s){let e=this.gen.curve(t,s);return this.draw(e)}path(t,s){let e=this.gen.path(t,s);return this.draw(e)}},Zt={canvas:(a,t)=>new ft(a,t),svg:(a,t)=>new dt(a,t),generator:a=>new $(a),newSeed:()=>$.newSeed()};export{Zt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M3SWKTLZ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as R,d as s}from"./chunk-R7TFKRNM.js";var g=R(e=>{"use strict";s();Object.defineProperty(e,"__esModule",{value:!0});e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0;e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;e.htmlCtrlEntityRegex=/&(newline|tab);/gi;e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;e.urlSchemeRegex=/^.+(:|:)/gim;e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;e.relativeFirstCharacters=[".","/"];e.BLANK_URL="about:blank"});var L=R(h=>{"use strict";s();Object.defineProperty(h,"__esModule",{value:!0});h.sanitizeUrl=f;var t=g();function C(r){return t.relativeFirstCharacters.indexOf(r[0])>-1}function p(r){var c=r.replace(t.ctrlCharactersRegex,"");return c.replace(t.htmlEntitiesRegex,function(a,i){return String.fromCharCode(i)})}function v(r){return URL.canParse(r)}function d(r){try{return decodeURIComponent(r)}catch{return r}}function f(r){if(!r)return t.BLANK_URL;var c,a=d(r.trim());do a=p(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),a=d(a),c=a.match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex);while(c&&c.length>0);var i=a;if(!i)return t.BLANK_URL;if(C(i))return i;var u=i.trimStart(),m=u.match(t.urlSchemeRegex);if(!m)return i;var n=m[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(n))return t.BLANK_URL;var o=u.replace(/\\/g,"/");if(n==="mailto:"||n.includes("://"))return o;if(n==="http:"||n==="https:"){if(!v(o))return t.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}});export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MBZYSJFT.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,b as o,c as n,d as t,e as u,g as d,k as l,x as s,y as G}from"./chunk-QNEZP2TE.js";import{d as i}from"./chunk-R7TFKRNM.js";i();var p=class extends G{static{e(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},h={parser:{TokenBuilder:e(()=>new p,"TokenBuilder"),ValueConverter:e(()=>new s,"ValueConverter")}};function m(c=u){let r=t(n(c),d),a=t(o({shared:r}),l,h);return r.ServiceRegistry.register(a),{shared:r,GitGraph:a}}e(m,"createGitGraphServices");export{h as a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-MZEMPN3C.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as c}from"./chunk-6FQEBIA3.js";import{a as i}from"./chunk-LDXBIOBF.js";import{d as h}from"./chunk-R7TFKRNM.js";h();var w=i(t=>{let{handDrawnSeed:e}=c();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),f=i(t=>Array.isArray(t)?t:t?t.split(";").map(e=>e.trim()).filter(Boolean):[],"normalizeStyleList"),p=i(t=>{let e=u([...t.cssCompiledStyles||[],...t.cssStyles||[],...f(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),u=i(t=>{let e=new Map;return t.forEach(o=>{let[a,s]=o.split(":");e.set(a.trim(),s?.trim())}),e},"styles2Map"),d=i(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),y=i(t=>{let{stylesArray:e}=p(t),o=[],a=[],s=[],n=[];return e.forEach(r=>{let l=r[0];d(l)?o.push(r.join(":")+" !important"):(a.push(r.join(":")+" !important"),l.includes("stroke")&&s.push(r.join(":")+" !important"),l==="fill"&&n.push(r.join(":")+" !important"))}),{labelStyles:o.join(";"),nodeStyles:a.join(";"),stylesArray:e,borderStyles:s,backgroundStyles:n}},"styles2String"),b=i((t,e)=>{let{themeVariables:o,handDrawnSeed:a}=c(),{nodeBorder:s,mainBkg:n}=o,{stylesMap:r}=p(t);return Object.assign({roughness:.7,fill:r.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:r.get("stroke")||s,seed:a,strokeWidth:r.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:g(r.get("stroke-dasharray"))},e)},"userNodeOverrides"),g=i(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let s=isNaN(e[0])?0:e[0];return[s,s]}let o=isNaN(e[0])?0:e[0],a=isNaN(e[1])?0:e[1];return[o,a]},"getStrokeDashArray");export{w as a,p as b,d as c,y as d,b as e};
|
|
2
|
+
//# sourceMappingURL=chunk-OODDZ447.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as o,b as c,c as l,d as i,e as u,g as v,s as g,w as m,y as h}from"./chunk-QNEZP2TE.js";import{d}from"./chunk-R7TFKRNM.js";d();var f=class extends h{static{o(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},p=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
|
|
2
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=n}return r},"decodeEscapedString"),C=class extends m{static{o(this,"RailroadPegValueConverter")}runConverter(a,e,r){let t=super.runConverter(a,e,r);if(a.name==="TITLE"&&typeof t=="string"){let n=t.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return p(n)}return t}runCustomConverter(a,e,r){if(a.name==="PEG_STRING")return p(e)}},R={parser:{TokenBuilder:o(()=>new f,"TokenBuilder"),ValueConverter:o(()=>new C,"ValueConverter")}};function P(a=u){let e=i(l(a),v),r=i(c({shared:e}),g,R);return e.ServiceRegistry.register(r),{shared:e,RailroadPeg:r}}o(P,"createRailroadPegServices");export{R as a,P as b};
|
|
3
|
+
//# sourceMappingURL=chunk-OXLTOJNY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as c}from"./chunk-6FQEBIA3.js";import{h as e}from"./chunk-L34PKG4P.js";import{a as s}from"./chunk-LDXBIOBF.js";import{d as n}from"./chunk-R7TFKRNM.js";n();var v=s(t=>{let{securityLevel:m}=c(),o=e("body");if(m==="sandbox"){let r=e(`#i${t}`).node()?.contentDocument??document;o=e(r.body)}return o.select(`#${t}`)},"selectSvgElement");export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PR453BYT.js.map
|