diff --git a/pr-528/404.html b/pr-528/404.html new file mode 100644 index 000000000..c2f081187 --- /dev/null +++ b/pr-528/404.html @@ -0,0 +1,40 @@ + + + + + + 404 | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/pr-528/README.html b/pr-528/README.html new file mode 100644 index 000000000..9a28d5fb0 --- /dev/null +++ b/pr-528/README.html @@ -0,0 +1,73 @@ + + + + + + Rollkit Documentation Site | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Skip to content

Deploy

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

  • Fork & Clone: Fork this repository and clone it to your local machine.
  • Branch: Always create a new branch for your changes. Naming it relevantly.
  • Commit Changes: Make your changes and commit them with a clear and concise commit message.
  • Push & Create PR: Push your changes to your fork and create a pull request to the main branch of this repository.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

  • /tutorials: Step-by-step instructions to help users build their own rollups with Rollkit.
  • /learn: Technical reference materials, such as configuration options and details about the Rollkit stack.
  • /blog: Blog posts for the Rollkit blog.
  • /public: Images, diagrams, and other media files used in the documentation.

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

Released under the APACHE-2.0 License

+ + + + \ No newline at end of file diff --git a/pr-528/artela-evm-rollkit/artela-evm-rollkit.png b/pr-528/artela-evm-rollkit/artela-evm-rollkit.png new file mode 100644 index 000000000..5e4936423 Binary files /dev/null and b/pr-528/artela-evm-rollkit/artela-evm-rollkit.png differ diff --git a/pr-528/assets/README.md.BTNvMC_a.js b/pr-528/assets/README.md.BTNvMC_a.js new file mode 100644 index 000000000..f238fd15b --- /dev/null +++ b/pr-528/assets/README.md.BTNvMC_a.js @@ -0,0 +1 @@ +import{_ as t,c as i,a3 as o,o as a}from"./chunks/framework.B8-VHxRu.js";const p=JSON.parse('{"title":"Rollkit Documentation Site","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit Documentation Site | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1733420866000}'),s={name:"README.md"};function n(r,e,l,c,u,h){return a(),i("div",null,e[0]||(e[0]=[o('

Deploy

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

',17)]))}const m=t(s,[["render",n]]);export{p as __pageData,m as default}; diff --git a/pr-528/assets/README.md.BTNvMC_a.lean.js b/pr-528/assets/README.md.BTNvMC_a.lean.js new file mode 100644 index 000000000..f238fd15b --- /dev/null +++ b/pr-528/assets/README.md.BTNvMC_a.lean.js @@ -0,0 +1 @@ +import{_ as t,c as i,a3 as o,o as a}from"./chunks/framework.B8-VHxRu.js";const p=JSON.parse('{"title":"Rollkit Documentation Site","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit Documentation Site | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1733420866000}'),s={name:"README.md"};function n(r,e,l,c,u,h){return a(),i("div",null,e[0]||(e[0]=[o('

Deploy

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

',17)]))}const m=t(s,[["render",n]]);export{p as __pageData,m as default}; diff --git a/pr-528/assets/alert-events.ENf_Rhu-.png b/pr-528/assets/alert-events.ENf_Rhu-.png new file mode 100644 index 000000000..690abdd64 Binary files /dev/null and b/pr-528/assets/alert-events.ENf_Rhu-.png differ diff --git a/pr-528/assets/alert-rule.C7t8zNE5.png b/pr-528/assets/alert-rule.C7t8zNE5.png new file mode 100644 index 000000000..f15953758 Binary files /dev/null and b/pr-528/assets/alert-rule.C7t8zNE5.png differ diff --git a/pr-528/assets/app.CKrDwBa1.js b/pr-528/assets/app.CKrDwBa1.js new file mode 100644 index 000000000..a567a35c2 --- /dev/null +++ b/pr-528/assets/app.CKrDwBa1.js @@ -0,0 +1,189 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-7KT5K2WU.Sh_If-eY.js","assets/chunks/graph.DDKaZ6Ct.js","assets/chunks/baseUniq.HRNeWzar.js","assets/chunks/layout.PWtEKM9a.js","assets/chunks/basePickBy.nUpO2mqN.js","assets/chunks/json.WLb0uRtH.js","assets/chunks/clone.BlcZCRmq.js","assets/chunks/framework.B8-VHxRu.js","assets/chunks/theme.Ds20UUID.js","assets/chunks/c4Diagram-ZCSEYPFN.BNsm4zSe.js","assets/chunks/chunk-V35ELUW5.C6DQpogG.js","assets/chunks/flowDiagram-NWEUNK3L.B7qW0ski.js","assets/chunks/chunk-4LC2V6XN.Cfx7Swlc.js","assets/chunks/channel.BijykDEK.js","assets/chunks/erDiagram-DKC2X5TE.C10OkHln.js","assets/chunks/gitGraphDiagram-JPZ3KUXI.BwzYD_Nw.js","assets/chunks/chunk-RYO7GUH3.D7U7-9br.js","assets/chunks/chunk-6JKP7OK7.CM73knb6.js","assets/chunks/gitGraph-YCYPL57B.DhPOFTVl.js","assets/chunks/ganttDiagram-HLVPPPRE.DwgrFMyV.js","assets/chunks/linear.CWPBtVa2.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/infoDiagram-RZZSJVI2.DUMNBVuj.js","assets/chunks/pieDiagram-X7YZ5ZEZ.Ctc6e2Ef.js","assets/chunks/arc.BNNkY6t3.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-F36EZAVT.BLIXBUvX.js","assets/chunks/xychartDiagram-KECQ2H5Q.CcbTCv_H.js","assets/chunks/requirementDiagram-JG2LMPGF.CxMVymv-.js","assets/chunks/sequenceDiagram-WK7YDQ3N.DyLD_NeW.js","assets/chunks/classDiagram-Q73GJZWF.U-6cgaiz.js","assets/chunks/chunk-NGC4727B.Dvf-dRgF.js","assets/chunks/classDiagram-v2-C6QPLPW4.4RHychDB.js","assets/chunks/chunk-REEJFE46.DZZ_04II.js","assets/chunks/stateDiagram-4JV6CC6H.B0BJhnfC.js","assets/chunks/chunk-5RIWM3LS.jgRW-DO2.js","assets/chunks/stateDiagram-v2-7KT6RKTD.CAA0WbwX.js","assets/chunks/journeyDiagram-BLD6N6MZ.BsShe1e6.js","assets/chunks/timeline-definition-3ZMEY6HS.CUUEMNH4.js","assets/chunks/mindmap-definition-OEB2RXX2.DCzKGaGW.js","assets/chunks/cytoscape.esm.otp_DSkq.js","assets/chunks/sankeyDiagram-ATFNWWW6.eM5AvVxt.js","assets/chunks/diagram-AVGMFHF7.BG-Sf4gB.js","assets/chunks/blockDiagram-TCMKQVZ6.C2prvRoY.js","assets/chunks/architectureDiagram-IFBEXTG3.BLPvaCNn.js"])))=>i.map(i=>d[i]); +var s0=Object.defineProperty;var lc=e=>{throw TypeError(e)};var o0=(e,t,r)=>t in e?s0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ft=(e,t,r)=>o0(e,typeof t!="symbol"?t+"":t,r),l0=(e,t,r)=>t.has(e)||lc("Cannot "+r);var cc=(e,t,r)=>t.has(e)?lc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var ti=(e,t,r)=>(l0(e,t,"access private method"),r);import{V as ht,p as hc,u as Xh,ao as c0,v as Zh,x as h0,o as u0,c as f0,n as p0,R as Hs,ap as d0,aq as g0,ar as m0,al as y0,as as x0,at as b0,au as _0,av as C0,aw as w0,am as v0,d as k0,s as S0,ax as T0,ay as A0,az as L0,a2 as B0}from"./chunks/framework.B8-VHxRu.js";import{R as M0}from"./chunks/theme.Ds20UUID.js";var E0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function F0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kh={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(E0,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",p="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var v=["th","st","nd","rd"],T=A%100;return"["+A+(v[(T-20)%10]||v[T]||v[0])+"]"}},w=function(A,v,T){var L=String(A);return!L||L.length>=v?A:""+Array(v+1-L.length).join(T)+A},k={s:w,z:function(A){var v=-A.utcOffset(),T=Math.abs(v),L=Math.floor(T/60),$=T%60;return(v<=0?"+":"-")+w(L,2,"0")+":"+w($,2,"0")},m:function A(v,T){if(v.date()1)return A(J[0])}else{var rt=v.name;E[rt]=v,$=rt}return!L&&$&&(S=$),$||!L&&S},O=function(A,v){if(I(A))return A.clone();var T=typeof v=="object"?v:{};return T.date=A,T.args=arguments,new G(T)},F=k;F.l=N,F.i=I,F.w=function(A,v){return O(A,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var G=function(){function A(T){this.$L=N(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[B]=!0}var v=A.prototype;return v.parse=function(T){this.$d=function(L){var $=L.date,W=L.utc;if($===null)return new Date(NaN);if(F.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var J=$.match(y);if(J){var rt=J[2]-1||0,mt=(J[7]||"0").substring(0,3);return W?new Date(Date.UTC(J[1],rt,J[3]||1,J[4]||0,J[5]||0,J[6]||0,mt)):new Date(J[1],rt,J[3]||1,J[4]||0,J[5]||0,J[6]||0,mt)}}return new Date($)}(T),this.init()},v.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},v.$utils=function(){return F},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(T,L){var $=O(T);return this.startOf(L)<=$&&$<=this.endOf(L)},v.isAfter=function(T,L){return O(T)e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Mn.hue2rgb(a,n,e+1/3)*255;case"g":return Mn.hue2rgb(a,n,e)*255;case"b":return Mn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/s+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},R0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},tt={channel:Mn,lang:O0,unit:R0},Re={};for(let e=0;e<=255;e++)Re[e]=tt.unit.dec2hex(e);const Bt={ALL:0,RGB:1,HSL:2};class I0{constructor(){this.type=Bt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Bt.ALL}is(t){return this.type===t}}class P0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new I0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Bt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Bt.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Bt.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Bt.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Bt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Bt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Bt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Bt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Bt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Bt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Bt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Bt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Bt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ta=new P0({r:0,g:0,b:0,a:0},"transparent"),wr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(wr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ta.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Re[Math.round(t)]}${Re[Math.round(r)]}${Re[Math.round(i)]}${Re[Math.round(n*255)]}`:`#${Re[Math.round(t)]}${Re[Math.round(r)]}${Re[Math.round(i)]}`}},Ke={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Ke.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(parseFloat(r)*.9);case"rad":return tt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return tt.channel.clamp.h(parseFloat(r)*360)}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ke.re);if(!r)return;const[,i,n,a,o,s]=r;return Ta.set({h:Ke._hue2deg(i),s:tt.channel.clamp.s(parseFloat(n)),l:tt.channel.clamp.l(parseFloat(a)),a:o?tt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${n})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},vi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=vi.colors[e];if(t)return wr.parse(t)},stringify:e=>{const t=wr.stringify(e);for(const r in vi.colors)if(vi.colors[r]===t)return r}},yi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(yi.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Ta.set({r:tt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:tt.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?tt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(n)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},ge={format:{keyword:vi,hex:wr,rgb:yi,rgba:yi,hsl:Ke,hsla:Ke},parse:e=>{if(typeof e!="string")return e;const t=wr.parse(e)||yi.parse(e)||Ke.parse(e)||vi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Bt.HSL)||e.data.r===void 0?Ke.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?yi.stringify(e):wr.stringify(e)},Qh=(e,t)=>{const r=ge.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return ge.stringify(r)},ki=(e,t,r=0,i=1)=>{if(typeof e!="number")return Qh(e,{a:t});const n=Ta.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return ge.stringify(n)},N0=e=>{const{r:t,g:r,b:i}=ge.parse(e),n=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(n)},z0=e=>N0(e)>=.5,Ui=e=>!z0(e),Jh=(e,t,r)=>{const i=ge.parse(e),n=i[t],a=tt.channel.clamp[t](n+r);return n!==a&&(i[t]=a),ge.stringify(i)},U=(e,t)=>Jh(e,"l",t),K=(e,t)=>Jh(e,"l",-t),C=(e,t)=>{const r=ge.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Qh(e,i)},q0=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=ge.parse(e),{r:s,g:l,b:c,a:h}=ge.parse(t),u=r/100,f=u*2-1,p=o-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-m,x=i*m+s*y,b=n*m+l*y,w=a*m+c*y,k=o*u+h*(1-u);return ki(x,b,w,k)},R=(e,t=100)=>{const r=ge.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,q0(r,e,t)};/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:tu,setPrototypeOf:uc,isFrozen:W0,getPrototypeOf:H0,getOwnPropertyDescriptor:j0}=Object;let{freeze:It,seal:Kt,create:eu}=Object,{apply:js,construct:Us}=typeof Reflect<"u"&&Reflect;It||(It=function(t){return t});Kt||(Kt=function(t){return t});js||(js=function(t,r,i){return t.apply(r,i)});Us||(Us=function(t,r){return new t(...r)});const ln=Yt(Array.prototype.forEach),fc=Yt(Array.prototype.pop),ei=Yt(Array.prototype.push),En=Yt(String.prototype.toLowerCase),ns=Yt(String.prototype.toString),pc=Yt(String.prototype.match),ri=Yt(String.prototype.replace),U0=Yt(String.prototype.indexOf),Y0=Yt(String.prototype.trim),ie=Yt(Object.prototype.hasOwnProperty),Dt=Yt(RegExp.prototype.test),ii=G0(TypeError);function Yt(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:En;uc&&uc(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(W0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function V0(e){for(let t=0;t/gm),J0=Kt(/\${[\w\W]*}/gm),tm=Kt(/^data-[\-\w.\u00B7-\uFFFF]/),em=Kt(/^aria-[\-\w]+$/),ru=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rm=Kt(/^(?:\w+script|data):/i),im=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),iu=Kt(/^html$/i),nm=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i);var xc=Object.freeze({__proto__:null,MUSTACHE_EXPR:K0,ERB_EXPR:Q0,TMPLIT_EXPR:J0,DATA_ATTR:tm,ARIA_ATTR:em,IS_ALLOWED_URI:ru,IS_SCRIPT_OR_DATA:rm,ATTR_WHITESPACE:im,DOCTYPE_NAME:iu,CUSTOM_ELEMENT:nm});const ai={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},am=function(){return typeof window>"u"?null:window},sm=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function nu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:am();const t=j=>nu(j);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==ai.document)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=e,g=l.prototype,m=ni(g,"cloneNode"),y=ni(g,"remove"),x=ni(g,"nextSibling"),b=ni(g,"childNodes"),w=ni(g,"parentNode");if(typeof o=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let k,S="";const{implementation:E,createNodeIterator:B,createDocumentFragment:I,getElementsByTagName:N}=r,{importNode:O}=i;let F={};t.isSupported=typeof tu=="function"&&typeof w=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:G,ERB_EXPR:P,TMPLIT_EXPR:A,DATA_ATTR:v,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:W}=xc;let{IS_ALLOWED_URI:J}=xc,rt=null;const mt=at({},[...dc,...as,...ss,...os,...gc]);let nt=null;const bt=at({},[...mc,...ls,...yc,...cn]);let st=Object.seal(eu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Vt=null,te=null,Fe=!0,ee=!0,vt=!1,re=!0,Xt=!1,$e=!0,Ue=!1,Ka=!1,Qa=!1,pr=!1,rn=!1,nn=!1,ql=!0,Wl=!1;const Qg="user-content-";let Ja=!0,Kr=!1,dr={},gr=null;const Hl=at({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let jl=null;const Ul=at({},["audio","video","img","source","image","track"]);let ts=null;const Yl=at({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),an="http://www.w3.org/1998/Math/MathML",sn="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let mr=be,es=!1,rs=null;const Jg=at({},[an,sn,be],ns);let Qr=null;const t0=["application/xhtml+xml","text/html"],e0="text/html";let Ct=null,yr=null;const r0=r.createElement("form"),Gl=function(_){return _ instanceof RegExp||_ instanceof Function},is=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yr&&yr===_)){if((!_||typeof _!="object")&&(_={}),_=Ge(_),Qr=t0.indexOf(_.PARSER_MEDIA_TYPE)===-1?e0:_.PARSER_MEDIA_TYPE,Ct=Qr==="application/xhtml+xml"?ns:En,rt=ie(_,"ALLOWED_TAGS")?at({},_.ALLOWED_TAGS,Ct):mt,nt=ie(_,"ALLOWED_ATTR")?at({},_.ALLOWED_ATTR,Ct):bt,rs=ie(_,"ALLOWED_NAMESPACES")?at({},_.ALLOWED_NAMESPACES,ns):Jg,ts=ie(_,"ADD_URI_SAFE_ATTR")?at(Ge(Yl),_.ADD_URI_SAFE_ATTR,Ct):Yl,jl=ie(_,"ADD_DATA_URI_TAGS")?at(Ge(Ul),_.ADD_DATA_URI_TAGS,Ct):Ul,gr=ie(_,"FORBID_CONTENTS")?at({},_.FORBID_CONTENTS,Ct):Hl,Vt=ie(_,"FORBID_TAGS")?at({},_.FORBID_TAGS,Ct):{},te=ie(_,"FORBID_ATTR")?at({},_.FORBID_ATTR,Ct):{},dr=ie(_,"USE_PROFILES")?_.USE_PROFILES:!1,Fe=_.ALLOW_ARIA_ATTR!==!1,ee=_.ALLOW_DATA_ATTR!==!1,vt=_.ALLOW_UNKNOWN_PROTOCOLS||!1,re=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xt=_.SAFE_FOR_TEMPLATES||!1,$e=_.SAFE_FOR_XML!==!1,Ue=_.WHOLE_DOCUMENT||!1,pr=_.RETURN_DOM||!1,rn=_.RETURN_DOM_FRAGMENT||!1,nn=_.RETURN_TRUSTED_TYPE||!1,Qa=_.FORCE_BODY||!1,ql=_.SANITIZE_DOM!==!1,Wl=_.SANITIZE_NAMED_PROPS||!1,Ja=_.KEEP_CONTENT!==!1,Kr=_.IN_PLACE||!1,J=_.ALLOWED_URI_REGEXP||ru,mr=_.NAMESPACE||be,st=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Gl(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Gl(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xt&&(ee=!1),rn&&(pr=!0),dr&&(rt=at({},gc),nt=[],dr.html===!0&&(at(rt,dc),at(nt,mc)),dr.svg===!0&&(at(rt,as),at(nt,ls),at(nt,cn)),dr.svgFilters===!0&&(at(rt,ss),at(nt,ls),at(nt,cn)),dr.mathMl===!0&&(at(rt,os),at(nt,yc),at(nt,cn))),_.ADD_TAGS&&(rt===mt&&(rt=Ge(rt)),at(rt,_.ADD_TAGS,Ct)),_.ADD_ATTR&&(nt===bt&&(nt=Ge(nt)),at(nt,_.ADD_ATTR,Ct)),_.ADD_URI_SAFE_ATTR&&at(ts,_.ADD_URI_SAFE_ATTR,Ct),_.FORBID_CONTENTS&&(gr===Hl&&(gr=Ge(gr)),at(gr,_.FORBID_CONTENTS,Ct)),Ja&&(rt["#text"]=!0),Ue&&at(rt,["html","head","body"]),rt.table&&(at(rt,["tbody"]),delete Vt.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw ii('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ii('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=_.TRUSTED_TYPES_POLICY,S=k.createHTML("")}else k===void 0&&(k=sm(p,n)),k!==null&&typeof S=="string"&&(S=k.createHTML(""));It&&It(_),yr=_}},Vl=at({},["mi","mo","mn","ms","mtext"]),Xl=at({},["foreignobject","annotation-xml"]),i0=at({},["title","style","font","a","script"]),Zl=at({},[...as,...ss,...X0]),Kl=at({},[...os,...Z0]),n0=function(_){let D=w(_);(!D||!D.tagName)&&(D={namespaceURI:mr,tagName:"template"});const z=En(_.tagName),ut=En(D.tagName);return rs[_.namespaceURI]?_.namespaceURI===sn?D.namespaceURI===be?z==="svg":D.namespaceURI===an?z==="svg"&&(ut==="annotation-xml"||Vl[ut]):!!Zl[z]:_.namespaceURI===an?D.namespaceURI===be?z==="math":D.namespaceURI===sn?z==="math"&&Xl[ut]:!!Kl[z]:_.namespaceURI===be?D.namespaceURI===sn&&!Xl[ut]||D.namespaceURI===an&&!Vl[ut]?!1:!Kl[z]&&(i0[z]||!Zl[z]):!!(Qr==="application/xhtml+xml"&&rs[_.namespaceURI]):!1},le=function(_){ei(t.removed,{element:_});try{w(_).removeChild(_)}catch{y(_)}},on=function(_,D){try{ei(t.removed,{attribute:D.getAttributeNode(_),from:D})}catch{ei(t.removed,{attribute:null,from:D})}if(D.removeAttribute(_),_==="is"&&!nt[_])if(pr||rn)try{le(D)}catch{}else try{D.setAttribute(_,"")}catch{}},Ql=function(_){let D=null,z=null;if(Qa)_=""+_;else{const kt=pc(_,/^[\r\n\t ]+/);z=kt&&kt[0]}Qr==="application/xhtml+xml"&&mr===be&&(_=''+_+"");const ut=k?k.createHTML(_):_;if(mr===be)try{D=new f().parseFromString(ut,Qr)}catch{}if(!D||!D.documentElement){D=E.createDocument(mr,"template",null);try{D.documentElement.innerHTML=es?S:ut}catch{}}const Lt=D.body||D.documentElement;return _&&z&&Lt.insertBefore(r.createTextNode(z),Lt.childNodes[0]||null),mr===be?N.call(D,Ue?"html":"body")[0]:Ue?D.documentElement:Lt},Jl=function(_){return B.call(_.ownerDocument||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},tc=function(_){return _ instanceof u&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof h)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},ec=function(_){return typeof s=="function"&&_ instanceof s},_e=function(_,D,z){F[_]&&ln(F[_],ut=>{ut.call(t,D,z,yr)})},rc=function(_){let D=null;if(_e("beforeSanitizeElements",_,null),tc(_))return le(_),!0;const z=Ct(_.nodeName);if(_e("uponSanitizeElement",_,{tagName:z,allowedTags:rt}),_.hasChildNodes()&&!ec(_.firstElementChild)&&Dt(/<[/\w]/g,_.innerHTML)&&Dt(/<[/\w]/g,_.textContent)||_.nodeType===ai.progressingInstruction||$e&&_.nodeType===ai.comment&&Dt(/<[/\w]/g,_.data))return le(_),!0;if(!rt[z]||Vt[z]){if(!Vt[z]&&nc(z)&&(st.tagNameCheck instanceof RegExp&&Dt(st.tagNameCheck,z)||st.tagNameCheck instanceof Function&&st.tagNameCheck(z)))return!1;if(Ja&&!gr[z]){const ut=w(_)||_.parentNode,Lt=b(_)||_.childNodes;if(Lt&&ut){const kt=Lt.length;for(let Pt=kt-1;Pt>=0;--Pt){const ce=m(Lt[Pt],!0);ce.__removalCount=(_.__removalCount||0)+1,ut.insertBefore(ce,x(_))}}}return le(_),!0}return _ instanceof l&&!n0(_)||(z==="noscript"||z==="noembed"||z==="noframes")&&Dt(/<\/no(script|embed|frames)/i,_.innerHTML)?(le(_),!0):(Xt&&_.nodeType===ai.text&&(D=_.textContent,ln([G,P,A],ut=>{D=ri(D,ut," ")}),_.textContent!==D&&(ei(t.removed,{element:_.cloneNode()}),_.textContent=D)),_e("afterSanitizeElements",_,null),!1)},ic=function(_,D,z){if(ql&&(D==="id"||D==="name")&&(z in r||z in r0))return!1;if(!(ee&&!te[D]&&Dt(v,D))){if(!(Fe&&Dt(T,D))){if(!nt[D]||te[D]){if(!(nc(_)&&(st.tagNameCheck instanceof RegExp&&Dt(st.tagNameCheck,_)||st.tagNameCheck instanceof Function&&st.tagNameCheck(_))&&(st.attributeNameCheck instanceof RegExp&&Dt(st.attributeNameCheck,D)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(D))||D==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&Dt(st.tagNameCheck,z)||st.tagNameCheck instanceof Function&&st.tagNameCheck(z))))return!1}else if(!ts[D]){if(!Dt(J,ri(z,$,""))){if(!((D==="src"||D==="xlink:href"||D==="href")&&_!=="script"&&U0(z,"data:")===0&&jl[_])){if(!(vt&&!Dt(L,ri(z,$,"")))){if(z)return!1}}}}}}return!0},nc=function(_){return _!=="annotation-xml"&&pc(_,W)},ac=function(_){_e("beforeSanitizeAttributes",_,null);const{attributes:D}=_;if(!D)return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt};let ut=D.length;for(;ut--;){const Lt=D[ut],{name:kt,namespaceURI:Pt,value:ce}=Lt,Jr=Ct(kt);let $t=kt==="value"?ce:Y0(ce);if(z.attrName=Jr,z.attrValue=$t,z.keepAttr=!0,z.forceKeepAttr=void 0,_e("uponSanitizeAttribute",_,z),$t=z.attrValue,$e&&Dt(/((--!?|])>)|<\/(style|title)/i,$t)){on(kt,_);continue}if(z.forceKeepAttr||(on(kt,_),!z.keepAttr))continue;if(!re&&Dt(/\/>/i,$t)){on(kt,_);continue}Xt&&ln([G,P,A],oc=>{$t=ri($t,oc," ")});const sc=Ct(_.nodeName);if(ic(sc,Jr,$t)){if(Wl&&(Jr==="id"||Jr==="name")&&(on(kt,_),$t=Qg+$t),k&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Pt)switch(p.getAttributeType(sc,Jr)){case"TrustedHTML":{$t=k.createHTML($t);break}case"TrustedScriptURL":{$t=k.createScriptURL($t);break}}try{Pt?_.setAttributeNS(Pt,kt,$t):_.setAttribute(kt,$t),tc(_)?le(_):fc(t.removed)}catch{}}}_e("afterSanitizeAttributes",_,null)},a0=function j(_){let D=null;const z=Jl(_);for(_e("beforeSanitizeShadowDOM",_,null);D=z.nextNode();)_e("uponSanitizeShadowNode",D,null),!rc(D)&&(D.content instanceof a&&j(D.content),ac(D));_e("afterSanitizeShadowDOM",_,null)};return t.sanitize=function(j){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,z=null,ut=null,Lt=null;if(es=!j,es&&(j=""),typeof j!="string"&&!ec(j))if(typeof j.toString=="function"){if(j=j.toString(),typeof j!="string")throw ii("dirty is not a string, aborting")}else throw ii("toString is not a function");if(!t.isSupported)return j;if(Ka||is(_),t.removed=[],typeof j=="string"&&(Kr=!1),Kr){if(j.nodeName){const ce=Ct(j.nodeName);if(!rt[ce]||Vt[ce])throw ii("root node is forbidden and cannot be sanitized in-place")}}else if(j instanceof s)D=Ql(""),z=D.ownerDocument.importNode(j,!0),z.nodeType===ai.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?D=z:D.appendChild(z);else{if(!pr&&!Xt&&!Ue&&j.indexOf("<")===-1)return k&&nn?k.createHTML(j):j;if(D=Ql(j),!D)return pr?null:nn?S:""}D&&Qa&&le(D.firstChild);const kt=Jl(Kr?j:D);for(;ut=kt.nextNode();)rc(ut)||(ut.content instanceof a&&a0(ut.content),ac(ut));if(Kr)return j;if(pr){if(rn)for(Lt=I.call(D.ownerDocument);D.firstChild;)Lt.appendChild(D.firstChild);else Lt=D;return(nt.shadowroot||nt.shadowrootmode)&&(Lt=O.call(i,Lt,!0)),Lt}let Pt=Ue?D.outerHTML:D.innerHTML;return Ue&&rt["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&Dt(iu,D.ownerDocument.doctype.name)&&(Pt=" +`+Pt),Xt&&ln([G,P,A],ce=>{Pt=ri(Pt,ce," ")}),k&&nn?k.createHTML(Pt):Pt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};is(j),Ka=!0},t.clearConfig=function(){yr=null,Ka=!1},t.isValidAttribute=function(j,_,D){yr||is({});const z=Ct(j),ut=Ct(_);return ic(z,ut,D)},t.addHook=function(j,_){typeof _=="function"&&(F[j]=F[j]||[],ei(F[j],_))},t.removeHook=function(j){if(F[j])return fc(F[j])},t.removeHooks=function(j){F[j]&&(F[j]=[])},t.removeAllHooks=function(){F={}},t}var Dr=nu(),au=Object.defineProperty,d=(e,t)=>au(e,"name",{value:t,configurable:!0}),om=(e,t)=>{for(var r in t)au(e,r,{get:t[r],enumerable:!0})},Ce={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:d((...e)=>{},"trace"),debug:d((...e)=>{},"debug"),info:d((...e)=>{},"info"),warn:d((...e)=>{},"warn"),error:d((...e)=>{},"error"),fatal:d((...e)=>{},"fatal")},zo=d(function(e="fatal"){let t=Ce.fatal;typeof e=="string"?e.toLowerCase()in Ce&&(t=Ce[e]):typeof e=="number"&&(t=e),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},t<=Ce.fatal&&(M.fatal=console.error?console.error.bind(console,Zt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Zt("FATAL"))),t<=Ce.error&&(M.error=console.error?console.error.bind(console,Zt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Zt("ERROR"))),t<=Ce.warn&&(M.warn=console.warn?console.warn.bind(console,Zt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Zt("WARN"))),t<=Ce.info&&(M.info=console.info?console.info.bind(console,Zt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Zt("INFO"))),t<=Ce.debug&&(M.debug=console.debug?console.debug.bind(console,Zt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zt("DEBUG"))),t<=Ce.trace&&(M.trace=console.debug?console.debug.bind(console,Zt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zt("TRACE")))},"setLogLevel"),Zt=d(e=>`%c${D0().format("ss.SSS")} : ${e} : `,"format"),su=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Si=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,lm=/\s*%%.*\n/gm,Tr,ou=(Tr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},d(Tr,"UnknownDiagramError"),Tr),Or={},qo=d(function(e,t){e=e.replace(su,"").replace(Si,"").replace(lm,` +`);for(const[r,{detector:i}]of Object.entries(Or))if(i(e,t))return r;throw new ou(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),lu=d((...e)=>{for(const{id:t,detector:r,loader:i}of e)cu(t,r,i)},"registerLazyLoadedDiagrams"),cu=d((e,t,r)=>{Or[e]&&M.warn(`Detector with key ${e} already exists. Overwriting.`),Or[e]={detector:t,loader:r},M.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),cm=d(e=>Or[e].loader,"getDiagramLoader"),Ys=d((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Ys(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Ys(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),At=Ys,Aa="#ffffff",La="#f2f2f2",Ot=d((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),Ar,hm=(Ar=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,n,a,o,s,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||R(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||R(this.tertiaryColor),this.lineColor=this.lineColor||R(this.background),this.arrowheadColor=this.arrowheadColor||R(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?K(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||K(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||R(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||U(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Ar,"Theme"),Ar),um=d(e=>{const t=new hm;return t.calculate(e),t},"getThemeVariables"),Lr,fm=(Lr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(R("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ki(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=K("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=K(this.sectionBkgColor,10),this.taskBorderColor=ki(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ki(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.secondBkg=U(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=U(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=U(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Lr,"Theme"),Lr),pm=d(e=>{const t=new fm;return t.calculate(e),t},"getThemeVariables"),Br,dm=(Br=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=ki(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||K(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||K(this.tertiaryColor,40);for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Br,"Theme"),Br),gm=d(e=>{const t=new dm;return t.calculate(e),t},"getThemeVariables"),Mr,mm=(Mr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=U("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.primaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.actorBorder=K(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||K(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||K(this.tertiaryColor,40);for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Mr,"Theme"),Mr),ym=d(e=>{const t=new mm;return t.calculate(e),t},"getThemeVariables"),Er,xm=(Er=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=U(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.secondBkg=U(this.contrast,55),this.border2=this.contrast,this.actorBorder=U(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Er,"Theme"),Er),bm=d(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),Se={base:{getThemeVariables:um},dark:{getThemeVariables:pm},default:{getThemeVariables:gm},forest:{getThemeVariables:ym},neutral:{getThemeVariables:bm}},De={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},hu={...De,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Se.default.getThemeVariables(),sequence:{...De.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...De.gantt,tickInterval:void 0,useWidth:void 0},c4:{...De.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...De.pie,useWidth:984},xyChart:{...De.xyChart,useWidth:void 0},requirement:{...De.requirement,useWidth:void 0},packet:{...De.packet}},uu=d((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...uu(e[i],"")]:[...r,t+i],[]),"keyify"),_m=new Set(uu(hu,"")),Cm=hu,jn=d(e=>{if(M.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>jn(t));return}for(const t of Object.keys(e)){if(M.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!_m.has(t)||e[t]==null){M.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){M.debug("sanitizing object",t),jn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(M.debug("sanitizing css option",t),e[t]=wm(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}M.debug("After sanitization",e)}},"sanitizeDirective"),wm=d(e=>{let t=0,r=0;for(const i of e){if(t{let r=At({},e),i={};for(const n of t)gu(n),i=At(i,n);if(r=At(r,i),i.theme&&i.theme in Se){const n=At({},fu),a=At(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Se&&(r.themeVariables=Se[r.theme].getThemeVariables(a))}return Ti=r,mu(Ti),Ti},"updateCurrentConfig"),vm=d(e=>(zt=At({},Rr),zt=At(zt,e),e.theme&&Se[e.theme]&&(zt.themeVariables=Se[e.theme].getThemeVariables(e.themeVariables)),Ba(zt,Ir),zt),"setSiteConfig"),km=d(e=>{fu=At({},e)},"saveConfigFromInitialize"),Sm=d(e=>(zt=At(zt,e),Ba(zt,Ir),zt),"updateSiteConfig"),pu=d(()=>At({},zt),"getSiteConfig"),du=d(e=>(mu(e),At(Ti,e),Be()),"setConfig"),Be=d(()=>At({},Ti),"getConfig"),gu=d(e=>{e&&(["secure",...zt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(M.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&gu(e[t])}))},"sanitize"),Tm=d(e=>{var t;jn(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ir.push(e),Ba(zt,Ir)},"addDirective"),Un=d((e=zt)=>{Ir=[],Ba(e,Ir)},"reset"),Am={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},bc={},Lm=d(e=>{bc[e]||(M.warn(Am[e]),bc[e]=!0)},"issueWarning"),mu=d(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Lm("LAZY_LOAD_DEPRECATED")},"checkConfig"),Yi=//gi,Bm=d(e=>e?bu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Mm=(()=>{let e=!1;return()=>{e||(yu(),e=!0)}})();function yu(){const e="data-temp-href-target";Dr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Dr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}d(yu,"setupDompurifyHooks");var xu=d(e=>(Mm(),Dr.sanitize(e)),"removeScript"),_c=d((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=xu(e):i!=="loose"&&(e=bu(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=Dm(e))}return e},"sanitizeMore"),Pr=d((e,t)=>e&&(t.dompurifyConfig?e=Dr.sanitize(_c(e,t),t.dompurifyConfig).toString():e=Dr.sanitize(_c(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Em=d((e,t)=>typeof e=="string"?Pr(e,t):e.flat().map(r=>Pr(r,t)),"sanitizeTextOrArray"),Fm=d(e=>Yi.test(e),"hasBreaks"),$m=d(e=>e.split(Yi),"splitBreaks"),Dm=d(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),bu=d(e=>e.replace(Yi,"#br#"),"breakToPlaceholder"),Om=d(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),Qt=d(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Rm=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Im=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),$L=d(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),Pm=d((e,t)=>{const r=Gs(e,"~"),i=Gs(t,"~");return r===1&&i===1},"shouldCombineSets"),Nm=d(e=>{const t=Gs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Cc=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Vs=/\$\$(.*)\$\$/g,Mi=d(e=>{var t;return(((t=e.match(Vs))==null?void 0:t.length)??0)>0},"hasKatex"),DL=d(async(e,t)=>{e=await Wo(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Wo=d(async(e,t)=>{if(!Mi(e))return e;if(!(Cc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Vs,"MathML is unsupported in this environment.");const{default:r}=await ht(async()=>{const{default:n}=await import("./chunks/katex.CvgdMzdh.js");return{default:n}},[]),i=t.forceLegacyMathML||!Cc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Yi).map(n=>Mi(n)?`
${n}
`:`
${n}
`).join("").replace(Vs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),Ur={getRows:Bm,sanitizeText:Pr,sanitizeTextOrArray:Em,hasBreaks:Fm,splitBreaks:$m,lineBreakRegex:Yi,removeScript:xu,getUrl:Om,evaluate:Qt,getMax:Rm,getMin:Im},zm=d(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),qm=d(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),_u=d(function(e,t,r,i){const n=qm(t,r,i);zm(e,n)},"configureSvgSize"),Wm=d(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;M.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;M.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,M.info(`Calculated bounds: ${s}x${l}`),_u(t,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Fn={},Hm=d((e,t,r)=>{let i="";return e in Fn&&Fn[e]?i=Fn[e](r):M.warn(`No theme found for ${e}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${i} + + ${t} +`},"getStyles"),jm=d((e,t)=>{t!==void 0&&(Fn[e]=t)},"addStylesForDiagram"),Um=Hm,Cu={};om(Cu,{clear:()=>Ym,getAccDescription:()=>Zm,getAccTitle:()=>Vm,getDiagramTitle:()=>Qm,setAccDescription:()=>Xm,setAccTitle:()=>Gm,setDiagramTitle:()=>Km});var Ho="",jo="",Uo="",Yo=d(e=>Pr(e,Be()),"sanitizeText"),Ym=d(()=>{Ho="",Uo="",jo=""},"clear"),Gm=d(e=>{Ho=Yo(e).replace(/^\s+/g,"")},"setAccTitle"),Vm=d(()=>Ho,"getAccTitle"),Xm=d(e=>{Uo=Yo(e).replace(/\n\s+/g,` +`)},"setAccDescription"),Zm=d(()=>Uo,"getAccDescription"),Km=d(e=>{jo=Yo(e)},"setDiagramTitle"),Qm=d(()=>jo,"getDiagramTitle"),wc=M,Jm=zo,gt=Be,OL=du,RL=Rr,ty=d(e=>Pr(e,gt()),"sanitizeText"),ey=Wm,ry=d(()=>Cu,"getCommonDb"),Yn={},Gn=d((e,t,r)=>{var i;Yn[e]&&wc.warn(`Diagram with id ${e} already registered. Overwriting.`),Yn[e]=t,r&&cu(e,r),jm(e,t.styles),(i=t.injectUtils)==null||i.call(t,wc,Jm,gt,ty,ey,ry(),()=>{})},"registerDiagram"),Xs=d(e=>{if(e in Yn)return Yn[e];throw new iy(e)},"getDiagram"),Fr,iy=(Fr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},d(Fr,"DiagramNotFoundError"),Fr);function Go(e){return typeof e>"u"||e===null}d(Go,"isNothing");function wu(e){return typeof e=="object"&&e!==null}d(wu,"isObject");function vu(e){return Array.isArray(e)?e:Go(e)?[]:[e]}d(vu,"toArray");function ku(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;rs&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}d($n,"getLine");function Dn(e,t){return _t.repeat(" ",t-e.length)+e}d(Dn,"padStart");function Au(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=$n(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=_t.repeat(" ",t.indent)+Dn((e.line-l+1).toString(),h)+" | "+c.str+` +`+s;for(c=$n(e.buffer,i[o],n[o],e.position,u),s+=_t.repeat(" ",t.indent)+Dn((e.line+1).toString(),h)+" | "+c.str+` +`,s+=_t.repeat("-",t.indent+h+3+c.pos)+`^ +`,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=$n(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),s+=_t.repeat(" ",t.indent)+Dn((e.line+l+1).toString(),h)+" | "+c.str+` +`;return s.replace(/\n$/,"")}d(Au,"makeSnippet");var hy=Au,uy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fy=["scalar","sequence","mapping"];function Lu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}d(Lu,"compileStyleAliases");function Bu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(uy.indexOf(r)===-1)throw new qt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Lu(t.styleAliases||null),fy.indexOf(this.kind)===-1)throw new qt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}d(Bu,"Type$1");var Et=Bu;function Zs(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}d(Zs,"compileList");function Mu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(d(i,"collectType"),t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:d(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:d(function(e){return e.toString(10)},"decimal"),hexadecimal:d(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Cy=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hu(e){return!(e===null||!Cy.test(e)||e[e.length-1]==="_")}d(Hu,"resolveYamlFloat");function ju(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}d(ju,"constructYamlFloat");var wy=/^[-+]?[0-9]+e/;function Uu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_t.isNegativeZero(e))return"-0.0";return r=e.toString(10),wy.test(r)?r.replace("e",".e"):r}d(Uu,"representYamlFloat");function Yu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_t.isNegativeZero(e))}d(Yu,"isFloat");var vy=new Et("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hu,construct:ju,predicate:Yu,represent:Uu,defaultStyle:"lowercase"}),Gu=yy.extend({implicit:[xy,by,_y,vy]}),ky=Gu,Vu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Xu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Zu(e){return e===null?!1:Vu.exec(e)!==null||Xu.exec(e)!==null}d(Zu,"resolveYamlTimestamp");function Ku(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,f;if(t=Vu.exec(e),t===null&&(t=Xu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&f.setTime(f.getTime()-c),f}d(Ku,"constructYamlTimestamp");function Qu(e){return e.toISOString()}d(Qu,"representYamlTimestamp");var Sy=new Et("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Zu,construct:Ku,instanceOf:Date,represent:Qu});function Ju(e){return e==="<<"||e===null}d(Ju,"resolveYamlMerge");var Ty=new Et("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ju}),Xo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function tf(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Xo;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}d(tf,"resolveYamlBinary");function ef(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Xo,o=0,s=[];for(t=0;t>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}d(ef,"constructYamlBinary");function rf(e){var t="",r=0,i,n,a=e.length,o=Xo;for(i=0;i>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}d(rf,"representYamlBinary");function nf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}d(nf,"isBinary");var Ay=new Et("tag:yaml.org,2002:binary",{kind:"scalar",resolve:tf,construct:ef,predicate:nf,represent:rf}),Ly=Object.prototype.hasOwnProperty,By=Object.prototype.toString;function af(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r>10)+55296,(e-65536&1023)+56320)}d(bf,"charFromCodepoint");var _f=new Array(256),Cf=new Array(256);for(Ye=0;Ye<256;Ye++)_f[Ye]=Qs(Ye)?1:0,Cf[Ye]=Qs(Ye);var Ye;function wf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||uf,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}d(wf,"State$1");function Zo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=hy(r),new qt(t,r)}d(Zo,"generateError");function H(e,t){throw Zo(e,t)}d(H,"throwError");function Ei(e,t){e.onWarning&&e.onWarning.call(null,Zo(e,t))}d(Ei,"throwWarning");var kc={YAML:d(function(t,r,i){var n,a,o;t.version!==null&&H(t,"duplication of %YAML directive"),i.length!==1&&H(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&H(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&H(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Ei(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:d(function(t,r,i){var n,a;i.length!==2&&H(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],df.test(n)||H(t,"ill-formed tag handle (first argument) of the TAG directive"),ze.call(t.tagMap,n)&&H(t,'there is a previously declared suffix for "'+n+'" tag handle'),gf.test(a)||H(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{H(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Te(e,t,r,i){var n,a,o,s;if(t1&&(e.result+=_t.repeat(` +`,t-1))}d(Ea,"writeFoldedLines");function vf(e,t,r){var i,n,a,o,s,l,c,h,u=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),Rt(p)||Qe(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=e.input.charCodeAt(e.position+1),Rt(n)||r&&Qe(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;p!==0;){if(p===58){if(n=e.input.charCodeAt(e.position+1),Rt(n)||r&&Qe(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),Rt(i))break}else{if(e.position===e.lineStart&&Gi(e)||r&&Qe(p))break;if(ae(p))if(l=e.line,c=e.lineStart,h=e.lineIndent,yt(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(Te(e,a,o,!1),Ea(e,e.line-l),a=o=e.position,s=!1),Ne(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Te(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}d(vf,"readPlainScalar");function kf(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Te(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ae(r)?(Te(e,i,n,!0),Ea(e,yt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Gi(e)?H(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);H(e,"unexpected end of the stream within a single quoted scalar")}d(kf,"readSingleQuotedScalar");function Sf(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Te(e,r,e.position,!0),e.position++,!0;if(s===92){if(Te(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),ae(s))yt(e,!1,t);else if(s<256&&_f[s])e.result+=Cf[s],e.position++;else if((o=yf(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=mf(s))>=0?a=(a<<4)+o:H(e,"expected hexadecimal character");e.result+=bf(a),e.position++}else H(e,"unknown escape sequence");r=i=e.position}else ae(s)?(Te(e,r,i,!0),Ea(e,yt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Gi(e)?H(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}H(e,"unexpected end of the stream within a double quoted scalar")}d(Sf,"readDoubleQuotedScalar");function Tf(e,t){var r=!0,i,n,a,o=e.tag,s,l=e.anchor,c,h,u,f,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,s=[];else if(b===123)h=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(yt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=s,!0;r?b===44&&H(e,"expected the node content, but found ','"):H(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Rt(c)&&(u=f=!0,e.position++,yt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,nr(e,t,Xn,!1,!0),y=e.tag,m=e.result,yt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),yt(e,!0,t),nr(e,t,Xn,!1,!0),x=e.result),p?Je(e,s,g,y,m,x,i,n,a):u?s.push(Je(e,null,g,y,m,x,i,n,a)):s.push(m),yt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}H(e,"unexpected end of the stream within a flow collection")}d(Tf,"readFlowCollection");function Af(e,t){var r,i,n=cs,a=!1,o=!1,s=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)cs===n?n=u===43?vc:Oy:H(e,"repeat of a chomping mode identifier");else if((h=xf(u))>=0)h===0?H(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?H(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Ne(u)){do u=e.input.charCodeAt(++e.position);while(Ne(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ae(u)&&u!==0)}for(;u!==0;){for(Ma(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndents&&(s=e.lineIndent),ae(u)){l++;continue}if(e.lineIndentt)&&l!==0)H(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(o=e.line,s=e.lineStart,l=e.position),nr(e,t,Zn,!0,n)&&(y?g=e.result:m=e.result),y||(Je(e,u,f,p,g,m,o,s,l),p=g=m=null),yt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)H(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u"),e.result!==null&&g.kind!==e.kind&&H(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):H(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}d(nr,"composeNode");function Ff(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(yt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Rt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&H(e,"directive name must not be less than one character in length");o!==0;){for(;Ne(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ae(o));break}if(ae(o))break;for(r=e.position;o!==0&&!Rt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Ma(e),ze.call(kc,i)?kc[i](e,i,n):Ei(e,'unknown document directive "'+i+'"')}if(yt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,yt(e,!0,-1)):a&&H(e,"directives end mark is expected"),nr(e,e.lineIndent-1,Zn,!1,!0),yt(e,!0,-1),e.checkLineBreaks&&Iy.test(e.input.slice(t,e.position))&&Ei(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Gi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,yt(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=Ko(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}d(Cr,"codePointAt");function Jo(e){var t=/^\n* /;return t.test(e)}d(Jo,"needIndentIndicator");var Vf=1,ao=2,Xf=3,Zf=4,_r=5;function Kf(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,f=!1,p=i!==-1,g=-1,m=Yf(Cr(e,0))&&Gf(Cr(e,e.length-1));if(t||o)for(l=0;l=65536?l+=2:l++){if(c=Cr(e,l),!zr(c))return _r;m=m&&no(c,h,s),h=c}else{for(l=0;l=65536?l+=2:l++){if(c=Cr(e,l),c===Fi)u=!0,p&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!zr(c))return _r;m=m&&no(c,h,s),h=c}f=f||p&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!n(e)?Vf:a===$i?_r:ao:r>9&&Jo(e)?_r:o?a===$i?_r:ao:f?Zf:Xf}d(Kf,"chooseScalarStyle");function Qf(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===$i?'""':"''";if(!e.noCompatMode&&(nx.indexOf(t)!==-1||ax.test(t)))return e.quotingType===$i?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Uf(e,c)}switch(d(l,"testAmbiguity"),Kf(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case Vf:return t;case ao:return"'"+t.replace(/'/g,"''")+"'";case Xf:return"|"+so(t,e.indent)+oo(ro(t,a));case Zf:return">"+so(t,e.indent)+oo(ro(Jf(t,o),a));case _r:return'"'+tp(t)+'"';default:throw new qt("impossible error: invalid scalar style")}}()}d(Qf,"writeScalar");function so(e,t){var r=Jo(e)?String(t):"",i=e[e.length-1]===` +`,n=i&&(e[e.length-2]===` +`||e===` +`),a=n?"+":i?"":"-";return r+a+` +`}d(so,"blockHeader");function oo(e){return e[e.length-1]===` +`?e.slice(0,-1):e}d(oo,"dropEndingNewline");function Jf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(` +`);return c=c!==-1?c:e.length,r.lastIndex=c,lo(e.slice(0,c),t)}(),n=e[0]===` +`||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],l=o[2];a=l[0]===" ",i+=s+(!n&&!a&&l!==""?` +`:"")+lo(l,t),n=a}return i}d(Jf,"foldString");function lo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,l+=` +`+e.slice(n,a),n=a+1),o=s;return l+=` +`,e.length-n>t&&o>n?l+=e.slice(n,o)+` +`+e.slice(o+1):l+=e.slice(n),l.slice(1)}d(lo,"foldLine");function tp(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=Cr(e,n),i=Ft[r],!i&&zr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Hf(r);return t}d(tp,"escapeString");function ep(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a"u"&&me(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}d(ep,"writeFlowSequence");function co(e,t,r,i){var n="",a=e.tag,o,s,l;for(o=0,s=r.length;o"u"&&me(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Qn(e,t)),e.dump&&Fi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}d(co,"writeBlockSequence");function rp(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),me(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}d(rp,"writeFlowMapping");function ip(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new qt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s1024,u&&(e.dump&&Fi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Qn(e,t)),me(e,t+1,h,!0,u)&&(e.dump&&Fi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}d(ip,"writeBlockMapping");function ho(e,t,r){var i,n,a,o,s,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}d(ho,"detectType");function me(e,t,r,i,n,a,o){e.tag=null,e.dump=r,ho(e,r,!1)||ho(e,r,!0);var s=Of.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(ip(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(rp(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?co(e,t-1,e.dump,n):co(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(ep(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Qf(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}d(me,"writeNode");function np(e,t){var r=[],i=[],n,a;for(Jn(e,r,i),n=0,a=i.length;n{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return us(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return us(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return us(s,r)?s:null}return null},us=(e,t)=>e?!!((e.provider===""||e.provider.match(hs))&&(t&&e.prefix===""||e.prefix.match(hs))&&e.name.match(hs)):!1;function mx(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Sc(e,t){const r=mx(e,t);for(const i in fx)i in ta?i in e&&!(i in r)&&(r[i]=ta[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function yx(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Tc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Sc(i[s]||n[s],a)}return o(t),r.forEach(o),Sc(e,a)}function xx(e,t){if(e.icons[t])return Tc(e,t,[]);const r=yx(e,[t])[t];return r?Tc(e,t,r):null}const bx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_x=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ac(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(bx);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=_x.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function Cx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function wx(e,t){return e?""+e+""+t:t}function vx(e,t,r){const i=Cx(e);return wx(i.defs,t+i.content+r)}const kx=e=>e==="unset"||e==="undefined"||e==="none";function Sx(e,t){const r={...ap,...e},i={...dx,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let w=m.rotate;x?b?w+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let k;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:k=n.height/2+n.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}w%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),y.length&&(a=vx(a,'',""))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Ac(u,l/c)):(h=o==="auto"?l:o,u=s===null?Ac(h,c/l):s==="auto"?c:s);const f={},p=(m,y)=>{kx(y)||(f[m]=y.toString())};p("width",h),p("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const Tx=/\sid="(\S+)"/g,Ax="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Lx=0;function Bx(e,t=Ax){const r=[];let i;for(;i=Tx.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(Lx++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function Mx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var Ex={body:'?',height:80,width:80},uo=new Map,sp=new Map,Fx=d(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",t.name),"loader"in t)sp.set(t.name,t.loader);else if("icons"in t)uo.set(t.name,t.icons);else throw M.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),$x=d(async(e,t)=>{const r=gx(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=uo.get(i);if(!n){const o=sp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},uo.set(i,n)}catch(s){throw M.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=xx(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Fa=d(async(e,t)=>{let r;try{r=await $x(e,t==null?void 0:t.fallbackPrefix)}catch(a){M.error(a),r=Ex}const i=Sx(r,t);return Mx(Bx(i.body),i.attributes)},"getIconSVG"),op=d(({flowchart:e})=>{var n,a;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Oe={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function xi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ea(e),t=ea(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}d(xi,"calculateDeltaAndAngle");var ea=d(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Dx=d(e=>({x:d(function(t,r,i){let n=0;if(r===0&&Object.hasOwn(Oe,e.arrowTypeStart)){const{angle:a,deltaX:o}=xi(i[0],i[1]);n=Oe[e.arrowTypeStart]*Math.cos(a)*(o>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Oe,e.arrowTypeEnd)){const{angle:a,deltaX:o}=xi(i[i.length-1],i[i.length-2]);n=Oe[e.arrowTypeEnd]*Math.cos(a)*(o>=0?1:-1)}return ea(t).x+n},"x"),y:d(function(t,r,i){let n=0;if(r===0&&Object.hasOwn(Oe,e.arrowTypeStart)){const{angle:a,deltaY:o}=xi(i[0],i[1]);n=Oe[e.arrowTypeStart]*Math.abs(Math.sin(a))*(o>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Oe,e.arrowTypeEnd)){const{angle:a,deltaY:o}=xi(i[i.length-1],i[i.length-2]);n=Oe[e.arrowTypeEnd]*Math.abs(Math.sin(a))*(o>=0?1:-1)}return ea(t).y+n},"y")}),"getLineFunctionsWithOffset"),tl={},wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.BLANK_URL=wt.relativeFirstCharacters=wt.whitespaceEscapeCharsRegex=wt.urlSchemeRegex=wt.ctrlCharactersRegex=wt.htmlCtrlEntityRegex=wt.htmlEntitiesRegex=wt.invalidProtocolRegex=void 0;wt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;wt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;wt.htmlCtrlEntityRegex=/&(newline|tab);/gi;wt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;wt.urlSchemeRegex=/^.+(:|:)/gim;wt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;wt.relativeFirstCharacters=[".","/"];wt.BLANK_URL="about:blank";Object.defineProperty(tl,"__esModule",{value:!0});var lp=tl.sanitizeUrl=void 0,Mt=wt;function Ox(e){return Mt.relativeFirstCharacters.indexOf(e[0])>-1}function Rx(e){var t=e.replace(Mt.ctrlCharactersRegex,"");return t.replace(Mt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function Ix(e){return URL.canParse(e)}function Lc(e){try{return decodeURIComponent(e)}catch{return e}}function Px(e){if(!e)return Mt.BLANK_URL;var t,r=Lc(e.trim());do r=Rx(r).replace(Mt.htmlCtrlEntityRegex,"").replace(Mt.ctrlCharactersRegex,"").replace(Mt.whitespaceEscapeCharsRegex,"").trim(),r=Lc(r),t=r.match(Mt.ctrlCharactersRegex)||r.match(Mt.htmlEntitiesRegex)||r.match(Mt.htmlCtrlEntityRegex)||r.match(Mt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Mt.BLANK_URL;if(Ox(i))return i;var n=i.trimStart(),a=n.match(Mt.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Mt.invalidProtocolRegex.test(o))return Mt.BLANK_URL;var s=n.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return s;if(o==="http:"||o==="https:"){if(!Ix(s))return Mt.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s}lp=tl.sanitizeUrl=Px;var Nx={value:()=>{}};function cp(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}On.prototype=cp.prototype={constructor:On,on:function(e,t){var r=this._,i=zx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Mc.hasOwnProperty(t)?{space:Mc[t],local:e}:e}function Wx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===fo&&t.documentElement.namespaceURI===fo?t.createElement(e):t.createElementNS(r,e)}}function Hx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function hp(e){var t=$a(e);return(t.local?Hx:Wx)(t)}function jx(){}function el(e){return e==null?jx:function(){return this.querySelector(e)}}function Ux(e){typeof e!="function"&&(e=el(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n=w&&(w=b+1);!(S=y[w])&&++w=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function mb(e){e||(e=yb);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}function xb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function bb(){return Array.from(this)}function _b(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?Eb:typeof t=="function"?$b:Fb)(e,t,r??"")):qr(this.node(),e)}function qr(e,t){return e.style.getPropertyValue(t)||gp(e).getComputedStyle(e,null).getPropertyValue(t)}function Ob(e){return function(){delete this[e]}}function Rb(e,t){return function(){this[e]=t}}function Ib(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Pb(e,t){return arguments.length>1?this.each((t==null?Ob:typeof t=="function"?Ib:Rb)(e,t)):this.node()[e]}function mp(e){return e.trim().split(/^|\s+/)}function rl(e){return e.classList||new yp(e)}function yp(e){this._node=e,this._names=mp(e.getAttribute("class")||"")}yp.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function xp(e,t){for(var r=rl(e),i=-1,n=t.length;++i=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function f1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?hn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?hn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=C1.exec(e))?new Wt(t[1],t[2],t[3],1):(t=w1.exec(e))?new Wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=v1.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=k1.exec(e))?hn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=S1.exec(e))?Ic(t[1],t[2]/100,t[3]/100,1):(t=T1.exec(e))?Ic(t[1],t[2]/100,t[3]/100,t[4]):Ec.hasOwnProperty(e)?Dc(Ec[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function Dc(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function hn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Wt(e,t,r,i)}function B1(e){return e instanceof Xi||(e=Ii(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function po(e,t,r,i){return arguments.length===1?B1(e):new Wt(e,t,r,i??1)}function Wt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}il(Wt,po,wp(Xi,{brighter(e){return e=e==null?ia:Math.pow(ia,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Oi:Math.pow(Oi,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(rr(this.r),rr(this.g),rr(this.b),na(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Oc,formatHex:Oc,formatHex8:M1,formatRgb:Rc,toString:Rc}));function Oc(){return`#${tr(this.r)}${tr(this.g)}${tr(this.b)}`}function M1(){return`#${tr(this.r)}${tr(this.g)}${tr(this.b)}${tr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rc(){const e=na(this.opacity);return`${e===1?"rgb(":"rgba("}${rr(this.r)}, ${rr(this.g)}, ${rr(this.b)}${e===1?")":`, ${e})`}`}function na(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function rr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tr(e){return e=rr(e),(e<16?"0":"")+e.toString(16)}function Ic(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ne(e,t,r,i)}function vp(e){if(e instanceof ne)return new ne(e.h,e.s,e.l,e.opacity);if(e instanceof Xi||(e=Ii(e)),!e)return new ne;if(e instanceof ne)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r0&&l<1?0:o,new ne(o,s,l,e.opacity)}function E1(e,t,r,i){return arguments.length===1?vp(e):new ne(e,t,r,i??1)}function ne(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}il(ne,E1,wp(Xi,{brighter(e){return e=e==null?ia:Math.pow(ia,e),new ne(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Oi:Math.pow(Oi,e),new ne(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Wt(fs(e>=240?e-240:e+120,n,i),fs(e,n,i),fs(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ne(Pc(this.h),un(this.s),un(this.l),na(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=na(this.opacity);return`${e===1?"hsl(":"hsla("}${Pc(this.h)}, ${un(this.s)*100}%, ${un(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pc(e){return e=(e||0)%360,e<0?e+360:e}function un(e){return Math.max(0,Math.min(1,e||0))}function fs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const nl=e=>()=>e;function kp(e,t){return function(r){return e+r*t}}function F1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function IL(e,t){var r=t-e;return r?kp(e,r>180||r<-180?r-360*Math.round(r/360):r):nl(isNaN(e)?t:e)}function $1(e){return(e=+e)==1?Sp:function(t,r){return r-t?F1(t,r,e):nl(isNaN(t)?r:t)}}function Sp(e,t){var r=t-e;return r?kp(e,r):nl(isNaN(e)?t:e)}const Nc=function e(t){var r=$1(t);function i(n,a){var o=r((n=po(n)).r,(a=po(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=Sp(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i}(1);function Ie(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var go=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ps=new RegExp(go.source,"g");function D1(e){return function(){return e}}function O1(e){return function(t){return e(t)+""}}function R1(e,t){var r=go.lastIndex=ps.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=go.exec(e))&&(n=ps.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Ie(i,n)})),r=ps.lastIndex;return r180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:Ie(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:Ie(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var m=p.push(n(p)+"scale(",null,",",null,")");g.push({i:m-4,x:Ie(c,u)},{i:m-2,x:Ie(h,f)})}else(u!==1||f!==1)&&p.push(n(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),s(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,m=f.length,y;++g=0&&e._call.call(void 0,t),e=e._next;--Wr}function qc(){ar=(sa=Pi.now())+Da,Wr=bi=0;try{W1()}finally{Wr=0,j1(),ar=0}}function H1(){var e=Pi.now(),t=e-sa;t>Lp&&(Da-=t,sa=e)}function j1(){for(var e,t=aa,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:aa=r);_i=e,yo(i)}function yo(e){if(!Wr){bi&&(bi=clearTimeout(bi));var t=e-ar;t>24?(e<1/0&&(bi=setTimeout(qc,e-Pi.now()-Da)),si&&(si=clearInterval(si))):(si||(sa=Pi.now(),si=setInterval(H1,Lp)),Wr=1,Bp(qc))}}function Wc(e,t,r){var i=new oa;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var U1=cp("start","end","cancel","interrupt"),Y1=[],Ep=0,Hc=1,xo=2,Rn=3,jc=4,bo=5,In=6;function Oa(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;G1(e,r,{name:t,index:i,group:n,on:U1,tween:Y1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ep})}function sl(e,t){var r=oe(e,t);if(r.state>Ep)throw new Error("too late; already scheduled");return r}function ye(e,t){var r=oe(e,t);if(r.state>Rn)throw new Error("too late; already running");return r}function oe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function G1(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Mp(a,0,r.time);function a(c){r.state=Hc,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,p;if(r.state!==Hc)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===Rn)return Wc(o);p.state===jc?(p.state=In,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+hxo&&i.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function k_(e,t,r){var i,n,a=v_(t)?sl:ye;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function S_(e,t){var r=this._id;return arguments.length<2?oe(this.node(),r).on.on(e):this.each(k_(r,e,t))}function T_(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function A_(){return this.on("end.remove",T_(this._id))}function L_(e){var t=this._name,r=this._id;typeof e!="function"&&(e=el(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Op;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;nVe)if(!(Math.abs(u*l-c*h)>Ve)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-o,g=n-s,m=l*l+c*c,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(f),w=a*Math.tan((_o-Math.acos((m+f-y)/(2*x*b)))/2),k=w/b,S=w/x;Math.abs(k-1)>Ve&&this._append`L${t+k*h},${r+k*u}`,this._append`A${a},${a},0,0,${+(u*p>h*g)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=t+s,h=r+l,u=1^o,f=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ve||Math.abs(this._y1-h)>Ve)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Co+Co),f>J_?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>Ve&&this._append`A${i},${i},0,${+(f>=_o)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function xr(e){return function(){return e}}const PL=Math.abs,NL=Math.atan2,zL=Math.cos,qL=Math.max,WL=Math.min,HL=Math.sin,jL=Math.sqrt,Uc=1e-12,ll=Math.PI,Yc=ll/2,UL=2*ll;function YL(e){return e>1?0:e<-1?ll:Math.acos(e)}function GL(e){return e>=1?Yc:e<=-1?-Yc:Math.asin(e)}function r2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new e2(t)}function i2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Rp(e){this._context=e}Rp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ip(e){return new Rp(e)}function n2(e){return e[0]}function a2(e){return e[1]}function s2(e,t){var r=xr(!0),i=null,n=Ip,a=null,o=r2(s);e=typeof e=="function"?e:e===void 0?n2:xr(e),t=typeof t=="function"?t:t===void 0?a2:xr(t);function s(l){var c,h=(l=i2(l)).length,u,f=!1,p;for(i==null&&(a=n(p=o())),c=0;c<=h;++c)!(c0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*a),this._beta*t[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const u2=function e(t){function r(i){return t===1?new Ra(i):new Wp(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ca(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function cl(e,t){this._context=e,this._k=(1-t)/6}cl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ca(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const f2=function e(t){function r(i){return new cl(i,t)}return r.tension=function(i){return e(+i)},r}(0);function hl(e,t){this._context=e,this._k=(1-t)/6}hl.prototype={areaStart:qe,areaEnd:qe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const p2=function e(t){function r(i){return new hl(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ul(e,t){this._context=e,this._k=(1-t)/6}ul.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const d2=function e(t){function r(i){return new ul(i,t)}return r.tension=function(i){return e(+i)},r}(0);function fl(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Uc){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Uc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function Hp(e,t){this._context=e,this._alpha=t}Hp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:fl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const g2=function e(t){function r(i){return t?new Hp(i,t):new cl(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function jp(e,t){this._context=e,this._alpha=t}jp.prototype={areaStart:qe,areaEnd:qe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:fl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const m2=function e(t){function r(i){return t?new jp(i,t):new hl(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Up(e,t){this._context=e,this._alpha=t}Up.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const y2=function e(t){function r(i){return t?new Up(i,t):new ul(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Yp(e){this._context=e}Yp.prototype={areaStart:qe,areaEnd:qe,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function x2(e){return new Yp(e)}function Gc(e){return e<0?-1:1}function Vc(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Gc(a)+Gc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Xc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ds(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function ha(e){this._context=e}ha.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ds(this,this._t0,Xc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ds(this,Xc(this,r=Vc(this,e,t)),r);break;default:ds(this,this._t0,r=Vc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Gp(e){this._context=new Vp(e)}(Gp.prototype=Object.create(ha.prototype)).point=function(e,t){ha.prototype.point.call(this,t,e)};function Vp(e){this._context=e}Vp.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function b2(e){return new ha(e)}function _2(e){return new Gp(e)}function Xp(e){this._context=e}Xp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Zc(e),n=Zc(t),a=0,o=1;o=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function w2(e){return new Ia(e,.5)}function v2(e){return new Ia(e,0)}function k2(e){return new Ia(e,1)}function Ci(e,t,r){this.k=e,this.x=t,this.y=r}Ci.prototype={constructor:Ci,scale:function(e){return e===1?this:new Ci(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ci(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Ci.prototype;var Zp=typeof global=="object"&&global&&global.Object===Object&&global,S2=typeof self=="object"&&self&&self.Object===Object&&self,xe=Zp||S2||Function("return this")(),ua=xe.Symbol,Kp=Object.prototype,T2=Kp.hasOwnProperty,A2=Kp.toString,oi=ua?ua.toStringTag:void 0;function L2(e){var t=T2.call(e,oi),r=e[oi];try{e[oi]=void 0;var i=!0}catch{}var n=A2.call(e);return i&&(t?e[oi]=r:delete e[oi]),n}var B2=Object.prototype,M2=B2.toString;function E2(e){return M2.call(e)}var F2="[object Null]",$2="[object Undefined]",Kc=ua?ua.toStringTag:void 0;function Yr(e){return e==null?e===void 0?$2:F2:Kc&&Kc in Object(e)?L2(e):E2(e)}function cr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var D2="[object AsyncFunction]",O2="[object Function]",R2="[object GeneratorFunction]",I2="[object Proxy]";function pl(e){if(!cr(e))return!1;var t=Yr(e);return t==O2||t==R2||t==D2||t==I2}var gs=xe["__core-js_shared__"],Qc=function(){var e=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function P2(e){return!!Qc&&Qc in e}var N2=Function.prototype,z2=N2.toString;function hr(e){if(e!=null){try{return z2.call(e)}catch{}try{return e+""}catch{}}return""}var q2=/[\\^$.*+?()[\]{}|]/g,W2=/^\[object .+?Constructor\]$/,H2=Function.prototype,j2=Object.prototype,U2=H2.toString,Y2=j2.hasOwnProperty,G2=RegExp("^"+U2.call(Y2).replace(q2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V2(e){if(!cr(e)||P2(e))return!1;var t=pl(e)?G2:W2;return t.test(hr(e))}function X2(e,t){return e==null?void 0:e[t]}function ur(e,t){var r=X2(e,t);return V2(r)?r:void 0}var Ni=ur(Object,"create");function Z2(){this.__data__=Ni?Ni(null):{},this.size=0}function K2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Q2="__lodash_hash_undefined__",J2=Object.prototype,tC=J2.hasOwnProperty;function eC(e){var t=this.__data__;if(Ni){var r=t[e];return r===Q2?void 0:r}return tC.call(t,e)?t[e]:void 0}var rC=Object.prototype,iC=rC.hasOwnProperty;function nC(e){var t=this.__data__;return Ni?t[e]!==void 0:iC.call(t,e)}var aC="__lodash_hash_undefined__";function sC(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ni&&t===void 0?aC:t,this}function sr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function pC(e,t){var r=this.__data__,i=Na(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=zC}function Wa(e){return e!=null&&rd(e.length)&&!pl(e)}function qC(e){return Ki(e)&&Wa(e)}function WC(){return!1}var id=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ah=id&&typeof module=="object"&&module&&!module.nodeType&&module,HC=ah&&ah.exports===id,sh=HC?xe.Buffer:void 0,jC=sh?sh.isBuffer:void 0,gl=jC||WC,UC="[object Object]",YC=Function.prototype,GC=Object.prototype,nd=YC.toString,VC=GC.hasOwnProperty,XC=nd.call(Object);function ZC(e){if(!Ki(e)||Yr(e)!=UC)return!1;var t=td(e);if(t===null)return!0;var r=VC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nd.call(r)==XC}var KC="[object Arguments]",QC="[object Array]",JC="[object Boolean]",tw="[object Date]",ew="[object Error]",rw="[object Function]",iw="[object Map]",nw="[object Number]",aw="[object Object]",sw="[object RegExp]",ow="[object Set]",lw="[object String]",cw="[object WeakMap]",hw="[object ArrayBuffer]",uw="[object DataView]",fw="[object Float32Array]",pw="[object Float64Array]",dw="[object Int8Array]",gw="[object Int16Array]",mw="[object Int32Array]",yw="[object Uint8Array]",xw="[object Uint8ClampedArray]",bw="[object Uint16Array]",_w="[object Uint32Array]",pt={};pt[fw]=pt[pw]=pt[dw]=pt[gw]=pt[mw]=pt[yw]=pt[xw]=pt[bw]=pt[_w]=!0;pt[KC]=pt[QC]=pt[hw]=pt[JC]=pt[uw]=pt[tw]=pt[ew]=pt[rw]=pt[iw]=pt[nw]=pt[aw]=pt[sw]=pt[ow]=pt[lw]=pt[cw]=!1;function Cw(e){return Ki(e)&&rd(e.length)&&!!pt[Yr(e)]}function ww(e){return function(t){return e(t)}}var ad=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ai=ad&&typeof module=="object"&&module&&!module.nodeType&&module,vw=Ai&&Ai.exports===ad,ms=vw&&Zp.process,oh=function(){try{var e=Ai&&Ai.require&&Ai.require("util").types;return e||ms&&ms.binding&&ms.binding("util")}catch{}}(),lh=oh&&oh.isTypedArray,ml=lh?ww(lh):Cw;function vo(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var kw=Object.prototype,Sw=kw.hasOwnProperty;function Tw(e,t,r){var i=e[t];(!(Sw.call(e,t)&&Pa(i,r))||r===void 0&&!(t in e))&&dl(e,t,r)}function Aw(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a-1&&e%1==0&&e0){if(++t>=jw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Vw=Gw(Hw);function Xw(e,t){return Vw(qw(e,t,cd),e+"")}function Zw(e,t,r){if(!cr(r))return!1;var i=typeof t;return(i=="number"?Wa(r)&&sd(t,r.length):i=="string"&&t in r)?Pa(r[t],e):!1}function Kw(e){return Xw(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&Zw(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++is.args);jn(o),i=At(i,[...o])}else i=r.args;if(!i)return;let n=qo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),hd=d(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${ev.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Si.exec(e))!==null;)if(a.index===Si.lastIndex&&Si.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const s=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:s,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(n){return M.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),iv=d(function(e){return e.replace(Si,"")},"removeDirectives"),nv=d(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function yl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return tv[r]??t}d(yl,"interpolateToCurve");function ud(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?lp(r):r}d(ud,"formatUrl");var av=d((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o{r+=xl(n,t),t=n});const i=r/2;return bl(e,i)}d(fd,"traverseEdge");function pd(e){return e.length===1?e[0]:fd(e)}d(pd,"calcLabelPosition");var hh=d((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),bl=d((e,t)=>{let r,i=t;for(const n of e){if(r){const a=xl(n,r);if(a=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:hh((1-o)*r.x+o*n.x,5),y:hh((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sv=d((e,t,r)=>{M.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=bl(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function dd(e,t,r){const i=structuredClone(r);M.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=bl(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}d(dd,"calcTerminalLabelPosition");function gd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}d(gd,"getStylesFromArray");var uh=0,ov=d(()=>(uh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+uh),"generateId");function md(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;nmd(e.length),"random"),cv=d(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"),hv=d(function(e,t){const r=t.text.replace(Ur.lineBreakRegex," "),[,i]=wl(t.fontSize),n=e.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",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),uv=Zi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Ur.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=qi(`${o} `,r),c=qi(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:p}=fv(o,t,"-",r);n.push(a,...f),a=p}else c+l>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),fv=Zi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(qi(c,i)>=t){const u=l+1,f=n.length===u,p=`${c}${r}`;a.push(f?c:p),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function yd(e,t){return _l(e,t).height}d(yd,"calculateTextHeight");function qi(e,t){return _l(e,t).width}d(qi,"calculateTextWidth");var _l=Zi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=wl(r),o=["sans-serif",i],s=e.split(Ur.lineBreakRegex),l=[],c=dt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=cv();y.text=m||Jw;const x=hv(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),$r,pv=($r=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},d($r,"InitIDGenerator"),$r),pn,dv=d(function(e){return pn=pn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),pn.innerHTML=e,unescape(pn.textContent)},"entityDecode");function Cl(e){return"str"in e}d(Cl,"isDetailedError");var gv=d((e,t,r,i)=>{var a;if(!i)return;const n=(a=e.node())==null?void 0:a.getBBox();n&&e.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),wl=d(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function vl(e,t){return Qw({},e,t)}d(vl,"cleanAndMerge");var ue={assignWithDepth:At,wrapLabel:uv,calculateTextHeight:yd,calculateTextWidth:qi,calculateTextDimensions:_l,cleanAndMerge:vl,detectInit:rv,detectDirective:hd,isSubstringInArray:nv,interpolateToCurve:yl,calcLabelPosition:pd,calcCardinalityPosition:sv,calcTerminalLabelPosition:dd,formatUrl:ud,getStylesFromArray:gd,generateId:ov,random:lv,runFunc:av,entityDecode:dv,insertTitle:gv,parseFontSize:wl,InitIDGenerator:pv},mv=d(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ha=d(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),VL=d((e,t,{counter:r=0,prefix:i,suffix:n})=>`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function kl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let fr=kl();function xd(e){fr=e}const bd=/[&<>"']/,yv=new RegExp(bd.source,"g"),_d=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,xv=new RegExp(_d.source,"g"),bv={"&":"&","<":"<",">":">",'"':""","'":"'"},fh=e=>bv[e];function jt(e,t){if(t){if(bd.test(e))return e.replace(yv,fh)}else if(_d.test(e))return e.replace(xv,fh);return e}const _v=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Cv(e){return e.replace(_v,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const wv=/(^|[^\[])\^/g;function ct(e,t){let r=typeof e=="string"?e:e.source;t=t||"";const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(wv,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}function ph(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Li={exec:()=>null};function dh(e,t){const r=e.replace(/\|/g,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length{const a=n.match(/^\s+/);if(a===null)return n;const[o]=a;return o.length>=i.length?n.slice(i.length):n}).join(` +`)}class ga{constructor(t){ft(this,"options");ft(this,"rules");ft(this,"lexer");this.options=t||fr}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const i=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:li(i,` +`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const i=r[0],n=kv(i,r[3]||"");return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(/#$/.test(i)){const n=li(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:li(r[0],` +`)}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){let i=li(r[0],` +`).split(` +`),n="",a="";const o=[];for(;i.length>0;){let s=!1;const l=[];let c;for(c=0;c/.test(i[c]))l.push(i[c]),s=!0;else if(!s)l.push(i[c]);else break;i=i.slice(c);const h=l.join(` +`),u=h.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n} +${h}`:h,a=a?`${a} +${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;const p=o[o.length-1];if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const g=p,m=g.raw+` +`+i.join(` +`),y=this.blockquote(m);o[o.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if((p==null?void 0:p.type)==="list"){const g=p,m=g.raw+` +`+i.join(` +`),y=this.list(m);o[o.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(o[o.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim();const n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let s=!1;for(;t;){let l=!1,c="",h="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let u=r[2].split(` +`,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),f=t.split(` +`,1)[0],p=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):p?g=r[1].length+1:(g=r[2].search(/[^ ]/),g=g>4?1:g,h=u.slice(g),g+=r[1].length),p&&/^ *$/.test(f)&&(c+=f+` +`,t=t.substring(f.length+1),l=!0),!l){const x=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;t;){const S=t.split(` +`,1)[0];if(f=S,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(f)||k.test(f)||x.test(f)||b.test(t))break;if(f.search(/[^ ]/)>=g||!f.trim())h+=` +`+f.slice(g);else{if(p||u.search(/[^ ]/)>=4||w.test(u)||k.test(u)||b.test(u))break;h+=` +`+f}!p&&!f.trim()&&(p=!0),c+=S+` +`,t=t.substring(S.length+1),u=f.slice(g)}}a.loose||(s?a.loose=!0:/\n *\n *$/.test(c)&&(s=!0));let m=null,y;this.options.gfm&&(m=/^\[[ xX]\] /.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),a.raw+=c}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let l=0;lu.type==="space"),h=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));a.loose=h}if(a.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){const r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;const i=dh(r[1]),n=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` +`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const s of n)/^ *-+: *$/.test(s)?o.align.push("right"):/^ *:-+: *$/.test(s)?o.align.push("center"):/^ *:-+ *$/.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){const r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){const r=this.rules.block.paragraph.exec(t);if(r){const i=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){const r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:jt(r[1])}}tag(t){const r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const i=r[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;const o=li(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=vv(r[2],"()");if(o>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o&&(n=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),/^$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),gh(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const n=(i[2]||i[1]).replace(/\s+/g," "),a=r[n.toLowerCase()];if(!a){const o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return gh(i,a,i[0],this.lexer)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const o=[...n[0]].length-1;let s,l,c=o,h=0;const u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*t.length+o);(n=u.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(l=[...s].length,n[3]||n[4]){c+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){h+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+h);const f=[...n[0]][0].length,p=t.slice(0,o+n.index+f+l);if(Math.min(o,l)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(/\n/g," ");const n=/[^ ]/.test(i),a=/^ /.test(i)&&/ $/.test(i);return n&&a&&(i=i.substring(1,i.length-1)),i=jt(i,!0),{type:"codespan",raw:r[0],text:i}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=jt(r[1]),n="mailto:"+i):(i=jt(r[1]),n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,a;if(r[2]==="@")n=jt(r[0]),a="mailto:"+n;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);n=jt(r[0]),r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=r[0]:i=jt(r[0]),{type:"text",raw:r[0],text:i}}}}const Sv=/^(?: *(?:\n|$))+/,Tv=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Av=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Lv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cd=/(?:[*+-]|\d{1,9}[.)])/,wd=ct(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Cd).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Sl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Bv=/^[^\n]+/,Tl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mv=ct(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Tl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ev=ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cd).getRegex(),ja="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Al=/|$))/,Fv=ct("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Al).replace("tag",ja).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vd=ct(Sl).replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ja).getRegex(),$v=ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vd).getRegex(),Ll={blockquote:$v,code:Tv,def:Mv,fences:Av,heading:Lv,hr:Qi,html:Fv,lheading:wd,list:Ev,newline:Sv,paragraph:vd,table:Li,text:Bv},mh=ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ja).getRegex(),Dv={...Ll,table:mh,paragraph:ct(Sl).replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",mh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ja).getRegex()},Ov={...Ll,html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Al).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Li,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ct(Sl).replace("hr",Qi).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",wd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sd=/^( {2,}|\\)\n(?!\s*$)/,Iv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,zv=ct(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ji).getRegex(),qv=ct("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ji).getRegex(),Wv=ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ji).getRegex(),Hv=ct(/\\([punct])/,"gu").replace(/punct/g,Ji).getRegex(),jv=ct(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Uv=ct(Al).replace("(?:-->|$)","-->").getRegex(),Yv=ct("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Uv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ma=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Gv=ct(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ma).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Td=ct(/^!?\[(label)\]\[(ref)\]/).replace("label",ma).replace("ref",Tl).getRegex(),Ad=ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tl).getRegex(),Vv=ct("reflink|nolink(?!\\()","g").replace("reflink",Td).replace("nolink",Ad).getRegex(),Bl={_backpedal:Li,anyPunctuation:Hv,autolink:jv,blockSkip:Nv,br:Sd,code:Rv,del:Li,emStrongLDelim:zv,emStrongRDelimAst:qv,emStrongRDelimUnd:Wv,escape:kd,link:Gv,nolink:Ad,punctuation:Pv,reflink:Td,reflinkSearch:Vv,tag:Yv,text:Iv,url:Li},Xv={...Bl,link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",ma).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ma).getRegex()},ko={...Bl,escape:ct(kd).replace("])","~|])").getRegex(),url:ct(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let n,a,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` +`+n.raw,a.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` +`+n.raw,a.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},l),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){a=r[r.length-1],i&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=` +`+n.raw,a.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(n),i=o.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=` +`+n.raw,a.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(n);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i,n,a,o=t,s,l,c;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,s.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(i=h.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.escape(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.tag(t)){t=t.substring(i.raw.length),n=r[r.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):r.push(i);continue}if(i=this.tokenizer.link(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(i.raw.length),n=r[r.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):r.push(i);continue}if(i=this.tokenizer.emStrong(t,o,c)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.codespan(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.br(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.del(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.autolink(t)){t=t.substring(i.raw.length),r.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(t))){t=t.substring(i.raw.length),r.push(i);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const u=t.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(a=t.substring(0,h+1))}if(i=this.tokenizer.inlineText(a)){t=t.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(c=i.raw.slice(-1)),l=!0,n=r[r.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):r.push(i);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}}class ya{constructor(t){ft(this,"options");ft(this,"parser");this.options=t||fr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;const n=(o=(r||"").match(/^\S*/))==null?void 0:o[0],a=t.replace(/\n$/,"")+` +`;return n?'
'+(i?a:jt(a,!0))+`
+`:"
"+(i?a:jt(a,!0))+`
+`}blockquote({tokens:t}){return`
+${this.parser.parse(t)}
+`}html({text:t}){return t}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
+`}list(t){const r=t.ordered,i=t.start;let n="";for(let s=0;s +`+n+" +`}listitem(t){let r="";if(t.task){const i=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",i="";for(let a=0;a${n}`),` + +`+r+` +`+n+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){const r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:i}){const n=this.parser.parseInline(i),a=ph(t);if(a===null)return n;t=a;let o='
    ",o}image({href:t,title:r,text:i}){const n=ph(t);if(n===null)return i;t=n;let a=`${i}{const c=s[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=r.renderers[a.name];o?r.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){const a=this.defaults.renderer||new ya(this.defaults);for(const o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o;let l=i.renderer[s];i.useNewRenderer||(l=ti(this,Le,Ld).call(this,l,s,a));const c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){const a=this.defaults.tokenizer||new ga(this.defaults);for(const o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,l=i.tokenizer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){const a=this.defaults.hooks||new Bi;for(const o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;const s=o,l=i.hooks[s],c=a[s];Bi.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async)return Promise.resolve(l.call(a,h)).then(f=>c.call(a,f));const u=l.call(a,h);return c.call(a,u)}:a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return fe.lex(t,r??this.defaults)}parser(t,r){return pe.parse(t,r??this.defaults)}}Le=new WeakSet,Ld=function(t,r,i){switch(r){case"heading":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,i.parser.parseInline(n.tokens),n.depth,Cv(i.parser.parseInline(n.tokens,i.parser.textRenderer)))};case"code":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text,n.lang,!!n.escaped)};case"table":return function(n){if(!n.type||n.type!==r)return t.apply(this,arguments);let a="",o="";for(let l=0;l0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=g+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=g+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:g+" "}):p+=g+" "}p+=this.parser.parse(h.tokens,s),l+=this.listitem({type:"list_item",raw:p,text:p,task:f,checked:!!u,loose:s,tokens:h.tokens})}return t.call(this,l,a,o)};case"html":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text,n.block)};case"paragraph":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"escape":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text)};case"link":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.href,n.title,this.parser.parseInline(n.tokens))};case"image":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.href,n.title,n.text)};case"strong":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"em":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"codespan":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text)};case"del":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"text":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text)}}return t},So=function(t,r){return(i,n)=>{const a={...n},o={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const s=ti(this,Le,Bd).call(this,!!o.silent,!!o.async);if(typeof i>"u"||i===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(i):i).then(l=>t(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>r(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(s);try{o.hooks&&(i=o.hooks.preprocess(i));let l=t(i,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let c=r(l,o);return o.hooks&&(c=o.hooks.postprocess(c)),c}catch(l){return s(l)}}},Bd=function(t,r){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const n="

    An error occurred:

    "+jt(i.message+"",!0)+"
    ";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}};const or=new Kv;function lt(e,t){return or.parse(e,t)}lt.options=lt.setOptions=function(e){return or.setOptions(e),lt.defaults=or.defaults,xd(lt.defaults),lt};lt.getDefaults=kl;lt.defaults=fr;lt.use=function(...e){return or.use(...e),lt.defaults=or.defaults,xd(lt.defaults),lt};lt.walkTokens=function(e,t){return or.walkTokens(e,t)};lt.parseInline=or.parseInline;lt.Parser=pe;lt.parser=pe.parse;lt.Renderer=ya;lt.TextRenderer=Ml;lt.Lexer=fe;lt.lexer=fe.lex;lt.Tokenizer=ga;lt.Hooks=Bi;lt.parse=lt;lt.options;lt.setOptions;lt.use;lt.walkTokens;lt.parseInline;pe.parse;fe.lex;function Md(e){for(var t=[],r=1;r/g,` +`).replace(/\n{2,}/g,` +`),n=Md(i);return t===!1?n.replace(/ /g," "):n}d(Ed,"preprocessMarkdown");function Fd(e,t={}){const r=Ed(e,t),i=lt.lexer(r),n=[[]];let a=0;function o(s,l="normal"){s.type==="text"?s.text.split(` +`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f&&n[a].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return d(o,"processNode"),i.forEach(s=>{var l;s.type==="paragraph"?(l=s.tokens)==null||l.forEach(c=>{o(c)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}d(Fd,"markdownToLines");function $d(e,{markdownAutoWrap:t}={}){const r=lt.lexer(e);function i(n){var a,o,s;return n.type==="text"?t===!1?n.text.replace(/\n */g,"
    ").replace(/ /g," "):n.text.replace(/\n */g,"
    "):n.type==="strong"?`${(a=n.tokens)==null?void 0:a.map(i).join("")}`:n.type==="em"?`${(o=n.tokens)==null?void 0:o.map(i).join("")}`:n.type==="paragraph"?`

    ${(s=n.tokens)==null?void 0:s.map(i).join("")}

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:`Unsupported markdown: ${n.type}`}return d(i,"output"),r.map(i).join("")}d($d,"markdownToHTML");function Dd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}d(Dd,"splitTextToChars");function Od(e,t){const r=Dd(t.content);return El(e,[],r,t.type)}d(Od,"splitWordToFitWidth");function El(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?El(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}d(El,"splitWordToFitWidthRecursion");function Rd(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return xa(e,t)}d(Rd,"splitLineToFitWidth");function xa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return xa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=Od(t,a);r.push([s]),l.content&&e.unshift(l)}return xa(e,t,r)}d(xa,"splitLineToFitWidthRecursion");function To(e,t){t&&e.attr("style",t)}d(To,"applyStyle");async function Id(e,t,r,i,n=!1){const a=e.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=t.label;t.label&&Mi(t.label)&&(s=await Wo(t.label.replace(Ur.lineBreakRegex,` +`),gt()));const l=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(s),To(c,t.labelStyle),c.attr("class",`${l} ${i}`),To(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}d(Id,"addHtmlSpan");function Ua(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}d(Ua,"createTspan");function Pd(e,t,r){const i=e.append("text"),n=Ua(i,1,t);Ya(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}d(Pd,"computeWidthOfText");function Qv(e,t,r){var o;const i=e.append("text"),n=Ua(i,1,t);Ya(n,[{content:r,type:"normal"}]);const a=(o=n.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}d(Qv,"computeDimensionOfText");function Nd(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=d(f=>Pd(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:Rd(c,h);for(const f of u){const p=Ua(s,l,1.1);Ya(p,f),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}d(Nd,"createFormattedText");function Ya(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}d(Ya,"updateTextContentAndStyles");function zd(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}d(zd,"replaceIconSubstring");var Fl=d(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(M.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=$d(t,c),u=zd(Ha(h)),f=t.replace(/\\\\/g,"\\"),p={isNode:o,label:Mi(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Id(e,p,s,n,l)}else{const h=t.replace(//g,"
    "),u=Fd(h.replace("
    ","
    "),c),f=Nd(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(f).select("text").attr("style",g)}return f}},"createText");function ys(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function Jv(e,t){return e[0]===t[0]&&e[1]===t[1]}function tk(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const c of o)ys(c,s,n);const l=function(c,h,u){const f=[];for(const b of c){const w=[...b];Jv(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}const p=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let w=0;wb.yminw.ymin?1:b.xw.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;wy);w++)b=w;g.splice(0,b+1).forEach(w=>{m.push({s:y,edge:w})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b=m.length)break;const k=m[b].edge,S=m[w].edge;p.push([[Math.round(k.x),y],[Math.round(S.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return p}(o,a,i);if(n){for(const c of o)ys(c,s,-n);(function(c,h,u){const f=[];c.forEach(p=>f.push(...p)),ys(f,h,u)})(l,s,-n)}return l}function tn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),tk(e,n,i,a||1)}class $l{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=tn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Ga(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class ek extends $l{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=tn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)Ga([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class rk extends $l{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class ik{constructor(t){this.helper=t}fillPolygons(t,r){const i=tn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const l=Ga(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(s[0][0]+s[1][0])/2-n/4,p=Math.min(s[0][1],s[1][1]);for(let g=0;g{const s=Ga(o),l=Math.floor(s/(i+n)),c=(s+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p{const o=Ga(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;uh%2?c+r:c+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Wd(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-s),g=n+(n-l)):(p=i,g=n);const m=i+2*(p-i)/3,y=n+2*(g-n)/3,x=u+2*(p-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=p,l=g,i=u,n=f;break}case"Q":{const[u,f,p,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=p+2*(u-p)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),s=u,l=f,i=p,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Hd(i,n,y,x,u,f,p,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=c}return t}function hi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Hd(e,t,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],p=0,g=0,m=0,y=0;if(c)[p,g,m,y]=c;else{[e,t]=hi(e,t,-h),[r,i]=hi(r,i,-h);const P=(e-r)/2,A=(t-i)/2;let v=P*P/(n*n)+A*A/(a*a);v>1&&(v=Math.sqrt(v),n*=v,a*=v);const T=n*n,L=a*a,$=T*L-T*A*A-L*P*P,W=T*A*A+L*P*P,J=(s===l?-1:1)*Math.sqrt(Math.abs($/W));m=J*n*A/a+(e+r)/2,y=J*-a*P/n+(t+i)/2,p=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),eg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const P=g,A=r,v=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Hd(r=m+n*Math.cos(g),i=y+a*Math.sin(g),A,v,n,a,o,0,l,[g,P,m,y])}x=g-p;const b=Math.cos(p),w=Math.sin(p),k=Math.cos(g),S=Math.sin(g),E=Math.tan(x/4),B=4/3*n*E,I=4/3*a*E,N=[e,t],O=[e+B*w,t-I*b],F=[r+B*S,i-I*k],G=[r,i];if(O[0]=2*N[0]-O[0],O[1]=2*N[1]-O[1],c)return[O,F,G].concat(f);{f=[O,F,G].concat(f);const P=[];for(let A=0;A2){const n=[];for(let a=0;a2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=vh(y,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const b=vh(y,c,h,u,f,p,g,1.5,l);x.push(...b)}return o&&(s?x.push(...We(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...We(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function _h(e,t){const r=Wd(qd(Dl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...We(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,p]=s;i.push(...hk(l,c,h,u,f,p,a,t)),a=[f,p];break}case"Z":i.push(...We(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function _s(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Q(n,t),i[0][1]+Q(n,t)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*Yd(n);let p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=Q(p,n,c),g=Q(g,n,c);const m=[],y=()=>Q(u,n,c),x=()=>Q(h,n,c),b=n.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:Q(h,n,c)),t+(b?0:Q(h,n,c))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*f+y(),g+t+(i-t)*f+y(),p+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*f+x(),g+t+(i-t)*f+x(),p+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function mn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let n=1;n3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+21&&n.push(s)):n.push(s),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=Xe(l,c,.5),p=Xe(c,h,.5),g=Xe(h,u,.5),m=Xe(f,p,.5),y=Xe(p,g,.5),x=Xe(m,y,.5);Bo([l,f,m,x],0,r,n),Bo([x,y,g,u],0,r,n)}var a,o;return n}function fk(e,t){return Ca(e,0,e.length,t)}function Ca(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;hl&&(l=u,c=h)}return Math.sqrt(l)>i?(Ca(e,t,c+1,i,a),Ca(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Cs(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a0?Ca(i,0,i.length,r):i}const Ht="none";class wa{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,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[jd(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=ck(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(_s([c],o)):s.push(br([c],o))}return o.stroke!==Ht&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],l=Ud(i,n,o),c=Ao(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Ao(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(br([c.estimatedPoints],o));return o.stroke!==Ht&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Pn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=bh(t,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=bh(t,r,i,n,a,o,!0,!1,f);p.type="fillPath",h.push(p)}else h.push(function(f,p,g,m,y,x,b){const w=f,k=p;let S=Math.abs(g/2),E=Math.abs(m/2);S+=Q(.01*S,b),E+=Q(.01*E,b);let B=y,I=x;for(;B<0;)B+=2*Math.PI,I+=2*Math.PI;I-B>2*Math.PI&&(B=0,I=2*Math.PI);const N=(I-B)/b.curveStepCount,O=[];for(let F=B;F<=I;F+=N)O.push([w+S*Math.cos(F),k+E*Math.sin(F)]);return O.push([w+S*Math.cos(I),k+E*Math.sin(I)]),O.push([w,k]),br([O],b)}(t,r,i,n,a,o,c));return c.stroke!==Ht&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=xh(t,i);if(i.fill&&i.fill!==Ht)if(i.fillStyle==="solid"){const o=xh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Cs(kh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Cs(kh(c),10,(1+i.roughness)/2))}o.length&&n.push(br([o],i))}return i.stroke!==Ht&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Pn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(_s([t],i)):n.push(br([t],i))),i.stroke!==Ht&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Ht,o=i.stroke!==Ht,s=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const p=Wd(qd(Dl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Cs(x,u)),x=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:E}of p)switch(S){case"M":w(),y=[E[0],E[1]],m.push(y);break;case"L":b(),m.push([E[0],E[1]]);break;case"C":if(!x.length){const B=m.length?m[m.length-1]:y;x.push([B[0],B[1]])}x.push([E[0],E[1]]),x.push([E[2],E[3]]),x.push([E[4],E[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(w(),!f)return g;const k=[];for(const S of g){const E=fk(S,f);E.length&&k.push(E)}return k}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=_h(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=_h(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(_s(l,i));else n.push(br(l,i));return o&&(s?l.forEach(h=>{n.push(Pn(h,!1,i))}):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ht};break;case"fillPath":o={d:this.opsToPath(a),stroke:Ht,strokeWidth:0,fill:i.fill||Ht};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ht,strokeWidth:i,fill:Ht}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class pk{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new wa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const yn="http://www.w3.org/2000/svg";class dk{constructor(t,r){this.svg=t,this.gen=new wa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(yn,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(yn,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(yn,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(yn,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new pk(e,t),svg:(e,t)=>new dk(e,t),generator:e=>new wa(e),newSeed:()=>wa.newSeed()},gk=d((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),en=gk;function Gd(e,t){t&&e.attr("style",t)}d(Gd,"applyStyle");async function Vd(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Mi(e.label)&&(i=await Wo(e.label.replace(Ur.lineBreakRegex,` +`),gt()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),Gd(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Vd,"addHtmlLabel");var mk=d(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),Qt(gt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),M.info("vertexText"+n);const a={isNode:i,label:Ha(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>``),labelStyle:t&&t.replace("fill:","color:")};return await Vd(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),er=mk,Vr=d((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),yk=d(e=>{const{handDrawnSeed:t}=gt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Xr=d(e=>{const t=xk([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),xk=d(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),Z=d(e=>{const{stylesArray:t}=Xr(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];s==="color"||s==="font-size"||s==="font-family"||s==="font-weight"||s==="font-style"||s==="text-decoration"||s==="text-align"||s==="text-transform"||s==="line-height"||s==="letter-spacing"||s==="word-spacing"||s==="text-shadow"||s==="text-overflow"||s==="white-space"||s==="word-wrap"||s==="word-break"||s==="overflow-wrap"||s==="hyphens"?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),V=d((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=gt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=Xr(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),Xd=d(async(e,t)=>{M.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Qt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Fl(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Qt(r.flowchart.htmlLabels)){const B=g.children[0],I=dt(g);m=B.getBoundingClientRect(),I.attr("width",m.width),I.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;M.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const B=Y.svg(u),I=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),N=B.path(Vr(b,w,y,x,0),I);k=u.insert(()=>(M.debug("Rough node insert CXC",N),N),":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=op(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),s){const B=p.select("span");B&&B.attr("style",s)}const E=k.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=m.height-t.padding/2,t.intersect=function(B){return en(t,B)},{cluster:u,labelBBox:m}},"rect"),bk=d((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return en(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_k=d(async(e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const p=u.node().appendChild(await er(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(Qt(r.flowchart.htmlLabels)){const N=p.children[0],O=dt(p);g=N.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-g.height-6,k=t.x-x/2,S=t.y-b/2;t.width=x;const E=t.y-t.height/2-y+g.height+2;let B;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),O=Y.svg(c),F=t.rx||t.ry?O.path(Vr(k,S,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(k,S,x,b,{seed:n});B=c.insert(()=>F,":first-child");const G=O.rectangle(k,E,x,w,{fill:N?a:o,fillStyle:N?"hachure":"solid",stroke:l,seed:n});B=c.insert(()=>F,":first-child"),f=c.insert(()=>G)}else B=h.insert("rect",":first-child"),B.attr("class","outer").attr("x",k).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",E).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(Qt(r.flowchart.htmlLabels)?0:3)})`);const I=B.node().getBBox();return t.height=I.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(N){return en(t,N)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Ck=d((e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let p;if(t.look==="handDrawn"){const y=Y.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});p=o.insert(()=>y,":first-child")}else p=s.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return en(t,m)},{cluster:o,labelBBox:{}}},"divider"),wk=Xd,vk={rect:Xd,squareRect:wk,roundedWithTitle:_k,noteGroup:bk,divider:Ck},Zd=new Map,kk=d(async(e,t)=>{const r=t.shape||"rect",i=await vk[r](e,t);return Zd.set(t.id,i),i},"insertCluster"),XL=d(()=>{Zd=new Map},"clear"),Sk=d((e,t,r,i,n)=>{t.arrowTypeStart&&Sh(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&Sh(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),Tk={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Sh=d((e,t,r,i,n,a)=>{const o=Tk[r];if(!o){M.warn(`Unknown arrow type: ${r}`);return}const s=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${n}_${a}-${o}${s})`)},"addEdgeMarker"),va=new Map,Tt=new Map,ZL=d(()=>{va.clear(),Tt.clear()},"clear"),fi=d(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Ak=d(async(e,t)=>{let r=Qt(gt().flowchart.htmlLabels);const i=await Fl(e,t.label,{style:fi(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});M.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const l=i.children[0],c=dt(i);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),va.set(t.id,n),t.width=o.width,t.height=o.height;let s;if(t.startLabelLeft){const l=await er(t.startLabelLeft,fi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).startLeft=c,wi(s,t.startLabelLeft)}if(t.startLabelRight){const l=await er(t.startLabelRight,fi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).startRight=c,wi(s,t.startLabelRight)}if(t.endLabelLeft){const l=await er(t.endLabelLeft,fi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).endLeft=c,wi(s,t.endLabelLeft)}if(t.endLabelRight){const l=await er(t.endLabelRight,fi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).endRight=c,wi(s,t.endLabelRight)}return i},"insertEdgeLabel");function wi(e,t){gt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(wi,"setTerminalWidth");var Lk=d((e,t)=>{M.debug("Moving label abc88 ",e.id,e.label,va.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=gt(),{subGraphTitleTotalMargin:n}=op(i);if(e.label){const a=va.get(e.id);let o=e.x,s=e.y;if(r){const l=ue.calcLabelPosition(r);M.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=Tt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=ue.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=Tt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=ue.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=Tt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=ue.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=Tt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=ue.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),Bk=d((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),Mk=d((e,t,r)=>{M.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.xMath.abs(i-t.x)*l){let u=r.y{M.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(M.info("abc88 checking point",a,t),!Bk(t,a)&&!n){const o=Mk(t,i,a);M.debug("abc88 inside",a,i,o),M.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?M.warn("abc88 no intersect",o,r):r.push(o),n=!0}else M.warn("abc88 outside",a,i),i=a,n||r.push(a)}),M.debug("returning points",r),r},"cutPathAtIntersect");function Kd(e){const t=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}d(Kd,"extractCornerPoints");var Ah=d(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),Ek=d(function(e){const{cornerPointPositions:t}=Kd(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){M.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const p=5;o.x===s.x?f={x:c<0?s.x-p+u:s.x+p-u,y:h<0?s.y-u:s.y+u}:f={x:c<0?s.x-u:s.x+u,y:h<0?s.y-p+u:s.y+p-u}}else M.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),Fk=d(function(e,t,r,i,n,a,o){const{handDrawnSeed:s}=gt();let l=t.points,c=!1;const h=n;var u=a;u.intersect&&h.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),M.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),t.toCluster&&(M.info("to cluster abc88",r.get(t.toCluster)),l=Th(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(M.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Th(l.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=l.filter(I=>!Number.isNaN(I.y));f=Ek(f);let p=f[f.length-1];if(f.length>1){p=f[f.length-1];const I=f[f.length-2],N=(p.x-I.x)/2,O=(p.y-I.y)/2,F={x:I.x+N,y:I.y+O};f.splice(-1,0,F)}let g=Np;t.curve&&(g=t.curve);const{x:m,y}=Dx(t),x=s2().x(m).y(y).curve(g);let b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let w,k=x(f);const S=Array.isArray(t.style)?t.style:[t.style];if(t.look==="handDrawn"){const I=Y.svg(e);Object.assign([],f);const N=I.path(k,{roughness:.3,seed:s});b+=" transition",w=dt(N).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((F,G)=>F+";"+G,""):"");let O=w.attr("d");w.attr("d",O),e.node().appendChild(w.node())}else w=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((I,N)=>I+";"+N,""):"");let E="";(gt().flowchart.arrowMarkerAbsolute||gt().state.arrowMarkerAbsolute)&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),M.info("arrowTypeStart",t.arrowTypeStart),M.info("arrowTypeEnd",t.arrowTypeEnd),Sk(w,t,E,o,i);let B={};return c&&(B.updatedPath=l),B.originalPath=t.points,B},"insertEdge"),$k=d((e,t,r,i)=>{t.forEach(n=>{Hk[n](e,r,i)})},"insertMarkers"),Dk=d((e,t,r)=>{M.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Ok=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Rk=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Ik=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Pk=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Nk=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).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",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).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"),zk=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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"),qk=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).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")},"cross"),Wk=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Hk={extension:Dk,composition:Ok,aggregation:Rk,dependency:Ik,lollipop:Pk,point:Nk,circle:zk,cross:qk,barb:Wk},jk=$k,et=d(async(e,t,r)=>{let i;const n=t.useHtmlLabels||Qt(gt().flowchart.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",t.labelStyle);let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];let l;l=await Fl(o,Pr(Ha(s),gt()),{useHtmlLabels:n,width:t.width||gt().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=t.padding/2;if(Qt(gt().flowchart.htmlLabels)){const u=l.children[0],f=dt(l),p=u.getElementsByTagName("img");if(p){const g=s.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=gt().fontSize?gt().fontSize:window.getComputedStyle(document.body).fontSize,k=parseInt(b,10)*5+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}d(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),X=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=d((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ot(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}d(ot,"createPathFromPoints");function He(e,t,r,i,n,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}d(He,"generateFullSineWavePoints");function Ol(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u0}d(Mo,"sameSign");var Gk=rg;function ig(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=i-e.width/2-o,c=n-e.height/2-s;for(let h=0;h1&&a.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,g=Math.sqrt(f*f+p*p),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g{const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await et(e,t,it(t)),s=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-s/2,h=-l/2;let u,{rx:f,ry:p}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,p=r.ry),t.look==="handDrawn"){const m=Y.svg(a),y=V(t,{}),x=f||p?m.path(Vr(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",g)}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",f).attr("ry",p).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return X(t,u),t.intersect=function(m){return q.rect(t,m)},a},"drawRect"),Xk=d(async(e,t)=>Rl(e,t,{rx:5,ry:5,classes:"flowchart-node"}),"state"),ws=d(async(e,t)=>{const r={rx:5,ry:5,classes:"",labelPaddingX:((t==null?void 0:t.padding)||0)*1,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Rl(e,t,r)},"roundedRect"),pi=d(async(e,t)=>{const r={rx:0,ry:0,classes:"",labelPaddingX:((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Rl(e,t,r)},"squareRect"),xn=d((e,t,{config:{themeVariables:r}})=>{const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=Y.svg(n).circle(0,0,14,yk(i));a=n.insert(()=>s)}else a=n.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),X(t,a),t.intersect=function(o){return q.circle(t,7,o)},n},"stateStart"),bn=d((e,t,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Y.svg(c),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=s??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),X(t,m),t.intersect=function(y){return q.circle(t,7,y)},c},"stateEnd"),vs=d((e,t,{dir:r,config:{state:i,themeVariables:n}})=>{const{nodeStyles:a}=Z(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,f=Y.svg(o),p=V(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.rectangle(h,u,l,c,p),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),X(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return q.rect(t,x)},o},"forkJoin"),Zk=d((e,t)=>{const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=Y.svg(i),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ot(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return q.polygon(t,o,f)},i},"choice"),Kk=d(async(e,t,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await et(e,t,it(t)),s=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,{cssStyles:u}=t;t.useHtmlLabels||(t.centerLabel=!0);const p=Y.svg(a),g=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=p.rectangle(c,h,s,l,g),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),X(t,y),t.intersect=function(x){return q.rect(t,x)},a},"note"),ks=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=a.height+t.padding,s=a.width+o/4+t.padding;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=Y.svg(n),u=V(t,{}),f=Vr(-s/2,-o/2,s,o,o/2),p=h.path(f,u);l=n.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",c)}else l=n.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return X(t,l),t.intersect=function(h){return q.rect(t,h)},n},"stadium"),Qk=d(async(e,t)=>{var I,N;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await er(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Qt((N=(I=gt())==null?void 0:I.flowchart)==null?void 0:N.htmlLabels)){const O=h.children[0],F=dt(h);u=O.getBoundingClientRect(),F.attr("width",u.width),F.attr("height",u.height)}M.info("Text 2",l);const f=l||[],p=h.getBBox(),g=s.node().appendChild(await er(f.join?f.join("
    "):f,t.labelStyle,!0,!0)),m=g.children[0],y=dt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;dt(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),dt(h).attr("transform","translate( "+(u.width(M.debug("Rough node insert CXC",G),P),":first-child"),E=a.insert(()=>(M.debug("Rough node insert CXC",G),G),":first-child")}else E=o.insert("rect",":first-child"),B=o.insert("line"),E.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),B.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return X(t,E),t.intersect=function(O){return q.rect(t,O)},a},"rectWithTitle");function Ee(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(Ee,"insertPolygonShape");var di=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=((t==null?void 0:t.padding)||0)/2,s=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=Y.svg(n),p=V(t,{}),g=f.rectangle(c-8,h,s+16,l,p),m=f.line(c,h,c,h+l,p),y=f.line(c+s,h,c+s,h+l,p);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",b),X(t,x)}else{const f=Ee(n,s,l,u);i&&f.attr("style",i),X(t,f)}return t.intersect=function(f){return q.polygon(t,u,f)},n},"subroutine"),Jk=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),tS=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),eS=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),_n=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=Y.svg(n),g=tS(0,0,s,h,l,c),m=eS(0,c,s,h,l,c),y=p.path(g,V(t,{})),x=p.path(m,V(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=Jk(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",f).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),X(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(p){const g=q.rect(t,p),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n},"cylinder"),Lh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await et(e,t,it(t)),s=a.width/2+o;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=Y.svg(n),u=V(t,{}),f=h.circle(0,0,s*2,u);l=n.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",c)}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return X(t,l),t.intersect=function(h){return M.info("Circle intersect",t,s,h),q.circle(t,s,h)},n},"circle"),Ss=d(async(e,t)=>{var f,p;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await et(e,t,it(t)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=Y.svg(n),m=V(t,{roughness:.2,strokeWidth:2.5}),y=V(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,l*2,m),b=g.circle(0,0,c*2,y);h=n.insert("g",":first-child"),h.attr("class",t.cssClasses).attr("style",u),(f=h.node())==null||f.appendChild(x),(p=h.node())==null||p.appendChild(b)}else{h=n.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return X(t,h),t.intersect=function(g){return M.info("DoubleCircle intersect",t,l,g),q.circle(t,l,g)},n},"doublecircle"),Bh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=t,g=Y.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ot(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),X(t,b),t.intersect=function(w){return q.polygon(t,f,w)},n},"rect_left_inv_arrow"),rS=d((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD"),Cn=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,l=o+s,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=Y.svg(n),p=V(t,{}),g=rS(0,0,l),m=f.path(g,p);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=Ee(n,l,l,c);return i&&h.attr("style",i),X(t,h),t.intersect=function(f){return M.debug(`APA12 Intersect called SPLIT +point:`,f,` +node: +`,t,` +res:`,q.polygon(t,c,f)),q.polygon(t,c,f)},n},"question"),iS=d((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD"),Ts=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=4,s=a.height+t.padding,l=s/o,c=a.width+2*l+t.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-s/2},{x:c-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=Y.svg(n),g=V(t,{}),m=iS(0,0,c,s,l),y=p.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),f&&u.attr("style",f)}else u=Ee(n,c,s,h);return i&&u.attr("style",i),t.width=c,t.height=s,X(t,u),t.intersect=function(p){return q.polygon(t,h,p)},n},"hexagon");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=Math.max(a.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(a.height+t.padding,(t==null?void 0:t.height)||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),X(t,h),t.intersect=function(u){return q.rect(t,u)},n}d(ng,"text");async function zn(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=a.height+t.padding,s=12,l=a.width+t.padding+s,c=0,h=l,u=-o,f=0,p=[{x:c+s,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Y.svg(n),x=V(t,{}),b=ot(p),w=y.path(b,x);g=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Ee(n,l,o,p);return i&&g.attr("style",i),X(t,g),t.intersect=function(y){return q.polygon(t,p,y)},n}d(zn,"card");var gi=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=(t==null?void 0:t.padding)??0,l=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=t,p=Y.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},n},"shadedProcess"),nS=d((e,t)=>{const{labelStyles:r}=Z(t);t.labelStyle=r;const i=it(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=Y.svg(a),c=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",s),X(t,u),t.intersect=function(f){return M.info("Circle intersect",t,o,f),q.circle(t,o,f)},a},"anchor"),wn=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=V(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ee(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n},"lean_right"),vn=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=V(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ee(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n},"lean_left"),kn=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=V(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ee(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n},"trapezoid"),mi=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=V(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ee(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n},"inv_trapezoid"),aS=d(async(e,t)=>{const{shapeSvg:r,bbox:i,label:n}=await et(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,a),t.intersect=function(l){return q.rect(t,l)},r},"labelRect"),As=d(async(e,t)=>{var b;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Qt((b=gt().flowchart)==null?void 0:b.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,p=Y.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ot(u),y=p.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,X(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(w){return M.info("Triangle intersect",t,u,w),q.polygon(t,u,w)},n},"triangle"),Mh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await et(e,t,it(t)),l=Math.max(n,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=Y.svg(o),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Ol(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ot(g),y=f.path(m,p),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),X(t,x),t.intersect=function(b){return M.info("Pill intersect",t,{radius:h,point:b}),q.polygon(t,g,b)},o},"halfRoundedRectangle"),Ls=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=80,s=20,l=Math.max(o,(a.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),c=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=Y.svg(n),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Ol(-y,-m/2,h,50,270,90)],w=ot(b),k=f.path(w,p),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,S),t.intersect=function(E){return q.polygon(t,b,E)},n},"curvedTrapezoid"),Bs=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,{cssStyles:u}=t,f=Y.svg(n),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=ot(g),y=f.path(m,p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return q.polygon(t,g,b)},n},"slopedRect");function Eo(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/n,g=f/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let S=Math.atan2((i-b)/a,(r-x)/n)-w;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const E=[];for(let B=0;B<20;B++){const I=B/19,N=w+I*S,O=x+n*Math.cos(N),F=b+a*Math.sin(N);E.push({x:O,y:F})}return E}d(Eo,"generateArcPoints");var Ms=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=a.width+t.padding+20,s=a.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Eo(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Eo(o/2,s/2,o/2,-s/2,c,l,!0)],f=Y.svg(n),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ot(u),m=f.path(g,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),X(t,y),t.intersect=function(x){return q.polygon(t,u,x)},n},"bowTieRect"),Sn=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=t,p=Y.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},n},"dividedRectangle");function ag(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y} + M ${n.x},${n.y} L ${o.x},${o.y}`}d(ag,"createLine");var Es=d((e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=Y.svg(n),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=ag(a),u=s.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),X(t,f),t.intersect=function(p){return M.info("crossedCircle intersect",t,{radius:a,point:p}),q.circle(t,a,p)},n},"crossedCircle"),Eh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=100,s=50,l=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const p=Math.min(f*.2,f/4),g=f+p*2,{cssStyles:m}=t,y=Y.svg(n),x=V(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...He(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...He(u/2,-g/2,-u/2,-g/2,p,-1)],w=ot(b),k=y.path(w,x),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),X(t,S),t.intersect=function(E){return q.polygon(t,b,E)},n},"waveRectangle"),sS=d((e,t,r,i,n,a)=>`M${e},${t} + a${n},${a} 0,0,1 0,${-i} + l${r},0 + a${n},${a} 0,0,1 0,${i} + M${r},${-i} + a${n},${a} 0,0,0 0,${i} + l${-r},0`,"createCylinderPathD"),oS=d((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),lS=d((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Fs=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await et(e,t,it(t)),l=t.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=Y.svg(n),y=oS(0,0,f,c,u,h),x=lS(0,0,f,c,u,h),b=m.path(y,V(t,{})),w=m.path(x,V(t,{fill:"none"}));g=n.insert(()=>w,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=sS(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",p).attr("style",i)}return g.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),X(t,g),t.intersect=function(m){const y=q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(b)),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n},"tiltedCylinder"),$s=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=60,s=20,l=Math.max(o,a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=Y.svg(n),f=V(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ot(p),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),X(t,y),t.intersect=function(x){return q.polygon(t,p,x)},n},"trapezoidalPentagon"),Ds=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=a.width+(t.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=Y.svg(n),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ot(h),m=f.path(g,p),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=l,X(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return M.info("Triangle intersect",t,h,x),q.polygon(t,h,x)},n},"flippedTriangle"),Fh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await et(e,t,it(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,l=Y.svg(n),c=V(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ot(h),f=l.path(u,c),p=n.insert(()=>f,":first-child");return p.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-o/2})`),X(t,p),t.intersect=function(g){return M.info("Pill intersect",t,{points:h}),q.polygon(t,h,g)},n},"hourglass"),Tn=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await et(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,p=Y.svg(n),g=V(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=p.path(x,g),w=ot(y),k=p.path(w,{...g,fillStyle:"solid"}),S=n.insert(()=>k,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),X(t,S),t.intersect=function(E){return q.polygon(t,m,E)},n},"taggedRect"),An=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,p=Y.svg(n),g=V(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=p.path(x,g),w=ot(y),k=p.path(w,{...g,fill:"none"}),S=n.insert(()=>k,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),X(t,S),t.intersect=function(E){return q.polygon(t,m,E)},n},"multiRect"),cS=d((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),hS=d((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),uS=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Os=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=Y.svg(n),m=hS(0,0,s,h,l,c,u),y=uS(0,c,s,h,l,c),x=V(t,{}),b=g.path(m,x),w=g.path(y,x);n.insert(()=>w,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const g=cS(0,0,s,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",p).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),X(t,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=q.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n},"linedCylinder"),$h=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=l+c,{cssStyles:u}=t,p=70-s,g=p>0?p/2:0,m=Y.svg(n),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...He(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=ot(x),w=m.path(b,y),k=n.insert(()=>w,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),X(t,k),t.intersect=function(S){return q.polygon(t,x,S)},n},"waveEdgedRectangle"),Rs=d((e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=Y.svg(n),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ot(c),p=h.path(f,u),g=n.insert(()=>p,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),X(t,g),t.intersect=function(m){return M.info("lightningBolt intersect",t,m),q.polygon(t,c,m)},n},"lightningBolt"),Is=d((e,t,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:n}=Z(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=Y.svg(a),{nodeBorder:c}=r,h=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),X(t,f),t.intersect=function(p){return M.info("filledCircle intersect",t,{radius:o,point:p}),q.circle(t,o,p)},a},"filledCircle"),Ln=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,u=-s/2,f=-h/2,p=5,{cssStyles:g}=t,m=He(u-p,f+h+p,u+s-p,f+h+p,c,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:y.y-2*p},{x:u+s+p,y:y.y-2*p},{x:u+s+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+s-p,y:f+p},{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:f},{x:u,y:f}],w=Y.svg(n),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=ot(x),E=w.path(S,k),B=ot(b),I=w.path(B,k),N=n.insert(()=>E,":first-child");return N.insert(()=>I),N.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-c/2-(a.y-(a.top??0))})`),X(t,N),t.intersect=function(O){return q.polygon(t,x,O)},n},"multiWaveEdgedRectangle"),Ps=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,p=Y.svg(n),g=V(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c} + M${h-c},${u} L${h+s},${u} + M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),X(t,b),t.intersect=function(w){return q.polygon(t,m,w)},n},"windowPane"),Dh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,{cssStyles:u}=t,f=Y.svg(n),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...He(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),X(t,y),t.intersect=function(x){return q.polygon(t,g,x)},n},"linedWaveEdgedRect"),Oh=d(async(e,t)=>{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:p}=t,g=Y.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...He(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,c,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,w=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...He(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],k=ot(y),S=g.path(k,m),E=ot(w),B=g.path(E,{...m,fillStyle:"solid"}),I=n.insert(()=>B,":first-child");return I.insert(()=>S,":first-child"),I.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),X(t,I),t.intersect=function(N){return q.polygon(t,y,N)},n},"taggedWaveEdgedRectangle");function ve(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ve(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...ve(s/2+c*2,-c,c,20,-180,-270),...ve(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...ve(s/2,l/2,c,20,0,90)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...ve(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...ve(s/2+s*.1,-c,c,20,-180,-270),...ve(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...ve(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=Y.svg(n),g=V(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=p.path(y,g),b=ot(f),w=p.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,k),t.intersect=function(S){return q.polygon(t,f,S)},n},"curlyBraceLeft");function ke(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ke(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...ke(s/2+c*2,-c,c,20,-180,-270),...ke(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...ke(s/2,l/2,c,20,0,90)],f=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...ke(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...ke(s/2+c*2,-c,c,20,-180,-270),...ke(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...ke(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=Y.svg(n),g=V(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=p.path(y,g),b=ot(f),w=p.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,k),t.intersect=function(S){return q.polygon(t,f,S)},n},"curlyBraceRight");function St(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u{const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await et(e,t,it(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...St(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...St(s/2+c*2,-c,c,20,-180,-270),...St(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...St(s/2,l/2,c,20,0,90)],f=[...St(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...St(-s/2-c/2,-c,c,20,0,90),...St(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...St(-s/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...St(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...St(s/2+c*2,-c,c,20,-180,-270),...St(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...St(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...St(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...St(-s/2-c/2,-c,c,20,0,90),...St(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...St(-s/2+c+c/2,l/2,c,30,-180,-270)],g=Y.svg(n),m=V(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ot(u).replace("Z",""),b=g.path(x,m),k=ot(f).replace("Z",""),S=g.path(k,m),E=ot(p),B=g.path(E,{...m}),I=n.insert("g",":first-child");return I.insert(()=>B,":first-child").attr("stroke-opacity",0),I.insert(()=>b,":first-child"),I.insert(()=>S,":first-child"),I.attr("class","text"),h&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,I),t.intersect=function(N){return q.polygon(t,p,N)},n},"curlyBraces"),dS=d(async(e,t,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Xr(t),w=-m/2,k=-g/2,S=t.label?8:0,E=Y.svg(c),B=V(t,{stroke:b.get("fill")||x});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const I=E.rectangle(w,k,m,g,B),N=Math.max(m,h.width),O=g+h.height+S,F=E.rectangle(-N/2,-O/2,N,O,{...B,fill:"transparent",stroke:"none"}),G=c.insert(()=>I,":first-child"),P=c.insert(()=>F);if(t.icon){const A=c.append("g");A.html(`${await Fa(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const v=A.node().getBBox(),T=v.width,L=v.height,$=v.x,W=v.y;A.attr("transform",`translate(${-T/2-$},${p?h.height/2+S/2-L/2-W:-h.height/2-S/2-L/2-W})`),A.selectAll("path").attr("fill",b.get("stroke")??y)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),G.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),X(t,P),t.intersect=function(A){if(M.info("iconSquare intersect",t,A),!t.label)return q.rect(t,A);const v=t.x??0,T=t.y??0,L=t.height??0;let $=[];return p?$=[{x:v-h.width/2,y:T-L/2},{x:v+h.width/2,y:T-L/2},{x:v+h.width/2,y:T-L/2+h.height+S},{x:v+m/2,y:T-L/2+h.height+S},{x:v+m/2,y:T+L/2},{x:v-m/2,y:T+L/2},{x:v-m/2,y:T-L/2+h.height+S},{x:v-h.width/2,y:T-L/2+h.height+S}]:$=[{x:v-m/2,y:T-L/2},{x:v+m/2,y:T-L/2},{x:v+m/2,y:T-L/2+g},{x:v+h.width/2,y:T-L/2+g},{x:v+h.width/2/2,y:T+L/2},{x:v-h.width/2,y:T+L/2},{x:v-h.width/2,y:T-L/2+g},{x:v-m/2,y:T-L/2+g}],q.polygon(t,$,A)},c},"iconSquare"),gS=d(async(e,t,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Xr(t),b=Y.svg(c),w=V(t,{stroke:x.get("fill")||y});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const k=c.append("g");t.icon&&k.html(`${await Fa(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const S=k.node().getBBox(),E=S.width,B=S.height,I=S.x,N=S.y,O=Math.max(E,B)*Math.SQRT2+f*2,F=b.circle(0,0,O,w),G=Math.max(O,h.width),P=O+h.height+p,A=b.rectangle(-G/2,-P/2,G,P,{...w,fill:"transparent",stroke:"none"}),v=c.insert(()=>F,":first-child"),T=c.insert(()=>A);return k.attr("transform",`translate(${-E/2-I},${g?h.height/2+p/2-B/2-N:-h.height/2-p/2-B/2-N})`),k.selectAll("path").attr("fill",x.get("stroke")||m),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-P/2:P/2-h.height})`),v.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),X(t,T),t.intersect=function(L){return M.info("iconSquare intersect",t,L),q.rect(t,L)},c},"iconCircle"),mS=d(async(e,t,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=t.pos==="t",p=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Xr(t),x=-g/2,b=-p/2,w=t.label?8:0,k=Y.svg(c),S=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const E=k.rectangle(x,b,g,p,S),B=Math.max(g,h.width),I=p+h.height+w,N=k.rectangle(-B/2,-I/2,B,I,{...S,fill:"transparent",stroke:"none"}),O=c.insert(()=>E,":first-child"),F=c.insert(()=>N);if(t.icon){const G=c.append("g");G.html(`${await Fa(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const P=G.node().getBBox(),A=P.width,v=P.height,T=P.x,L=P.y;G.attr("transform",`translate(${-A/2-T},${f?h.height/2+w/2-v/2-L:-h.height/2-w/2-v/2-L})`),G.selectAll("path").attr("fill",y.get("stroke")||m)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-I/2:I/2-h.height})`),O.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),X(t,F),t.intersect=function(G){if(M.info("iconSquare intersect",t,G),!t.label)return q.rect(t,G);const P=t.x??0,A=t.y??0,v=t.height??0;let T=[];return f?T=[{x:P-h.width/2,y:A-v/2},{x:P+h.width/2,y:A-v/2},{x:P+h.width/2,y:A-v/2+h.height+w},{x:P+g/2,y:A-v/2+h.height+w},{x:P+g/2,y:A+v/2},{x:P-g/2,y:A+v/2},{x:P-g/2,y:A-v/2+h.height+w},{x:P-h.width/2,y:A-v/2+h.height+w}]:T=[{x:P-g/2,y:A-v/2},{x:P+g/2,y:A-v/2},{x:P+g/2,y:A-v/2+p},{x:P+h.width/2,y:A-v/2+p},{x:P+h.width/2/2,y:A+v/2},{x:P-h.width/2,y:A+v/2},{x:P-h.width/2,y:A-v/2+p},{x:P-g/2,y:A-v/2+p}],q.polygon(t,T,G)},c},"icon"),yS=d(async(e,t,{config:{flowchart:r}})=>{const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=Z(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??n),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:p}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=Y.svg(u),w=V(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const k=b.rectangle(m,y,c,h,w),S=Math.max(c,f.width),E=h+f.height+x,B=b.rectangle(-S/2,-E/2,S,E,{...w,fill:"none",stroke:"none"}),I=u.insert(()=>k,":first-child"),N=u.insert(()=>B);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${g?E/2-h:-E/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),I.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),X(t,N),t.intersect=function(O){if(M.info("iconSquare intersect",t,O),!t.label)return q.rect(t,O);const F=t.x??0,G=t.y??0,P=t.height??0;let A=[];return g?A=[{x:F-f.width/2,y:G-P/2},{x:F+f.width/2,y:G-P/2},{x:F+f.width/2,y:G-P/2+f.height+x},{x:F+c/2,y:G-P/2+f.height+x},{x:F+c/2,y:G+P/2},{x:F-c/2,y:G+P/2},{x:F-c/2,y:G-P/2+f.height+x},{x:F-f.width/2,y:G-P/2+f.height+x}]:A=[{x:F-c/2,y:G-P/2},{x:F+c/2,y:G-P/2},{x:F+c/2,y:G-P/2+h},{x:F+f.width/2,y:G-P/2+h},{x:F+f.width/2/2,y:G+P/2},{x:F-f.width/2,y:G+P/2},{x:F-f.width/2,y:G-P/2+h},{x:F-c/2,y:G-P/2+h}],q.polygon(t,A,O)},u},"imageSquare"),xS=d(async(e,t,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Xr(t),w=-m/2,k=-g/2,S=t.label?8:0,E=Y.svg(c),B=V(t,{stroke:b.get("fill")||x});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const I=E.path(Vr(w,k,m,g,5),B),N=Math.max(m,h.width),O=g+h.height+S,F=E.rectangle(-N/2,-O/2,N,O,{...B,fill:"transparent",stroke:"none"}),G=c.insert(()=>I,":first-child"),P=c.insert(()=>F);if(t.icon){const A=c.append("g");A.html(`${await Fa(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const v=A.node().getBBox(),T=v.width,L=v.height,$=v.x,W=v.y;A.attr("transform",`translate(${-T/2-$},${p?h.height/2+S/2-L/2-W:-h.height/2-S/2-L/2-W})`),A.selectAll("path").attr("fill",b.get("stroke")??y)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),G.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),X(t,P),t.intersect=function(A){if(M.info("iconSquare intersect",t,A),!t.label)return q.rect(t,A);const v=t.x??0,T=t.y??0,L=t.height??0;let $=[];return p?$=[{x:v-h.width/2,y:T-L/2},{x:v+h.width/2,y:T-L/2},{x:v+h.width/2,y:T-L/2+h.height+S},{x:v+m/2,y:T-L/2+h.height+S},{x:v+m/2,y:T+L/2},{x:v-m/2,y:T+L/2},{x:v-m/2,y:T-L/2+h.height+S},{x:v-h.width/2,y:T-L/2+h.height+S}]:$=[{x:v-m/2,y:T-L/2},{x:v+m/2,y:T-L/2},{x:v+m/2,y:T-L/2+g},{x:v+h.width/2,y:T-L/2+g},{x:v+h.width/2/2,y:T+L/2},{x:v-h.width/2,y:T+L/2},{x:v-h.width/2,y:T-L/2+g},{x:v-m/2,y:T-L/2+g}],q.polygon(t,$,A)},c},"iconRounded"),zs={state:Xk,stateStart:xn,stateEnd:bn,forkJoin:vs,choice:Zk,note:Kk,rectWithTitle:Qk,roundedRect:ws,squareRect:pi,rectangle:pi,rect:pi,process:pi,proc:pi,rounded:ws,event:ws,stadium:ks,pill:ks,terminal:ks,subroutine:di,"framed-rectangle":di,"fr-rect":di,subprocess:di,subproc:di,cylinder:_n,db:_n,cyl:_n,database:_n,question:Cn,diam:Cn,diamond:Cn,decision:Cn,hexagon:Ts,hex:Ts,prepare:Ts,lean_right:wn,"lean-r":wn,"lean-right":wn,"in-out":wn,lean_left:vn,"lean-l":vn,"lean-left":vn,"out-in":vn,trapezoid:kn,"trap-b":kn,"trapezoid-bottom":kn,priority:kn,inv_trapezoid:mi,"inv-trapezoid":mi,"trapezoid-top":mi,"trap-t":mi,manual:mi,doublecircle:Ss,"dbl-circ":Ss,"double-circle":Ss,circle:Lh,circ:Lh,rect_left_inv_arrow:Bh,odd:Bh,card:zn,"notched-rectangle":zn,"notch-rect":zn,"lined-rectangle":gi,"lin-rect":gi,"lin-proc":gi,"lined-process":gi,"shaded-process":gi,"small-circle":xn,"sm-circ":xn,start:xn,stop:bn,"framed-circle":bn,"fr-circ":bn,join:vs,fork:vs,comment:Ns,"brace-l":Ns,bolt:Rs,"com-link":Rs,"lightning-bolt":Rs,doc:$h,document:$h,delay:Mh,"half-rounded-rectangle":Mh,"horizontal-cylinder":Fs,"h-cyl":Fs,das:Fs,"lined-cylinder":Os,"lin-cyl":Os,disk:Os,"curved-trapezoid":Ls,"curv-trap":Ls,display:Ls,"divided-rectangle":Sn,"div-rect":Sn,"div-proc":Sn,"divided-process":Sn,triangle:As,tri:As,extract:As,"window-pane":Ps,"win-pane":Ps,"internal-storage":Ps,"f-circ":Is,junction:Is,"filled-circle":Is,"lin-doc":Dh,"lined-document":Dh,"notched-pentagon":$s,"notch-pent":$s,"loop-limit":$s,"flipped-triangle":Ds,"flip-tri":Ds,"manual-file":Ds,"sloped-rectangle":Bs,"sl-rect":Bs,"manual-input":Bs,docs:Ln,documents:Ln,"st-doc":Ln,"stacked-document":Ln,processes:An,procs:An,"stacked-rectangle":An,"st-rect":An,flag:Eh,"paper-tape":Eh,"bow-tie-rectangle":Ms,"bow-rect":Ms,"stored-data":Ms,"crossed-circle":Es,"cross-circ":Es,summary:Es,"tag-doc":Oh,"tagged-document":Oh,"tag-rect":Tn,"tagged-rectangle":Tn,"tag-proc":Tn,"tagged-process":Tn,hourglass:Fh,collate:Fh,text:ng,anchor:nS,brace:Ns,labelRect:aS,"brace-r":fS,braces:pS,iconSquare:dS,iconCircle:gS,icon:mS,iconRounded:xS,imageSquare:yS},kr=new Map,bS=d(async(e,t,r)=>{let i,n;if(t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect"),!zs[t.shape])throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),n=await zs[t.shape](i,t,r)}else n=await zs[t.shape](e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),kr.set(t.id,i),t.haveCallback&&kr.get(t.id).attr("class",kr.get(t.id).attr("class")+" clickable"),i},"insertNode"),KL=d((e,t)=>{kr.set(t.id,e)},"setNodeElem"),QL=d(()=>{kr.clear()},"clear"),JL=d(e=>{const t=kr.get(e.id);M.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),_S={common:Ur,getConfig:Be,insertCluster:kk,insertEdge:Fk,insertEdgeLabel:Ak,insertMarkers:jk,insertNode:bS,interpolateToCurve:yl,labelHelper:et,log:M,positionEdgeLabel:Lk},Wi={},sg=d(e=>{for(const t of e)Wi[t.name]=t},"registerLayoutLoaders"),CS=d(()=>{sg([{name:"dagre",loader:d(async()=>await ht(()=>import("./chunks/dagre-7KT5K2WU.Sh_If-eY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),"loader")}])},"registerDefaultLayoutLoaders");CS();var tB=d(async(e,t)=>{if(!(e.layoutAlgorithm in Wi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Wi[e.layoutAlgorithm];return(await r.loader()).render(e,t,_S,{algorithm:r.algorithm})},"render"),eB=d((e="",{fallback:t="dagre"}={})=>{if(e in Wi)return e;if(t in Wi)return M.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Rh="11.3.0",wS=d(e=>{var n;const{securityLevel:t}=gt();let r=dt("body");if(t==="sandbox"){const o=((n=dt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=dt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),og="comm",lg="rule",cg="decl",vS="@import",kS="@keyframes",SS="@layer",hg=Math.abs,Il=String.fromCharCode;function ug(e){return e.trim()}function qn(e,t,r){return e.replace(t,r)}function TS(e,t,r){return e.indexOf(t,r)}function Hi(e,t){return e.charCodeAt(t)|0}function Hr(e,t,r){return e.slice(t,r)}function he(e){return e.length}function AS(e){return e.length}function Bn(e,t){return t.push(e),e}var Va=1,jr=1,fg=0,Jt=0,xt=0,Zr="";function Pl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Va,column:jr,length:o,return:"",siblings:s}}function LS(){return xt}function BS(){return xt=Jt>0?Hi(Zr,--Jt):0,jr--,xt===10&&(jr=1,Va--),xt}function se(){return xt=Jt2||ji(xt)>3?"":" "}function $S(e,t){for(;--t&&se()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Xa(e,Wn()+(t<6&&Pe()==32&&se()==32))}function Fo(e){for(;se();)switch(xt){case e:return Jt;case 34:case 39:e!==34&&e!==39&&Fo(xt);break;case 40:e===41&&Fo(e);break;case 92:se();break}return Jt}function DS(e,t){for(;se()&&e+xt!==57;)if(e+xt===84&&Pe()===47)break;return"/*"+Xa(t,Jt-1)+"*"+Il(e===47?e:se())}function OS(e){for(;!ji(Pe());)se();return Xa(e,Jt)}function RS(e){return ES(Hn("",null,null,null,[""],e=MS(e),0,[0],e))}function Hn(e,t,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,f=0,p=0,g=0,m=1,y=1,x=1,b=0,w="",k=n,S=a,E=i,B=w;y;)switch(g=b,b=se()){case 40:if(g!=108&&Hi(B,u-1)==58){TS(B+=qn(qs(b),"&","&\f"),"&\f",hg(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:B+=qs(b);break;case 9:case 10:case 13:case 32:B+=FS(g);break;case 92:B+=$S(Wn()-1,7);continue;case 47:switch(Pe()){case 42:case 47:Bn(IS(DS(se(),Wn()),t,r,l),l),(ji(g||1)==5||ji(Pe()||1)==5)&&he(B)&&Hr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:s[c++]=he(B)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(B=qn(B,/\f/g,"")),p>0&&(he(B)-u||m===0&&g===47)&&Bn(p>32?Ph(B+";",i,r,u-1,l):Ph(qn(B," ","")+";",i,r,u-2,l),l);break;case 59:B+=";";default:if(Bn(E=Ih(B,t,r,c,h,n,s,w,k=[],S=[],u,a),a),b===123)if(h===0)Hn(B,t,E,E,k,a,u,s,S);else switch(f===99&&Hi(B,3)===110?100:f){case 100:case 108:case 109:case 115:Hn(e,E,E,i&&Bn(Ih(e,E,E,0,0,n,s,w,n,k=[],u,S),S),n,S,u,s,i?k:S);break;default:Hn(B,E,E,E,[""],S,0,s,S)}}c=h=p=0,m=x=1,w=B="",u=o;break;case 58:u=1+he(B),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&BS()==125)continue}switch(B+=Il(b),b*m){case 38:x=h>0?1:(B+="\f",-1);break;case 44:s[c++]=(he(B)-1)*x,x=1;break;case 64:Pe()===45&&(B+=qs(se())),f=Pe(),h=u=he(w=B+=OS(Wn())),b++;break;case 45:g===45&&he(B)==2&&(m=0)}}return a}function Ih(e,t,r,i,n,a,o,s,l,c,h,u){for(var f=n-1,p=n===0?a:[""],g=AS(p),m=0,y=0,x=0;m0?p[b]+" "+w:qn(w,/&\f/g,p[b])))&&(l[x++]=k);return Pl(e,t,r,n===0?lg:s,l,c,h,u)}function IS(e,t,r,i){return Pl(e,t,r,og,Il(LS()),Hr(e,2,-2),0,i)}function Ph(e,t,r,i,n){return Pl(e,t,r,cg,Hr(e,0,i),Hr(e,i+1,-1),i,n)}function $o(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),tT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/c4Diagram-ZCSEYPFN.BNsm4zSe.js");return{diagram:t}},__vite__mapDeps([9,10,7,8]));return{id:pg,diagram:e}},"loader"),eT={id:pg,detector:JS,loader:tT},rT=eT,dg="flowchart",iT=d((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),nT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/flowDiagram-NWEUNK3L.B7qW0ski.js");return{diagram:t}},__vite__mapDeps([11,12,13,7,8]));return{id:dg,diagram:e}},"loader"),aT={id:dg,detector:iT,loader:nT},sT=aT,gg="flowchart-v2",oT=d((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),lT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/flowDiagram-NWEUNK3L.B7qW0ski.js");return{diagram:t}},__vite__mapDeps([11,12,13,7,8]));return{id:gg,diagram:e}},"loader"),cT={id:gg,detector:oT,loader:lT},hT=cT,mg="er",uT=d(e=>/^\s*erDiagram/.test(e),"detector"),fT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/erDiagram-DKC2X5TE.C10OkHln.js");return{diagram:t}},__vite__mapDeps([14,1,2,3,4,7,8]));return{id:mg,diagram:e}},"loader"),pT={id:mg,detector:uT,loader:fT},dT=pT,yg="gitGraph",gT=d(e=>/^\s*gitGraph/.test(e),"detector"),mT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/gitGraphDiagram-JPZ3KUXI.BwzYD_Nw.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,7,2,4,6,8]));return{id:yg,diagram:e}},"loader"),yT={id:yg,detector:gT,loader:mT},xT=yT,xg="gantt",bT=d(e=>/^\s*gantt/.test(e),"detector"),_T=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/ganttDiagram-HLVPPPRE.DwgrFMyV.js");return{diagram:t}},__vite__mapDeps([19,20,21,7,8]));return{id:xg,diagram:e}},"loader"),CT={id:xg,detector:bT,loader:_T},wT=CT,bg="info",vT=d(e=>/^\s*info/.test(e),"detector"),kT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/infoDiagram-RZZSJVI2.DUMNBVuj.js");return{diagram:t}},__vite__mapDeps([22,18,7,2,4,6,8]));return{id:bg,diagram:e}},"loader"),ST={id:bg,detector:vT,loader:kT},_g="pie",TT=d(e=>/^\s*pie/.test(e),"detector"),AT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/pieDiagram-X7YZ5ZEZ.Ctc6e2Ef.js");return{diagram:t}},__vite__mapDeps([23,16,18,7,2,4,6,24,25,21,8]));return{id:_g,diagram:e}},"loader"),LT={id:_g,detector:TT,loader:AT},Cg="quadrantChart",BT=d(e=>/^\s*quadrantChart/.test(e),"detector"),MT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/quadrantDiagram-F36EZAVT.BLIXBUvX.js");return{diagram:t}},__vite__mapDeps([26,20,21,7,8]));return{id:Cg,diagram:e}},"loader"),ET={id:Cg,detector:BT,loader:MT},FT=ET,wg="xychart",$T=d(e=>/^\s*xychart-beta/.test(e),"detector"),DT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/xychartDiagram-KECQ2H5Q.CcbTCv_H.js");return{diagram:t}},__vite__mapDeps([27,21,25,20,7,8]));return{id:wg,diagram:e}},"loader"),OT={id:wg,detector:$T,loader:DT},RT=OT,vg="requirement",IT=d(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),PT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/requirementDiagram-JG2LMPGF.CxMVymv-.js");return{diagram:t}},__vite__mapDeps([28,1,2,3,4,7,8]));return{id:vg,diagram:e}},"loader"),NT={id:vg,detector:IT,loader:PT},zT=NT,kg="sequence",qT=d(e=>/^\s*sequenceDiagram/.test(e),"detector"),WT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/sequenceDiagram-WK7YDQ3N.DyLD_NeW.js");return{diagram:t}},__vite__mapDeps([29,10,17,7,8]));return{id:kg,diagram:e}},"loader"),HT={id:kg,detector:qT,loader:WT},jT=HT,Sg="class",UT=d((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),YT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/classDiagram-Q73GJZWF.U-6cgaiz.js");return{diagram:t}},__vite__mapDeps([30,31,1,2,3,4,7,8]));return{id:Sg,diagram:e}},"loader"),GT={id:Sg,detector:UT,loader:YT},VT=GT,Tg="classDiagram",XT=d((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),ZT=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/classDiagram-v2-C6QPLPW4.4RHychDB.js");return{diagram:t}},__vite__mapDeps([32,33,31,1,2,3,4,5,6,7,8]));return{id:Tg,diagram:e}},"loader"),KT={id:Tg,detector:XT,loader:ZT},QT=KT,Ag="state",JT=d((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),tA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/stateDiagram-4JV6CC6H.B0BJhnfC.js");return{diagram:t}},__vite__mapDeps([34,35,12,1,2,3,4,7,8]));return{id:Ag,diagram:e}},"loader"),eA={id:Ag,detector:JT,loader:tA},rA=eA,Lg="stateDiagram",iA=d((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),nA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/stateDiagram-v2-7KT6RKTD.CAA0WbwX.js");return{diagram:t}},__vite__mapDeps([36,35,12,7,8]));return{id:Lg,diagram:e}},"loader"),aA={id:Lg,detector:iA,loader:nA},sA=aA,Bg="journey",oA=d(e=>/^\s*journey/.test(e),"detector"),lA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/journeyDiagram-BLD6N6MZ.BsShe1e6.js");return{diagram:t}},__vite__mapDeps([37,10,24,7,8]));return{id:Bg,diagram:e}},"loader"),cA={id:Bg,detector:oA,loader:lA},hA=cA,uA=d((e,t,r)=>{M.debug(`rendering svg for syntax error +`);const i=wS(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),_u(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Mg={draw:uA},fA=Mg,pA={db:{},renderer:Mg,parser:{parse:d(()=>{},"parse")}},dA=pA,Eg="flowchart-elk",gA=d((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),mA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/flowDiagram-NWEUNK3L.B7qW0ski.js");return{diagram:t}},__vite__mapDeps([11,12,13,7,8]));return{id:Eg,diagram:e}},"loader"),yA={id:Eg,detector:gA,loader:mA},xA=yA,Fg="timeline",bA=d(e=>/^\s*timeline/.test(e),"detector"),_A=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/timeline-definition-3ZMEY6HS.CUUEMNH4.js");return{diagram:t}},__vite__mapDeps([38,24,7,8]));return{id:Fg,diagram:e}},"loader"),CA={id:Fg,detector:bA,loader:_A},wA=CA,$g="mindmap",vA=d(e=>/^\s*mindmap/.test(e),"detector"),kA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/mindmap-definition-OEB2RXX2.DCzKGaGW.js");return{diagram:t}},__vite__mapDeps([39,40,7,8]));return{id:$g,diagram:e}},"loader"),SA={id:$g,detector:vA,loader:kA},TA=SA,Dg="sankey",AA=d(e=>/^\s*sankey-beta/.test(e),"detector"),LA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/sankeyDiagram-ATFNWWW6.eM5AvVxt.js");return{diagram:t}},__vite__mapDeps([41,25,21,7,8]));return{id:Dg,diagram:e}},"loader"),BA={id:Dg,detector:AA,loader:LA},MA=BA,Og="packet",EA=d(e=>/^\s*packet-beta/.test(e),"detector"),FA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/diagram-AVGMFHF7.BG-Sf4gB.js");return{diagram:t}},__vite__mapDeps([42,16,18,7,2,4,6,8]));return{id:Og,diagram:e}},"loader"),$A={id:Og,detector:EA,loader:FA},Rg="block",DA=d(e=>/^\s*block-beta/.test(e),"detector"),OA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/blockDiagram-TCMKQVZ6.C2prvRoY.js");return{diagram:t}},__vite__mapDeps([43,33,6,2,1,13,7,8]));return{id:Rg,diagram:e}},"loader"),RA={id:Rg,detector:DA,loader:OA},IA=RA,Ig="architecture",PA=d(e=>/^\s*architecture/.test(e),"detector"),NA=d(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./chunks/architectureDiagram-IFBEXTG3.BLPvaCNn.js");return{diagram:t}},__vite__mapDeps([44,16,17,18,7,2,4,6,40,8]));return{id:Ig,diagram:e}},"loader"),zA={id:Ig,detector:PA,loader:NA},qA=zA,Uh=!1,Za=d(()=>{Uh||(Uh=!0,Gn("error",dA,e=>e.toLowerCase().trim()==="error"),Gn("---",{db:{clear:d(()=>{},"clear")},styles:{},renderer:{draw:d(()=>{},"draw")},parser:{parse:d(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:d(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),lu(rT,QT,VT,dT,wT,ST,LT,zT,jT,xA,hT,sT,TA,wA,xT,sA,rA,hA,FT,MA,$A,RT,IA,qA))},"addDiagrams"),WA=d(async()=>{M.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Or).map(async([r,{detector:i,loader:n}])=>{if(n)try{Xs(r)}catch{try{const{diagram:a,id:o}=await n();Gn(o,a,i)}catch(a){throw M.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Or[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){M.error(`Failed to load ${t.length} external diagrams`);for(const r of t)M.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),HA="graphics-document document";function Pg(e,t){e.attr("role",HA),t!==""&&e.attr("aria-roledescription",t)}d(Pg,"setA11yDiagramInfo");function Ng(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}d(Ng,"addSVGa11yTitleDescription");var ir,Po=(ir=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Be(),n=qo(t,i);t=mv(t)+` +`;try{Xs(n)}catch{const u=cm(n);if(!u)throw new ou(`Diagram ${n} not found.`);const{id:f,diagram:p}=await u();Gn(f,p)}const{db:a,parser:o,renderer:s,init:l}=Xs(n);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new ir(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},d(ir,"Diagram"),ir),Yh=[],jA=d(()=>{Yh.forEach(e=>{e()}),Yh=[]},"attachFunctions"),UA=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zg(e){const t=e.match(su);if(!t)return{text:e,metadata:{}};let r=hx(t[1],{schema:cx})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}d(zg,"extractFrontMatter");var YA=d(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),GA=d(e=>{const{text:t,metadata:r}=zg(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),VA=d(e=>{const t=ue.detectInit(e)??{},r=ue.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:iv(e),directive:t}},"processDirectives");function Nl(e){const t=YA(e),r=GA(t),i=VA(r.text),n=vl(r.config,i.directive);return e=UA(i.text),{code:e,title:r.title,config:n}}d(Nl,"preprocessDiagram");function qg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}d(qg,"toBase64");var XA=5e4,ZA="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",KA="sandbox",QA="loose",JA="http://www.w3.org/2000/svg",tL="http://www.w3.org/1999/xlink",eL="http://www.w3.org/1999/xhtml",rL="100%",iL="100%",nL="border:0;margin:0;",aL="margin:0",sL="allow-top-navigation-by-user-activation allow-popups",oL='The "iframe" tag is not supported by your browser.',lL=["foreignobject"],cL=["dominant-baseline"];function zl(e){const t=Nl(e);return Un(),Tm(t.config??{}),t}d(zl,"processAndSetConfigs");async function Wg(e,t){Za();try{const{code:r,config:i}=zl(e);return{diagramType:(await jg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}d(Wg,"parse");var Gh=d((e,t,r=[])=>` +.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),hL=d((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=` +${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{jh(l.styles)||s.forEach(c=>{r+=Gh(l.id,c,l.styles)}),jh(l.textStyles)||(r+=Gh(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),uL=d((e,t,r,i)=>{const n=hL(e,r),a=Um(t,n,e.themeVariables);return $o(RS(`${i}{${a}}`),PS)},"createUserStyles"),fL=d((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ha(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),pL=d((e="",t)=>{var n,a;const r=(a=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":iL,i=qg(`${e}`);return``},"putIntoIFrame"),Vh=d((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",JA);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function No(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}d(No,"sandboxedIframe");var dL=d((e,t,r,i)=>{var n,a,o;(n=e.getElementById(t))==null||n.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),gL=d(async function(e,t,r){var G,P,A,v,T,L;Za();const i=zl(t);t=i.code;const n=Be();M.debug(n),t.length>((n==null?void 0:n.maxTextSize)??XA)&&(t=ZA);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=d(()=>{const W=dt(f?s:c).node();W&&"remove"in W&&W.remove()},"removeTempElements");let u=dt("body");const f=n.securityLevel===KA,p=n.securityLevel===QA,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const $=No(dt(r),o);u=dt($.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=dt(r);Vh(u,e,l,`font-family: ${g}`,tL)}else{if(dL(document,e,l,o),f){const $=No(dt("body"),o);u=dt($.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=dt("body");Vh(u,e,l)}let m,y;try{m=await Po.fromText(t,{title:i.title})}catch($){if(n.suppressErrorRendering)throw h(),$;m=await Po.fromText("error"),y=$}const x=u.select(c).node(),b=m.type,w=x.firstChild,k=w.firstChild,S=(P=(G=m.renderer).getClasses)==null?void 0:P.call(G,t,m),E=uL(n,b,S,a),B=document.createElement("style");B.innerHTML=E,w.insertBefore(B,k);try{await m.renderer.draw(t,e,Rh,m)}catch($){throw n.suppressErrorRendering?h():fA.draw(t,e,Rh),$}const I=u.select(`${c} svg`),N=(v=(A=m.db).getAccTitle)==null?void 0:v.call(A),O=(L=(T=m.db).getAccDescription)==null?void 0:L.call(T);Ug(b,I,N,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",eL);let F=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),F=fL(F,f,Qt(n.arrowMarkerAbsolute)),f){const $=u.select(c+" svg").node();F=pL(F,$)}else p||(F=Dr.sanitize(F,{ADD_TAGS:lL,ADD_ATTR:cL}));if(jA(),y)throw y;return h(),{diagramType:b,svg:F,bindFunctions:m.db.bindFunctions}},"render");function Hg(e={}){var i;const t=At({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),km(t),t!=null&&t.theme&&t.theme in Se?t.themeVariables=Se[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Se.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?vm(t):pu();zo(r.logLevel),Za()}d(Hg,"initialize");var jg=d((e,t={})=>{const{code:r}=Nl(e);return Po.fromText(r,t)},"getDiagramFromText");function Ug(e,t,r,i){Pg(t,e),Ng(t,r,i,t.attr("id"))}d(Ug,"addA11yInfo");var lr=Object.freeze({render:gL,parse:Wg,getDiagramFromText:jg,initialize:Hg,getConfig:Be,setConfig:du,getSiteConfig:pu,updateSiteConfig:Sm,reset:d(()=>{Un()},"reset"),globalReset:d(()=>{Un(Rr)},"globalReset"),defaultConfig:Rr});zo(Be().logLevel);Un(Be());var mL=d((e,t,r)=>{M.warn(e),Cl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Yg=d(async function(e={querySelector:".mermaid"}){try{await yL(e)}catch(t){if(Cl(t)&&M.error(t.str),Ut.parseError&&Ut.parseError(t),!e.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),t}},"run"),yL=d(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=lr.getConfig();M.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");M.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(M.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),lr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ue.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if(M.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=Md(ue.entityDecode(o)).trim().replace(//gi,"
    ");const h=ue.detectInit(o);h&&M.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Zg(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){mL(u,s,Ut.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Gg=d(function(e){lr.initialize(e)},"initialize"),xL=d(async function(e,t,r){M.warn("mermaid.init is deprecated. Please use run instead."),e&&Gg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Yg(i)},"init"),bL=d(async(e,{lazyLoad:t=!0}={})=>{Za(),lu(...e),t===!1&&await WA()},"registerExternalDiagrams"),Vg=d(function(){if(Ut.startOnLoad){const{startOnLoad:e}=lr.getConfig();e&&Ut.run().catch(t=>M.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Vg,!1);var _L=d(function(e){Ut.parseError=e},"setParseErrorHandler"),ka=[],Ws=!1,Xg=d(async()=>{if(!Ws){for(Ws=!0;ka.length>0;){const e=ka.shift();if(e)try{await e()}catch(t){M.error("Error executing queue",t)}}Ws=!1}},"executeQueue"),CL=d(async(e,t)=>new Promise((r,i)=>{const n=d(()=>new Promise((a,o)=>{lr.parse(e,t).then(s=>{a(s),r(s)},s=>{var l;M.error("Error parsing",s),(l=Ut.parseError)==null||l.call(Ut,s),o(s),i(s)})}),"performCall");ka.push(n),Xg().catch(i)}),"parse"),Zg=d((e,t,r)=>new Promise((i,n)=>{const a=d(()=>new Promise((o,s)=>{lr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;M.error("Error parsing",l),(c=Ut.parseError)==null||c.call(Ut,l),s(l),n(l)})}),"performCall");ka.push(a),Xg().catch(n)}),"render"),Ut={startOnLoad:!0,mermaidAPI:lr,parse:CL,render:Zg,init:xL,run:Yg,registerExternalDiagrams:bL,registerLayoutLoaders:sg,initialize:Gg,parseError:void 0,contentLoaded:Vg,setParseErrorHandler:_L,detectType:qo,registerIconPacks:Fx},Sa=Ut;/*! Check if previously processed *//*! + * Wait for document loaded before starting the execution + */const wL=async e=>{try{Sa.registerExternalDiagrams&&await Sa.registerExternalDiagrams(e)}catch(t){console.error(t)}},vL=async(e,t,r)=>{Sa.initialize(r);const{svg:i}=await Sa.render(e,t);return i},kL=["innerHTML"],SL={__name:"Mermaid",props:{graph:{type:String,required:!0},id:{type:String,required:!0},class:{type:String,required:!1,default:"mermaid"}},setup(e){const t=hc({securityLevel:"loose",startOnLoad:!1,externalDiagrams:[]}),{page:r}=Xh(),{frontmatter:i}=c0(r.value),n=i.mermaidTheme||"",a=e,o=hc(null);let s=null;Zh(async()=>{var u;await wL(t.value.externalDiagrams);let c=await ht(()=>import("./chunks/virtual_mermaid-config.DDnGl6nM.js"),[]);c!=null&&c.default&&(t.value=c.default),s=new MutationObserver(async()=>await l()),s.observe(document.documentElement,{attributes:!0}),await l(),((u=//.exec(decodeURIComponent(a.graph)))==null?void 0:u.length)>0&&setTimeout(()=>{let f=document.getElementsByTagName("img"),p=Array.from(f);p.length&&Promise.all(p.filter(g=>!g.complete).map(g=>new Promise(m=>{g.onload=g.onerror=m}))).then(async()=>{await l()})},100)}),h0(()=>s.disconnect());const l=async()=>{const c=document.documentElement.classList.contains("dark");let h={...t.value};n&&(h.theme=n),c&&(h.theme="dark");let u=await vL(a.id,decodeURIComponent(a.graph),h);const f=Math.random().toString(36).substring(7);o.value=`${u} ${f}`};return(c,h)=>(u0(),f0("div",{innerHTML:o.value,class:p0(a.class)},null,10,kL))}};function Kg(e){if(e.extends){const t=Kg(e.extends);return{...t,...e,async enhanceApp(r){t.enhanceApp&&await t.enhanceApp(r),e.enhanceApp&&await e.enhanceApp(r)}}}return e}const Sr=Kg(M0),TL=k0({name:"VitePressApp",setup(){const{site:e,lang:t,dir:r}=Xh();return Zh(()=>{S0(()=>{document.documentElement.lang=t.value,document.documentElement.dir=r.value})}),e.value.router.prefetchLinks&&T0(),A0(),L0(),Sr.setup&&Sr.setup(),()=>B0(Sr.Layout)}});async function AL(){globalThis.__VITEPRESS__=!0;const e=BL(),t=LL();t.provide(g0,e);const r=m0(e.route);return t.provide(y0,r),t.component("Mermaid",SL),t.component("Content",x0),t.component("ClientOnly",b0),Object.defineProperties(t.config.globalProperties,{$frontmatter:{get(){return r.frontmatter.value}},$params:{get(){return r.page.value.params}}}),Sr.enhanceApp&&await Sr.enhanceApp({app:t,router:e,siteData:_0}),{app:t,router:e,data:r}}function LL(){return C0(TL)}function BL(){let e=Hs,t;return w0(r=>{let i=v0(r),n=null;return i&&(e&&(t=i),(e||t===i)&&(i=i.replace(/\.js$/,".lean.js")),n=import(i)),Hs&&(e=!1),n},Sr.NotFound)}Hs&&AL().then(({app:e,router:t,data:r})=>{t.go().then(()=>{d0(t.route,r.site),e.mount("#app")})});export{gm as $,ki as A,Cm as B,ge as C,vl as D,Be as E,lv as F,ey as G,wS as H,Rh as I,cx as J,r2 as K,Yc as L,Uc as M,UL as N,zL as O,HL as P,WL as Q,PL as R,ll as S,jL as T,tt as U,NL as V,xr as W,GL as X,YL as Y,qL as Z,d as _,At as a,IL as a$,s2 as a0,Mi as a1,DL as a2,Wo as a3,wl as a4,Jw as a5,Np as a6,$L as a7,Wm as a8,gd as a9,Xw as aA,qC as aB,Ww as aC,pl as aD,jh as aE,Qv as aF,i2 as aG,E0 as aH,F0 as aI,Ex as aJ,Fx as aK,Fa as aL,cr as aM,Zw as aN,od as aO,Pa as aP,Wa as aQ,da as aR,cd as aS,sd as aT,Tw as aU,il as aV,wp as aW,Wt as aX,Xi as aY,B1 as aZ,Sp as a_,yl as aa,Ip as ab,op as ac,Qt as ad,Fl as ae,Dx as af,zd as ag,Ha as ah,ov as ai,om as aj,Cu as ak,Ui as al,U as am,K as an,jk as ao,QL as ap,ZL as aq,XL as ar,X as as,KL as at,bS as au,JL as av,kk as aw,Fk as ax,Lk as ay,Ak as az,Zm as b,D0 as b0,nl as b1,Ie as b2,Ii as b3,Nc as b4,R1 as b5,Vw as b6,qw as b7,LC as b8,dl as b9,qa as bA,ww as ba,Qw as bb,Ki as bc,Yr as bd,ua as be,$w as bf,WS as bg,Zi as bh,pa as bi,Aw as bj,td as bk,EC as bl,FC as bm,Ze as bn,oh as bo,$C as bp,gl as bq,MC as br,RC as bs,Gr as bt,je as bu,rh as bv,ml as bw,rd as bx,Ro as by,Kw as bz,Xm as c,AL as createApp,gt as d,Ur as e,yd as f,Vm as g,qi as h,Pr as i,dt as j,_u as k,M as l,lp as m,Yi as n,OL as o,RL as p,Km as q,Qm as r,Gm as s,hx as t,ue as u,Ym as v,uv as w,VL as x,eB as y,tB as z}; diff --git a/pr-528/assets/blog_overview.md.BkoGr0eX.js b/pr-528/assets/blog_overview.md.BkoGr0eX.js new file mode 100644 index 000000000..8db8fcb12 --- /dev/null +++ b/pr-528/assets/blog_overview.md.BkoGr0eX.js @@ -0,0 +1 @@ +import{_ as o,c as t,a3 as a,o as l}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"Blog","description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","frontmatter":{"description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","head":[["meta",{"name":"og:title","content":"Blog | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/overview.md","filePath":"blog/overview.md","lastUpdated":1733420866000}'),r={name:"blog/overview.md"};function i(n,e,s,c,p,g){return l(),t("div",null,e[0]||(e[0]=[a('

    Blog

    Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

    Table of contents

    Stay tuned for more exciting content!

    ',5)]))}const v=o(r,[["render",i]]);export{d as __pageData,v as default}; diff --git a/pr-528/assets/blog_overview.md.BkoGr0eX.lean.js b/pr-528/assets/blog_overview.md.BkoGr0eX.lean.js new file mode 100644 index 000000000..8db8fcb12 --- /dev/null +++ b/pr-528/assets/blog_overview.md.BkoGr0eX.lean.js @@ -0,0 +1 @@ +import{_ as o,c as t,a3 as a,o as l}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"Blog","description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","frontmatter":{"description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","head":[["meta",{"name":"og:title","content":"Blog | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/overview.md","filePath":"blog/overview.md","lastUpdated":1733420866000}'),r={name:"blog/overview.md"};function i(n,e,s,c,p,g){return l(),t("div",null,e[0]||(e[0]=[a('

    Blog

    Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

    Table of contents

    Stay tuned for more exciting content!

    ',5)]))}const v=o(r,[["render",i]]);export{d as __pageData,v as default}; diff --git a/pr-528/assets/blog_rollkit-the-first-sovereign-rollup-framework.md.3iTSfbJu.js b/pr-528/assets/blog_rollkit-the-first-sovereign-rollup-framework.md.3iTSfbJu.js new file mode 100644 index 000000000..54befaf97 --- /dev/null +++ b/pr-528/assets/blog_rollkit-the-first-sovereign-rollup-framework.md.3iTSfbJu.js @@ -0,0 +1 @@ +import{_ as l,o as a,c as i,j as t,a as o,G as s,a3 as h}from"./chunks/framework.B8-VHxRu.js";const c="/docs-preview/pr-528/img/Rollkit-cover.jpg",p={name:"Twitter"},d={class:"twitter-tweet","data-lang":"en","data-theme":"dark"};function u(n,r,e,g,k,b){return a(),i("blockquote",d,r[0]||(r[0]=[t("p",{lang:"de",dir:"ltr"},[o("rollkit start "),t("a",{href:"https://t.co/tytjFm1Z4Y"},"pic.twitter.com/tytjFm1Z4Y")],-1),o("— Josh Stein 🤳✨ (@JoshCStein) "),t("a",{href:"https://twitter.com/JoshCStein/status/1783880747301880161?ref_src=twsrc%5Etfw"},"April 26, 2024",-1)]))}const m=l(p,[["render",u],["__scopeId","data-v-23ec5da3"]]),y=JSON.parse('{"title":"Rollkit: The First Sovereign Rollup Framework","description":"Launch a sovereign, customizable blockchain as easily as a smart contract","frontmatter":{"head":[["meta",{"name":"title","content":"Rollkit: The First Sovereign Rollup Framework"}],["meta",{"name":"description","content":"Launch a sovereign, customizable blockchain as easily as a smart contract"}],["meta",{"name":"keywords","content":"Rollkit, Cosmos-SDK"}],["meta",{"name":"og:title","content":"Rollkit: The First Sovereign Rollup Framework | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/rollkit-the-first-sovereign-rollup-framework.md","filePath":"blog/rollkit-the-first-sovereign-rollup-framework.md","lastUpdated":1733420866000}'),f={name:"blog/rollkit-the-first-sovereign-rollup-framework.md"},w=Object.assign(f,{setup(n){return(r,e)=>(a(),i("div",null,[e[0]||(e[0]=t("h1",{id:"rollkit-the-first-sovereign-rollup-framework",tabindex:"-1"},[o("Rollkit: The First Sovereign Rollup Framework "),t("a",{class:"header-anchor",href:"#rollkit-the-first-sovereign-rollup-framework","aria-label":'Permalink to "Rollkit: The First Sovereign Rollup Framework"'},"​")],-1)),e[1]||(e[1]=t("p",null,"By Rollkit",-1)),e[2]||(e[2]=t("p",null,[t("img",{src:c,alt:"Rollkit blog cover"})],-1)),e[3]||(e[3]=t("p",null,"Bitcoin to Ethereum took 7 years. Ethereum to more scalable alt-L1s took 1–2 years. And then Cosmos SDK and CometBFT brought down time-to-launch a sovereign L1 to months.",-1)),e[4]||(e[4]=t("p",null,[o("Now, Rollkit makes deploying any VM or application on its own sovereign chain as easy as typing "),t("strong",null,"rollkit start"),o(".")],-1)),s(m),e[5]||(e[5]=h('

    Rollkit provides a path to one-click sovereignty for any crypto application, enabling any developer to launch their own sovereign rollups within seconds.

    Sovereign rollups combine the self-governance of a Layer 1 with the ease of deploying a rollup. They remove the need to recruit a secure validator set or bootstrap security by prematurely launching a token. Just like an independent L1, sovereign rollups retain the ability to hard fork which allows them to protect against hacks or bugs. This provides its community the ability to enforce social consensus and be sovereign.

    Without the overhead of a settlement layer, sovereign rollups can directly interoperate with shared security when using the same DA layer.

    By using a generic application interface like ABCI++, Rollkit is compatible with the Cosmos SDK, the leading framework for building sovereign blockchains. This enables all Cosmos SDK developers to build a sovereign rollup and tap into all the powerful cosmos ecosystem tooling they’re used to including IBC, ABCI++, and Skip Protocol's Slinky and BlockSDK.

    Developers have full-freedom to deploy a VM or define their own execution environment, unconstrained by the overhead of an enshrined settlement layer that must process fraud or ZK proofs for their rollups. This means that instead of a canonical on-chain light client that comes with an enshrined settlement layer, sovereign rollups can define how they interoperate with other blockchains by having on-chain light clients of each other as needed.

    Take Control

    In the past, developers have been compelled to accept a degree of trust in convincing validators to organize and independently run nodes that secure a new blockchain. This requires launching premature tokens, inflating away their token supply in order to maintain incentive alignment with validators and offset their operational costs. This does not let developers focus on the core product they’re building. Sovereign rollups empower developers to get rid of this need to launch a token prematurely for bootstrapping a validator set and spending an excessively high amount of internal resources on blockchain development.

    Existing settled rollups come with the overhead of an enshrined settlement layer like Ethereum L1 where it is difficult and expensive to unwind a token on an L2 and move to another L2 without relying on trusted liquidity bridging intermediaries. This also comes with becoming subordinate to the social consensus of an enshrined settlement layer, which they may or may not align with.

    Sovereign rollups don’t need to settle to an external blockchain and can instead fully own their settlement. This allows them to protect against hacks and bugs, and facilitate upgrades via hard forks. They introduce rollup light clients that verify DA directly through data availability sampling and verify execution state proofs allowing asynchronous composability as needed. This in turn paves the path forward for trust-minimized interoperability between sovereign chains that share the same DA layer.

    Sovereign rollups remove the need to have a bridge contract that is upgradeable by an offchain council and instead allows the sovereign community to define rules via fully onchain governance.

    Build with the Best

    Cosmos SDK’s rich array of developer tooling, battle-tested and refined over the past several years, is available to Rollkit developers from day one. Developers can use popular wallet infrastructure, block explorers and indexers supporting CometBFT RPCs, speak IBC across the interchain, have Cosmwasm smart contracts along with Abstract SDK, utilize MEV and free lanes via the BlockSDK and enshrine oracles in block production with Slinky from Skip Protocol. More cosmos related resources.

    Rollkit rollups interact with a state machine via the Application Blockchain Interface (ABCI++). This allows it to be used as an alternative to CometBFT for any ABCI application. Rollkit comes with a custom start handler that can be used by Cosmos SDK blockchains to use it as its ABCI client while still following the release branches of upstream Cosmos SDK. This compatibility enables developers to use tools like abci-cli to test and debug rollups.

    Optimize for your needs

    Rollkit allows developers to optimize between the different modular components of a sovereign chain as needed. Rollkit allows you to:

    • Choose between data availability layers that implement the go-da interface.

    • Choose any ABCI++ compatible virtual machine.

    • Utilize the Sequencing API to delegate sequencing to the shared sequencer network of your choice or even delegate sequencing to the DA layer to go based. Choose between state validity modes: Pessimistic, Optimistic, or ZK or use a combination of both zk and optimistic schemes. Eliminate the need to launch a token or designate the native token or any token for gas fees.

    • Customize block time to just a couple hundred milliseconds and produce blocks only when needed.

    • Configure the fork choice rule.

    Rollkit rollups pay only for data availability on demand. There is no sequencer split required, nor will there ever be any kind of rent seeking model imposed on Rollkit rollups. Rollkit rollups preserve the advantages of a Cosmos SDK blockchain but reduce the overhead of deploying and maintaining a validator set.

    Break Free. Be Sovereign.

    Get started with launching your own sovereign chain with Rollkit. If you’re thinking of building a sovereign chain, we’d love to hear from you. Fill out this form.

    ',19))]))}});export{y as __pageData,w as default}; diff --git a/pr-528/assets/blog_rollkit-the-first-sovereign-rollup-framework.md.3iTSfbJu.lean.js b/pr-528/assets/blog_rollkit-the-first-sovereign-rollup-framework.md.3iTSfbJu.lean.js new file mode 100644 index 000000000..54befaf97 --- /dev/null +++ b/pr-528/assets/blog_rollkit-the-first-sovereign-rollup-framework.md.3iTSfbJu.lean.js @@ -0,0 +1 @@ +import{_ as l,o as a,c as i,j as t,a as o,G as s,a3 as h}from"./chunks/framework.B8-VHxRu.js";const c="/docs-preview/pr-528/img/Rollkit-cover.jpg",p={name:"Twitter"},d={class:"twitter-tweet","data-lang":"en","data-theme":"dark"};function u(n,r,e,g,k,b){return a(),i("blockquote",d,r[0]||(r[0]=[t("p",{lang:"de",dir:"ltr"},[o("rollkit start "),t("a",{href:"https://t.co/tytjFm1Z4Y"},"pic.twitter.com/tytjFm1Z4Y")],-1),o("— Josh Stein 🤳✨ (@JoshCStein) "),t("a",{href:"https://twitter.com/JoshCStein/status/1783880747301880161?ref_src=twsrc%5Etfw"},"April 26, 2024",-1)]))}const m=l(p,[["render",u],["__scopeId","data-v-23ec5da3"]]),y=JSON.parse('{"title":"Rollkit: The First Sovereign Rollup Framework","description":"Launch a sovereign, customizable blockchain as easily as a smart contract","frontmatter":{"head":[["meta",{"name":"title","content":"Rollkit: The First Sovereign Rollup Framework"}],["meta",{"name":"description","content":"Launch a sovereign, customizable blockchain as easily as a smart contract"}],["meta",{"name":"keywords","content":"Rollkit, Cosmos-SDK"}],["meta",{"name":"og:title","content":"Rollkit: The First Sovereign Rollup Framework | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/rollkit-the-first-sovereign-rollup-framework.md","filePath":"blog/rollkit-the-first-sovereign-rollup-framework.md","lastUpdated":1733420866000}'),f={name:"blog/rollkit-the-first-sovereign-rollup-framework.md"},w=Object.assign(f,{setup(n){return(r,e)=>(a(),i("div",null,[e[0]||(e[0]=t("h1",{id:"rollkit-the-first-sovereign-rollup-framework",tabindex:"-1"},[o("Rollkit: The First Sovereign Rollup Framework "),t("a",{class:"header-anchor",href:"#rollkit-the-first-sovereign-rollup-framework","aria-label":'Permalink to "Rollkit: The First Sovereign Rollup Framework"'},"​")],-1)),e[1]||(e[1]=t("p",null,"By Rollkit",-1)),e[2]||(e[2]=t("p",null,[t("img",{src:c,alt:"Rollkit blog cover"})],-1)),e[3]||(e[3]=t("p",null,"Bitcoin to Ethereum took 7 years. Ethereum to more scalable alt-L1s took 1–2 years. And then Cosmos SDK and CometBFT brought down time-to-launch a sovereign L1 to months.",-1)),e[4]||(e[4]=t("p",null,[o("Now, Rollkit makes deploying any VM or application on its own sovereign chain as easy as typing "),t("strong",null,"rollkit start"),o(".")],-1)),s(m),e[5]||(e[5]=h('

    Rollkit provides a path to one-click sovereignty for any crypto application, enabling any developer to launch their own sovereign rollups within seconds.

    Sovereign rollups combine the self-governance of a Layer 1 with the ease of deploying a rollup. They remove the need to recruit a secure validator set or bootstrap security by prematurely launching a token. Just like an independent L1, sovereign rollups retain the ability to hard fork which allows them to protect against hacks or bugs. This provides its community the ability to enforce social consensus and be sovereign.

    Without the overhead of a settlement layer, sovereign rollups can directly interoperate with shared security when using the same DA layer.

    By using a generic application interface like ABCI++, Rollkit is compatible with the Cosmos SDK, the leading framework for building sovereign blockchains. This enables all Cosmos SDK developers to build a sovereign rollup and tap into all the powerful cosmos ecosystem tooling they’re used to including IBC, ABCI++, and Skip Protocol's Slinky and BlockSDK.

    Developers have full-freedom to deploy a VM or define their own execution environment, unconstrained by the overhead of an enshrined settlement layer that must process fraud or ZK proofs for their rollups. This means that instead of a canonical on-chain light client that comes with an enshrined settlement layer, sovereign rollups can define how they interoperate with other blockchains by having on-chain light clients of each other as needed.

    Take Control

    In the past, developers have been compelled to accept a degree of trust in convincing validators to organize and independently run nodes that secure a new blockchain. This requires launching premature tokens, inflating away their token supply in order to maintain incentive alignment with validators and offset their operational costs. This does not let developers focus on the core product they’re building. Sovereign rollups empower developers to get rid of this need to launch a token prematurely for bootstrapping a validator set and spending an excessively high amount of internal resources on blockchain development.

    Existing settled rollups come with the overhead of an enshrined settlement layer like Ethereum L1 where it is difficult and expensive to unwind a token on an L2 and move to another L2 without relying on trusted liquidity bridging intermediaries. This also comes with becoming subordinate to the social consensus of an enshrined settlement layer, which they may or may not align with.

    Sovereign rollups don’t need to settle to an external blockchain and can instead fully own their settlement. This allows them to protect against hacks and bugs, and facilitate upgrades via hard forks. They introduce rollup light clients that verify DA directly through data availability sampling and verify execution state proofs allowing asynchronous composability as needed. This in turn paves the path forward for trust-minimized interoperability between sovereign chains that share the same DA layer.

    Sovereign rollups remove the need to have a bridge contract that is upgradeable by an offchain council and instead allows the sovereign community to define rules via fully onchain governance.

    Build with the Best

    Cosmos SDK’s rich array of developer tooling, battle-tested and refined over the past several years, is available to Rollkit developers from day one. Developers can use popular wallet infrastructure, block explorers and indexers supporting CometBFT RPCs, speak IBC across the interchain, have Cosmwasm smart contracts along with Abstract SDK, utilize MEV and free lanes via the BlockSDK and enshrine oracles in block production with Slinky from Skip Protocol. More cosmos related resources.

    Rollkit rollups interact with a state machine via the Application Blockchain Interface (ABCI++). This allows it to be used as an alternative to CometBFT for any ABCI application. Rollkit comes with a custom start handler that can be used by Cosmos SDK blockchains to use it as its ABCI client while still following the release branches of upstream Cosmos SDK. This compatibility enables developers to use tools like abci-cli to test and debug rollups.

    Optimize for your needs

    Rollkit allows developers to optimize between the different modular components of a sovereign chain as needed. Rollkit allows you to:

    • Choose between data availability layers that implement the go-da interface.

    • Choose any ABCI++ compatible virtual machine.

    • Utilize the Sequencing API to delegate sequencing to the shared sequencer network of your choice or even delegate sequencing to the DA layer to go based. Choose between state validity modes: Pessimistic, Optimistic, or ZK or use a combination of both zk and optimistic schemes. Eliminate the need to launch a token or designate the native token or any token for gas fees.

    • Customize block time to just a couple hundred milliseconds and produce blocks only when needed.

    • Configure the fork choice rule.

    Rollkit rollups pay only for data availability on demand. There is no sequencer split required, nor will there ever be any kind of rent seeking model imposed on Rollkit rollups. Rollkit rollups preserve the advantages of a Cosmos SDK blockchain but reduce the overhead of deploying and maintaining a validator set.

    Break Free. Be Sovereign.

    Get started with launching your own sovereign chain with Rollkit. If you’re thinking of building a sovereign chain, we’d love to hear from you. Fill out this form.

    ',19))]))}});export{y as __pageData,w as default}; diff --git a/pr-528/assets/blog_sovereign-rollups-on-bitcoin.md.3SYCE1yS.js b/pr-528/assets/blog_sovereign-rollups-on-bitcoin.md.3SYCE1yS.js new file mode 100644 index 000000000..b031a854a --- /dev/null +++ b/pr-528/assets/blog_sovereign-rollups-on-bitcoin.md.3SYCE1yS.js @@ -0,0 +1 @@ +import{_ as e}from"./chunks/rollkit-bitcoin-1.DCy-Y3gh.js";import{_ as a,c as n,a3 as l,j as t,a as i,o as r}from"./chunks/framework.B8-VHxRu.js";const s="/docs-preview/pr-528/bitcoin-rollkit/rollkit-bitcoin.png",c="/docs-preview/pr-528/bitcoin-rollkit/rollkit-bitcoin-2.png",w=JSON.parse('{"title":"Sovereign rollups on Bitcoin with Rollkit","description":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it.","frontmatter":{"head":[["meta",{"name":"title","content":"Sovereign rollups on Bitcoin with Rollkit"}],["meta",{"name":"description","content":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it."}],["meta",{"name":"keywords","content":"Rollkit, Celestia"}],["meta",{"name":"og:image","content":"/img/Rollkit-cover.jpg"}],["meta",{"name":"og:title","content":"Sovereign rollups on Bitcoin with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/sovereign-rollups-on-bitcoin.md","filePath":"blog/sovereign-rollups-on-bitcoin.md","lastUpdated":1733420866000}'),d={name:"blog/sovereign-rollups-on-bitcoin.md"};function h(p,o,u,m,b,g){return r(),n("div",null,o[0]||(o[0]=[l('

    Sovereign rollups on Bitcoin with Rollkit

    By Rollkit

    rollkit-bitcoinOriginally published on 5 March 2023

    Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. An early research implementation allows Rollkit rollups to use Bitcoin for data availability.

    Rollkit is opening the door for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and re-org resistance. With the new integration it is now possible to run the EVM on Bitcoin as a Rollkit sovereign rollup. Sovereign rollups on Bitcoin not only expand the possibilities for rollups, but also have the potential to help bootstrap a healthy blockspace fee market on Bitcoin, enabling a more sustainable security budget.

    Tl;dr

    • Sovereign rollups using Bitcoin for data availability are now a reality with Rollkit’s new early research integration.
    • Follow along with a demo of the EVM running on Bitcoin as a sovereign Rollkit rollup.
    • The implementation was possible due to Bitcoin's Taproot upgrade and Ordinals' usage of Bitcoin for publishing arbitrary data.

    Posting data on Bitcoin with Taproot

    On Feb. 1, 2023, the Luxor mining pool mined the largest Bitcoin block (#774628) ever, approximately 4 MB. Most of the blockspace was used to inscribe a Taproot Wizards NFT with Ordinals, a project that implements NFTs on Bitcoin by publishing the image data on-chain.

    Bitcoin NFTs use Taproot witnesses to inscribe arbitrary data, enabled by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can include up to around 390kB of arbitrary data while still passing through the public mempool. A non-standard transaction, included by a miner directly without passing through the mempool, can include close to 4MB of arbitrary data. In short, with SegWit, it became viable to post big blobs of data to the Bitcoin blockchain.

    Since then, the usage of Ordinals for NFT inscriptions and Taproot utilization has kicked off. Eric Wall found that at the time of his tweet, posting data on Bitcoin was 7x cheaper than Ethereum. Now that there are thousands of inscriptions on Bitcoin, it has become clear that sovereign rollups and an ecosystem of dapps on Bitcoin could become a reality. The missing piece: a rollup framework for easily integrating Bitcoin as a data availability layer.

    Integrating Bitcoin as a data availability layer into Rollkit

    Rollkit is a modular framework for rollups, where developers can plug-in custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, Bitcoin is an option, thanks to an early research implementation of a Bitcoin data availability module for Rollkit. In this case, sovereign rollups manage their own execution and settlement while offloading consensus and data availability to Bitcoin.

    rollkit-bitcoin-rollup

    How Rollkit posts data to Bitcoin

    To write and read data on Bitcoin, we make use of Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da that provides a reader/writer interface to Bitcoin. For details of how the interface works and how it uses Taproot, see the specs. The package can be re-used by any project that wants to read or write data on Bitcoin.

    Rollkit was built with modularity at its core. It has a data availability interface so that developers can simply implement specific methods to add a new data availability layer. To add a data availability layer, implementers need to satisfy the DataAvailabilityLayerClient interface which defines the behavior of the data availability client, and the BlockRetriever interface which defines how blocks can be synced. These interfaces live in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing the blocks.

    After implementing the Taproot reader/writer interface for Bitcoin (bitcoin-da), adding it as a data availability module for Rollkit took less than a day. We mostly only had to implement the SubmitBlock and RetrieveBlocks functions for Rollkit to call the Read and Write methods in bitcoin-da.

    rollkit-bitcoin-rollup-2

    EVM on Bitcoin demo

    Rollkit supports custom execution layers, including EVM, CosmWasm, or the Cosmos SDK. To test the integration, we used Rollkit to run the EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network. See below for a demo.

    ',21),t("iframe",{title:"Rollkit: Ethermint + Bitcoin DA demo",src:"https://www.youtube.com/embed/qBKFEctzgT0",allowfullscreen:""},null,-1),t("h2",{id:"conclusion",tabindex:"-1"},[i("Conclusion "),t("a",{class:"header-anchor",href:"#conclusion","aria-label":'Permalink to "Conclusion"'},"​")],-1),t("p",null,[i("As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. "),t("a",{href:"https://blog.celestia.org/sovereign-rollup-chains/",target:"_blank",rel:"noreferrer"},"Sovereign rollups"),i(" fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.")],-1),t("p",null,[i("Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around Rollkit and build sovereign rollups on Bitcoin, or customize Rollkit with different execution environments and data availability layers. For details on how to run Rollkit with the Bitcoin data availability module, see the instructions "),t("a",{href:"/docs-preview/pr-528/docs/tutorials/bitcoin"},"here"),i(". Keep in mind that the integration is an early research implementation and it is not yet production-ready!")],-1),t("p",null,"Modularism, not maximalism.",-1)]))}const y=a(d,[["render",h]]);export{w as __pageData,y as default}; diff --git a/pr-528/assets/blog_sovereign-rollups-on-bitcoin.md.3SYCE1yS.lean.js b/pr-528/assets/blog_sovereign-rollups-on-bitcoin.md.3SYCE1yS.lean.js new file mode 100644 index 000000000..b031a854a --- /dev/null +++ b/pr-528/assets/blog_sovereign-rollups-on-bitcoin.md.3SYCE1yS.lean.js @@ -0,0 +1 @@ +import{_ as e}from"./chunks/rollkit-bitcoin-1.DCy-Y3gh.js";import{_ as a,c as n,a3 as l,j as t,a as i,o as r}from"./chunks/framework.B8-VHxRu.js";const s="/docs-preview/pr-528/bitcoin-rollkit/rollkit-bitcoin.png",c="/docs-preview/pr-528/bitcoin-rollkit/rollkit-bitcoin-2.png",w=JSON.parse('{"title":"Sovereign rollups on Bitcoin with Rollkit","description":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it.","frontmatter":{"head":[["meta",{"name":"title","content":"Sovereign rollups on Bitcoin with Rollkit"}],["meta",{"name":"description","content":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it."}],["meta",{"name":"keywords","content":"Rollkit, Celestia"}],["meta",{"name":"og:image","content":"/img/Rollkit-cover.jpg"}],["meta",{"name":"og:title","content":"Sovereign rollups on Bitcoin with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/sovereign-rollups-on-bitcoin.md","filePath":"blog/sovereign-rollups-on-bitcoin.md","lastUpdated":1733420866000}'),d={name:"blog/sovereign-rollups-on-bitcoin.md"};function h(p,o,u,m,b,g){return r(),n("div",null,o[0]||(o[0]=[l('

    Sovereign rollups on Bitcoin with Rollkit

    By Rollkit

    rollkit-bitcoinOriginally published on 5 March 2023

    Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. An early research implementation allows Rollkit rollups to use Bitcoin for data availability.

    Rollkit is opening the door for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and re-org resistance. With the new integration it is now possible to run the EVM on Bitcoin as a Rollkit sovereign rollup. Sovereign rollups on Bitcoin not only expand the possibilities for rollups, but also have the potential to help bootstrap a healthy blockspace fee market on Bitcoin, enabling a more sustainable security budget.

    Tl;dr

    • Sovereign rollups using Bitcoin for data availability are now a reality with Rollkit’s new early research integration.
    • Follow along with a demo of the EVM running on Bitcoin as a sovereign Rollkit rollup.
    • The implementation was possible due to Bitcoin's Taproot upgrade and Ordinals' usage of Bitcoin for publishing arbitrary data.

    Posting data on Bitcoin with Taproot

    On Feb. 1, 2023, the Luxor mining pool mined the largest Bitcoin block (#774628) ever, approximately 4 MB. Most of the blockspace was used to inscribe a Taproot Wizards NFT with Ordinals, a project that implements NFTs on Bitcoin by publishing the image data on-chain.

    Bitcoin NFTs use Taproot witnesses to inscribe arbitrary data, enabled by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can include up to around 390kB of arbitrary data while still passing through the public mempool. A non-standard transaction, included by a miner directly without passing through the mempool, can include close to 4MB of arbitrary data. In short, with SegWit, it became viable to post big blobs of data to the Bitcoin blockchain.

    Since then, the usage of Ordinals for NFT inscriptions and Taproot utilization has kicked off. Eric Wall found that at the time of his tweet, posting data on Bitcoin was 7x cheaper than Ethereum. Now that there are thousands of inscriptions on Bitcoin, it has become clear that sovereign rollups and an ecosystem of dapps on Bitcoin could become a reality. The missing piece: a rollup framework for easily integrating Bitcoin as a data availability layer.

    Integrating Bitcoin as a data availability layer into Rollkit

    Rollkit is a modular framework for rollups, where developers can plug-in custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, Bitcoin is an option, thanks to an early research implementation of a Bitcoin data availability module for Rollkit. In this case, sovereign rollups manage their own execution and settlement while offloading consensus and data availability to Bitcoin.

    rollkit-bitcoin-rollup

    How Rollkit posts data to Bitcoin

    To write and read data on Bitcoin, we make use of Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da that provides a reader/writer interface to Bitcoin. For details of how the interface works and how it uses Taproot, see the specs. The package can be re-used by any project that wants to read or write data on Bitcoin.

    Rollkit was built with modularity at its core. It has a data availability interface so that developers can simply implement specific methods to add a new data availability layer. To add a data availability layer, implementers need to satisfy the DataAvailabilityLayerClient interface which defines the behavior of the data availability client, and the BlockRetriever interface which defines how blocks can be synced. These interfaces live in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing the blocks.

    After implementing the Taproot reader/writer interface for Bitcoin (bitcoin-da), adding it as a data availability module for Rollkit took less than a day. We mostly only had to implement the SubmitBlock and RetrieveBlocks functions for Rollkit to call the Read and Write methods in bitcoin-da.

    rollkit-bitcoin-rollup-2

    EVM on Bitcoin demo

    Rollkit supports custom execution layers, including EVM, CosmWasm, or the Cosmos SDK. To test the integration, we used Rollkit to run the EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network. See below for a demo.

    ',21),t("iframe",{title:"Rollkit: Ethermint + Bitcoin DA demo",src:"https://www.youtube.com/embed/qBKFEctzgT0",allowfullscreen:""},null,-1),t("h2",{id:"conclusion",tabindex:"-1"},[i("Conclusion "),t("a",{class:"header-anchor",href:"#conclusion","aria-label":'Permalink to "Conclusion"'},"​")],-1),t("p",null,[i("As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. "),t("a",{href:"https://blog.celestia.org/sovereign-rollup-chains/",target:"_blank",rel:"noreferrer"},"Sovereign rollups"),i(" fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.")],-1),t("p",null,[i("Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around Rollkit and build sovereign rollups on Bitcoin, or customize Rollkit with different execution environments and data availability layers. For details on how to run Rollkit with the Bitcoin data availability module, see the instructions "),t("a",{href:"/docs-preview/pr-528/docs/tutorials/bitcoin"},"here"),i(". Keep in mind that the integration is an early research implementation and it is not yet production-ready!")],-1),t("p",null,"Modularism, not maximalism.",-1)]))}const y=a(d,[["render",h]]);export{w as __pageData,y as default}; diff --git a/pr-528/assets/chunks/@localSearchIndexroot.BvuN70QE.js b/pr-528/assets/chunks/@localSearchIndexroot.BvuN70QE.js new file mode 100644 index 000000000..5bd4b215e --- /dev/null +++ b/pr-528/assets/chunks/@localSearchIndexroot.BvuN70QE.js @@ -0,0 +1 @@ +const e='{"documentCount":391,"nextId":391,"documentIds":{"0":"/docs-preview/pr-528/README#rollkit-documentation-site","1":"/docs-preview/pr-528/README#building-the-site","2":"/docs-preview/pr-528/README#contribution-guidelines","3":"/docs-preview/pr-528/README#directory-structure","4":"/docs-preview/pr-528/README#feedback-suggestions","5":"/docs-preview/pr-528/blog/overview#blog","6":"/docs-preview/pr-528/blog/overview#table-of-contents","7":"/docs-preview/pr-528/blog/rollkit-the-first-sovereign-rollup-framework#rollkit-the-first-sovereign-rollup-framework","8":"/docs-preview/pr-528/blog/rollkit-the-first-sovereign-rollup-framework#take-control","9":"/docs-preview/pr-528/blog/rollkit-the-first-sovereign-rollup-framework#build-with-the-best","10":"/docs-preview/pr-528/blog/rollkit-the-first-sovereign-rollup-framework#optimize-for-your-needs","11":"/docs-preview/pr-528/blog/rollkit-the-first-sovereign-rollup-framework#break-free-be-sovereign","12":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#sovereign-rollups-on-bitcoin-with-rollkit","13":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#tl-dr","14":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#posting-data-on-bitcoin-with-taproot","15":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#integrating-bitcoin-as-a-data-availability-layer-into-rollkit","16":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#how-rollkit-posts-data-to-bitcoin","17":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#evm-on-bitcoin-demo","18":"/docs-preview/pr-528/blog/sovereign-rollups-on-bitcoin#conclusion","19":"/docs-preview/pr-528/guides/block-times#how-to-change-speed-of-block-production","20":"/docs-preview/pr-528/guides/cometbft-to-rollkit#how-to-turn-your-cometbft-app-into-a-rollkit-app","21":"/docs-preview/pr-528/guides/cometbft-to-rollkit#install-rollkit","22":"/docs-preview/pr-528/guides/cometbft-to-rollkit#add-rollkit-features","23":"/docs-preview/pr-528/guides/cometbft-to-rollkit#initialize-rollkit","24":"/docs-preview/pr-528/guides/cometbft-to-rollkit#initialize-rollkit-cli-configuration","25":"/docs-preview/pr-528/guides/cometbft-to-rollkit#start-rollkit-app","26":"/docs-preview/pr-528/guides/cometbft-to-rollkit#summary","27":"/docs-preview/pr-528/guides/create-genesis#how-to-create-a-genesis-for-your-rollup","28":"/docs-preview/pr-528/guides/create-genesis#_0-pre-requisities","29":"/docs-preview/pr-528/guides/create-genesis#_1-setting-variables","30":"/docs-preview/pr-528/guides/create-genesis#_2-rebuild-your-chain","31":"/docs-preview/pr-528/guides/create-genesis#_3-resetting-existing-genesis-chain-data","32":"/docs-preview/pr-528/guides/create-genesis#_4-initializing-the-validator","33":"/docs-preview/pr-528/guides/create-genesis#_5-adding-a-key-to-keyring-backend","34":"/docs-preview/pr-528/guides/create-genesis#_6-adding-a-genesis-account","35":"/docs-preview/pr-528/guides/create-genesis#_7-setting-the-staking-amount-in-the-genesis-transaction","36":"/docs-preview/pr-528/guides/create-genesis#_8-collecting-genesis-transactions","37":"/docs-preview/pr-528/guides/create-genesis#_9-configuring-the-genesis-file","38":"/docs-preview/pr-528/guides/create-genesis#_10-starting-the-chain","39":"/docs-preview/pr-528/guides/create-genesis#summary","40":"/docs-preview/pr-528/guides/cw-orch#speed-up-your-development-with-cw-orchestrator","41":"/docs-preview/pr-528/guides/cw-orch#introduction","42":"/docs-preview/pr-528/guides/cw-orch#summary","43":"/docs-preview/pr-528/guides/cw-orch#single-contract-integration","44":"/docs-preview/pr-528/guides/cw-orch#adding-cw-orch-to-your-cargo-toml-file","45":"/docs-preview/pr-528/guides/cw-orch#creating-an-interface","46":"/docs-preview/pr-528/guides/cw-orch#interaction-helpers","47":"/docs-preview/pr-528/guides/cw-orch#using-the-integration","48":"/docs-preview/pr-528/guides/cw-orch#integration-in-a-workspace","49":"/docs-preview/pr-528/guides/cw-orch#handling-dependencies-and-features","50":"/docs-preview/pr-528/guides/cw-orch#creating-an-interface-crate","51":"/docs-preview/pr-528/guides/cw-orch#integrating-single-contracts","52":"/docs-preview/pr-528/guides/cw-orch#more-examples-and-scripts","53":"/docs-preview/pr-528/guides/full-node#rollup-full-node-setup-guide","54":"/docs-preview/pr-528/guides/full-node#introduction","55":"/docs-preview/pr-528/guides/full-node#prerequisites","56":"/docs-preview/pr-528/guides/full-node#setting-up-your-full-node","57":"/docs-preview/pr-528/guides/full-node#initialize-chain-config-and-copy-genesis-file","58":"/docs-preview/pr-528/guides/full-node#set-up-p2p-connection-to-sequencer-node","59":"/docs-preview/pr-528/guides/full-node#start-the-full-node","60":"/docs-preview/pr-528/guides/full-node#verifying-full-node-operation","61":"/docs-preview/pr-528/guides/full-node#conclusion","62":"/docs-preview/pr-528/guides/da-block-time#how-to-configure-da-chain-block-syncing-time","63":"/docs-preview/pr-528/guides/gas-price#how-to-configure-gas-price","64":"/docs-preview/pr-528/guides/ibc-connection#ibc-connection-tutorial","65":"/docs-preview/pr-528/guides/ibc-connection#prerequisites","66":"/docs-preview/pr-528/guides/ibc-connection#software-requirements","67":"/docs-preview/pr-528/guides/ibc-connection#run-a-gm-rollup-chain","68":"/docs-preview/pr-528/guides/ibc-connection#run-your-local-osmosis-testnet","69":"/docs-preview/pr-528/guides/ibc-connection#install-osmosis-binary","70":"/docs-preview/pr-528/guides/ibc-connection#run-local-osmosis-testnet","71":"/docs-preview/pr-528/guides/ibc-connection#funds","72":"/docs-preview/pr-528/guides/ibc-connection#setup-relayer-create-ibc-connection-and-start-relaying-packets","73":"/docs-preview/pr-528/guides/ibc-connection#install-relayer","74":"/docs-preview/pr-528/guides/ibc-connection#setup-relayer-config","75":"/docs-preview/pr-528/guides/ibc-connection#create-relayer-account","76":"/docs-preview/pr-528/guides/ibc-connection#create-ibc-channel","77":"/docs-preview/pr-528/guides/ibc-connection#start-relaying-packets","78":"/docs-preview/pr-528/guides/ibc-connection#transfer-token-from-rollup-chain-to-osmosis-local","79":"/docs-preview/pr-528/guides/ibc-connection#transfer-token-back-from-osmosis-local-to-rollup-chain","80":"/docs-preview/pr-528/guides/ignite-rollkit#how-to-use-ignite-to-create-a-rollkit-app","81":"/docs-preview/pr-528/guides/ignite-rollkit#install-ignite","82":"/docs-preview/pr-528/guides/ignite-rollkit#install-ignite-app-rollkit","83":"/docs-preview/pr-528/guides/ignite-rollkit#add-rollkit-features","84":"/docs-preview/pr-528/guides/ignite-rollkit#build-your-chain","85":"/docs-preview/pr-528/guides/ignite-rollkit#initialize-your-blockchain","86":"/docs-preview/pr-528/guides/ignite-rollkit#initialize-rollkit-cli-configuration","87":"/docs-preview/pr-528/guides/ignite-rollkit#start-your-chain","88":"/docs-preview/pr-528/guides/ignite-rollkit#summary","89":"/docs-preview/pr-528/guides/lazy-sequencing#how-to-use-lazy-sequencing-aggregation","90":"/docs-preview/pr-528/guides/max-pending-blocks#how-to-configure-the-maximum-number-of-blocks-pending-da-submission","91":"/docs-preview/pr-528/guides/overview#how-to-guides","92":"/docs-preview/pr-528/guides/overview#support","93":"/docs-preview/pr-528/guides/metrics#how-to-configure-metrics","94":"/docs-preview/pr-528/guides/metrics#list-of-available-metrics","95":"/docs-preview/pr-528/guides/metrics#abci","96":"/docs-preview/pr-528/guides/metrics#sequencer","97":"/docs-preview/pr-528/guides/metrics#mempool","98":"/docs-preview/pr-528/guides/metrics#p2p","99":"/docs-preview/pr-528/guides/metrics#state","100":"/docs-preview/pr-528/guides/metrics#centralized-sequencer","101":"/docs-preview/pr-528/guides/reset-state#how-to-reset-the-state-of-your-chain","102":"/docs-preview/pr-528/guides/reset-state#prerequisities","103":"/docs-preview/pr-528/guides/reset-state#quick-start","104":"/docs-preview/pr-528/guides/reset-state#wordle","105":"/docs-preview/pr-528/guides/restart-rollup#🔄-how-to-restart-your-rollup","106":"/docs-preview/pr-528/guides/restart-rollup#restart-rollup","107":"/docs-preview/pr-528/guides/restart-rollup#restart-rollup-after-running-out-of-funds","108":"/docs-preview/pr-528/guides/restart-rollup#errors","109":"/docs-preview/pr-528/guides/restart-rollup#refund-your-account","110":"/docs-preview/pr-528/guides/restart-rollup#stopping-your-rollup","111":"/docs-preview/pr-528/guides/restart-rollup#increase-gas-fee","112":"/docs-preview/pr-528/guides/restart-rollup#restarting-your-rollup","113":"/docs-preview/pr-528/guides/restart-rollup#reduce-gas-fee-restart-again","114":"/docs-preview/pr-528/guides/rollkit-monitoring#how-to-integrate-range-with-your-rollup","115":"/docs-preview/pr-528/guides/rollkit-monitoring#overview","116":"/docs-preview/pr-528/guides/rollkit-monitoring#prerequisites","117":"/docs-preview/pr-528/guides/rollkit-monitoring#_1-integrate-your-rollup","118":"/docs-preview/pr-528/guides/rollkit-monitoring#steps","119":"/docs-preview/pr-528/guides/rollkit-monitoring#_2-add-your-addresses-and-contracts","120":"/docs-preview/pr-528/guides/rollkit-monitoring#_3-creating-your-first-alert-rule","121":"/docs-preview/pr-528/guides/use-rollkit-cli#how-to-use-rollkit-cli","122":"/docs-preview/pr-528/guides/use-rollkit-cli#_1-installing-rollkit-cli","123":"/docs-preview/pr-528/guides/use-rollkit-cli#_2-initializing-rollkit-toml","124":"/docs-preview/pr-528/guides/use-rollkit-cli#steps-to-generate-rollkit-toml","125":"/docs-preview/pr-528/guides/use-rollkit-cli#_3-running-rollup-commands-using-rollkit-cli","126":"/docs-preview/pr-528/guides/use-rollkit-cli#example","127":"/docs-preview/pr-528/guides/use-rollkit-cli#summary","128":"/docs-preview/pr-528/guides/use-tia-for-gas#how-to-use-ibc-token-tia-as-gas-token-in-your-rollup","129":"/docs-preview/pr-528/guides/use-tia-for-gas#introduction","130":"/docs-preview/pr-528/guides/use-tia-for-gas#dependencies","131":"/docs-preview/pr-528/guides/use-tia-for-gas#install-rollkit","132":"/docs-preview/pr-528/guides/use-tia-for-gas#running-local-da","133":"/docs-preview/pr-528/guides/use-tia-for-gas#building-your-sovereign-rollup","134":"/docs-preview/pr-528/guides/use-tia-for-gas#initialize-rollkit-configuration","135":"/docs-preview/pr-528/guides/use-tia-for-gas#start-your-rollup","136":"/docs-preview/pr-528/guides/use-tia-for-gas#ibc-to-celestia","137":"/docs-preview/pr-528/guides/use-tia-for-gas#transactions","138":"/docs-preview/pr-528/guides/use-tia-for-gas#🎉-next-steps","139":"/docs-preview/pr-528/guides/zkml#zkml-rollup-tutorial-with-sindri","140":"/docs-preview/pr-528/guides/zkml#introduction-code-once-verify-anywhere","141":"/docs-preview/pr-528/guides/zkml#prerequisites","142":"/docs-preview/pr-528/guides/zkml#setting-up-the-polaris-evm-using-rollkit","143":"/docs-preview/pr-528/guides/zkml#installing-the-sindri-python-sdk","144":"/docs-preview/pr-528/guides/zkml#deploying-and-proving-a-cool-zkml-circuit-to-sindri","145":"/docs-preview/pr-528/guides/zkml#clone","146":"/docs-preview/pr-528/guides/zkml#modify","147":"/docs-preview/pr-528/guides/zkml#deploy-and-prove-your-zkml-circuit-on-sindri","148":"/docs-preview/pr-528/guides/zkml#deploy-smart-contract-verifier-to-rollkit","149":"/docs-preview/pr-528/guides/zkml#deploy","150":"/docs-preview/pr-528/guides/zkml#interact-with-the-contract-verify-your-zkml-proof-on-chain","151":"/docs-preview/pr-528/guides/zkml#congratulations","152":"/docs-preview/pr-528/learn/about#about-rollkit","153":"/docs-preview/pr-528/learn/about#what-is-rollkit","154":"/docs-preview/pr-528/learn/about#what-problems-is-rollkit-solving","155":"/docs-preview/pr-528/learn/about#_1-scalability-and-customizability","156":"/docs-preview/pr-528/learn/about#_2-security-and-time-to-market","157":"/docs-preview/pr-528/learn/about#why-rollkit","158":"/docs-preview/pr-528/learn/about#how-can-you-use-rollkit","159":"/docs-preview/pr-528/learn/about#rollup-with-any-execution-environment","160":"/docs-preview/pr-528/learn/about#sovereign-rollup-with-cosmos-sdk","161":"/docs-preview/pr-528/learn/about#build-a-settlement-layer","162":"/docs-preview/pr-528/learn/about#when-can-you-use-rollkit","163":"/docs-preview/pr-528/learn/building-and-deploying-a-rollup#🗞️-building-a-rollup-and-testnet-deployment","164":"/docs-preview/pr-528/learn/building-and-deploying-a-rollup#beginner","165":"/docs-preview/pr-528/learn/building-and-deploying-a-rollup#intermediate","166":"/docs-preview/pr-528/learn/building-and-deploying-a-rollup#advanced","167":"/docs-preview/pr-528/learn/building-and-deploying-a-rollup#support","168":"/docs-preview/pr-528/learn/intro#introduction","169":"/docs-preview/pr-528/learn/specifications#technical-specifications","170":"/docs-preview/pr-528/learn/stack#rollkit-stack","171":"/docs-preview/pr-528/learn/stack#application-structure","172":"/docs-preview/pr-528/learn/stack#abci-interface","173":"/docs-preview/pr-528/learn/stack#cosmos-sdk","174":"/docs-preview/pr-528/learn/stack#data-availability","175":"/docs-preview/pr-528/learn/stack#celestia","176":"/docs-preview/pr-528/learn/stack#node-components","177":"/docs-preview/pr-528/learn/stack#mempool","178":"/docs-preview/pr-528/learn/stack#block-manager","179":"/docs-preview/pr-528/learn/stack#rpc","180":"/docs-preview/pr-528/learn/stack#parameters","181":"/docs-preview/pr-528/learn/stack#p2p-layer","182":"/docs-preview/pr-528/learn/stack#rollkit-node-types","183":"/docs-preview/pr-528/learn/stack#full-node","184":"/docs-preview/pr-528/learn/stack#light-node-work-in-progress","185":"/docs-preview/pr-528/learn/stack#sequencer-node","186":"/docs-preview/pr-528/learn/stack#state-validity-modes","187":"/docs-preview/pr-528/learn/stack#pessimistic-full-nodes-only","188":"/docs-preview/pr-528/learn/stack#optimistic-fraud-proofs-work-in-progress","189":"/docs-preview/pr-528/learn/stack#validity-zk-proofs","190":"/docs-preview/pr-528/learn/transaction-flow#transaction-flow","191":"/docs-preview/pr-528/learn/transaction-flow#transaction-submission","192":"/docs-preview/pr-528/learn/transaction-flow#transaction-validation-and-processing","193":"/docs-preview/pr-528/learn/transaction-flow#block-processing","194":"/docs-preview/pr-528/learn/transaction-flow#fraud-proof-gossip-and-forking","195":"/docs-preview/pr-528/testnets/cosmwasm-testnet#cosmwasm-testnet","196":"/docs-preview/pr-528/testnets/cosmwasm-testnet#details-of-rosm-testnet","197":"/docs-preview/pr-528/testnets/cosmwasm-testnet#add-rosm-to-keplr","198":"/docs-preview/pr-528/tutorials/bitcoin#bitcoin-rollup-tutorial","199":"/docs-preview/pr-528/tutorials/bitcoin#☀️introduction","200":"/docs-preview/pr-528/tutorials/bitcoin#📖-the-stack","201":"/docs-preview/pr-528/tutorials/bitcoin#💻-prerequisites","202":"/docs-preview/pr-528/tutorials/bitcoin#🛠️-dependency-setup","203":"/docs-preview/pr-528/tutorials/bitcoin#🏃-golang","204":"/docs-preview/pr-528/tutorials/bitcoin#⚒️-foundry","205":"/docs-preview/pr-528/tutorials/bitcoin#🪙-install-bitcoin","206":"/docs-preview/pr-528/tutorials/bitcoin#🟢-running-a-local-bitcoin-network","207":"/docs-preview/pr-528/tutorials/bitcoin#👛-create-a-wallet-for-the-chain","208":"/docs-preview/pr-528/tutorials/bitcoin#🎬-start-generating-blocks","209":"/docs-preview/pr-528/tutorials/bitcoin#🧊-block-height","210":"/docs-preview/pr-528/tutorials/bitcoin#🧊-block-hash","211":"/docs-preview/pr-528/tutorials/bitcoin#🧊-block-header","212":"/docs-preview/pr-528/tutorials/bitcoin#🎬-restarting-the-local-network","213":"/docs-preview/pr-528/tutorials/bitcoin#🏃‍♀️-running-the-ethermint-rollup","214":"/docs-preview/pr-528/tutorials/bitcoin#⚡️-initialize-development-environment","215":"/docs-preview/pr-528/tutorials/bitcoin#📒-updating-the-contract-and-tests","216":"/docs-preview/pr-528/tutorials/bitcoin#📜-updating-the-deployment-script","217":"/docs-preview/pr-528/tutorials/bitcoin#🏠-deploying-locally","218":"/docs-preview/pr-528/tutorials/bitcoin#🧪-deploying-to-the-ethermint-sovereign-rollup","219":"/docs-preview/pr-528/tutorials/da/avail-da#using-avail-as-da","220":"/docs-preview/pr-528/tutorials/da/avail-da#introduction","221":"/docs-preview/pr-528/tutorials/da/avail-da#🪶-running-an-avail-light-node","222":"/docs-preview/pr-528/tutorials/da/avail-da#🚀-using-turing-testnet","223":"/docs-preview/pr-528/tutorials/da/avail-da#🧹-cleaning-previous-chain-history","224":"/docs-preview/pr-528/tutorials/da/avail-da#🏗️-building-your-rollup","225":"/docs-preview/pr-528/tutorials/da/avail-da#🛠️-configuring-flags-for-da","226":"/docs-preview/pr-528/tutorials/da/avail-da#🔥-running-your-rollup-connected-to-an-avail-light-node","227":"/docs-preview/pr-528/tutorials/da/avail-da#🎉-next-steps","228":"/docs-preview/pr-528/tutorials/da/celestia-da#using-celestia-as-da","229":"/docs-preview/pr-528/tutorials/da/celestia-da#introduction","230":"/docs-preview/pr-528/tutorials/da/celestia-da#🪶-running-a-celestia-light-node","231":"/docs-preview/pr-528/tutorials/da/celestia-da#prerequisites","232":"/docs-preview/pr-528/tutorials/da/celestia-da#🛠️-configuring-flags-for-da","233":"/docs-preview/pr-528/tutorials/da/celestia-da#🔥-running-your-rollup-connected-to-celestia-light-node","234":"/docs-preview/pr-528/tutorials/da/celestia-da#🎉-next-steps","235":"/docs-preview/pr-528/tutorials/da/local-da#using-local-da","236":"/docs-preview/pr-528/tutorials/da/local-da#introduction","237":"/docs-preview/pr-528/tutorials/da/local-da#setting-up-a-local-da-network","238":"/docs-preview/pr-528/tutorials/da/local-da#configuring-your-rollup-to-connect-to-the-local-da-network","239":"/docs-preview/pr-528/tutorials/da/local-da#run-your-rollup","240":"/docs-preview/pr-528/tutorials/da/local-da#summary","241":"/docs-preview/pr-528/tutorials/da/overview#da","242":"/docs-preview/pr-528/tutorials/da/overview#go-da","243":"/docs-preview/pr-528/tutorials/da/overview#mock-da","244":"/docs-preview/pr-528/tutorials/da/overview#da-layers","245":"/docs-preview/pr-528/tutorials/deploy-overview#deploying-your-rollup","246":"/docs-preview/pr-528/tutorials/docker-compose#🐳-docker-compose","247":"/docs-preview/pr-528/tutorials/docker-compose#prerequisites","248":"/docs-preview/pr-528/tutorials/docker-compose#dependencies","249":"/docs-preview/pr-528/tutorials/docker-compose#docker-compose","250":"/docs-preview/pr-528/tutorials/docker-compose#setting-up-your-environment","251":"/docs-preview/pr-528/tutorials/docker-compose#dockerfile","252":"/docs-preview/pr-528/tutorials/docker-compose#docker-compose-file","253":"/docs-preview/pr-528/tutorials/docker-compose#run-wordle-chain","254":"/docs-preview/pr-528/tutorials/docker-compose#interacting-with-the-chain","255":"/docs-preview/pr-528/tutorials/docker-compose#🎉-next-steps","256":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#quick-start-guide-for-artela-evm-with-rollkit","257":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#📦-clone-the-artela-rollkit-repository","258":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#🛥️-run-with-docker-compose","259":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#🔑-get-prefunded-test-accounts","260":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#⚙️-configuring-the-node","261":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#🧪-build-on-evm","262":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#📖-more-to-know","263":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#💥-build-with-examples","264":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#🛑-stopping-the-node","265":"/docs-preview/pr-528/tutorials/execution/artela-evm-plus-plus#🎉-conclusion","266":"/docs-preview/pr-528/tutorials/execution/beaconkit#building-a-sovereign-rollup-with-beaconkit-and-rollkit","267":"/docs-preview/pr-528/tutorials/execution/beaconkit#introduction","268":"/docs-preview/pr-528/tutorials/execution/beaconkit#prerequisites","269":"/docs-preview/pr-528/tutorials/execution/beaconkit#rollkit","270":"/docs-preview/pr-528/tutorials/execution/beaconkit#docker","271":"/docs-preview/pr-528/tutorials/execution/beaconkit#run-local-da-node","272":"/docs-preview/pr-528/tutorials/execution/beaconkit#clone-the-repo","273":"/docs-preview/pr-528/tutorials/execution/beaconkit#start-go-ethereum-client","274":"/docs-preview/pr-528/tutorials/execution/beaconkit#build-and-run-beaconkit-node","275":"/docs-preview/pr-528/tutorials/execution/beaconkit#smart-contract-deployment-and-interaction","276":"/docs-preview/pr-528/tutorials/execution/beaconkit#conclusion","277":"/docs-preview/pr-528/tutorials/execution/beaconkit#next-steps","278":"/docs-preview/pr-528/tutorials/execution/beaconkit#troubleshooting","279":"/docs-preview/pr-528/tutorials/execution/cosmwasm#🗞️-cosmwasm-rollup","280":"/docs-preview/pr-528/tutorials/execution/cosmwasm#dependencies","281":"/docs-preview/pr-528/tutorials/execution/cosmwasm#start-your-rollup","282":"/docs-preview/pr-528/tutorials/execution/cosmwasm#contract-deployment-on-cosmwasm","283":"/docs-preview/pr-528/tutorials/execution/cosmwasm#compile-smart-contract","284":"/docs-preview/pr-528/tutorials/execution/cosmwasm#optimized-smart-contract","285":"/docs-preview/pr-528/tutorials/execution/cosmwasm#contract-deployment","286":"/docs-preview/pr-528/tutorials/execution/cosmwasm#contract-interaction-on-local-da","287":"/docs-preview/pr-528/tutorials/execution/cosmwasm#contract-querying","288":"/docs-preview/pr-528/tutorials/execution/cosmwasm#contract-instantiation","289":"/docs-preview/pr-528/tutorials/execution/cosmwasm#contract-interaction","290":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#smart-contract-interaction-on-evm-rollup","291":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#install-foundry","292":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#funds","293":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#frontend","294":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#deploy-the-ooga-booga-portal-contract","295":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#interact-with-the-contract","296":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#start-and-update-the-frontend","297":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#interact-with-the-frontend","298":"/docs-preview/pr-528/tutorials/execution/evm-contract-interaction#conclusion","299":"/docs-preview/pr-528/tutorials/execution/octane-evm#quick-start-guide-for-omni-octane-with-rollkit","300":"/docs-preview/pr-528/tutorials/execution/octane-evm#📦-clone-the-omni-repository","301":"/docs-preview/pr-528/tutorials/execution/octane-evm#🏗️-build-docker-images","302":"/docs-preview/pr-528/tutorials/execution/octane-evm#🚀-deploy-omni-with-rollkit-and-local-da","303":"/docs-preview/pr-528/tutorials/execution/octane-evm#🧪-smart-contract-deployment-and-interaction","304":"/docs-preview/pr-528/tutorials/execution/octane-evm#🛑-stopping-the-node","305":"/docs-preview/pr-528/tutorials/execution/octane-evm#🎉-conclusion","306":"/docs-preview/pr-528/tutorials/execution/polaris-evm#polaris-evm-and-rollkit","307":"/docs-preview/pr-528/tutorials/execution/polaris-evm#prerequisites","308":"/docs-preview/pr-528/tutorials/execution/polaris-evm#run-a-local-celestia-devnet","309":"/docs-preview/pr-528/tutorials/execution/polaris-evm#clone-the-repo","310":"/docs-preview/pr-528/tutorials/execution/polaris-evm#install-foundry","311":"/docs-preview/pr-528/tutorials/execution/polaris-evm#start-the-polaris-evm-using-rollkit","312":"/docs-preview/pr-528/tutorials/execution/polaris-evm#congratulations","313":"/docs-preview/pr-528/tutorials/execution/polaris-evm#funds","314":"/docs-preview/pr-528/tutorials/execution/polaris-evm#frontend","315":"/docs-preview/pr-528/tutorials/execution/polaris-evm#deploy-the-ooga-booga-portal-contract","316":"/docs-preview/pr-528/tutorials/execution/polaris-evm#interact-with-the-contract","317":"/docs-preview/pr-528/tutorials/execution/polaris-evm#start-and-update-the-frontend","318":"/docs-preview/pr-528/tutorials/execution/polaris-evm#interact-with-the-frontend","319":"/docs-preview/pr-528/tutorials/execution/polaris-evm#running-polaris-evm-with-a-celestia-light-node","320":"/docs-preview/pr-528/tutorials/execution/polaris-evm#start-your-light-node","321":"/docs-preview/pr-528/tutorials/execution/polaris-evm#setup-polaris-script","322":"/docs-preview/pr-528/tutorials/execution/polaris-evm#start-the-evm-rollup","323":"/docs-preview/pr-528/tutorials/gm-world#gm-world-rollup","324":"/docs-preview/pr-528/tutorials/gm-world#introduction","325":"/docs-preview/pr-528/tutorials/gm-world#dependencies","326":"/docs-preview/pr-528/tutorials/gm-world#start-your-rollup","327":"/docs-preview/pr-528/tutorials/gm-world#transactions","328":"/docs-preview/pr-528/tutorials/gm-world#balances","329":"/docs-preview/pr-528/tutorials/gm-world#📦-gm-world-ui-app","330":"/docs-preview/pr-528/tutorials/gm-world#🔗-connecting-your-wallet","331":"/docs-preview/pr-528/tutorials/gm-world#🎉-next-steps","332":"/docs-preview/pr-528/tutorials/kurtosis#🟩-kurtosis","333":"/docs-preview/pr-528/tutorials/kurtosis#prerequisites","334":"/docs-preview/pr-528/tutorials/kurtosis#dependencies","335":"/docs-preview/pr-528/tutorials/kurtosis#kurtosis-cli","336":"/docs-preview/pr-528/tutorials/kurtosis#setting-up-your-environment","337":"/docs-preview/pr-528/tutorials/kurtosis#dockerfile","338":"/docs-preview/pr-528/tutorials/kurtosis#kurtosis-init","339":"/docs-preview/pr-528/tutorials/kurtosis#run-wordle-chain","340":"/docs-preview/pr-528/tutorials/kurtosis#interacting-with-the-chain","341":"/docs-preview/pr-528/tutorials/kurtosis#🎉-next-steps","342":"/docs-preview/pr-528/tutorials/quick-start#quick-start-guide","343":"/docs-preview/pr-528/tutorials/quick-start#📦-install-rollkit-cli","344":"/docs-preview/pr-528/tutorials/quick-start#🚀-run-your-sovereign-rollup-node","345":"/docs-preview/pr-528/tutorials/quick-start#🎉-conclusion","346":"/docs-preview/pr-528/tutorials/sequencing/astria#astria-sequencing","347":"/docs-preview/pr-528/tutorials/sequencing/based#based-sequencing","348":"/docs-preview/pr-528/tutorials/sequencing/centralized#centralized-sequencer","349":"/docs-preview/pr-528/tutorials/sequencing/centralized#prerequisites","350":"/docs-preview/pr-528/tutorials/sequencing/centralized#installation-centralized-sequencer","351":"/docs-preview/pr-528/tutorials/sequencing/centralized#run-the-centralized-sequencer","352":"/docs-preview/pr-528/tutorials/sequencing/centralized#run-your-chain","353":"/docs-preview/pr-528/tutorials/sequencing/centralized#metrics","354":"/docs-preview/pr-528/tutorials/sequencing/centralized#summary","355":"/docs-preview/pr-528/tutorials/sequencing/forced-inclusion#forced-inclusion","356":"/docs-preview/pr-528/tutorials/sequencing/local#local-sequencer","357":"/docs-preview/pr-528/tutorials/sequencing/local#introduction","358":"/docs-preview/pr-528/tutorials/sequencing/local#setting-up-a-local-local-sequencer","359":"/docs-preview/pr-528/tutorials/sequencing/local#configuring-your-chain-to-connect-to-the-local-sequencer","360":"/docs-preview/pr-528/tutorials/sequencing/local#run-your-chain","361":"/docs-preview/pr-528/tutorials/sequencing/local#summary","362":"/docs-preview/pr-528/tutorials/sequencing/overview#sequencing","363":"/docs-preview/pr-528/tutorials/sequencing/overview#rollkit-prior-to-sequencing","364":"/docs-preview/pr-528/tutorials/sequencing/overview#sequencing-interface","365":"/docs-preview/pr-528/tutorials/sequencing/overview#mock-sequencer","366":"/docs-preview/pr-528/tutorials/sequencing/overview#sequencing-implementations","367":"/docs-preview/pr-528/tutorials/wordle#🕹️-wordle-app","368":"/docs-preview/pr-528/tutorials/wordle#prerequisites","369":"/docs-preview/pr-528/tutorials/wordle#design-implementation","370":"/docs-preview/pr-528/tutorials/wordle#ignite-scaffold-wordle-chain","371":"/docs-preview/pr-528/tutorials/wordle#ignite","372":"/docs-preview/pr-528/tutorials/wordle#scaffolding-wordle-chain","373":"/docs-preview/pr-528/tutorials/wordle#wordle-directory","374":"/docs-preview/pr-528/tutorials/wordle#setting-up-rollkit","375":"/docs-preview/pr-528/tutorials/wordle#installing-rollkit","376":"/docs-preview/pr-528/tutorials/wordle#creating-wordle-module","377":"/docs-preview/pr-528/tutorials/wordle#scaffolding-a-module","378":"/docs-preview/pr-528/tutorials/wordle#messages","379":"/docs-preview/pr-528/tutorials/wordle#scaffolding-a-message","380":"/docs-preview/pr-528/tutorials/wordle#wordle-types","381":"/docs-preview/pr-528/tutorials/wordle#scaffolding-wordle-types","382":"/docs-preview/pr-528/tutorials/wordle#keeper-functions","383":"/docs-preview/pr-528/tutorials/wordle#submitwordle-function","384":"/docs-preview/pr-528/tutorials/wordle#submitguess-function","385":"/docs-preview/pr-528/tutorials/wordle#protobuf-file","386":"/docs-preview/pr-528/tutorials/wordle#⛓️-run-the-wordle-chain","387":"/docs-preview/pr-528/tutorials/wordle#build-and-run-wordle-chain","388":"/docs-preview/pr-528/tutorials/wordle#interacting-with-the-chain","389":"/docs-preview/pr-528/tutorials/wordle#extending-in-the-future","390":"/docs-preview/pr-528/tutorials/wordle#🎉-next-steps"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[3,1,24],"1":[3,3,20],"2":[2,3,69],"3":[2,3,41],"4":[3,3,25],"5":[1,1,22],"6":[3,1,17],"7":[6,1,171],"8":[2,6,172],"9":[4,6,110],"10":[4,6,114],"11":[5,6,27],"12":[6,1,79],"13":[2,6,43],"14":[6,6,129],"15":[9,6,46],"16":[6,6,110],"17":[4,6,34],"18":[1,6,90],"19":[7,1,83],"20":[9,1,37],"21":[2,9,30],"22":[7,9,22],"23":[2,9,20],"24":[4,9,41],"25":[4,9,27],"26":[1,9,32],"27":[8,1,27],"28":[3,8,40],"29":[3,8,31],"30":[4,8,65],"31":[6,8,21],"32":[4,8,15],"33":[7,8,14],"34":[5,8,19],"35":[8,8,21],"36":[4,8,8],"37":[5,8,40],"38":[4,8,21],"39":[1,8,46],"40":[7,1,1],"41":[1,7,129],"42":[1,7,42],"43":[3,7,27],"44":[8,10,41],"45":[3,10,124],"46":[2,10,114],"47":[3,10,119],"48":[4,7,36],"49":[4,11,51],"50":[4,11,79],"51":[3,11,16],"52":[4,7,42],"53":[5,1,1],"54":[1,5,33],"55":[1,5,29],"56":[5,5,1],"57":[7,8,52],"58":[7,8,36],"59":[4,8,93],"60":[4,5,74],"61":[1,5,14],"62":[8,1,41],"63":[5,1,91],"64":[3,1,73],"65":[3,3,1],"66":[2,6,15],"67":[5,3,104],"68":[5,3,1],"69":[3,8,17],"70":[4,8,76],"71":[1,3,33],"72":[9,3,72],"73":[2,10,38],"74":[3,10,106],"75":[3,10,47],"76":[3,10,168],"77":[3,10,25],"78":[8,10,104],"79":[9,10,79],"80":[8,1,17],"81":[2,8,52],"82":[4,8,39],"83":[3,8,15],"84":[3,8,10],"85":[3,8,22],"86":[4,11,30],"87":[3,8,41],"88":[1,8,28],"89":[7,1,81],"90":[11,1,36],"91":[3,1,107],"92":[2,3,30],"93":[4,1,53],"94":[4,4,10],"95":[1,7,19],"96":[1,7,27],"97":[1,7,34],"98":[1,7,47],"99":[1,7,30],"100":[2,4,15],"101":[8,1,44],"102":[1,8,21],"103":[2,8,61],"104":[1,8,96],"105":[6,1,12],"106":[2,6,100],"107":[7,6,104],"108":[5,12,48],"109":[5,12,43],"110":[4,12,18],"111":[5,12,29],"112":[4,12,7],"113":[7,12,41],"114":[7,1,27],"115":[1,7,37],"116":[1,7,22],"117":[4,8,17],"118":[1,12,48],"119":[6,8,44],"120":[6,8,76],"121":[5,1,30],"122":[4,5,26],"123":[4,5,27],"124":[6,9,72],"125":[7,5,26],"126":[2,10,23],"127":[1,5,29],"128":[11,1,1],"129":[2,11,75],"130":[2,11,35],"131":[5,11,38],"132":[6,11,45],"133":[5,11,96],"134":[5,11,28],"135":[4,11,172],"136":[8,11,228],"137":[2,11,56],"138":[3,11,20],"139":[5,1,1],"140":[5,5,81],"141":[1,5,29],"142":[7,6,22],"143":[5,6,48],"144":[9,5,32],"145":[1,12,56],"146":[1,12,88],"147":[8,12,89],"148":[6,5,39],"149":[1,11,156],"150":[10,5,119],"151":[1,5,41],"152":[2,1,61],"153":[4,2,88],"154":[6,2,1],"155":[4,7,38],"156":[6,7,102],"157":[3,2,181],"158":[6,2,24],"159":[5,7,37],"160":[5,7,48],"161":[4,7,47],"162":[6,2,76],"163":[7,1,41],"164":[2,7,6],"165":[2,7,5],"166":[2,7,7],"167":[2,7,73],"168":[1,1,40],"169":[2,1,38],"170":[2,1,61],"171":[2,2,2],"172":[2,4,37],"173":[2,6,65],"174":[2,4,77],"175":[1,6,45],"176":[2,2,1],"177":[1,4,43],"178":[2,4,82],"179":[1,4,67],"180":[1,5,23],"181":[2,4,68],"182":[3,2,9],"183":[2,4,24],"184":[6,4,45],"185":[2,4,107],"186":[3,2,1],"187":[5,5,38],"188":[7,5,114],"189":[4,5,12],"190":[2,1,41],"191":[2,2,2],"192":[4,2,2],"193":[2,2,2],"194":[5,2,125],"195":[2,1,18],"196":[4,2,147],"197":[4,6,18],"198":[3,1,1],"199":[1,3,78],"200":[3,4,63],"201":[2,3,16],"202":[3,3,50],"203":[2,6,85],"204":[2,6,24],"205":[3,6,30],"206":[6,3,19],"207":[7,8,30],"208":[4,8,88],"209":[3,12,32],"210":[3,12,28],"211":[3,12,30],"212":[5,12,28],"213":[5,3,84],"214":[4,7,52],"215":[6,7,147],"216":[5,7,68],"217":[3,7,100],"218":[7,7,108],"219":[4,1,1],"220":[2,4,88],"221":[6,4,29],"222":[4,9,94],"223":[5,4,28],"224":[4,4,35],"225":[5,4,125],"226":[10,4,74],"227":[3,4,28],"228":[4,1,1],"229":[2,4,52],"230":[6,4,66],"231":[2,4,9],"232":[5,4,159],"233":[9,4,63],"234":[3,4,27],"235":[3,1,1],"236":[1,3,35],"237":[6,3,40],"238":[9,3,19],"239":[3,3,52],"240":[1,3,32],"241":[1,1,57],"242":[2,1,67],"243":[2,1,79],"244":[2,1,28],"245":[3,1,96],"246":[3,1,23],"247":[3,3,14],"248":[2,3,1],"249":[3,5,24],"250":[5,3,43],"251":[2,8,177],"252":[4,8,99],"253":[4,8,27],"254":[5,3,104],"255":[3,3,23],"256":[8,1,76],"257":[6,8,18],"258":[5,8,89],"259":[5,8,64],"260":[4,8,56],"261":[4,8,134],"262":[4,11,38],"263":[4,11,62],"264":[4,8,22],"265":[2,8,32],"266":[8,1,3],"267":[1,8,42],"268":[1,8,13],"269":[1,9,37],"270":[1,9,17],"271":[7,8,37],"272":[4,8,24],"273":[6,8,45],"274":[6,8,167],"275":[5,8,64],"276":[1,8,26],"277":[2,8,29],"278":[1,8,50],"279":[3,1,56],"280":[3,3,41],"281":[4,3,276],"282":[7,3,1],"283":[5,9,53],"284":[4,9,75],"285":[3,9,122],"286":[5,3,41],"287":[3,7,75],"288":[3,7,67],"289":[3,7,166],"290":[6,1,35],"291":[2,6,17],"292":[1,6,30],"293":[1,6,30],"294":[6,7,112],"295":[4,7,31],"296":[5,7,56],"297":[4,7,72],"298":[1,7,24],"299":[8,1,20],"300":[5,8,20],"301":[4,8,83],"302":[8,8,62],"303":[6,8,54],"304":[4,8,26],"305":[2,8,26],"306":[4,1,81],"307":[1,4,28],"308":[5,4,36],"309":[3,4,25],"310":[2,4,9],"311":[6,4,15],"312":[1,4,68],"313":[1,4,44],"314":[1,4,41],"315":[6,5,108],"316":[4,5,31],"317":[5,5,56],"318":[4,5,72],"319":[8,4,83],"320":[4,10,108],"321":[3,10,74],"322":[4,10,41],"323":[3,1,1],"324":[2,3,65],"325":[2,3,44],"326":[4,3,341],"327":[2,3,157],"328":[3,3,36],"329":[5,3,43],"330":[4,3,62],"331":[3,3,37],"332":[2,1,51],"333":[3,2,14],"334":[2,2,1],"335":[3,4,28],"336":[5,2,53],"337":[2,7,75],"338":[2,7,123],"339":[4,7,158],"340":[5,2,205],"341":[3,2,23],"342":[3,1,19],"343":[5,3,38],"344":[6,3,69],"345":[2,3,39],"346":[2,1,8],"347":[2,1,8],"348":[2,1,52],"349":[1,2,66],"350":[4,2,95],"351":[4,2,41],"352":[3,2,92],"353":[1,2,58],"354":[1,2,25],"355":[2,1,3],"356":[2,1,1],"357":[1,2,35],"358":[5,2,47],"359":[8,2,25],"360":[3,2,54],"361":[1,2,25],"362":[1,1,14],"363":[4,1,58],"364":[2,1,51],"365":[2,1,69],"366":[2,1,90],"367":[3,1,47],"368":[3,3,70],"369":[3,3,110],"370":[7,3,1],"371":[2,10,103],"372":[5,10,96],"373":[3,10,114],"374":[4,3,16],"375":[3,7,25],"376":[5,3,55],"377":[4,8,71],"378":[2,3,73],"379":[4,5,33],"380":[3,3,15],"381":[4,5,49],"382":[3,3,62],"383":[3,6,216],"384":[3,6,285],"385":[3,6,92],"386":[5,3,1],"387":[6,8,72],"388":[5,8,256],"389":[5,8,80],"390":[3,3,23]},"averageFieldLength":[3.767263427109975,5.414322250639384,54.43478260869565],"storedFields":{"0":{"title":"Rollkit Documentation Site","titles":[]},"1":{"title":"Building the site","titles":["Rollkit Documentation Site"]},"2":{"title":"Contribution Guidelines","titles":["Rollkit Documentation Site"]},"3":{"title":"Directory Structure","titles":["Rollkit Documentation Site"]},"4":{"title":"Feedback & Suggestions","titles":["Rollkit Documentation Site"]},"5":{"title":"Blog","titles":[]},"6":{"title":"Table of contents","titles":["Blog"]},"7":{"title":"Rollkit: The First Sovereign Rollup Framework","titles":[]},"8":{"title":"Take Control","titles":["Rollkit: The First Sovereign Rollup Framework"]},"9":{"title":"Build with the Best","titles":["Rollkit: The First Sovereign Rollup Framework"]},"10":{"title":"Optimize for your needs","titles":["Rollkit: The First Sovereign Rollup Framework"]},"11":{"title":"Break Free. Be Sovereign.","titles":["Rollkit: The First Sovereign Rollup Framework"]},"12":{"title":"Sovereign rollups on Bitcoin with Rollkit","titles":[]},"13":{"title":"Tl;dr","titles":["Sovereign rollups on Bitcoin with Rollkit"]},"14":{"title":"Posting data on Bitcoin with Taproot","titles":["Sovereign rollups on Bitcoin with Rollkit"]},"15":{"title":"Integrating Bitcoin as a data availability layer into Rollkit","titles":["Sovereign rollups on Bitcoin with Rollkit"]},"16":{"title":"How Rollkit posts data to Bitcoin","titles":["Sovereign rollups on Bitcoin with Rollkit"]},"17":{"title":"EVM on Bitcoin demo","titles":["Sovereign rollups on Bitcoin with Rollkit"]},"18":{"title":"Conclusion","titles":["Sovereign rollups on Bitcoin with Rollkit"]},"19":{"title":"How to change speed of block production","titles":[]},"20":{"title":"How to Turn Your CometBFT App into a Rollkit App","titles":[]},"21":{"title":"Install Rollkit","titles":["How to Turn Your CometBFT App into a Rollkit App"]},"22":{"title":"Add Rollkit Features to Your CometBFT App","titles":["How to Turn Your CometBFT App into a Rollkit App"]},"23":{"title":"Initialize Rollkit","titles":["How to Turn Your CometBFT App into a Rollkit App"]},"24":{"title":"Initialize Rollkit CLI Configuration","titles":["How to Turn Your CometBFT App into a Rollkit App"]},"25":{"title":"Start Your Rollkit App","titles":["How to Turn Your CometBFT App into a Rollkit App"]},"26":{"title":"Summary","titles":["How to Turn Your CometBFT App into a Rollkit App"]},"27":{"title":"How to create a genesis for your rollup","titles":[]},"28":{"title":"0. Pre-requisities","titles":["How to create a genesis for your rollup"]},"29":{"title":"1. Setting variables","titles":["How to create a genesis for your rollup"]},"30":{"title":"2. Rebuild your chain","titles":["How to create a genesis for your rollup"]},"31":{"title":"3. Resetting existing genesis/chain data","titles":["How to create a genesis for your rollup"]},"32":{"title":"4. Initializing the validator","titles":["How to create a genesis for your rollup"]},"33":{"title":"5. Adding a key to keyring backend","titles":["How to create a genesis for your rollup"]},"34":{"title":"6. Adding a genesis account","titles":["How to create a genesis for your rollup"]},"35":{"title":"7. Setting the staking amount in the genesis transaction","titles":["How to create a genesis for your rollup"]},"36":{"title":"8. Collecting genesis transactions","titles":["How to create a genesis for your rollup"]},"37":{"title":"9. Configuring the genesis file","titles":["How to create a genesis for your rollup"]},"38":{"title":"10. Starting the chain","titles":["How to create a genesis for your rollup"]},"39":{"title":"Summary","titles":["How to create a genesis for your rollup"]},"40":{"title":"Speed up your development with cw-orchestrator","titles":[]},"41":{"title":"Introduction","titles":["Speed up your development with cw-orchestrator"]},"42":{"title":"Summary","titles":["Speed up your development with cw-orchestrator"]},"43":{"title":"Single Contract Integration","titles":["Speed up your development with cw-orchestrator"]},"44":{"title":"Adding cw-orch to your Cargo.toml file","titles":["Speed up your development with cw-orchestrator","Single Contract Integration"]},"45":{"title":"Creating an Interface","titles":["Speed up your development with cw-orchestrator","Single Contract Integration"]},"46":{"title":"Interaction helpers","titles":["Speed up your development with cw-orchestrator","Single Contract Integration"]},"47":{"title":"Using the integration","titles":["Speed up your development with cw-orchestrator","Single Contract Integration"]},"48":{"title":"Integration in a workspace","titles":["Speed up your development with cw-orchestrator"]},"49":{"title":"Handling dependencies and features","titles":["Speed up your development with cw-orchestrator","Integration in a workspace"]},"50":{"title":"Creating an interface crate","titles":["Speed up your development with cw-orchestrator","Integration in a workspace"]},"51":{"title":"Integrating single contracts","titles":["Speed up your development with cw-orchestrator","Integration in a workspace"]},"52":{"title":"More examples and scripts","titles":["Speed up your development with cw-orchestrator"]},"53":{"title":"Rollup Full Node Setup Guide","titles":[]},"54":{"title":"Introduction","titles":["Rollup Full Node Setup Guide"]},"55":{"title":"Prerequisites","titles":["Rollup Full Node Setup Guide"]},"56":{"title":"Setting Up Your Full Node","titles":["Rollup Full Node Setup Guide"]},"57":{"title":"Initialize Chain Config and Copy Genesis File","titles":["Rollup Full Node Setup Guide","Setting Up Your Full Node"]},"58":{"title":"Set Up P2P Connection to Sequencer Node","titles":["Rollup Full Node Setup Guide","Setting Up Your Full Node"]},"59":{"title":"Start the Full Node","titles":["Rollup Full Node Setup Guide","Setting Up Your Full Node"]},"60":{"title":"Verifying Full Node Operation","titles":["Rollup Full Node Setup Guide"]},"61":{"title":"Conclusion","titles":["Rollup Full Node Setup Guide"]},"62":{"title":"How to configure DA chain block syncing time","titles":[]},"63":{"title":"How to configure gas price","titles":[]},"64":{"title":"IBC connection tutorial","titles":[]},"65":{"title":"💻 Pre-requisites","titles":["IBC connection tutorial"]},"66":{"title":"Software requirements","titles":["IBC connection tutorial","💻 Pre-requisites"]},"67":{"title":"Run a GM rollup chain","titles":["IBC connection tutorial"]},"68":{"title":"Run your local-osmosis-testnet","titles":["IBC connection tutorial"]},"69":{"title":"Install Osmosis binary","titles":["IBC connection tutorial","Run your local-osmosis-testnet"]},"70":{"title":"Run local-osmosis-testnet","titles":["IBC connection tutorial","Run your local-osmosis-testnet"]},"71":{"title":"Funds","titles":["IBC connection tutorial"]},"72":{"title":"Setup relayer, create IBC connection and start relaying packets","titles":["IBC connection tutorial"]},"73":{"title":"Install relayer","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"74":{"title":"Setup relayer config","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"75":{"title":"Create relayer account","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"76":{"title":"Create IBC channel","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"77":{"title":"Start relaying packets","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"78":{"title":"Transfer token from rollup chain to osmosis-local","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"79":{"title":"Transfer token back from osmosis-local to rollup chain","titles":["IBC connection tutorial","Setup relayer, create IBC connection and start relaying packets"]},"80":{"title":"How to Use Ignite to Create a Rollkit App","titles":[]},"81":{"title":"Install Ignite","titles":["How to Use Ignite to Create a Rollkit App"]},"82":{"title":"Install Ignite App Rollkit","titles":["How to Use Ignite to Create a Rollkit App"]},"83":{"title":"Add Rollkit Features","titles":["How to Use Ignite to Create a Rollkit App"]},"84":{"title":"Build your chain","titles":["How to Use Ignite to Create a Rollkit App"]},"85":{"title":"Initialize Your Blockchain","titles":["How to Use Ignite to Create a Rollkit App"]},"86":{"title":"Initialize Rollkit CLI Configuration","titles":["How to Use Ignite to Create a Rollkit App","Initialize Your Blockchain"]},"87":{"title":"Start your chain","titles":["How to Use Ignite to Create a Rollkit App"]},"88":{"title":"Summary","titles":["How to Use Ignite to Create a Rollkit App"]},"89":{"title":"How to Use Lazy Sequencing (Aggregation)","titles":[]},"90":{"title":"How to configure the maximum number of blocks pending DA submission","titles":[]},"91":{"title":"How To Guides","titles":[]},"92":{"title":"💻 Support","titles":["How To Guides"]},"93":{"title":"How to configure metrics","titles":[]},"94":{"title":"List of available metrics","titles":["How to configure metrics"]},"95":{"title":"ABCI","titles":["How to configure metrics","List of available metrics"]},"96":{"title":"sequencer","titles":["How to configure metrics","List of available metrics"]},"97":{"title":"mempool","titles":["How to configure metrics","List of available metrics"]},"98":{"title":"p2p","titles":["How to configure metrics","List of available metrics"]},"99":{"title":"state","titles":["How to configure metrics","List of available metrics"]},"100":{"title":"centralized-sequencer","titles":["How to configure metrics"]},"101":{"title":"How to reset the state of your chain","titles":[]},"102":{"title":"Prerequisities","titles":["How to reset the state of your chain"]},"103":{"title":"Quick Start","titles":["How to reset the state of your chain"]},"104":{"title":"Wordle","titles":["How to reset the state of your chain"]},"105":{"title":"🔄 How to restart your rollup","titles":[]},"106":{"title":"Restart rollup","titles":["🔄 How to restart your rollup"]},"107":{"title":"Restart rollup after running out of funds","titles":["🔄 How to restart your rollup"]},"108":{"title":"🟠 Errors in this example","titles":["🔄 How to restart your rollup","Restart rollup after running out of funds"]},"109":{"title":"💰 Re-fund your account","titles":["🔄 How to restart your rollup","Restart rollup after running out of funds"]},"110":{"title":"🛑 Stopping your rollup","titles":["🔄 How to restart your rollup","Restart rollup after running out of funds"]},"111":{"title":"⛽ Increase the gas fee","titles":["🔄 How to restart your rollup","Restart rollup after running out of funds"]},"112":{"title":"🔁 Restarting your rollup","titles":["🔄 How to restart your rollup","Restart rollup after running out of funds"]},"113":{"title":"🛢️ Reduce gas fee & restart again","titles":["🔄 How to restart your rollup","Restart rollup after running out of funds"]},"114":{"title":"How to integrate Range with your rollup","titles":[]},"115":{"title":"Overview","titles":["How to integrate Range with your rollup"]},"116":{"title":"Prerequisites","titles":["How to integrate Range with your rollup"]},"117":{"title":"1. Integrate Your Rollup","titles":["How to integrate Range with your rollup","Prerequisites"]},"118":{"title":"Steps","titles":["How to integrate Range with your rollup","Prerequisites","1. Integrate Your Rollup"]},"119":{"title":"2. Add Your Addresses and Contracts","titles":["How to integrate Range with your rollup","Prerequisites"]},"120":{"title":"3. Creating Your First Alert Rule","titles":["How to integrate Range with your rollup","Prerequisites"]},"121":{"title":"How to Use Rollkit CLI","titles":[]},"122":{"title":"1. Installing Rollkit CLI","titles":["How to Use Rollkit CLI"]},"123":{"title":"2. Initializing rollkit.toml","titles":["How to Use Rollkit CLI"]},"124":{"title":"Steps to Generate rollkit.toml:","titles":["How to Use Rollkit CLI","2. Initializing rollkit.toml"]},"125":{"title":"3. Running Rollup Commands Using Rollkit CLI","titles":["How to Use Rollkit CLI"]},"126":{"title":"Example:","titles":["How to Use Rollkit CLI","3. Running Rollup Commands Using Rollkit CLI"]},"127":{"title":"Summary","titles":["How to Use Rollkit CLI"]},"128":{"title":"How to use IBC token (TIA) as gas token in your rollup","titles":[]},"129":{"title":"🌞 Introduction","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"130":{"title":"🛠️ Dependencies","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"131":{"title":"📦 Install Rollkit (CLI)","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"132":{"title":"🌐 Running a Local DA Network","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"133":{"title":"🏗️ Building Your Sovereign Rollup","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"134":{"title":"🛠️ Initialize Rollkit TOML Configuration","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"135":{"title":"🚀 Starting your rollup","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"136":{"title":"✨ Connecting to Celestia Mocha testnet using IBC","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"137":{"title":"💸 Transactions","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"138":{"title":"🎉 Next steps","titles":["How to use IBC token (TIA) as gas token in your rollup"]},"139":{"title":"zkML Rollup Tutorial with Sindri","titles":[]},"140":{"title":"Introduction - Code Once, Verify Anywhere","titles":["zkML Rollup Tutorial with Sindri"]},"141":{"title":"Prerequisites","titles":["zkML Rollup Tutorial with Sindri"]},"142":{"title":"Setting Up the Polaris EVM using Rollkit","titles":["zkML Rollup Tutorial with Sindri","Prerequisites"]},"143":{"title":"Installing the Sindri Python SDK","titles":["zkML Rollup Tutorial with Sindri","Prerequisites"]},"144":{"title":"Deploying and Proving a Cool zkML Circuit to Sindri","titles":["zkML Rollup Tutorial with Sindri"]},"145":{"title":"Clone","titles":["zkML Rollup Tutorial with Sindri","Deploying and Proving a Cool zkML Circuit to Sindri"]},"146":{"title":"Modify","titles":["zkML Rollup Tutorial with Sindri","Deploying and Proving a Cool zkML Circuit to Sindri"]},"147":{"title":"Deploy and Prove your zkML Circuit on Sindri","titles":["zkML Rollup Tutorial with Sindri","Deploying and Proving a Cool zkML Circuit to Sindri"]},"148":{"title":"Deploy Smart Contract Verifier to Rollkit","titles":["zkML Rollup Tutorial with Sindri"]},"149":{"title":"Deploy","titles":["zkML Rollup Tutorial with Sindri","Deploy Smart Contract Verifier to Rollkit"]},"150":{"title":"Interact with the Contract - Verify your zkML Proof On-Chain","titles":["zkML Rollup Tutorial with Sindri"]},"151":{"title":"Congratulations","titles":["zkML Rollup Tutorial with Sindri"]},"152":{"title":"About Rollkit","titles":[]},"153":{"title":"What is Rollkit?","titles":["About Rollkit"]},"154":{"title":"What problems is Rollkit solving?","titles":["About Rollkit"]},"155":{"title":"1. Scalability and customizability","titles":["About Rollkit","What problems is Rollkit solving?"]},"156":{"title":"2. Security and time to market","titles":["About Rollkit","What problems is Rollkit solving?"]},"157":{"title":"Why Rollkit?","titles":["About Rollkit"]},"158":{"title":"How can you use Rollkit?","titles":["About Rollkit"]},"159":{"title":"Rollup with any execution environment","titles":["About Rollkit","How can you use Rollkit?"]},"160":{"title":"Sovereign rollup with Cosmos SDK","titles":["About Rollkit","How can you use Rollkit?"]},"161":{"title":"Build a settlement layer","titles":["About Rollkit","How can you use Rollkit?"]},"162":{"title":"When can you use Rollkit?","titles":["About Rollkit"]},"163":{"title":"🗞️ Building a rollup and testnet deployment","titles":[]},"164":{"title":"1. Beginner","titles":["🗞️ Building a rollup and testnet deployment"]},"165":{"title":"2️. Intermediate","titles":["🗞️ Building a rollup and testnet deployment"]},"166":{"title":"3️. Advanced","titles":["🗞️ Building a rollup and testnet deployment"]},"167":{"title":"💻 Support","titles":["🗞️ Building a rollup and testnet deployment"]},"168":{"title":"Introduction","titles":[]},"169":{"title":"Technical specifications","titles":[]},"170":{"title":"Rollkit stack","titles":[]},"171":{"title":"Application structure","titles":["Rollkit stack"]},"172":{"title":"ABCI interface","titles":["Rollkit stack","Application structure"]},"173":{"title":"Cosmos SDK","titles":["Rollkit stack","Application structure","ABCI interface"]},"174":{"title":"Data availability","titles":["Rollkit stack","Application structure"]},"175":{"title":"Celestia","titles":["Rollkit stack","Application structure","Data availability"]},"176":{"title":"Node components","titles":["Rollkit stack"]},"177":{"title":"Mempool","titles":["Rollkit stack","Node components"]},"178":{"title":"Block manager","titles":["Rollkit stack","Node components"]},"179":{"title":"RPC","titles":["Rollkit stack","Node components"]},"180":{"title":"Parameters","titles":["Rollkit stack","Node components","RPC"]},"181":{"title":"P2P layer","titles":["Rollkit stack","Node components"]},"182":{"title":"Rollkit node types","titles":["Rollkit stack"]},"183":{"title":"Full node","titles":["Rollkit stack","Rollkit node types"]},"184":{"title":"Light node (work in progress)","titles":["Rollkit stack","Rollkit node types"]},"185":{"title":"Sequencer node","titles":["Rollkit stack","Rollkit node types"]},"186":{"title":"State validity modes","titles":["Rollkit stack"]},"187":{"title":"Pessimistic (full nodes only)","titles":["Rollkit stack","State validity modes"]},"188":{"title":"Optimistic (fraud proofs) (work in progress)","titles":["Rollkit stack","State validity modes"]},"189":{"title":"Validity (ZK proofs)","titles":["Rollkit stack","State validity modes"]},"190":{"title":"Transaction flow","titles":[]},"191":{"title":"Transaction submission","titles":["Transaction flow"]},"192":{"title":"Transaction validation and processing","titles":["Transaction flow"]},"193":{"title":"Block processing","titles":["Transaction flow"]},"194":{"title":"Fraud proof gossip and forking","titles":["Transaction flow"]},"195":{"title":"CosmWasm Testnet","titles":[]},"196":{"title":"Details of ROSM testnet","titles":["CosmWasm Testnet"]},"197":{"title":"Add Rosm to Keplr","titles":["CosmWasm Testnet","Details of ROSM testnet"]},"198":{"title":"Bitcoin rollup tutorial","titles":[]},"199":{"title":"☀️Introduction","titles":["Bitcoin rollup tutorial"]},"200":{"title":"📖 The stack","titles":["Bitcoin rollup tutorial","☀️Introduction"]},"201":{"title":"💻 Prerequisites","titles":["Bitcoin rollup tutorial"]},"202":{"title":"🛠️ Dependency setup","titles":["Bitcoin rollup tutorial"]},"203":{"title":"🏃 Golang","titles":["Bitcoin rollup tutorial","🛠️ Dependency setup"]},"204":{"title":"⚒️ Foundry","titles":["Bitcoin rollup tutorial","🛠️ Dependency setup"]},"205":{"title":"🪙 Install Bitcoin","titles":["Bitcoin rollup tutorial","🛠️ Dependency setup"]},"206":{"title":"🟢 Running a local Bitcoin network","titles":["Bitcoin rollup tutorial"]},"207":{"title":"👛 Create a wallet for the chain","titles":["Bitcoin rollup tutorial","🟢 Running a local Bitcoin network"]},"208":{"title":"🎬 Start generating blocks","titles":["Bitcoin rollup tutorial","🟢 Running a local Bitcoin network"]},"209":{"title":"🧊 Block height","titles":["Bitcoin rollup tutorial","🟢 Running a local Bitcoin network","🎬 Start generating blocks"]},"210":{"title":"🧊 Block hash","titles":["Bitcoin rollup tutorial","🟢 Running a local Bitcoin network","🎬 Start generating blocks"]},"211":{"title":"🧊 Block header","titles":["Bitcoin rollup tutorial","🟢 Running a local Bitcoin network","🎬 Start generating blocks"]},"212":{"title":"🎬 Restarting the local network","titles":["Bitcoin rollup tutorial","🟢 Running a local Bitcoin network","🎬 Start generating blocks"]},"213":{"title":"🏃‍♀️ Running the Ethermint rollup","titles":["Bitcoin rollup tutorial"]},"214":{"title":"⚡️ Initialize development environment","titles":["Bitcoin rollup tutorial","🏃‍♀️ Running the Ethermint rollup"]},"215":{"title":"📒 Updating the contract and tests","titles":["Bitcoin rollup tutorial","🏃‍♀️ Running the Ethermint rollup"]},"216":{"title":"📜 Updating the deployment script","titles":["Bitcoin rollup tutorial","🏃‍♀️ Running the Ethermint rollup"]},"217":{"title":"🏠 Deploying locally","titles":["Bitcoin rollup tutorial","🏃‍♀️ Running the Ethermint rollup"]},"218":{"title":"🧪 Deploying to the Ethermint sovereign rollup","titles":["Bitcoin rollup tutorial","🏃‍♀️ Running the Ethermint rollup"]},"219":{"title":"Using Avail as DA","titles":[]},"220":{"title":"🌞 Introduction","titles":["Using Avail as DA"]},"221":{"title":"🪶 Running an Avail light node","titles":["Using Avail as DA"]},"222":{"title":"🚀 Using Turing Testnet","titles":["Using Avail as DA","🪶 Running an Avail light node"]},"223":{"title":"🧹 Cleaning previous chain history","titles":["Using Avail as DA"]},"224":{"title":"🏗️ Building your rollup","titles":["Using Avail as DA"]},"225":{"title":"🛠️ Configuring flags for DA","titles":["Using Avail as DA"]},"226":{"title":"🔥 Running your rollup connected to an avail light node","titles":["Using Avail as DA"]},"227":{"title":"🎉 Next steps","titles":["Using Avail as DA"]},"228":{"title":"Using Celestia as DA","titles":[]},"229":{"title":"🌞 Introduction","titles":["Using Celestia as DA"]},"230":{"title":"🪶 Running a Celestia light node","titles":["Using Celestia as DA"]},"231":{"title":"🏗️ Prerequisites","titles":["Using Celestia as DA"]},"232":{"title":"🛠️ Configuring flags for DA","titles":["Using Celestia as DA"]},"233":{"title":"🔥 Running your rollup connected to Celestia light node","titles":["Using Celestia as DA"]},"234":{"title":"🎉 Next steps","titles":["Using Celestia as DA"]},"235":{"title":"Using Local DA","titles":[]},"236":{"title":"Introduction","titles":["Using Local DA"]},"237":{"title":"Setting Up a Local DA Network","titles":["Using Local DA"]},"238":{"title":"Configuring your rollup to connect to the local DA network","titles":["Using Local DA"]},"239":{"title":"Run your rollup","titles":["Using Local DA"]},"240":{"title":"Summary","titles":["Using Local DA"]},"241":{"title":"DA","titles":[]},"242":{"title":"Go DA","titles":["DA"]},"243":{"title":"Mock DA","titles":["DA"]},"244":{"title":"DA Layers","titles":["DA"]},"245":{"title":"Deploying Your Rollup","titles":[]},"246":{"title":"🐳 Docker Compose","titles":[]},"247":{"title":"💻 Pre-requisites","titles":["🐳 Docker Compose"]},"248":{"title":"🛠️ Dependencies","titles":["🐳 Docker Compose"]},"249":{"title":"💻 Docker Compose","titles":["🐳 Docker Compose","🛠️ Dependencies"]},"250":{"title":"🛠️ Setting up your environment","titles":["🐳 Docker Compose"]},"251":{"title":"🐳 Dockerfile","titles":["🐳 Docker Compose","🛠️ Setting up your environment"]},"252":{"title":"🐳 Docker Compose file","titles":["🐳 Docker Compose","🛠️ Setting up your environment"]},"253":{"title":"🚀 Run Wordle chain","titles":["🐳 Docker Compose","🛠️ Setting up your environment"]},"254":{"title":"🚀 Interacting with the chain","titles":["🐳 Docker Compose"]},"255":{"title":"🎉 Next steps","titles":["🐳 Docker Compose"]},"256":{"title":"Quick Start Guide for Artela EVM++ with Rollkit","titles":[]},"257":{"title":"📦 Clone the Artela Rollkit Repository","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"258":{"title":"🛥️ Run with Docker Compose","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"259":{"title":"🔑 Get prefunded test accounts","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"260":{"title":"⚙️ Configuring the Node","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"261":{"title":"🧪 Build on EVM++","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"262":{"title":"📖 More to know","titles":["Quick Start Guide for Artela EVM++ with Rollkit","🧪 Build on EVM++"]},"263":{"title":"💥 Build with examples","titles":["Quick Start Guide for Artela EVM++ with Rollkit","🧪 Build on EVM++"]},"264":{"title":"🛑 Stopping the Node","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"265":{"title":"🎉 Conclusion","titles":["Quick Start Guide for Artela EVM++ with Rollkit"]},"266":{"title":"Building a Sovereign Rollup with BeaconKit and Rollkit","titles":[]},"267":{"title":"Introduction","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"268":{"title":"Prerequisites","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"269":{"title":"Rollkit","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit","Prerequisites"]},"270":{"title":"Docker","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit","Prerequisites"]},"271":{"title":"Run a local Data Availability (DA) node","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"272":{"title":"Clone the BeaconKit repository","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"273":{"title":"Start the Go Ethereum (Geth) client","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"274":{"title":"Build and run the BeaconKit node","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"275":{"title":"Smart Contract Deployment and Interaction","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"276":{"title":"Conclusion","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"277":{"title":"Next Steps","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"278":{"title":"Troubleshooting","titles":["Building a Sovereign Rollup with BeaconKit and Rollkit"]},"279":{"title":"🗞️ CosmWasm rollup","titles":[]},"280":{"title":"💻 CosmWasm dependency","titles":["🗞️ CosmWasm rollup"]},"281":{"title":"🚀 Starting your rollup","titles":["🗞️ CosmWasm rollup"]},"282":{"title":"📒 Contract deployment on CosmWasm with Rollkit","titles":["🗞️ CosmWasm rollup"]},"283":{"title":"🤖 Compile the smart contract","titles":["🗞️ CosmWasm rollup","📒 Contract deployment on CosmWasm with Rollkit"]},"284":{"title":"🏎️ Optimized smart contract","titles":["🗞️ CosmWasm rollup","📒 Contract deployment on CosmWasm with Rollkit"]},"285":{"title":"🚀 Contract deployment","titles":["🗞️ CosmWasm rollup","📒 Contract deployment on CosmWasm with Rollkit"]},"286":{"title":"🌟 Contract interaction on CosmWasm","titles":["🗞️ CosmWasm rollup"]},"287":{"title":"🔎 Contract querying","titles":["🗞️ CosmWasm rollup","🌟 Contract interaction on CosmWasm"]},"288":{"title":"📃 Contract instantiation","titles":["🗞️ CosmWasm rollup","🌟 Contract interaction on CosmWasm"]},"289":{"title":"📄 Contract interaction","titles":["🗞️ CosmWasm rollup","🌟 Contract interaction on CosmWasm"]},"290":{"title":"Smart Contract Interaction on EVM Rollup","titles":[]},"291":{"title":"Install Foundry","titles":["Smart Contract Interaction on EVM Rollup"]},"292":{"title":"Funds","titles":["Smart Contract Interaction on EVM Rollup"]},"293":{"title":"Frontend","titles":["Smart Contract Interaction on EVM Rollup"]},"294":{"title":"Deploy the ooga booga portal contract","titles":["Smart Contract Interaction on EVM Rollup","Frontend"]},"295":{"title":"Interact with the contract","titles":["Smart Contract Interaction on EVM Rollup","Frontend"]},"296":{"title":"Start and update the frontend","titles":["Smart Contract Interaction on EVM Rollup","Frontend"]},"297":{"title":"Interact with the frontend","titles":["Smart Contract Interaction on EVM Rollup","Frontend"]},"298":{"title":"Conclusion","titles":["Smart Contract Interaction on EVM Rollup","Frontend"]},"299":{"title":"Quick start guide for Omni Octane with Rollkit","titles":[]},"300":{"title":"📦 Clone the Omni repository","titles":["Quick start guide for Omni Octane with Rollkit"]},"301":{"title":"🏗️ Build Docker images","titles":["Quick start guide for Omni Octane with Rollkit"]},"302":{"title":"🚀 Deploy Omni with Rollkit and local-DA","titles":["Quick start guide for Omni Octane with Rollkit"]},"303":{"title":"🧪 Smart Contract Deployment and Interaction","titles":["Quick start guide for Omni Octane with Rollkit"]},"304":{"title":"🛑 Stopping the node","titles":["Quick start guide for Omni Octane with Rollkit"]},"305":{"title":"🎉 Conclusion","titles":["Quick start guide for Omni Octane with Rollkit"]},"306":{"title":"Polaris EVM and Rollkit","titles":[]},"307":{"title":"Prerequisites","titles":["Polaris EVM and Rollkit"]},"308":{"title":"Run a local-celestia-devnet","titles":["Polaris EVM and Rollkit"]},"309":{"title":"Clone the repo","titles":["Polaris EVM and Rollkit"]},"310":{"title":"Install Foundry","titles":["Polaris EVM and Rollkit"]},"311":{"title":"Start the Polaris EVM using Rollkit","titles":["Polaris EVM and Rollkit"]},"312":{"title":"Congratulations","titles":["Polaris EVM and Rollkit"]},"313":{"title":"Funds","titles":["Polaris EVM and Rollkit"]},"314":{"title":"Frontend","titles":["Polaris EVM and Rollkit"]},"315":{"title":"Deploy the ooga booga portal contract","titles":["Polaris EVM and Rollkit","Frontend"]},"316":{"title":"Interact with the contract","titles":["Polaris EVM and Rollkit","Frontend"]},"317":{"title":"Start and update the frontend","titles":["Polaris EVM and Rollkit","Frontend"]},"318":{"title":"Interact with the frontend","titles":["Polaris EVM and Rollkit","Frontend"]},"319":{"title":"Running Polaris EVM with a Celestia light node","titles":["Polaris EVM and Rollkit"]},"320":{"title":"Start your light node","titles":["Polaris EVM and Rollkit","Running Polaris EVM with a Celestia light node"]},"321":{"title":"Setup Polaris script","titles":["Polaris EVM and Rollkit","Running Polaris EVM with a Celestia light node"]},"322":{"title":"Start the EVM rollup","titles":["Polaris EVM and Rollkit","Running Polaris EVM with a Celestia light node"]},"323":{"title":"GM world rollup","titles":[]},"324":{"title":"🌞 Introduction","titles":["GM world rollup"]},"325":{"title":"🛠️ Dependencies","titles":["GM world rollup"]},"326":{"title":"🚀 Starting your rollup","titles":["GM world rollup"]},"327":{"title":"💸 Transactions","titles":["GM world rollup"]},"328":{"title":"⚖️ Checking Balances","titles":["GM world rollup"]},"329":{"title":"📦 GM world UI app","titles":["GM world rollup"]},"330":{"title":"🔗 Connecting your wallet","titles":["GM world rollup"]},"331":{"title":"🎉 Next steps","titles":["GM world rollup"]},"332":{"title":"🟩 Kurtosis","titles":[]},"333":{"title":"💻 Pre-requisites","titles":["🟩 Kurtosis"]},"334":{"title":"🛠️ Dependencies","titles":["🟩 Kurtosis"]},"335":{"title":"💻 Kurtosis CLI","titles":["🟩 Kurtosis","🛠️ Dependencies"]},"336":{"title":"🛠️ Setting up your environment","titles":["🟩 Kurtosis"]},"337":{"title":"🐳 Dockerfile","titles":["🟩 Kurtosis","🛠️ Setting up your environment"]},"338":{"title":"🟢 Kurtosis","titles":["🟩 Kurtosis","🛠️ Setting up your environment"]},"339":{"title":"🚀 Run Wordle chain","titles":["🟩 Kurtosis","🛠️ Setting up your environment"]},"340":{"title":"🚀 Interacting with the chain","titles":["🟩 Kurtosis"]},"341":{"title":"🎉 Next steps","titles":["🟩 Kurtosis"]},"342":{"title":"Quick start guide","titles":[]},"343":{"title":"📦 Install Rollkit (CLI)","titles":["Quick start guide"]},"344":{"title":"🚀 Run your sovereign rollup node","titles":["Quick start guide"]},"345":{"title":"🎉 Conclusion","titles":["Quick start guide"]},"346":{"title":"Astria Sequencing","titles":[]},"347":{"title":"Based Sequencing","titles":[]},"348":{"title":"Centralized Sequencer","titles":[]},"349":{"title":"Prerequisites","titles":["Centralized Sequencer"]},"350":{"title":"Installation the Centralized Sequencer","titles":["Centralized Sequencer"]},"351":{"title":"Run the centralized sequencer","titles":["Centralized Sequencer"]},"352":{"title":"Run your chain","titles":["Centralized Sequencer"]},"353":{"title":"Metrics","titles":["Centralized Sequencer"]},"354":{"title":"Summary","titles":["Centralized Sequencer"]},"355":{"title":"Forced Inclusion","titles":[]},"356":{"title":"Local Sequencer","titles":[]},"357":{"title":"Introduction","titles":["Local Sequencer"]},"358":{"title":"Setting Up a Local Local Sequencer","titles":["Local Sequencer"]},"359":{"title":"Configuring your chain to connect to the local sequencer","titles":["Local Sequencer"]},"360":{"title":"Run your chain","titles":["Local Sequencer"]},"361":{"title":"Summary","titles":["Local Sequencer"]},"362":{"title":"Sequencing","titles":[]},"363":{"title":"Rollkit prior to Sequencing","titles":["Sequencing"]},"364":{"title":"Sequencing Interface","titles":["Sequencing"]},"365":{"title":"Mock Sequencer","titles":["Sequencing"]},"366":{"title":"Sequencing Implementations","titles":["Sequencing"]},"367":{"title":"🕹️ Wordle app","titles":[]},"368":{"title":"💻 Pre-requisites","titles":["🕹️ Wordle app"]},"369":{"title":"📖 Design implementation","titles":["🕹️ Wordle app"]},"370":{"title":"⛓️ Ignite and scaffolding the wordle chain","titles":["🕹️ Wordle app"]},"371":{"title":"🔥 Ignite","titles":["🕹️ Wordle app","⛓️ Ignite and scaffolding the wordle chain"]},"372":{"title":"⛓️ Scaffolding the wordle chain","titles":["🕹️ Wordle app","⛓️ Ignite and scaffolding the wordle chain"]},"373":{"title":"🗂️ Wordle directory","titles":["🕹️ Wordle app","⛓️ Ignite and scaffolding the wordle chain"]},"374":{"title":"🛠️ Setting up Rollkit","titles":["🕹️ Wordle app"]},"375":{"title":"🗞️ Installing Rollkit","titles":["🕹️ Wordle app","🛠️ Setting up Rollkit"]},"376":{"title":"✨ Creating the wordle module","titles":["🕹️ Wordle app"]},"377":{"title":"🔖 Scaffolding a module","titles":["🕹️ Wordle app","✨ Creating the wordle module"]},"378":{"title":"✉️ Messages","titles":["🕹️ Wordle app"]},"379":{"title":"💬 Scaffolding a message","titles":["🕹️ Wordle app","✉️ Messages"]},"380":{"title":"🎨 Wordle types","titles":["🕹️ Wordle app"]},"381":{"title":"🏗️ Scaffolding wordle types","titles":["🕹️ Wordle app","🎨 Wordle types"]},"382":{"title":"🔐 Keeper functions","titles":["🕹️ Wordle app"]},"383":{"title":"📤 SubmitWordle function","titles":["🕹️ Wordle app","🔐 Keeper functions"]},"384":{"title":"⌛ SubmitGuess function","titles":["🕹️ Wordle app","🔐 Keeper functions"]},"385":{"title":"📦 Protobuf file","titles":["🕹️ Wordle app","🔐 Keeper functions"]},"386":{"title":"⛓️ Run the wordle chain","titles":["🕹️ Wordle app"]},"387":{"title":"🟢 Building and running wordle chain","titles":["🕹️ Wordle app","⛓️ Run the wordle chain"]},"388":{"title":"🚀 Interacting with the chain","titles":["🕹️ Wordle app","⛓️ Run the wordle chain"]},"389":{"title":"🔮 Extending in the future","titles":["🕹️ Wordle app","⛓️ Run the wordle chain"]},"390":{"title":"🎉 Next steps","titles":["🕹️ Wordle app"]}},"dirtCount":0,"index":[["✔",{"2":{"387":2}}],["⌛",{"0":{"384":1}}],["✉️",{"0":{"378":1},"1":{"379":1}}],["⛓️",{"0":{"370":1,"372":1,"386":1},"1":{"371":1,"372":1,"373":1,"387":1,"388":1,"389":1}}],["⚖️",{"0":{"328":1}}],["ã���������$�i��",{"2":{"312":1}}],["�aru��5�",{"2":{"312":1}}],["���",{"2":{"312":1}}],["⠘",{"2":{"294":1,"315":1}}],["⭐",{"2":{"281":1,"326":1,"339":1}}],["⚙️",{"0":{"260":1}}],["\\tpath",{"2":{"350":1}}],["\\tauth",{"2":{"350":1}}],["\\tapt",{"2":{"251":2}}],["\\tda",{"2":{"350":2}}],["\\ttime",{"2":{"350":1}}],["\\trollup",{"2":{"350":1}}],["\\tlisten",{"2":{"350":1}}],["\\tjq",{"2":{"251":1}}],["\\tcentralized",{"2":{"350":2}}],["\\tcurl",{"2":{"251":1}}],["\\tca",{"2":{"251":1}}],["\\tbuild",{"2":{"251":1}}],["\\tsubmit",{"2":{"242":1}}],["\\tget",{"2":{"242":1}}],["\\t",{"2":{"242":2}}],["⠑",{"2":{"215":1,"294":1,"315":1}}],["⠊",{"2":{"215":1}}],["🤖",{"0":{"283":1}}],["🧢",{"2":{"274":2}}],["🧹",{"0":{"223":1}}],["🪶",{"0":{"221":1,"230":1},"1":{"222":1}}],["🧪",{"0":{"218":1,"261":1,"303":1},"1":{"262":1,"263":1}}],["🧊",{"0":{"209":1,"210":1,"211":1}}],["🪙",{"0":{"205":1}}],["⚒️",{"0":{"204":1}}],["☀️introduction",{"0":{"199":1},"1":{"200":1}}],["⚡️",{"0":{"214":1},"2":{"185":2}}],["⏳",{"2":{"185":2}}],["❌",{"2":{"185":4}}],["✅",{"2":{"149":1,"185":9,"294":1,"315":1}}],["⠉",{"2":{"149":1,"294":1,"315":1}}],["⠰",{"2":{"149":1,"215":1}}],["⠆",{"2":{"149":1,"215":1}}],["⠒",{"2":{"149":1,"215":1,"294":1,"315":1}}],["^0",{"2":{"149":1,"215":2,"216":1}}],["zero",{"2":{"140":1,"220":1,"302":1,"304":1}}],["zkml",{"0":{"139":1,"144":1,"147":1,"150":1},"1":{"140":1,"141":1,"142":1,"143":1,"144":1,"145":2,"146":2,"147":2,"148":1,"149":1,"150":1,"151":1},"2":{"91":1,"144":1,"147":1,"148":1,"150":1,"151":1}}],["zk",{"0":{"189":1},"2":{"7":1,"10":2,"140":1,"157":2,"170":1,"189":1}}],["q",{"2":{"136":4,"137":1,"321":1,"388":1}}],["quality",{"2":{"147":1}}],["quot",{"2":{"145":2,"167":2,"180":2,"185":4,"226":2,"295":2,"301":2,"316":2,"324":2,"330":2}}],["queried",{"2":{"210":1}}],["queries",{"2":{"46":1,"170":1,"184":1}}],["query=",{"2":{"289":1}}],["querying",{"0":{"287":1},"2":{"179":1,"388":1}}],["queryresponses",{"2":{"46":1}}],["queryfns",{"2":{"46":2,"49":1}}],["query",{"2":{"45":1,"46":3,"78":2,"79":3,"179":1,"196":3,"211":1,"225":1,"232":1,"287":3,"289":7,"328":3,"388":6}}],["querymsgfns",{"2":{"46":1}}],["querymsg",{"2":{"45":2,"46":3,"49":2}}],["quickly",{"2":{"153":1,"256":1,"299":1}}],["quickstart",{"2":{"143":1}}],["quicker",{"2":{"41":2}}],["quick",{"0":{"103":1,"256":1,"299":1,"342":1},"1":{"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"343":1,"344":1,"345":1},"2":{"19":1,"41":2,"102":1,"106":1,"107":1,"129":1,"229":1,"231":1,"236":1,"239":1,"243":1,"261":1,"269":1,"324":1,"349":1,"351":1,"352":1,"357":1,"358":1,"360":1,"365":1,"368":1}}],["✨",{"0":{"136":1,"376":1},"1":{"377":1}}],["🎨",{"0":{"380":1},"1":{"381":1}}],["🌟",{"0":{"286":1},"1":{"287":1,"288":1,"289":1}}],["🏎️",{"0":{"284":1},"2":{"274":1}}],["🌲",{"2":{"274":1}}],["🏠",{"0":{"217":1}}],["🎬",{"0":{"208":1,"212":1},"1":{"209":1,"210":1,"211":1,"212":1}}],["🏃‍♀️",{"0":{"213":1},"1":{"214":1,"215":1,"216":1,"217":1,"218":1}}],["🏃",{"0":{"203":1}}],["🎉",{"0":{"138":1,"227":1,"234":1,"255":1,"265":1,"305":1,"331":1,"341":1,"345":1,"390":1}}],["🏗️",{"0":{"133":1,"224":1,"231":1,"301":1,"381":1},"2":{"274":1}}],["🌐",{"0":{"132":1}}],["🌞",{"0":{"129":1,"220":1,"229":1,"324":1}}],["🎊",{"2":{"113":1,"120":1}}],["⛽",{"0":{"111":1}}],["+x",{"2":{"251":1}}],["+=",{"2":{"215":1,"384":1}}],["+calldata",{"2":{"146":1}}],["+",{"2":{"110":1,"113":1,"135":1,"151":1,"208":1,"384":1}}],["++",{"2":{"19":1,"57":1,"62":1,"89":1,"90":1,"321":1}}],["🔮",{"0":{"389":1}}],["📤",{"0":{"383":1}}],["🔐",{"0":{"382":1},"1":{"383":1,"384":1,"385":1}}],["💬",{"0":{"379":1}}],["🔖",{"0":{"377":1}}],["🗂️",{"0":{"373":1}}],["🕹️",{"0":{"367":1},"1":{"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"388":1,"389":1,"390":1}}],["🟩",{"0":{"332":1},"1":{"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"340":1,"341":1}}],["🔗",{"0":{"330":1}}],["📄",{"0":{"289":1}}],["📃",{"0":{"288":1}}],["🔎",{"0":{"287":1}}],["🚧",{"2":{"274":1}}],["🔆",{"2":{"274":1}}],["🛩️",{"2":{"274":1}}],["📫",{"2":{"274":1}}],["🙈",{"2":{"274":1}}],["💥",{"0":{"263":1}}],["👉",{"2":{"261":2}}],["👇",{"2":{"259":1}}],["🔑",{"0":{"259":1}}],["🛥️",{"0":{"258":1}}],["🐳",{"0":{"246":1,"251":1,"252":1,"337":1},"1":{"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1}}],["😎",{"2":{"232":1,"320":1}}],["🔥",{"0":{"226":1,"233":1,"371":1}}],["📜",{"0":{"216":1}}],["📒",{"0":{"215":1,"282":1},"1":{"283":1,"284":1,"285":1}}],["👛",{"0":{"207":1}}],["🟢",{"0":{"206":1,"338":1,"387":1},"1":{"207":1,"208":1,"209":1,"210":1,"211":1,"212":1}}],["📖",{"0":{"200":1,"262":1,"369":1}}],["🟡",{"2":{"185":2}}],["🗞️",{"0":{"163":1,"279":1,"375":1},"1":{"164":1,"165":1,"166":1,"167":1,"280":1,"281":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1}}],["💸",{"0":{"137":1,"327":1}}],["🚀",{"0":{"135":1,"222":1,"253":1,"254":1,"281":1,"285":1,"302":1,"326":1,"339":1,"340":1,"344":1,"388":1},"2":{"203":1}}],["📦",{"0":{"131":1,"257":1,"300":1,"329":1,"343":1,"385":1}}],["🛠️",{"0":{"130":1,"134":1,"202":1,"225":1,"232":1,"248":1,"250":1,"325":1,"334":1,"336":1,"374":1},"1":{"203":1,"204":1,"205":1,"249":1,"251":1,"252":1,"253":1,"335":1,"337":1,"338":1,"339":1,"375":1},"2":{"274":1}}],["🛢️",{"0":{"113":1}}],["🔁",{"0":{"112":1}}],["🛑",{"0":{"110":1,"264":1,"304":1}}],["💰",{"0":{"109":1}}],["🟠",{"0":{"108":1}}],["🔄",{"0":{"105":1},"1":{"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1}}],["💻",{"0":{"65":1,"92":1,"167":1,"201":1,"247":1,"249":1,"280":1,"333":1,"335":1,"368":1},"1":{"66":1},"2":{"274":1}}],["│",{"2":{"103":4,"104":39}}],["|jq",{"2":{"321":1}}],["||",{"2":{"281":2,"326":2,"339":2}}],["|",{"2":{"67":1,"81":1,"122":1,"130":1,"131":1,"132":1,"133":1,"136":2,"137":2,"204":1,"211":1,"225":1,"232":1,"237":1,"251":2,"271":1,"281":1,"285":1,"287":1,"289":1,"291":1,"310":1,"321":1,"326":1,"338":1,"340":1,"343":1,"358":2,"368":1,"371":1,"388":1}}],["≥",{"2":{"66":2}}],["└──",{"2":{"50":2,"103":4,"104":9}}],["├──",{"2":{"50":5,"103":11,"104":26}}],["`date",{"2":{"208":1}}],["`nodejs",{"2":{"203":1}}],["```bash",{"2":{"203":4}}],["```",{"2":{"203":5}}],["`",{"2":{"47":1,"208":1}}],["xyz",{"2":{"204":1,"291":1,"310":1}}],["xzf",{"2":{"203":1}}],["x",{"2":{"149":1,"151":1,"289":1,"294":1,"315":1,"319":1,"373":2,"383":2,"384":2,"385":1}}],["x26",{"2":{"37":2,"41":1,"45":3,"47":2,"109":2,"132":2,"134":2,"202":2,"223":2,"224":2,"251":6,"271":2,"272":2,"285":2,"296":2,"309":2,"311":2,"314":2,"317":2,"321":2,"383":1,"384":2,"387":2}}],["x3c",{"2":{"25":1,"45":4,"47":1,"89":1,"109":1,"126":5,"147":1,"217":2,"218":1,"222":1,"275":1,"297":1,"303":1,"318":1}}],[">26657",{"2":{"326":1,"340":1}}],[">9730",{"2":{"281":1,"326":1,"340":1}}],[">9779",{"2":{"281":1,"326":1,"340":1}}],[">9710",{"2":{"281":1,"326":1,"340":1}}],[">9290",{"2":{"281":1}}],[">8081",{"2":{"281":1,"326":1,"340":1}}],[">7443",{"2":{"281":1,"326":1,"340":1}}],[">7980",{"2":{"254":1,"281":1,"326":1,"340":1}}],[">36656",{"2":{"281":1}}],[">50051",{"2":{"254":1}}],[">>",{"2":{"203":2}}],[">",{"2":{"37":1,"45":2,"47":2,"136":1,"203":2,"281":6,"326":4,"339":4}}],["~",{"2":{"37":4,"124":1,"149":2,"203":4,"214":1,"259":1,"284":1,"387":1,"388":1}}],["9db601efd92b",{"2":{"326":1}}],["9d5c710cd64d031752a7db86e09c8ea8ce4cae4e30878c6d0487c57806060a47",{"2":{"196":2}}],["9731",{"2":{"281":2,"326":2,"340":2}}],["9730",{"2":{"281":1,"326":1,"340":1}}],["9779",{"2":{"281":1,"326":1,"340":1}}],["9711",{"2":{"281":2,"326":2,"340":2}}],["9710",{"2":{"281":1,"326":1,"340":1}}],["974724",{"2":{"149":1}}],["96d04bc472c9",{"2":{"281":1}}],["96d04bc472c9455d88d046128fbdefa6",{"2":{"281":3}}],["90",{"2":{"280":1,"281":2,"325":1,"326":2,"340":2}}],["9090",{"2":{"67":2,"308":2}}],["93036ms",{"2":{"274":1}}],["9390",{"2":{"59":2}}],["9545",{"2":{"217":2}}],["9290",{"2":{"135":1,"281":3,"326":1}}],["990942dc84ab",{"2":{"326":1}}],["990942dc84ab4b3ab2c8d64002a5bafa",{"2":{"326":3}}],["99957931",{"2":{"328":1}}],["999",{"2":{"288":1}}],["999uwasm",{"2":{"288":1}}],["9999999999999999989995000",{"2":{"136":1}}],["9999999999999999999897679",{"2":{"79":1}}],["99ms",{"2":{"149":1}}],["991rcctqc5l4px95k6tdg4pjrms70m2a9t35rl50t",{"2":{"120":1}}],["991hesf7xgmjwttag2n2wzk43rvxh47nn4ckh3e6s",{"2":{"120":1}}],["9",{"0":{"37":1},"2":{"203":1,"215":2,"281":1,"326":1,"340":1}}],["8080",{"2":{"353":1}}],["8081",{"2":{"281":1,"326":1,"340":1}}],["80",{"2":{"281":1,"326":1,"340":1}}],["80085",{"2":{"149":1}}],["8000",{"2":{"113":1,"222":1,"225":2,"294":1,"302":1,"303":1}}],["8bfee95b49ee",{"2":{"281":1}}],["8cd936e91ada45beab50f0d19be8c57f",{"2":{"281":2}}],["8cd936e91ada",{"2":{"281":1}}],["86f9bfa5b6d2",{"2":{"254":1}}],["8kyecn9mzv8ghjspkrde",{"2":{"232":1}}],["8510",{"2":{"215":1}}],["8545",{"2":{"149":1,"218":3,"261":1,"273":1,"294":1,"315":1}}],["8gb",{"2":{"201":1}}],["843",{"2":{"365":1}}],["842",{"2":{"239":1}}],["846",{"2":{"106":1}}],["845",{"2":{"106":7}}],["8",{"0":{"36":1},"2":{"149":3,"213":1,"215":6,"216":1,"251":1,"294":2,"315":2,"337":1}}],["636",{"2":{"352":2,"360":2}}],["677caf6c80b85acef6f9ec7906fb3cb021322aac78b015fa07d5112f2f824bff",{"2":{"327":1}}],["67a2c3058e01",{"2":{"254":1}}],["655",{"2":{"302":1}}],["6510stake",{"2":{"76":1}}],["682",{"2":{"294":1,"315":1}}],["62da89015918",{"2":{"281":1}}],["6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d",{"2":{"196":1}}],["6e46bd1f53acead98b43e63fcf2bd5435499350d",{"2":{"104":1}}],["64ba6e31fe887d66c6f8f31c7b1a80c7ca179239677b4088bb55f5ea07dbe273",{"2":{"78":1,"79":1}}],["698",{"2":{"352":1}}],["69",{"2":{"76":1}}],["61",{"2":{"76":1}}],["6",{"0":{"34":1},"2":{"67":1,"203":1,"281":2,"284":1,"308":1,"326":1,"340":14,"369":3,"384":5}}],["jcstein",{"2":{"314":1}}],["jit",{"2":{"263":1}}],["join",{"2":{"146":1,"262":1,"338":1}}],["journey",{"2":{"41":1}}],["js",{"2":{"135":1,"203":1,"389":1}}],["jsonrpc",{"2":{"196":1,"281":1,"326":2,"338":2,"339":2}}],["json",{"2":{"31":1,"37":7,"46":1,"57":2,"74":2,"103":4,"104":5,"136":2,"137":2,"145":1,"146":3,"179":2,"196":2,"261":1,"275":1,"285":1,"287":3,"289":4,"296":3,"317":3,"344":4,"388":3}}],["jump",{"2":{"285":1}}],["jul",{"2":{"281":1,"326":1,"339":1}}],["juno",{"2":{"47":1}}],["just",{"2":{"7":1,"10":1,"72":1,"129":1,"147":1,"151":1,"157":1,"222":1,"252":1,"256":1,"284":1,"313":1,"319":1,"324":1,"327":1,"336":1,"338":1,"350":1}}],["jq",{"2":{"37":3,"133":3,"136":1,"137":2,"202":1,"211":1,"225":1,"232":1,"251":1,"269":1,"285":1,"287":1,"289":1,"321":1,"388":1}}],["=nil",{"2":{"384":1}}],["=====================================================",{"2":{"339":2}}],["======================================================",{"2":{"281":2,"326":2}}],["==========================================",{"2":{"281":2,"326":2,"339":2}}],["=========================================",{"2":{"281":2,"326":2,"339":2}}],["==",{"2":{"149":2,"294":2,"315":2,"384":2}}],["=>",{"2":{"136":5,"137":1}}],["=",{"2":{"30":1,"37":1,"41":1,"44":2,"45":4,"47":8,"50":1,"57":2,"107":1,"124":2,"134":2,"146":8,"215":6,"222":5,"289":4,"307":1,"338":5,"383":15,"384":21,"385":2}}],["$wordle",{"2":{"340":3}}],["$name",{"2":{"289":1}}],["$namespace",{"2":{"213":1}}],["$receiver",{"2":{"297":1,"318":1}}],["$register",{"2":{"289":1}}],["$rpc",{"2":{"149":2,"150":2,"217":3,"294":2,"295":2,"297":1,"315":2,"316":2,"318":1}}],["$init",{"2":{"288":1}}],["$da",{"2":{"225":1,"226":1,"232":1,"233":3}}],["$hash",{"2":{"211":2}}],["$home",{"2":{"31":2,"57":2,"67":1,"69":1,"73":1,"74":1,"103":2,"104":3,"109":1,"133":1,"136":4,"145":1,"148":1,"149":1,"150":1,"203":5,"223":2,"224":2,"251":1,"271":1,"272":1,"273":1,"274":1,"275":1,"293":1,"296":2,"309":1,"311":1,"314":1,"317":2,"320":1,"321":2,"322":1}}],["$flags",{"2":{"210":1,"211":2}}],["$tx",{"2":{"137":1,"285":1,"287":1,"388":1}}],["$token",{"2":{"34":1}}],["$auth",{"2":{"232":3,"233":1,"321":1}}],["$anvil",{"2":{"217":2}}],["$account",{"2":{"136":1,"137":2}}],["$address",{"2":{"37":1,"208":1}}],["$cw",{"2":{"281":2,"285":2}}],["$code",{"2":{"287":2,"288":1,"289":2}}],["$coinbase",{"2":{"208":1}}],["$contract",{"2":{"150":2,"217":2,"218":2,"289":5,"295":2,"316":2}}],["$calldata",{"2":{"150":2}}],["$cmthome",{"2":{"93":1}}],["$channel",{"2":{"78":1,"79":1,"136":1}}],["$chain",{"2":{"31":2,"32":1,"35":1,"37":4,"38":1,"57":1}}],["$gm",{"2":{"79":3,"326":2,"327":1}}],["$osmo",{"2":{"78":2}}],["$private",{"2":{"149":2,"150":2,"218":2,"294":2,"295":1,"297":1,"315":2,"316":1,"318":1}}],["$p2p",{"2":{"59":1}}],["$pubkey",{"2":{"37":1}}],["$pub",{"2":{"37":1}}],["$staking",{"2":{"35":1}}],["$key1",{"2":{"327":1,"328":1}}],["$key2",{"2":{"327":1,"328":1}}],["$key",{"2":{"33":1,"34":1,"35":1}}],["$validator",{"2":{"32":1}}],["$",{"2":{"29":1,"57":1,"136":3,"137":1,"212":1,"223":1,"284":3,"321":1}}],["01",{"2":{"383":1,"384":2}}],["01|09",{"2":{"344":6}}],["05",{"2":{"344":6}}],["05bd40e",{"2":{"326":3}}],["082",{"2":{"344":1}}],["081",{"2":{"344":1}}],["080",{"2":{"344":1}}],["080998z",{"2":{"76":1}}],["080992z",{"2":{"76":1}}],["080924z",{"2":{"76":1}}],["089b9be758464668857fa46c2187bfe3",{"2":{"340":2}}],["03",{"2":{"302":1}}],["036da1ab230a4ce8654358f77cb426ba2f8ef9b81ea06faca32085b0b0d25c2a",{"2":{"196":2}}],["09bdf1e94862",{"2":{"340":1}}],["09am",{"2":{"258":4}}],["09",{"2":{"243":1}}],["09t15",{"2":{"196":2}}],["0`",{"2":{"203":1}}],["0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860",{"2":{"294":1,"315":1}}],["0xa06a4585af436e2271fc9f697488ce49771c6480e72caac76739e286564c0fc3",{"2":{"149":1}}],["0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306",{"2":{"292":1,"313":1}}],["0x123450000000000000000",{"2":{"275":1}}],["0x12345000000000000000000",{"2":{"275":1}}],["0x18df82c7e422a42d47345ed86b0e935e9718ebda",{"2":{"294":1,"315":1}}],["0x18d",{"2":{"261":1}}],["0x0",{"2":{"275":1}}],["0x0000000000000000",{"2":{"275":1}}],["0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",{"2":{"150":1}}],["0x000000",{"2":{"274":1}}],["0x9fcebd70654d360b41ccd123dadaaad6ce13c788",{"2":{"261":1}}],["0x58096aabd3cb58bdef28501bda01b6cf4a37ed0ba482f81462bc1043bb91f996",{"2":{"150":1}}],["0x5c59c83c099f72fce832208f96a23a1e43737a14",{"2":{"149":2,"150":1}}],["0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4",{"2":{"150":1,"275":1,"292":1,"313":1}}],["0xbbd872d0c37fe889c2456daf80505c20f262b001842d919d06e48c163319af3d",{"2":{"150":1}}],["002",{"2":{"344":2}}],["002924172006823068",{"2":{"149":1}}],["001",{"2":{"344":1}}],["001528707003566983",{"2":{"294":1,"315":1}}],["00",{"2":{"149":3,"281":6,"294":3,"315":3,"326":8,"339":13}}],["000000506f6c61726973",{"2":{"320":1}}],["00000000000000000000000000000000000000000008e5f679bf7116cb",{"2":{"232":2}}],["0000000000000000000000000000000000000000000000000000000000000000",{"2":{"196":1}}],["000000000000000000000000000000000000b7b24d9321578eb83626",{"2":{"196":1}}],["000000007",{"2":{"149":1,"294":1,"315":1}}],["000000",{"2":{"104":2,"274":1}}],["000002",{"2":{"103":2}}],["000001",{"2":{"103":2,"104":4,"206":1}}],["069040z",{"2":{"76":1}}],["062667z",{"2":{"76":1}}],["062649z",{"2":{"76":1}}],["078583z",{"2":{"76":1}}],["070389z",{"2":{"76":1}}],["070364z",{"2":{"76":1}}],["07",{"2":{"76":8,"281":5,"302":1,"326":8,"339":13,"352":1}}],["04",{"2":{"76":5,"196":2,"281":5,"326":8,"339":13,"352":1}}],["025uwasm",{"2":{"285":1,"288":1,"289":1}}],["025stake",{"2":{"135":1,"136":1,"226":1}}],["02t11",{"2":{"281":1,"326":8}}],["02ibc",{"2":{"135":1,"137":1}}],["02",{"2":{"76":13,"326":1,"383":1,"384":2}}],["0s",{"2":{"74":2,"136":2,"149":1,"294":1,"315":1}}],["0stake",{"2":{"59":1}}],["0",{"0":{"28":1},"2":{"41":1,"44":1,"47":1,"58":2,"59":20,"63":1,"66":2,"67":2,"69":1,"74":2,"76":12,"78":2,"89":1,"90":1,"120":2,"135":9,"136":7,"137":2,"149":4,"150":1,"179":4,"196":6,"203":3,"213":2,"215":5,"217":2,"218":6,"222":2,"226":2,"249":1,"252":8,"254":8,"280":1,"281":49,"283":2,"284":1,"285":3,"287":5,"288":3,"289":21,"294":4,"302":2,"303":2,"307":1,"315":4,"320":3,"325":1,"326":42,"327":1,"328":2,"332":1,"338":4,"339":5,"340":32,"350":4,"363":1,"366":1,"384":1,"388":5}}],["33",{"2":{"352":2,"360":2}}],["33pm",{"2":{"60":2}}],["364",{"2":{"289":1}}],["36657",{"2":{"74":1,"78":1,"79":2,"120":1,"281":5,"285":1,"287":2,"288":1,"289":6}}],["36656",{"2":{"58":1,"281":3}}],["31",{"2":{"281":1,"326":1,"340":1}}],["310493z",{"2":{"76":1}}],["39eb05e1c693",{"2":{"326":1}}],["39",{"2":{"281":6,"339":3}}],["390kb",{"2":{"14":1}}],["3b5a25b",{"2":{"281":1}}],["35",{"2":{"225":1}}],["322264",{"2":{"222":1}}],["38000",{"2":{"222":1}}],["3️",{"0":{"166":1}}],["3",{"0":{"31":1,"120":1,"125":1},"1":{"126":1},"2":{"67":2,"141":1,"149":1,"215":3,"254":3,"263":1,"281":7,"285":1,"288":1,"289":1,"294":1,"315":1,"326":1,"335":1,"338":1,"373":1}}],["3000",{"2":{"226":1,"330":1}}],["3000000007",{"2":{"150":1}}],["300397z",{"2":{"76":1}}],["30s",{"2":{"19":1}}],["30",{"2":{"19":1}}],["kv",{"2":{"383":2}}],["k",{"2":{"383":4,"384":6}}],["kurtos",{"2":{"281":1,"326":1,"340":1}}],["kurtosistech",{"2":{"281":2,"326":2,"340":2}}],["kurtosis",{"0":{"332":1,"335":1,"338":1},"1":{"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"340":1,"341":1},"2":{"280":3,"281":9,"325":3,"326":9,"330":1,"332":3,"335":2,"336":3,"338":6,"339":5,"340":7,"341":1}}],["kzg",{"2":{"220":1}}],["knowledge",{"2":{"140":1,"199":1,"220":1,"265":1}}],["know",{"0":{"262":1},"2":{"92":1,"167":1,"255":1,"290":1,"341":1}}],["keplr",{"0":{"197":1},"2":{"197":3,"329":1,"330":3}}],["keyfile=",{"2":{"344":1}}],["key2=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3",{"2":{"327":1}}],["key1=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx",{"2":{"327":1}}],["keyinfo",{"2":{"259":1}}],["key>",{"2":{"147":1,"217":1}}],["keyregistry",{"2":{"103":1,"104":1}}],["keyring",{"0":{"33":1},"2":{"33":2,"34":1,"35":1,"74":2,"78":1,"104":1,"109":1,"120":1,"136":5,"137":2,"218":1,"259":1,"285":1,"288":1,"289":1,"327":2,"388":5}}],["key=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306",{"2":{"149":1,"294":1,"315":1}}],["key=",{"2":{"147":1,"217":1}}],["key=gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy",{"2":{"78":1}}],["key=osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll",{"2":{"78":1}}],["key=$",{"2":{"37":1,"218":1}}],["keys",{"2":{"33":1,"74":2,"75":3,"78":1,"136":8,"137":1,"217":3,"218":1,"263":1,"327":3}}],["key",{"0":{"33":1},"2":{"29":2,"33":1,"37":5,"59":1,"70":2,"71":2,"74":4,"78":5,"79":3,"103":2,"104":2,"109":2,"136":7,"137":1,"141":1,"147":1,"149":5,"150":4,"196":1,"217":5,"218":8,"259":5,"261":2,"263":1,"285":1,"287":1,"288":1,"289":3,"292":1,"294":5,"295":2,"297":4,"313":1,"315":5,"316":2,"318":4,"327":2,"328":2,"344":3,"364":1,"369":1,"382":1,"383":1,"388":1}}],["keepers",{"2":{"382":1,"385":1}}],["keeper",{"0":{"382":1},"1":{"383":1,"384":1,"385":1},"2":{"289":2,"382":5,"383":3,"384":3,"385":1}}],["keep",{"2":{"18":1,"63":1,"72":1,"109":1,"150":1,"174":1,"251":1,"376":1}}],["kit",{"2":{"272":2,"273":1,"274":1,"275":1}}],["kickstarted",{"2":{"387":1}}],["kicking",{"2":{"261":1}}],["kicked",{"2":{"14":1}}],["kinds",{"2":{"377":1}}],["kind",{"2":{"10":1}}],["40",{"2":{"339":1}}],["4039stake",{"2":{"120":1}}],["45",{"2":{"326":1}}],["45am",{"2":{"274":25}}],["49dd471ac3bb413d96932d4020c20b21",{"2":{"326":2}}],["49dd471ac3bb",{"2":{"326":1}}],["4980",{"2":{"210":1}}],["43",{"2":{"281":1,"326":2,"339":3}}],["41",{"2":{"243":1}}],["46",{"2":{"326":7,"339":3,"344":6}}],["464427035z",{"2":{"196":2}}],["46656",{"2":{"59":2}}],["46657",{"2":{"59":2,"70":1,"74":1,"78":1,"79":1}}],["48",{"2":{"196":2,"339":1}}],["443mb",{"2":{"251":1,"337":1}}],["443",{"2":{"136":1}}],["4a90e750914792c2d7f98775c13a588d9d304bd0",{"2":{"104":1}}],["42069$ibc",{"2":{"79":1}}],["42069",{"2":{"78":1,"327":1,"328":1}}],["42069stake",{"2":{"78":1,"327":1}}],["4762stake",{"2":{"76":1}}],["47",{"2":{"73":1}}],["4mb",{"2":{"14":1}}],["4",{"0":{"32":1},"2":{"14":1,"73":3,"108":3,"136":11,"201":1,"320":3,"340":1}}],["58",{"2":{"344":6}}],["58pm",{"2":{"312":10}}],["5a969765174a",{"2":{"339":1}}],["5a969765174a47ada0727bd68e087f36",{"2":{"339":1,"340":2}}],["56pm",{"2":{"340":6}}],["56",{"2":{"339":14}}],["5699",{"2":{"149":1}}],["59855",{"2":{"326":1}}],["59s",{"2":{"215":1}}],["55500",{"2":{"281":1}}],["55pm",{"2":{"58":1,"281":7}}],["5bfeda0a871f",{"2":{"281":1}}],["53",{"2":{"281":5}}],["53dab037ac3bd380f4a9192b2c6eedbe95fce180",{"2":{"104":1}}],["5d3533c1ea1c",{"2":{"251":1,"337":1}}],["54",{"2":{"239":1,"339":3,"365":1}}],["57pm",{"2":{"340":6}}],["57050",{"2":{"340":1}}],["57",{"2":{"220":1}}],["52s",{"2":{"294":1,"315":1}}],["52",{"2":{"106":8}}],["51",{"2":{"326":2}}],["51pm",{"2":{"108":4}}],["5183",{"2":{"74":1,"136":1}}],["5112",{"2":{"64":1}}],["509569",{"2":{"294":1,"315":1}}],["50051",{"2":{"252":3,"254":1,"350":1,"352":3,"358":1,"360":3,"365":1}}],["500uosmo",{"2":{"79":1}}],["5000stake",{"2":{"78":1,"120":1,"136":1,"327":1}}],["50",{"2":{"67":1,"196":2,"326":5}}],["5",{"0":{"33":1},"2":{"12":1,"73":1,"74":2,"114":1,"136":3,"281":1,"339":1,"340":2,"383":4,"384":4,"388":1}}],["uwasm",{"2":{"288":2}}],["uuid",{"2":{"281":5,"326":5,"339":5}}],["ui",{"0":{"329":1},"2":{"329":1,"330":1,"389":1}}],["uiiny",{"2":{"196":1}}],["uint256",{"2":{"150":8}}],["uint",{"2":{"90":1}}],["uri",{"2":{"179":1,"222":1}}],["url=http",{"2":{"149":1,"217":1,"294":1,"302":1,"315":1}}],["url",{"2":{"149":5,"150":4,"217":7,"218":3,"225":1,"261":1,"290":1,"294":5,"295":4,"297":2,"303":1,"315":5,"316":4,"318":2}}],["ubuntu",{"2":{"133":1,"201":2}}],["utia",{"2":{"113":1,"135":1}}],["utilizing",{"2":{"152":1}}],["utilization",{"2":{"14":1}}],["utilized",{"2":{"160":1}}],["utilizes",{"2":{"129":1,"324":1}}],["utilize",{"2":{"9":1,"10":1,"160":1,"185":1}}],["utest",{"2":{"78":1}}],["uosmo",{"2":{"78":1}}],["updating",{"0":{"215":1,"216":1}}],["updated",{"2":{"178":1,"194":1,"330":1,"366":1,"384":2}}],["updates=0",{"2":{"106":2,"135":1,"258":1,"274":1,"281":2,"312":1,"326":1,"340":3,"344":1}}],["updates",{"2":{"99":2,"278":1}}],["update",{"0":{"296":1,"317":1},"2":{"28":1,"57":1,"59":1,"188":1,"202":2,"203":1,"215":2,"216":1,"251":2,"274":3,"296":1,"306":1,"317":1,"338":1}}],["upon",{"2":{"136":2,"302":1,"344":1}}],["uploading",{"2":{"326":1,"339":1}}],["uploadable",{"2":{"45":1}}],["upload",{"2":{"41":1,"47":1,"145":2,"147":1,"326":1,"339":1}}],["up",{"0":{"40":1,"56":1,"58":1,"142":1,"237":1,"250":1,"336":1,"358":1,"374":1},"1":{"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"57":1,"58":1,"59":1,"251":1,"252":1,"253":1,"337":1,"338":1,"339":1,"375":1},"2":{"14":1,"19":1,"20":1,"24":1,"27":1,"30":1,"39":1,"42":1,"54":1,"61":1,"72":1,"86":1,"87":1,"107":1,"120":1,"125":1,"132":1,"149":1,"152":1,"178":1,"185":2,"199":2,"200":1,"205":1,"206":1,"207":1,"220":1,"232":1,"237":1,"240":1,"251":3,"252":1,"253":1,"254":3,"256":1,"258":2,"265":1,"271":1,"276":1,"278":1,"281":7,"288":1,"290":1,"299":1,"302":1,"304":1,"305":1,"306":1,"326":8,"330":1,"337":2,"338":2,"340":7,"345":1,"354":1,"358":1,"361":1,"369":1,"372":1,"374":1,"383":2,"384":2}}],["upstream",{"2":{"9":1,"173":1}}],["upgrade",{"2":{"13":1,"14":1,"200":1,"202":2}}],["upgradeable",{"2":{"8":1}}],["upgrades",{"2":{"8":1,"101":1}}],["unicode",{"2":{"383":2}}],["unified",{"2":{"153":1}}],["undelegating",{"2":{"377":1}}],["underpins",{"2":{"220":1}}],["under",{"2":{"93":1,"124":2,"184":1,"277":1,"348":1}}],["understanding",{"2":{"129":1,"199":1,"244":1,"261":1,"262":1,"324":2}}],["understand",{"2":{"24":1,"91":1,"101":1,"123":1,"169":1,"245":1,"261":1,"376":1}}],["unknown",{"2":{"289":3}}],["unpacked",{"2":{"208":1}}],["unstoppable",{"2":{"168":2}}],["unsafe",{"2":{"31":1,"104":1,"218":1}}],["unlikely",{"2":{"156":1}}],["unlike",{"2":{"129":1,"324":1}}],["unable",{"2":{"107":1}}],["uncommitted",{"2":{"97":1}}],["unconstrained",{"2":{"7":1}}],["unordered",{"2":{"76":1}}],["until",{"2":{"63":1}}],["unwrapsdkcontext",{"2":{"383":1,"384":1}}],["unwrap",{"2":{"45":1}}],["unwind",{"2":{"8":1}}],["usr",{"2":{"203":3,"251":1,"284":1}}],["us",{"2":{"92":1,"120":1,"146":1,"167":1,"250":1,"281":1,"283":1,"287":1,"289":1,"326":1,"336":1,"339":1,"371":1,"378":1,"381":1,"382":2,"383":1,"384":2}}],["usage",{"2":{"13":1,"14":1,"45":1,"46":1,"136":1,"200":1}}],["using",{"0":{"47":1,"125":1,"136":1,"142":1,"219":1,"222":1,"228":1,"235":1,"311":1},"1":{"126":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"236":1,"237":1,"238":1,"239":1,"240":1},"2":{"7":2,"13":1,"17":1,"39":1,"41":1,"42":1,"43":1,"45":1,"49":1,"50":1,"51":1,"70":1,"74":1,"76":1,"80":1,"84":1,"87":1,"93":1,"107":2,"110":1,"121":1,"125":1,"129":2,"133":1,"135":2,"137":1,"140":2,"141":1,"142":1,"150":1,"151":1,"173":1,"174":1,"175":2,"179":1,"181":1,"199":2,"215":2,"216":1,"222":2,"225":1,"230":1,"232":3,"233":1,"236":1,"245":1,"246":1,"254":2,"255":1,"256":1,"259":1,"265":1,"267":2,"276":1,"279":1,"286":2,"289":1,"299":1,"301":1,"306":1,"307":1,"319":4,"320":1,"324":1,"326":1,"331":1,"332":1,"340":1,"341":1,"342":1,"345":1,"349":1,"350":1,"357":1,"371":1,"377":1,"383":1,"388":1,"389":2,"390":1}}],["user",{"2":{"194":2,"213":1,"281":1,"326":1,"329":1,"331":1,"339":1,"377":1}}],["users",{"2":{"3":1,"30":1,"151":1,"157":1,"170":1,"184":2,"190":1,"194":1,"326":1,"339":1,"371":1}}],["useful",{"2":{"45":1,"46":1,"240":1,"345":1}}],["uses",{"2":{"16":1,"60":1,"123":1,"129":1,"130":1,"138":1,"153":1,"155":1,"181":1,"187":1,"196":1,"215":1,"241":1,"306":1,"371":1,"383":1,"384":1}}],["use",{"0":{"80":1,"89":1,"121":1,"128":1,"158":1,"162":1},"1":{"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"159":1,"160":1,"161":1},"2":{"5":1,"9":3,"10":1,"12":1,"14":1,"16":1,"24":1,"25":1,"28":1,"39":1,"44":1,"45":2,"46":1,"47":4,"48":1,"50":2,"52":1,"59":1,"63":1,"64":2,"67":1,"83":1,"86":1,"89":2,"91":5,"152":1,"153":1,"159":2,"172":1,"181":1,"188":1,"190":1,"199":1,"200":1,"203":1,"212":1,"216":1,"217":2,"218":1,"220":1,"241":1,"243":1,"244":1,"245":1,"250":2,"252":7,"258":1,"259":1,"261":3,"263":5,"264":1,"275":1,"279":2,"280":1,"283":1,"285":3,"286":2,"294":1,"297":1,"303":2,"304":1,"306":1,"315":1,"318":1,"320":2,"325":2,"332":1,"336":2,"338":1,"349":2,"363":1,"365":1,"367":1,"372":1,"383":1,"384":1,"387":1}}],["used",{"2":{"3":1,"7":1,"9":2,"14":1,"16":1,"17":1,"30":1,"47":2,"49":1,"60":1,"62":1,"63":2,"76":5,"89":1,"90":1,"106":2,"143":1,"150":1,"153":1,"157":1,"158":1,"172":1,"180":1,"181":1,"185":1,"196":2,"209":1,"226":1,"232":1,"241":1,"243":1,"245":1,"252":2,"254":1,"261":1,"281":1,"289":2,"292":1,"306":1,"319":1,"326":1,"339":1,"340":2,"363":1,"365":1,"380":1,"384":1,"388":1}}],["2s",{"2":{"350":1}}],["2e8da9bdf81f",{"2":{"340":1}}],["2b50989f65cd",{"2":{"340":1}}],["27",{"2":{"281":3}}],["2️",{"0":{"165":1}}],["26660",{"2":{"93":2}}],["26650",{"2":{"308":2,"320":3}}],["26659",{"2":{"67":2,"308":2,"320":2}}],["26658",{"2":{"67":2,"232":2,"243":1,"308":2,"320":2,"350":1}}],["26657",{"2":{"67":2,"135":1,"136":1,"179":2,"308":2,"326":5,"339":2,"340":1}}],["26656",{"2":{"59":1,"135":2,"326":2}}],["24ms",{"2":{"215":1}}],["24",{"2":{"76":3,"149":2,"196":1,"369":1}}],["24023uosmo",{"2":{"76":1}}],["29",{"2":{"302":1}}],["296353z",{"2":{"76":1}}],["293348z",{"2":{"76":1}}],["231649",{"2":{"150":2}}],["23",{"2":{"76":1,"249":1}}],["22",{"2":{"76":13,"201":1,"302":1,"352":2,"360":2}}],["2006",{"2":{"383":1,"384":2}}],["200000",{"2":{"327":1,"388":1}}],["2061",{"2":{"294":1,"315":1}}],["20b",{"2":{"274":1}}],["2020",{"2":{"281":1,"326":1,"340":1}}],["2024",{"2":{"76":12,"106":8,"196":2,"239":1,"243":1,"281":6,"326":9,"339":14,"344":6,"352":3,"360":2,"365":1}}],["2023",{"2":{"12":1,"14":1}}],["20s",{"2":{"74":2,"136":2}}],["20",{"2":{"74":1,"135":1,"136":1,"149":1,"232":1,"294":2,"302":1,"315":2}}],["259b1278264180a2aefc2085f1b55753849c4815",{"2":{"73":1}}],["2x",{"2":{"63":1}}],["2127672",{"2":{"232":1}}],["21pm",{"2":{"135":24,"326":24}}],["21",{"2":{"44":1,"66":1,"73":1,"307":1}}],["2",{"0":{"30":1,"119":1,"123":1,"156":1},"1":{"124":1},"2":{"7":1,"44":1,"49":1,"60":2,"63":1,"66":1,"67":1,"73":3,"87":1,"136":5,"137":1,"150":9,"196":2,"215":1,"251":1,"254":1,"263":1,"281":5,"283":2,"326":10,"336":1,"339":2,"340":2,"378":1,"385":1,"387":1}}],["1ether",{"2":{"297":1,"318":1}}],["1eb6366a5e16",{"2":{"281":1}}],["11t11",{"2":{"281":4}}],["11",{"2":{"196":1,"239":1,"243":1,"254":1,"274":25,"281":2,"326":1,"352":3,"360":2,"365":1}}],["11544",{"2":{"150":1}}],["118",{"2":{"74":2,"136":2}}],["17",{"2":{"215":4,"340":1}}],["172",{"2":{"135":1,"281":2,"326":1,"339":1}}],["17|14",{"2":{"106":8}}],["171590",{"2":{"76":1}}],["198f7873bbec",{"2":{"326":1}}],["19",{"2":{"76":1,"107":3,"108":3,"111":1,"203":1,"239":1,"340":2,"365":1}}],["14",{"2":{"76":1,"332":1,"339":1,"340":2,"363":1,"366":1}}],["18332",{"2":{"213":1}}],["18177uosmo",{"2":{"76":1}}],["18",{"2":{"76":1,"215":1,"294":1,"315":1,"340":3}}],["15|16",{"2":{"352":1}}],["15|15",{"2":{"352":2,"360":2}}],["15|14",{"2":{"239":1,"243":1,"365":1}}],["1594",{"2":{"306":1}}],["15s",{"2":{"196":1}}],["15utia",{"2":{"136":1}}],["150",{"2":{"136":1}}],["15",{"2":{"76":1,"118":1,"225":1,"232":1,"281":1,"326":9}}],["15t09",{"2":{"76":13}}],["16t14",{"2":{"339":13}}],["1657ab3f1c3942658a3993a0e3b54327",{"2":{"326":2}}],["165662",{"2":{"76":1}}],["167533",{"2":{"289":1}}],["16",{"2":{"203":6,"281":2,"339":2}}],["160",{"2":{"201":1}}],["162",{"2":{"135":1,"326":1}}],["163",{"2":{"135":1,"326":1}}],["1632",{"2":{"64":1}}],["1uosmo",{"2":{"74":1}}],["1utia",{"2":{"63":1}}],["13285",{"2":{"215":1}}],["1317",{"2":{"196":1}}],["1318",{"2":{"59":2}}],["13",{"2":{"67":2,"89":1,"106":4,"149":1,"196":1,"215":2,"216":1,"281":1,"340":2}}],["12345",{"2":{"388":1}}],["123809",{"2":{"289":1}}],["12350",{"2":{"215":1}}],["12d3koowsicdpmmtlf9fjbsshzc9uvp1cbnqkppbyvbgxhvbhauy",{"2":{"135":2,"326":2}}],["12d3koowjbd9tqomsssuyfhhmmgvy3lqcjxyfz8wq92qa6daqtmh",{"2":{"58":2}}],["124972",{"2":{"76":1}}],["126689",{"2":{"76":1}}],["12",{"2":{"76":1,"106":4,"135":23,"215":2,"284":1,"308":1,"320":1,"326":24}}],["127",{"2":{"58":1,"59":6,"120":1,"135":1,"179":2,"213":1,"217":1,"218":3,"222":1,"281":4,"285":1,"287":2,"288":1,"289":6,"302":1,"303":1,"326":3,"339":2}}],["101",{"2":{"149":1,"208":2}}],["10+",{"2":{"141":1}}],["109",{"2":{"135":1,"326":1}}],["10s",{"2":{"74":1,"136":1,"196":1}}],["10",{"0":{"38":1},"2":{"76":1,"106":8,"201":1,"215":3,"216":1,"232":3,"281":1,"320":2,"326":1,"340":1}}],["100uwasm",{"2":{"288":1,"289":1}}],["1000000urosm",{"2":{"196":1}}],["1000000utia",{"2":{"136":1}}],["10000000utia",{"2":{"136":1}}],["10000000stake",{"2":{"136":2}}],["100000000999876914",{"2":{"78":1}}],["100000000000000",{"2":{"78":1}}],["10000000000000000000000000stake",{"2":{"29":1}}],["1000000000stake",{"2":{"29":1}}],["1000000stake",{"2":{"78":1}}],["1000000",{"2":{"74":2,"136":1}}],["100000",{"2":{"74":2}}],["1000",{"2":{"37":1}}],["100ms",{"2":{"19":1}}],["100",{"2":{"19":1,"288":1,"369":1,"383":1,"384":1}}],["1stake",{"2":{"74":1,"137":1,"226":1}}],["1s",{"2":{"19":3}}],["1",{"0":{"29":1,"117":1,"122":1,"155":1,"164":1},"1":{"118":1},"2":{"7":2,"14":1,"18":2,"41":1,"47":1,"50":2,"58":2,"59":6,"63":3,"66":1,"67":1,"69":1,"74":4,"76":7,"77":1,"78":1,"79":2,"89":1,"103":1,"104":1,"120":1,"135":3,"136":5,"149":2,"150":3,"156":2,"157":2,"160":2,"179":2,"196":5,"203":2,"208":2,"213":2,"215":2,"217":1,"218":3,"222":2,"249":1,"251":1,"263":1,"280":1,"281":12,"285":2,"287":5,"288":2,"289":9,"294":3,"302":1,"303":1,"307":1,"315":3,"325":1,"326":12,"335":2,"339":4,"340":4,"350":1,"352":1,"369":1,"384":1,"385":1}}],["yml",{"2":{"338":2,"373":1}}],["ymlservices",{"2":{"252":1}}],["yarn",{"2":{"296":2,"317":2}}],["yamlname",{"2":{"338":1}}],["yamlglobal",{"2":{"74":1}}],["yaml",{"2":{"74":1,"136":1,"222":1,"252":2}}],["y",{"2":{"136":1,"137":1,"202":2,"208":1,"251":2,"285":1,"288":1,"289":1,"327":1,"377":1,"379":2,"381":2,"388":6}}],["yearning",{"2":{"339":3}}],["years",{"2":{"7":2,"9":1,"157":1}}],["yes",{"2":{"185":8,"274":1}}],["yellow",{"2":{"136":2,"369":1}}],["yet",{"2":{"18":1,"28":1,"167":1,"384":1,"388":2}}],["yourself",{"2":{"372":1}}],["yours",{"2":{"211":1}}],["yourrollup",{"2":{"60":1}}],["yourrollupd",{"2":{"57":2}}],["your",{"0":{"10":1,"20":1,"22":1,"25":1,"27":1,"30":1,"40":1,"44":1,"56":1,"68":1,"84":1,"85":1,"87":1,"101":1,"105":1,"109":1,"110":1,"112":1,"114":1,"117":1,"119":1,"120":1,"128":1,"133":1,"135":1,"147":1,"150":1,"224":1,"226":1,"233":1,"238":1,"239":1,"245":1,"250":1,"281":1,"320":1,"326":1,"330":1,"336":1,"344":1,"352":1,"359":1,"360":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"57":1,"58":1,"59":1,"69":1,"70":1,"86":1,"102":1,"103":1,"104":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"115":1,"116":1,"117":1,"118":2,"119":1,"120":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"251":1,"252":1,"253":1,"337":1,"338":1,"339":1},"2":{"2":5,"10":1,"11":1,"19":3,"20":2,"21":2,"22":1,"23":1,"24":1,"25":3,"26":2,"27":2,"28":2,"29":1,"30":2,"38":1,"39":3,"41":1,"42":2,"44":3,"45":4,"46":1,"47":2,"49":1,"50":5,"52":1,"55":1,"57":1,"59":3,"60":3,"61":1,"66":1,"70":2,"71":2,"73":1,"76":1,"78":4,"79":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":3,"88":2,"89":1,"91":8,"93":1,"101":3,"103":5,"104":6,"105":1,"106":9,"107":4,"108":1,"109":3,"110":2,"113":2,"115":3,"118":3,"119":2,"120":2,"123":1,"124":2,"127":1,"131":1,"132":1,"133":2,"140":1,"145":1,"147":3,"148":2,"149":9,"150":3,"155":2,"164":1,"172":1,"173":1,"197":1,"207":1,"208":2,"209":1,"210":1,"212":1,"213":1,"214":1,"218":1,"220":1,"221":1,"222":6,"225":2,"226":2,"229":1,"230":3,"232":10,"233":2,"236":3,"237":1,"238":1,"239":2,"240":1,"241":2,"245":5,"247":2,"251":1,"253":2,"254":4,"255":1,"258":1,"261":2,"262":1,"267":1,"268":1,"269":1,"270":1,"273":1,"274":1,"275":3,"276":1,"277":3,"278":1,"285":1,"289":2,"290":1,"294":2,"296":2,"297":4,"298":2,"301":4,"302":3,"303":2,"307":2,"311":1,"313":2,"315":2,"317":2,"318":4,"319":5,"320":4,"321":1,"322":4,"327":1,"329":3,"330":7,"331":1,"333":2,"338":2,"339":1,"340":3,"341":1,"342":1,"343":1,"345":1,"349":5,"351":2,"352":7,"354":2,"357":3,"358":2,"359":2,"360":4,"361":2,"362":2,"371":3,"372":2,"373":2,"375":1,"384":1,"390":1}}],["you",{"0":{"158":1,"162":1},"1":{"159":1,"160":1,"161":1},"2":{"0":2,"2":1,"4":1,"5":1,"10":1,"11":2,"18":1,"19":4,"20":3,"21":1,"22":1,"23":1,"24":2,"25":1,"26":1,"27":1,"28":4,"30":2,"32":1,"39":1,"41":7,"44":2,"45":3,"47":2,"48":3,"49":2,"50":2,"51":2,"52":1,"55":1,"60":3,"61":1,"67":4,"70":2,"74":1,"75":1,"76":4,"77":1,"80":1,"81":2,"82":1,"85":1,"86":1,"87":1,"88":1,"89":1,"91":4,"92":1,"101":4,"102":1,"103":4,"104":5,"105":1,"106":12,"107":6,"108":1,"109":3,"110":1,"111":1,"113":1,"116":3,"118":1,"119":4,"120":2,"121":2,"124":1,"125":3,"126":1,"127":2,"129":1,"133":4,"135":1,"138":1,"140":1,"142":1,"143":1,"145":3,"147":2,"148":1,"150":1,"151":1,"152":3,"155":1,"162":3,"163":2,"167":2,"168":1,"172":1,"173":2,"175":1,"188":1,"194":1,"196":1,"199":2,"203":1,"205":1,"208":2,"210":1,"212":2,"213":2,"214":1,"215":1,"217":2,"218":1,"220":3,"221":2,"222":2,"223":1,"225":2,"226":1,"227":1,"229":1,"230":3,"232":3,"233":1,"234":1,"236":1,"238":1,"239":1,"240":1,"241":2,"243":3,"244":2,"245":6,"246":2,"247":1,"249":2,"251":3,"253":2,"254":8,"255":1,"256":1,"258":2,"259":1,"260":2,"261":8,"262":1,"263":1,"265":2,"267":1,"268":2,"273":1,"274":1,"275":2,"276":1,"278":1,"279":1,"280":2,"281":3,"283":1,"284":1,"285":4,"286":2,"289":3,"290":2,"292":1,"294":1,"296":4,"297":6,"298":2,"299":1,"301":6,"302":1,"303":3,"304":1,"305":2,"307":2,"308":2,"312":1,"313":2,"315":1,"317":4,"318":6,"319":4,"320":4,"321":2,"324":1,"325":2,"326":3,"327":3,"329":2,"330":1,"331":2,"332":2,"333":1,"335":2,"337":3,"338":2,"339":2,"340":10,"341":1,"345":1,"349":3,"350":1,"351":1,"352":3,"354":2,"357":1,"359":1,"360":1,"361":2,"365":3,"368":3,"369":3,"371":4,"372":4,"373":2,"384":2,"388":13,"389":7,"390":1}}],["74b6708de48e",{"2":{"340":1}}],["7fec3d659452",{"2":{"326":1}}],["775883b14f7f",{"2":{"339":1}}],["775883b14f7f4db393addcebe3afe34d",{"2":{"339":1,"340":2}}],["7700c0b72195",{"2":{"281":1}}],["774628",{"2":{"14":1}}],["782dec73fcf8",{"2":{"281":1}}],["735",{"2":{"243":1}}],["7980",{"2":{"55":1,"59":1,"132":1,"135":1,"237":1,"239":3,"252":3,"254":1,"271":1,"278":1,"281":4,"326":4,"339":3,"340":1,"351":3,"352":2}}],["7x",{"2":{"14":1}}],["7",{"0":{"35":1},"2":{"7":1,"89":2,"196":1,"254":1,"258":4,"281":1,"312":9,"326":1,"340":1}}],["h",{"2":{"208":1,"301":1,"350":1}}],["hub",{"2":{"161":1}}],["hundred",{"2":{"10":1}}],["home",{"2":{"320":1}}],["homebrew",{"2":{"301":1}}],["hold",{"2":{"281":1,"326":1,"340":1}}],["hole",{"2":{"162":1}}],["hours",{"2":{"196":1,"254":1,"326":6,"369":1}}],["honest",{"2":{"188":1}}],["hosted",{"2":{"348":1}}],["host",{"2":{"147":1,"213":1,"222":1,"252":1,"258":1,"260":1,"350":2,"371":1}}],["hopefully",{"2":{"91":1}}],["hood",{"2":{"71":2,"75":2,"348":1}}],["however",{"2":{"135":1,"168":1,"194":2}}],["how",{"0":{"16":1,"19":1,"20":1,"27":1,"62":1,"63":1,"80":1,"89":1,"90":1,"91":1,"93":1,"101":1,"105":1,"114":1,"121":1,"128":1,"158":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"92":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"102":1,"103":1,"104":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"159":1,"160":1,"161":1},"2":{"7":1,"16":3,"18":1,"26":1,"49":1,"52":1,"54":1,"64":2,"89":1,"101":1,"105":1,"111":1,"114":1,"121":1,"129":1,"130":1,"140":1,"151":1,"160":1,"187":1,"199":5,"230":1,"245":1,"246":1,"250":1,"255":1,"261":1,"262":1,"263":2,"279":2,"286":1,"313":1,"329":1,"331":1,"332":1,"336":1,"341":1,"345":1,"367":1,"368":1,"372":1,"378":1,"381":1,"388":1}}],["https",{"2":{"67":2,"69":1,"70":1,"73":1,"81":1,"122":1,"130":1,"131":1,"132":1,"133":1,"136":2,"145":1,"196":7,"203":1,"204":1,"213":1,"225":3,"237":1,"251":2,"257":1,"261":1,"271":1,"272":1,"281":1,"291":1,"293":1,"300":1,"306":1,"309":1,"310":1,"314":1,"321":1,"326":1,"339":1,"343":1,"350":1,"358":2,"368":1,"371":1}}],["http",{"2":{"59":1,"74":2,"135":2,"136":1,"179":4,"213":1,"218":3,"222":1,"239":2,"252":1,"261":1,"281":6,"285":1,"287":2,"288":1,"289":6,"303":1,"326":3,"330":1,"338":1,"339":3,"350":1,"351":3,"352":2,"353":1}}],["hints",{"2":{"369":1}}],["hire",{"2":{"47":1}}],["history",{"0":{"223":1},"2":{"212":1}}],["histogram",{"2":{"95":1,"97":1,"99":1}}],["his",{"2":{"14":1}}],["highlight",{"2":{"369":3}}],["high",{"2":{"8":1,"18":1,"63":1,"64":1,"143":1,"157":2,"168":1,"327":1}}],["happen",{"2":{"373":1}}],["happy",{"2":{"168":1}}],["halts",{"2":{"264":1}}],["halt",{"2":{"194":1}}],["hands",{"2":{"261":1,"275":1,"303":1}}],["handshake",{"2":{"76":5}}],["handful",{"2":{"145":1,"217":1}}],["handles",{"2":{"382":1}}],["handled",{"2":{"177":1}}],["handle",{"2":{"47":2,"133":1,"225":1,"232":1,"378":1}}],["handler",{"2":{"9":1}}],["handling",{"0":{"49":1},"2":{"42":1,"377":1}}],["had",{"2":{"16":1}}],["hasn",{"2":{"384":2}}],["hashing",{"2":{"389":1}}],["hash=f159e11116ec9505fc2c0d97e605357fec0f3dae06b57bfb17ea6a548905043e",{"2":{"388":1}}],["hash=c93d26aee9b611952c8122deb67dbad95b3604f5c9c5dfba95a3e7a4cf0af641",{"2":{"340":1}}],["hash=8c751ba9edcfad7f92e0e940995b0155bdc856070b876373299e7820c32f0b8b",{"2":{"340":2}}],["hash=826541369149f3f8de5a53f5b4174c51975bcc665f0e73b1db69d9206e4f5563",{"2":{"340":2}}],["hash=313f7c52e30b3dee3511d66b3e2c1b2a56df4cde54a90b02ac79678d822b644a",{"2":{"340":1}}],["hash=ac959f089c21dc617275e0ab35e77dc3839c9597ecfdecdad6c924ec49b1eb07",{"2":{"312":1}}],["hash=e09f4a71e216d85f4ccb9fcbcee53d82bca597451c1d4b4fce0e4081b5fa40e3",{"2":{"281":2}}],["hash=e71622a57b08d28613a34e3d7ad36bf294cf5a88f4cdd5dd18e6fb65c76f7209",{"2":{"281":2}}],["hash=e483920a1e1e7e492e47036300003769420813bb13bb3f25cfafdb0df19c144a",{"2":{"258":2}}],["hash=004216246ae7750d578035ea1c6cd13330bd91a0c3fdd628f96d514acf691be5",{"2":{"274":2}}],["hash=0x5207a1ff35540dafe70565d3a95ed07f6c9b1ed9114f93c6c47ee0a1c0d4cc2e",{"2":{"312":1}}],["hash=0x314b131b1d4117445091b25240eaf420cdbdcf9f653eabd1d95aa0dab3cd1359",{"2":{"312":1}}],["hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4",{"2":{"274":6}}],["hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843",{"2":{"274":7}}],["hash=1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5",{"2":{"210":1}}],["hash=$",{"2":{"137":1,"285":1}}],["hash=235d3710d61f347dbbbdd6fd63aa7687842d1ef9cb475c712856d7da32f82f09",{"2":{"135":2,"326":2}}],["hash=",{"2":{"106":4,"312":1,"344":1}}],["hash",{"0":{"210":1},"2":{"76":4,"78":1,"79":1,"131":1,"137":1,"149":1,"196":14,"210":3,"211":2,"285":2,"286":1,"287":2,"294":1,"315":1,"327":1,"343":1,"383":3,"384":5,"388":3,"389":1}}],["has",{"2":{"14":2,"16":1,"63":1,"64":1,"71":2,"75":1,"78":1,"79":1,"100":1,"155":2,"160":1,"173":1,"194":1,"214":1,"217":1,"218":1,"251":1,"263":1,"274":2,"281":1,"283":1,"289":1,"306":1,"313":1,"326":1,"382":1,"383":2,"388":2}}],["having",{"2":{"7":1,"153":1}}],["haven",{"2":{"116":1,"135":1}}],["have",{"2":{"4":1,"7":1,"8":2,"9":1,"12":1,"19":1,"20":1,"28":3,"55":1,"60":1,"102":1,"106":1,"116":1,"118":1,"125":1,"143":1,"147":1,"148":1,"151":1,"152":1,"157":1,"175":1,"197":1,"199":2,"213":1,"214":1,"215":1,"220":1,"223":1,"229":1,"236":1,"241":1,"243":1,"244":1,"245":1,"247":1,"252":1,"253":1,"261":3,"265":2,"268":1,"281":2,"283":1,"286":1,"289":1,"290":1,"297":1,"298":1,"301":2,"307":1,"312":1,"318":1,"326":2,"329":2,"333":1,"338":1,"339":1,"349":3,"351":1,"354":1,"357":1,"361":1,"365":1,"368":3,"369":3,"383":1,"384":1,"387":1}}],["hacks",{"2":{"7":1,"8":1}}],["hardhat",{"2":{"372":1}}],["hardcoded",{"2":{"136":1}}],["hardforks",{"2":{"101":1}}],["hard",{"2":{"7":1,"8":1}}],["hello",{"2":{"261":1}}],["helper",{"2":{"245":1,"373":1,"383":1}}],["helpers",{"0":{"46":1},"2":{"42":1,"46":1,"49":1}}],["helps",{"2":{"2":1,"54":1,"127":1,"383":1,"384":1}}],["help",{"2":{"0":1,"3":1,"12":1,"41":1,"91":1,"163":1,"280":1,"299":1,"325":1,"350":1,"371":3,"382":1}}],["hex",{"2":{"213":1,"232":1,"259":1,"295":1,"316":1,"320":1,"383":3,"384":4}}],["height=6",{"2":{"340":4}}],["height=5",{"2":{"340":2}}],["height=41",{"2":{"274":1}}],["height=40",{"2":{"274":4}}],["height=4",{"2":{"258":1}}],["height=39",{"2":{"274":1}}],["height=3",{"2":{"258":3}}],["height=$",{"2":{"225":1,"232":1,"321":2}}],["height=included",{"2":{"179":1}}],["height=223",{"2":{"344":2}}],["height=22",{"2":{"135":4,"326":4}}],["height=28126",{"2":{"108":1}}],["height=8",{"2":{"106":4,"340":2}}],["height=7",{"2":{"106":4,"340":4}}],["height=12",{"2":{"312":3}}],["height=11",{"2":{"312":4}}],["height=138",{"2":{"281":3}}],["height=137",{"2":{"281":4}}],["height=1",{"2":{"60":1,"179":1,"196":1}}],["height",{"0":{"209":1},"2":{"76":4,"96":4,"103":1,"104":1,"106":1,"174":2,"178":1,"179":1,"180":4,"196":2,"209":1,"210":1,"211":2,"213":1,"225":6,"226":2,"232":6,"233":2,"289":1,"321":4,"327":1,"353":2,"388":2}}],["health",{"2":{"179":1}}],["healthy",{"2":{"12":1}}],["headercount=14",{"2":{"352":1}}],["header",{"0":{"211":1},"2":{"196":1,"211":2,"225":1,"232":2,"321":3,"366":1}}],["headerinch",{"2":{"178":1}}],["headers",{"2":{"170":1,"178":2,"179":1,"181":1,"184":1,"188":2,"190":1,"352":1}}],["head",{"2":{"119":1,"162":1,"232":1,"274":3,"321":1}}],["hear",{"2":{"11":1}}],["here>",{"2":{"222":1}}],["here",{"2":{"0":1,"5":1,"18":1,"19":1,"29":1,"50":1,"70":1,"81":1,"91":1,"130":1,"141":1,"144":1,"145":1,"168":1,"190":1,"194":1,"197":1,"215":2,"218":1,"222":1,"225":1,"233":1,"246":1,"249":1,"258":1,"279":1,"280":1,"288":1,"292":1,"325":1,"332":1,"335":1,"336":1,"371":1,"373":1,"379":1,"381":1,"382":1,"383":1,"384":1,"385":2,"388":1,"389":3}}],["vue",{"2":{"373":2,"389":1}}],["v",{"2":{"284":1,"320":1}}],["vv",{"2":{"215":1}}],["vlog",{"2":{"103":2,"104":1}}],["v1beta1",{"2":{"196":2,"327":1}}],["v1",{"2":{"76":8,"225":2,"306":1}}],["v2",{"2":{"73":1,"136":1,"249":1,"306":1}}],["v21",{"2":{"69":1}}],["v28",{"2":{"66":1,"67":2}}],["v0",{"2":{"67":3,"73":1,"89":2,"196":1,"281":6,"283":2,"308":1,"320":1,"326":4,"332":1,"338":1,"339":2,"340":1,"363":1,"366":1}}],["vesting",{"2":{"377":1}}],["vector",{"2":{"281":1,"326":1,"340":1}}],["venue",{"2":{"47":1}}],["verified",{"2":{"150":1,"151":1}}],["verifierscript",{"2":{"149":3}}],["verifier",{"0":{"148":1},"1":{"149":1},"2":{"140":1,"146":10,"147":3,"149":12,"150":1,"274":2}}],["verification",{"2":{"140":1,"274":1}}],["verifiable",{"2":{"140":2,"151":1}}],["verifybatch",{"2":{"364":2}}],["verifyfraudproof",{"2":{"188":1}}],["verifyproof",{"2":{"150":2}}],["verifying",{"0":{"60":1},"2":{"147":1}}],["verify",{"0":{"140":1,"150":1},"2":{"8":2,"64":1,"71":2,"73":1,"75":2,"131":1,"136":2,"137":1,"140":1,"148":1,"150":1,"157":2,"161":1,"170":2,"178":2,"183":2,"188":1,"249":1,"274":2,"278":1,"280":1,"281":1,"325":1,"326":1,"335":1,"340":1,"343":1,"388":1}}],["very",{"2":{"46":1,"146":1,"242":1}}],["version",{"2":{"44":2,"64":1,"66":2,"73":3,"76":1,"122":1,"131":3,"136":1,"173":1,"196":2,"203":1,"205":2,"215":1,"230":7,"249":2,"280":3,"306":2,"307":1,"325":3,"335":3,"343":3,"372":1}}],["ve",{"2":{"19":1,"26":1,"61":1,"88":1,"91":1,"113":1,"119":1,"120":1,"136":1,"138":1,"151":1,"216":1,"218":1,"227":1,"234":1,"245":1,"276":1,"305":1,"331":1,"390":1}}],["visit",{"2":{"278":1}}],["visiting",{"2":{"152":1,"319":1}}],["view",{"2":{"150":1,"196":1,"215":2,"226":1,"233":1,"322":1}}],["vital",{"2":{"136":2}}],["vitepress",{"2":{"1":1}}],["virtual",{"2":{"10":1,"159":1,"267":1,"306":1}}],["viable",{"2":{"14":1}}],["via",{"2":{"8":2,"9":2,"163":1,"175":1,"177":1,"187":1,"254":1,"281":1,"327":1,"338":1,"339":1,"340":1,"350":1,"363":1,"366":1,"389":1}}],["vm",{"2":{"7":2,"149":2,"216":2,"256":2}}],["varying",{"2":{"377":1}}],["var",{"2":{"47":1,"383":6,"384":10}}],["various",{"2":{"245":2,"277":1,"366":1}}],["variable",{"2":{"57":1,"58":1,"59":1,"147":1,"150":1,"209":1,"210":1,"217":2,"218":1,"286":1}}],["variables",{"0":{"29":1},"2":{"28":1,"29":1,"78":1,"213":1,"285":3}}],["variant",{"2":{"46":1}}],["variety",{"2":{"5":1}}],["valuable",{"2":{"156":1}}],["values",{"2":{"232":1,"381":1}}],["value",{"2":{"4":1,"46":1,"74":2,"136":2,"145":1,"215":9,"225":1,"232":1,"287":2,"297":1,"318":1,"382":1,"384":1,"388":1}}],["val",{"2":{"106":2,"135":1,"258":1,"274":1,"281":2,"312":1,"326":1,"340":3,"344":1}}],["valid",{"2":{"194":2}}],["validating",{"2":{"376":1}}],["validation",{"0":{"192":1}}],["validates",{"2":{"364":1}}],["validate",{"2":{"54":1,"194":1}}],["validators",{"2":{"8":2,"37":1,"156":2,"196":2}}],["validator",{"0":{"32":1},"2":{"7":1,"8":1,"10":1,"32":1,"37":2,"39":1,"103":2,"104":2,"156":1,"157":1,"196":1,"344":3}}],["validity",{"0":{"186":1,"189":1},"1":{"187":1,"188":1,"189":1},"2":{"10":1,"167":1,"183":1,"184":1,"187":1,"189":1,"194":1}}],["e2e",{"2":{"321":1}}],["ephemeral",{"2":{"273":1,"274":1}}],["eoa",{"2":{"263":1}}],["eyjbbgxvdyi6wyjwdwjsawmilcjyzwfkiiwid3jpdguixx0",{"2":{"232":1}}],["eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9",{"2":{"232":1}}],["eye",{"2":{"72":1}}],["emit",{"2":{"215":3}}],["empty",{"2":{"45":1,"74":1,"89":1,"383":2,"385":1}}],["empty>>",{"2":{"45":1}}],["empower",{"2":{"8":1,"153":1}}],["e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",{"2":{"196":4}}],["etc",{"2":{"170":1}}],["eth1",{"2":{"274":7}}],["eth",{"2":{"149":1,"218":1,"275":1,"292":1,"294":1,"297":1,"315":1,"318":1}}],["ethermintd",{"2":{"218":1}}],["ethermint",{"0":{"213":1,"218":1},"1":{"214":1,"215":1,"216":1,"217":1,"218":1},"2":{"17":1,"213":5,"214":3,"218":4}}],["ethereum",{"0":{"273":1},"2":{"7":2,"8":1,"14":1,"267":1,"273":1,"297":1,"306":1,"318":1}}],["escrow",{"2":{"383":1}}],["estimate",{"2":{"289":1}}],["establish",{"2":{"136":1,"225":1}}],["essentially",{"2":{"345":1}}],["essentials",{"2":{"261":1}}],["essential",{"2":{"169":1,"174":1,"202":2,"251":1,"262":1,"270":1}}],["e",{"2":{"167":1,"185":1,"196":1,"225":1,"232":4,"320":2,"363":1}}],["economic",{"2":{"157":1}}],["ecosystem",{"2":{"7":1,"14":1,"220":1,"279":1}}],["echo",{"2":{"136":1,"203":2,"208":2,"225":1,"232":4,"281":1,"285":1,"287":1,"289":1,"326":1,"340":1}}],["ed0233f8291d",{"2":{"326":1}}],["ed0233f8291d4a42bdd0e173393af809",{"2":{"326":3}}],["edt",{"2":{"281":1,"326":1,"339":1}}],["edge",{"2":{"220":1}}],["educational",{"2":{"132":1,"245":1}}],["editor",{"2":{"74":1}}],["edit",{"2":{"67":1,"134":1}}],["efficient",{"2":{"199":1}}],["efficiently",{"2":{"127":1}}],["effect",{"2":{"156":1}}],["effectivegasprice",{"2":{"150":1}}],["effectively",{"2":{"91":1,"263":1}}],["either",{"2":{"102":1,"136":2,"216":1,"320":1}}],["errinvalidrequest",{"2":{"383":3,"384":4}}],["err",{"2":{"108":3,"383":3,"384":6}}],["errtxinmempoolcache",{"2":{"107":2}}],["error=",{"2":{"108":3}}],["errors",{"0":{"108":1},"2":{"108":1,"133":1,"285":1,"383":5,"384":6,"388":2}}],["error",{"2":{"60":1,"107":6,"111":1,"242":3,"278":1,"289":3,"364":1,"383":1,"384":1,"385":2,"388":3}}],["eric",{"2":{"14":1}}],["else",{"2":{"41":1,"383":1,"384":2}}],["eliminates",{"2":{"157":1}}],["eliminate",{"2":{"10":1}}],["equality",{"2":{"215":1}}],["eq",{"2":{"41":1,"47":1}}],["evidence",{"2":{"196":3}}],["evicted",{"2":{"97":2}}],["evm++",{"0":{"256":1,"261":1},"1":{"257":1,"258":1,"259":1,"260":1,"261":1,"262":2,"263":2,"264":1,"265":1},"2":{"256":2,"261":3,"265":3}}],["evm",{"0":{"17":1,"142":1,"290":1,"306":1,"311":1,"319":1,"322":1},"1":{"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1,"314":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":2,"321":2,"322":2},"2":{"12":1,"13":1,"17":2,"60":2,"91":1,"141":1,"142":2,"148":1,"149":3,"150":1,"163":1,"199":1,"213":1,"256":1,"259":1,"267":2,"273":1,"275":1,"290":2,"293":1,"294":3,"298":2,"302":4,"303":1,"306":4,"307":1,"308":1,"312":3,"314":1,"315":2,"372":1}}],["ever",{"2":{"10":1,"14":1}}],["everyone",{"2":{"383":1}}],["everyday",{"2":{"157":1}}],["everybody",{"2":{"41":1}}],["everything",{"2":{"25":1,"59":1,"372":1}}],["every",{"2":{"2":1,"120":1,"155":1,"196":1,"208":3,"363":1,"369":2,"384":1,"389":1}}],["eventual",{"2":{"185":2}}],["eventually",{"2":{"63":1}}],["eventbus",{"2":{"135":1,"326":1}}],["events",{"2":{"106":2,"120":2,"135":1,"258":1,"274":2,"281":1,"287":1,"289":1,"312":1,"326":1,"340":3,"388":2}}],["event",{"2":{"76":1}}],["even",{"2":{"10":1,"19":1,"89":1,"157":1,"158":1,"366":1,"388":1}}],["early",{"2":{"12":1,"13":1,"15":1,"18":1,"136":2}}],["each",{"2":{"7":1,"46":1,"72":2,"75":2,"95":1,"98":3,"174":1,"225":1,"232":1,"242":1,"373":1,"376":2,"378":1,"381":1,"382":2,"384":1}}],["easiest",{"2":{"342":1}}],["easier",{"2":{"91":1,"157":1,"245":1}}],["easily",{"2":{"14":1,"152":1,"168":1}}],["ease",{"2":{"7":1,"252":3}}],["easy",{"2":{"7":1,"18":1,"41":1,"153":1,"157":1,"200":2,"372":1,"376":1}}],["exit",{"2":{"254":1,"340":1}}],["exist",{"2":{"251":1,"376":1}}],["exists",{"2":{"107":2,"384":1}}],["existing",{"0":{"31":1},"2":{"8":1,"19":2,"20":1,"22":1,"31":2,"62":2,"63":1,"89":2,"90":2,"159":1,"160":1,"224":1}}],["exec",{"2":{"254":1,"259":1,"260":1,"285":1,"321":1,"327":1,"340":1}}],["executable",{"2":{"251":2}}],["executing",{"2":{"120":1,"125":1,"129":1,"185":1,"324":1,"326":2,"339":2}}],["execution",{"0":{"159":1},"2":{"7":1,"8":1,"12":1,"15":2,"17":1,"18":1,"26":1,"60":1,"150":1,"155":1,"157":1,"161":1,"162":1,"199":2,"200":2,"245":1,"256":2,"273":1,"302":1,"344":1}}],["executed",{"2":{"106":2,"135":1,"157":1,"258":1,"274":1,"281":2,"312":1,"326":1,"340":3}}],["executefns",{"2":{"46":2,"49":1}}],["execute",{"2":{"45":1,"46":1,"49":1,"122":1,"130":1,"167":1,"170":1,"188":1,"202":1,"289":3,"302":1,"344":1,"366":1}}],["executemsgfns",{"2":{"46":1}}],["executemsg",{"2":{"45":2,"46":3,"49":2}}],["exercise",{"2":{"211":1}}],["extended",{"2":{"389":1}}],["extending",{"0":{"389":1}}],["extend",{"2":{"263":1,"367":1,"369":1,"388":1}}],["extensions",{"2":{"256":2}}],["extension",{"2":{"74":2,"136":2,"197":1,"256":1,"289":1,"327":2,"329":1,"388":2}}],["external",{"2":{"8":1,"297":1,"318":1}}],["extra",{"2":{"74":2,"136":2}}],["exotic",{"2":{"71":2,"75":2}}],["examples",{"0":{"52":1,"263":1},"2":{"42":1,"52":2,"245":2,"263":1,"389":1}}],["example",{"0":{"108":1,"126":1},"2":{"19":2,"29":1,"30":1,"38":1,"41":1,"43":1,"46":1,"48":1,"52":2,"62":1,"89":1,"90":1,"106":2,"107":2,"120":1,"124":1,"149":2,"175":1,"196":3,"214":1,"215":1,"222":1,"225":1,"233":1,"254":1,"263":3,"339":4,"340":1,"349":1,"366":1,"368":1,"388":1,"389":1}}],["exposes",{"2":{"153":1,"377":1}}],["exported",{"2":{"98":1,"353":1}}],["export",{"2":{"45":1,"46":1,"133":1,"147":1,"149":2,"203":2,"218":2,"294":3,"315":3,"327":2}}],["explain",{"2":{"384":1}}],["explaining",{"2":{"151":1}}],["exploring",{"2":{"279":1,"331":1}}],["exploration",{"2":{"129":1}}],["explorer",{"2":{"119":1,"150":1,"196":2,"322":1}}],["explorers",{"2":{"9":1,"233":2}}],["explore",{"2":{"52":1,"92":1,"114":1,"115":1,"167":1,"199":1,"244":1,"345":1,"390":1}}],["expects",{"2":{"349":1}}],["expecting",{"2":{"306":1,"352":1,"359":1}}],["expected",{"2":{"289":1,"385":1}}],["experienced",{"2":{"331":1}}],["experience",{"2":{"261":1,"275":1,"285":1,"303":1,"368":1}}],["experimentation",{"2":{"153":1,"160":1}}],["experiment",{"2":{"19":1,"159":1,"277":1,"305":1}}],["expertise",{"2":{"156":1}}],["expensive",{"2":{"8":1,"151":1}}],["expanded",{"2":{"256":1}}],["expand",{"2":{"12":1}}],["excessively",{"2":{"8":1}}],["exciting",{"2":{"6":1,"162":1}}],["enclave",{"2":{"281":3,"326":3,"336":1,"339":3}}],["encodetostring",{"2":{"383":2,"384":3}}],["encoded",{"2":{"46":1,"295":1,"316":1}}],["encoding",{"2":{"383":1,"384":1}}],["encourage",{"2":{"373":1}}],["encountered",{"2":{"157":1}}],["encounter",{"2":{"107":1,"278":1,"301":1}}],["engine",{"2":{"274":5,"280":2,"281":2,"325":2,"326":2,"335":2,"339":2,"340":2}}],["enough",{"2":{"222":1}}],["enjoy",{"2":{"157":1}}],["entries",{"2":{"344":1}}],["entry",{"2":{"123":1,"156":1,"384":5}}],["entrypoint",{"2":{"30":2,"124":3,"251":9,"259":1,"321":1}}],["enter",{"2":{"254":1,"327":1,"340":1,"373":1}}],["entering",{"2":{"254":1,"259":1,"340":1}}],["entire",{"2":{"103":1}}],["enhance",{"2":{"83":1,"262":1}}],["enhanced",{"2":{"20":1,"173":1,"256":1}}],["env`",{"2":{"47":1}}],["env",{"2":{"47":2}}],["environments",{"2":{"12":1,"18":1,"150":1,"157":1,"199":1,"200":2}}],["environment",{"0":{"159":1,"214":1,"250":1,"336":1},"1":{"251":1,"252":1,"253":1,"337":1,"338":1,"339":1},"2":{"7":1,"41":1,"58":1,"59":1,"67":1,"147":1,"149":1,"150":1,"155":1,"199":1,"214":1,"217":2,"240":1,"245":2,"251":3,"254":1,"264":1,"286":1,"304":1,"330":1,"337":2,"369":1}}],["enum",{"2":{"46":2}}],["endpoint",{"2":{"118":1,"196":1,"217":1,"225":1}}],["end",{"2":{"41":1,"76":1,"129":1,"151":1,"199":1,"312":1,"324":1,"369":1,"389":1}}],["ensuring",{"2":{"140":1,"239":1,"352":1,"360":1,"389":1}}],["ensures",{"2":{"63":1,"220":1,"252":1,"384":1}}],["ensure",{"2":{"2":1,"30":2,"55":1,"75":1,"106":1,"125":1,"133":1,"220":1,"229":1,"236":1,"251":1,"258":1,"268":1,"278":1,"321":1,"349":1,"352":1,"357":1,"359":1,"383":2,"384":1,"388":1}}],["enshrine",{"2":{"9":1}}],["enshrined",{"2":{"7":2,"8":2}}],["enable",{"2":{"93":1,"136":1,"140":1,"174":1,"188":1}}],["enabled",{"2":{"14":1,"25":1,"129":1,"173":1,"188":1,"353":1}}],["enables",{"2":{"7":1,"9":1,"157":1,"181":1,"256":1,"265":1}}],["enabling",{"2":{"7":1,"12":1,"46":1,"200":1,"220":1,"258":1}}],["enforce",{"2":{"7":1}}],["pwd",{"2":{"284":2}}],["pseudo",{"2":{"377":1}}],["psprovider",{"2":{"301":1}}],["psdrive",{"2":{"301":1}}],["ps",{"2":{"254":1,"281":2,"321":1,"326":2,"340":2}}],["pkg",{"2":{"202":1}}],["py",{"2":{"146":1,"147":2}}],["python",{"0":{"143":1},"2":{"141":2,"143":3,"146":1,"338":1}}],["p",{"2":{"67":4,"136":1,"308":5,"320":3}}],["person",{"2":{"381":1,"384":1}}],["persist",{"2":{"350":1}}],["persistence",{"2":{"332":1}}],["perspective",{"2":{"229":1,"327":1}}],["performance",{"2":{"277":2}}],["perform",{"2":{"217":1,"218":1}}],["perfect",{"2":{"156":1}}],["per",{"2":{"178":2,"369":1,"383":2,"384":1}}],["periods",{"2":{"63":1}}],["peer",{"2":{"98":11,"181":1}}],["peers",{"2":{"98":2,"181":1}}],["pending",{"0":{"90":1},"2":{"90":4,"91":1,"98":2,"353":2}}],["pessimistic",{"0":{"187":1},"2":{"10":1,"167":1,"187":3}}],["p2p",{"0":{"58":1,"98":1,"181":1},"2":{"58":4,"59":4,"98":7,"109":1,"135":3,"181":2,"188":2,"190":1,"194":1,"232":2,"281":1,"319":1,"320":2,"326":3}}],["pip",{"2":{"143":1}}],["pipe",{"2":{"47":1}}],["piece",{"2":{"14":1,"382":1}}],["plaintext",{"2":{"389":1}}],["plain",{"2":{"259":1}}],["plan",{"2":{"338":4}}],["planned",{"2":{"185":3,"189":1}}],["plans",{"2":{"185":1}}],["placed",{"2":{"157":1,"208":2}}],["place",{"2":{"72":1,"194":1,"284":1,"371":1}}],["platform",{"2":{"67":1,"114":1,"161":1,"279":1,"308":1}}],["played",{"2":{"261":1}}],["play",{"2":{"18":1}}],["plus",{"2":{"48":1,"50":1,"155":1}}],["plugin",{"2":{"203":1}}],["pluggable",{"2":{"185":1}}],["plugged",{"2":{"174":1}}],["plug",{"2":{"15":1}}],["please",{"2":{"2":1,"4":1,"26":1,"92":1,"124":1,"144":1,"167":1,"261":1}}],["panic",{"2":{"384":1}}],["particular",{"2":{"377":1}}],["part",{"2":{"369":1,"372":1}}],["party",{"2":{"366":1}}],["parts",{"2":{"196":3}}],["parent",{"2":{"274":4}}],["paradigm",{"2":{"204":1,"291":1,"310":1}}],["parameter",{"2":{"99":1,"179":1,"379":1}}],["parameters",{"0":{"180":1},"2":{"24":1,"260":1}}],["param",{"2":{"99":1}}],["paragraph",{"2":{"48":1}}],["paid",{"2":{"149":1,"294":1,"315":1}}],["pagination",{"2":{"78":1,"79":1,"136":1,"287":1,"289":2,"328":2}}],["page",{"2":{"41":1,"152":1,"170":1,"330":1}}],["packets",{"0":{"72":1,"77":1},"1":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1}}],["packages",{"2":{"50":2,"202":1}}],["package",{"2":{"16":3,"49":1,"50":2,"143":1,"175":1,"182":1,"326":3,"336":1,"338":6,"339":5,"373":1}}],["passes",{"2":{"378":2}}],["passed",{"2":{"215":1,"326":1,"339":1,"372":1,"383":1}}],["passwd",{"2":{"259":1}}],["pass",{"2":{"213":1,"215":3,"238":1,"352":1,"359":1}}],["passing",{"2":{"14":2,"72":1,"379":1}}],["paste",{"2":{"222":2}}],["past",{"2":{"8":1,"9":1}}],["paying",{"2":{"156":1}}],["payer",{"2":{"76":4,"327":1,"388":1}}],["payload",{"2":{"14":1,"274":10}}],["pay",{"2":{"10":1}}],["paves",{"2":{"8":1}}],["path=",{"2":{"344":2}}],["path=$path",{"2":{"133":1,"203":2}}],["paths",{"2":{"72":2,"74":1,"76":1,"136":1}}],["path",{"2":{"7":1,"8":1,"45":2,"47":1,"50":2,"76":6,"133":1,"136":1,"203":1,"204":1,"301":1,"350":1}}],["pops",{"2":{"320":1,"321":1}}],["popular",{"2":{"9":1,"367":1}}],["polynomial",{"2":{"220":1}}],["polaris",{"0":{"142":1,"306":1,"311":1,"319":1,"321":1},"1":{"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1,"314":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":2,"321":2,"322":2},"2":{"142":2,"148":1,"149":3,"306":5,"307":1,"308":1,"309":3,"311":1,"312":1,"313":1,"314":3,"315":1,"319":1,"321":3,"322":2}}],["point",{"2":{"70":1,"123":1,"262":1,"321":1}}],["points",{"2":{"59":1,"369":1}}],["portion",{"2":{"214":1,"319":1}}],["portal",{"0":{"294":1,"315":1},"2":{"148":1,"149":4,"261":2,"293":3,"296":6,"297":1,"313":2,"314":4,"317":6,"318":1}}],["ports=wordle",{"2":{"338":2}}],["portspec",{"2":{"338":1}}],["ports",{"2":{"59":2,"252":4,"254":1,"281":2,"326":2,"338":4,"339":1,"340":1}}],["port",{"2":{"55":1,"70":3,"76":10,"93":1,"132":1,"136":2,"196":1,"217":1,"222":2,"232":1,"237":1,"271":1,"273":2,"278":1,"289":1,"294":1,"326":2,"350":2,"353":1,"358":1}}],["powershell",{"2":{"301":1}}],["power",{"2":{"37":1,"371":1}}],["powerful",{"2":{"7":1}}],["pool",{"2":{"14":1}}],["potential",{"2":{"12":1,"156":1}}],["position",{"2":{"369":3}}],["posted",{"2":{"157":1,"188":1}}],["post",{"2":{"14":1,"107":2,"151":1,"170":1,"199":1,"213":1,"240":1,"297":1,"318":1,"319":2}}],["posting",{"0":{"14":1},"2":{"14":1,"55":1,"107":1,"129":1,"135":1,"157":1,"222":1,"226":1,"229":1,"230":1,"232":2,"233":1,"322":1,"324":1}}],["posts",{"0":{"16":1},"2":{"3":1,"138":1,"188":1,"227":1,"234":1}}],["possibly",{"2":{"221":1}}],["possible",{"2":{"12":1,"13":1,"18":1,"77":1,"177":2,"200":3,"284":1,"363":2}}],["possibility",{"2":{"160":1,"194":1}}],["possibilities",{"2":{"12":1,"153":1,"199":1,"200":1}}],["purpose",{"2":{"373":1}}],["purposes",{"2":{"132":1,"245":1}}],["purchase",{"2":{"288":2}}],["purchasing",{"2":{"279":1}}],["pure",{"2":{"185":2}}],["putting",{"2":{"156":1,"208":1}}],["put",{"2":{"124":1,"208":1}}],["pubsub",{"2":{"135":1,"326":1}}],["pubkey",{"2":{"37":1,"327":4}}],["pub",{"2":{"37":3,"45":3,"46":4,"47":1,"196":1}}],["publish",{"2":{"106":1,"252":2}}],["publishing",{"2":{"13":1,"14":1,"106":2,"135":1,"200":1,"258":1,"274":3,"281":2,"312":1,"326":1,"340":3,"344":1}}],["published",{"2":{"12":1,"252":2}}],["publicnode",{"2":{"136":1,"225":1}}],["public",{"2":{"3":1,"14":1,"118":1,"149":2,"215":7,"216":2,"338":1}}],["pull",{"2":{"2":2,"283":1,"384":1}}],["push",{"2":{"2":2,"188":1}}],["practical",{"2":{"324":1}}],["pragma",{"2":{"149":1,"215":2,"216":1}}],["prune",{"2":{"312":2}}],["prhw8rohdq==",{"2":{"196":1}}],["primary",{"2":{"190":1}}],["printf",{"2":{"281":1,"326":1,"340":1}}],["printing",{"2":{"281":3,"326":3,"339":1}}],["print",{"2":{"146":2,"338":1}}],["priority",{"2":{"177":1}}],["prior",{"0":{"363":1},"2":{"101":1,"129":1,"324":1,"366":1,"389":1}}],["price=0",{"2":{"63":2}}],["price",{"0":{"63":1},"2":{"63":11,"71":2,"75":2,"91":1,"111":1,"226":1,"288":4,"353":2}}],["prices=",{"2":{"135":1,"226":2}}],["prices",{"2":{"59":1,"74":2,"136":2,"137":1,"226":1,"285":1,"288":1,"289":1}}],["privileged",{"2":{"185":1}}],["privatekey",{"2":{"313":1}}],["private",{"2":{"71":2,"149":4,"150":2,"215":1,"217":6,"218":3,"259":4,"261":2,"292":1,"294":4,"295":1,"297":3,"313":1,"315":4,"316":1,"318":3,"344":1}}],["priv",{"2":{"37":2,"103":2,"104":2,"344":2}}],["press",{"2":{"208":1}}],["presents",{"2":{"156":1}}],["present",{"2":{"30":1,"39":1,"269":1}}],["preserve",{"2":{"10":1}}],["preparing",{"2":{"312":1}}],["prepared",{"2":{"225":1}}],["prepareproposal",{"2":{"177":1}}],["prepare",{"2":{"23":1,"133":1}}],["prepend",{"2":{"147":1}}],["prerequisities",{"0":{"102":1},"2":{"351":1}}],["prerequisites",{"0":{"55":1,"116":1,"141":1,"201":1,"231":1,"268":1,"307":1,"349":1},"1":{"117":1,"118":1,"119":1,"120":1,"142":1,"143":1,"269":1,"270":1},"2":{"258":1,"278":1}}],["prevents",{"2":{"89":1}}],["previous",{"0":{"223":1},"2":{"63":1,"261":2,"285":1,"286":1}}],["prefunded",{"0":{"259":1}}],["prefer",{"2":{"74":1}}],["prefix",{"2":{"67":1,"74":2,"81":1,"136":2,"196":1}}],["pretty",{"2":{"47":1,"372":1}}],["prelude",{"2":{"45":1,"47":1}}],["pre",{"0":{"28":1,"65":1,"247":1,"333":1,"368":1},"1":{"66":1},"2":{"144":1,"159":1,"181":1,"283":1}}],["premature",{"2":{"8":1}}],["prematurely",{"2":{"7":1,"8":1}}],["proxy",{"2":{"281":1,"326":1,"339":1,"340":1}}],["probably",{"2":{"242":1}}],["problem",{"2":{"173":1}}],["problems",{"0":{"154":1},"1":{"155":1,"156":1},"2":{"156":1}}],["proposal",{"2":{"274":4}}],["proposer",{"2":{"196":1}}],["properly",{"2":{"258":1,"278":1}}],["property",{"2":{"185":1}}],["propagate",{"2":{"170":1}}],["progress",{"0":{"184":1,"188":1},"2":{"185":1,"188":1,"190":1,"196":1,"302":1,"346":1,"347":1,"366":1}}],["programmatically",{"2":{"174":1}}],["programming",{"2":{"130":1}}],["prompt",{"2":{"330":1}}],["prompted",{"2":{"327":2}}],["prominent",{"2":{"175":1}}],["prometheus=true",{"2":{"93":1}}],["prometheus",{"2":{"91":1,"93":4,"353":1}}],["prohibitively",{"2":{"151":1}}],["proved",{"2":{"147":1}}],["prove",{"0":{"147":1},"2":{"146":1,"147":2}}],["proving",{"0":{"144":1},"1":{"145":1,"146":1,"147":1},"2":{"147":1}}],["providing",{"2":{"129":1,"256":1}}],["provided",{"2":{"130":1,"225":1,"270":1,"279":1,"280":1,"325":1,"335":1,"371":1}}],["provider",{"2":{"76":4}}],["provide",{"2":{"14":1,"160":1,"161":1,"215":1,"225":1,"232":1,"243":1,"273":1,"344":1}}],["provides",{"2":{"7":2,"16":1,"39":1,"46":1,"162":1,"179":1,"241":1,"284":1,"306":1,"324":1,"348":1,"371":1}}],["proof+public",{"2":{"146":2,"147":1}}],["proof",{"0":{"150":1,"194":1},"2":{"140":2,"146":7,"147":2,"148":1,"150":3,"157":1,"188":2}}],["proofs",{"0":{"188":1,"189":1},"2":{"7":1,"8":1,"64":2,"67":1,"140":1,"147":1,"157":2,"161":1,"162":1,"167":1,"170":2,"173":1,"181":1,"183":2,"184":2,"188":5,"190":1,"194":1}}],["proceeding",{"2":{"133":1,"220":1,"229":1,"236":1,"349":1,"357":1,"388":1}}],["processed",{"2":{"194":1}}],["processor",{"2":{"76":1,"376":1}}],["processing",{"0":{"192":1,"193":1},"2":{"60":1,"99":2,"169":1}}],["process",{"2":{"7":1,"20":1,"27":1,"60":1,"80":1,"99":1,"129":1,"135":2,"140":1,"224":1,"256":1,"267":1,"269":1,"301":1,"324":1,"326":2,"372":1,"378":1}}],["profile",{"2":{"118":1,"203":2}}],["projects",{"2":{"263":3}}],["project",{"2":{"14":1,"16":1,"124":1,"127":1,"214":1,"261":2,"262":1,"372":1,"373":2,"375":1,"377":1}}],["proud",{"2":{"12":1}}],["producers",{"2":{"185":1}}],["producer",{"2":{"87":1,"366":1}}],["produce",{"2":{"10":1,"183":1,"185":1,"366":1}}],["products",{"2":{"156":1,"157":1}}],["production",{"0":{"19":1},"2":{"9":1,"18":1,"64":1,"89":1,"91":1,"147":1,"178":1,"243":1,"245":2,"332":1,"365":1,"388":2}}],["product",{"2":{"8":1}}],["protobuf",{"0":{"385":1}}],["proto",{"2":{"81":1,"373":1,"385":2}}],["protocol=",{"2":{"338":2}}],["protocols",{"2":{"179":1}}],["protocol",{"2":{"7":1,"9":1,"64":1,"72":1,"373":1}}],["protect",{"2":{"7":1,"8":1}}],["pr",{"2":{"2":1}}],["nice",{"2":{"389":1}}],["nil",{"2":{"383":6,"384":8}}],["npc",{"2":{"263":1}}],["npm",{"2":{"202":1,"203":3,"261":2}}],["ncdu",{"2":{"202":1}}],["n",{"2":{"146":2,"225":2,"232":8,"327":1,"388":1}}],["null",{"2":{"74":2,"78":1,"136":2,"196":2,"251":1,"287":1,"289":5,"327":1,"328":2,"388":2}}],["numerous",{"2":{"261":1}}],["num",{"2":{"60":1,"96":1,"98":1,"106":4,"135":2,"258":2,"274":3,"281":4,"312":3,"326":2,"340":6,"344":2,"353":1}}],["number=26657",{"2":{"338":1}}],["numbers",{"2":{"263":1}}],["number",{"0":{"90":1},"2":{"46":1,"96":2,"97":5,"98":6,"99":1,"131":1,"174":1,"196":1,"222":1,"343":1,"353":1}}],["nfts",{"2":{"14":2}}],["nft",{"2":{"14":2}}],["nodejs",{"2":{"203":3}}],["node",{"0":{"53":1,"56":1,"58":1,"59":1,"60":1,"176":1,"182":1,"183":1,"184":1,"185":1,"221":1,"226":1,"230":1,"233":1,"260":1,"264":1,"271":1,"274":1,"304":1,"319":1,"320":1,"344":1},"1":{"54":1,"55":1,"56":1,"57":2,"58":2,"59":2,"60":1,"61":1,"177":1,"178":1,"179":1,"180":1,"181":1,"183":1,"184":1,"185":1,"222":1,"320":1,"321":1,"322":1},"2":{"19":1,"54":3,"55":2,"57":2,"58":1,"59":6,"60":2,"61":1,"63":2,"64":1,"75":1,"78":2,"79":3,"87":1,"91":1,"93":1,"103":1,"104":1,"107":3,"108":1,"109":3,"110":1,"120":1,"132":2,"135":4,"153":1,"167":1,"175":2,"178":1,"179":2,"181":1,"182":1,"188":1,"190":1,"194":4,"196":1,"199":1,"203":1,"205":1,"220":1,"221":2,"222":4,"224":1,"225":1,"226":1,"230":6,"232":3,"233":1,"237":3,"238":1,"239":1,"240":1,"242":1,"250":1,"251":1,"252":1,"254":1,"256":1,"258":4,"259":1,"260":2,"261":4,"264":1,"271":2,"274":3,"276":1,"278":1,"281":2,"285":1,"287":2,"288":1,"289":6,"299":1,"302":4,"304":1,"305":1,"319":3,"320":8,"322":1,"326":5,"336":2,"337":1,"338":5,"340":1,"342":1,"344":5,"345":1,"348":1,"353":1,"363":1,"366":3}}],["nodes",{"0":{"187":1},"2":{"8":1,"135":1,"157":3,"162":1,"167":1,"170":2,"174":1,"178":5,"181":3,"182":1,"183":1,"184":4,"185":2,"187":1,"188":10,"190":1,"194":4,"202":1,"326":1,"336":1}}],["nonce",{"2":{"275":1}}],["none",{"2":{"41":2,"47":2}}],["non",{"2":{"14":1,"327":1,"388":1}}],["nor",{"2":{"10":1}}],["no",{"2":{"10":1,"43":1,"67":1,"89":1,"90":1,"129":1,"135":1,"173":1,"174":1,"180":1,"185":4,"229":1,"274":2,"281":1,"288":1,"324":1,"326":2,"339":2,"372":2,"381":2,"383":1,"384":1}}],["notably",{"2":{"377":1}}],["notifying",{"2":{"274":2}}],["notifies",{"2":{"120":1}}],["noticed",{"2":{"243":1,"365":1}}],["notice",{"2":{"76":1,"273":1,"302":1,"372":1}}],["note",{"2":{"41":2,"45":1,"46":1,"70":1,"135":1,"136":1,"149":1,"150":1,"173":1,"178":1,"188":1,"218":1,"220":1,"261":1,"326":1,"349":1,"388":2}}],["not",{"2":{"8":2,"12":1,"18":3,"30":1,"45":3,"59":2,"78":1,"79":1,"124":1,"133":1,"140":1,"159":1,"167":1,"188":1,"189":1,"194":1,"213":1,"225":2,"232":2,"243":3,"258":1,"262":1,"269":1,"274":1,"306":1,"320":1,"332":3,"363":1,"365":2,"383":2,"388":2,"389":1}}],["now",{"2":{"7":1,"12":1,"13":1,"14":1,"15":1,"19":1,"22":1,"47":2,"51":1,"59":1,"61":1,"67":1,"77":1,"82":1,"87":2,"119":1,"120":1,"126":1,"132":1,"135":1,"147":1,"150":1,"202":1,"208":1,"211":2,"213":1,"216":2,"217":1,"218":2,"224":1,"225":1,"226":2,"227":1,"232":2,"233":1,"234":1,"241":1,"244":1,"245":1,"252":1,"254":1,"255":1,"261":1,"274":1,"281":2,"283":2,"285":2,"287":2,"289":2,"293":1,"296":2,"297":1,"298":1,"312":1,"314":1,"317":2,"318":1,"322":1,"326":2,"327":3,"329":1,"331":1,"338":1,"340":1,"341":1,"345":1,"354":1,"361":1,"369":1,"371":1,"372":1,"373":1,"379":1,"382":1,"383":1,"384":1,"387":1,"388":3,"390":1}}],["neural",{"2":{"140":1}}],["neck",{"2":{"47":1}}],["necessary",{"2":{"29":1,"41":1,"59":1,"202":1,"260":1,"301":1,"387":1}}],["next",{"0":{"138":1,"227":1,"234":1,"255":1,"277":1,"331":1,"341":1,"390":1},"2":{"24":1,"70":1,"76":1,"78":1,"136":1,"141":1,"147":1,"148":1,"149":1,"162":1,"196":1,"208":1,"214":1,"215":2,"217":2,"224":1,"232":1,"252":1,"261":1,"274":2,"287":1,"289":3,"294":1,"315":1,"328":2,"362":1,"364":1,"375":1,"380":1,"383":1,"384":2,"385":1,"388":2}}],["network=mocha",{"2":{"320":2}}],["networking",{"2":{"252":1}}],["network>",{"2":{"109":1}}],["networks",{"2":{"41":1,"47":1,"153":1,"181":1,"203":1,"230":1,"366":1,"390":1}}],["network",{"0":{"132":1,"206":1,"212":1,"237":1,"238":1},"1":{"207":1,"208":1,"209":1,"210":1,"211":1,"212":1},"2":{"10":1,"17":1,"47":2,"54":2,"55":2,"60":1,"63":1,"109":1,"118":2,"129":1,"132":2,"133":1,"135":1,"138":1,"140":1,"152":1,"156":5,"157":2,"179":1,"181":1,"188":2,"190":1,"194":2,"206":1,"212":1,"216":1,"220":1,"221":1,"222":1,"226":3,"229":2,"232":3,"237":1,"238":1,"239":1,"240":1,"252":1,"254":1,"257":1,"258":1,"261":1,"271":1,"281":3,"287":1,"289":1,"306":2,"319":2,"320":1,"324":1,"326":4,"336":1,"340":1,"348":1,"350":2,"363":2,"364":2,"366":1,"387":2,"388":2}}],["needing",{"2":{"306":1}}],["needs",{"0":{"10":1},"2":{"159":1,"241":2,"303":1}}],["needed",{"2":{"7":1,"8":1,"10":2,"24":1,"170":1,"173":1,"188":1,"199":1,"225":1}}],["need",{"2":{"7":1,"8":3,"10":1,"16":1,"19":1,"21":1,"23":1,"24":1,"28":1,"41":1,"44":1,"45":2,"49":2,"59":1,"67":2,"70":1,"76":1,"85":1,"87":1,"101":1,"102":1,"104":1,"106":4,"107":3,"109":1,"111":1,"116":2,"133":1,"150":1,"157":1,"167":1,"173":1,"174":1,"203":1,"218":1,"221":1,"224":2,"230":1,"238":1,"241":1,"245":1,"250":1,"251":1,"252":2,"260":1,"261":2,"273":1,"280":1,"281":1,"285":1,"296":2,"297":2,"301":2,"307":1,"308":1,"317":2,"318":2,"319":4,"320":1,"325":1,"326":1,"337":1,"338":1,"340":1,"349":1,"352":1,"359":1,"368":1,"372":1,"374":1,"385":2,"388":1}}],["newguess",{"2":{"384":2}}],["newint64coin",{"2":{"383":1,"384":1}}],["newly",{"2":{"181":1,"232":1,"383":2}}],["new",{"2":{"2":2,"8":1,"12":1,"13":1,"16":1,"45":2,"47":2,"50":2,"72":2,"76":5,"81":1,"82":1,"107":1,"133":1,"149":5,"153":3,"156":3,"157":2,"162":1,"174":1,"175":1,"188":1,"194":1,"199":1,"200":1,"207":1,"208":3,"214":1,"215":1,"216":1,"218":1,"224":2,"251":2,"252":1,"260":1,"261":1,"274":3,"281":1,"326":1,"332":1,"337":2,"339":1,"350":1,"369":1,"371":1,"372":3,"384":7}}],["nameservice",{"2":{"279":2,"283":4,"284":2,"285":3,"288":1,"289":1}}],["names",{"2":{"254":1,"281":2,"326":2,"340":2}}],["namespaces",{"2":{"232":1,"320":1}}],["namespace=000000506f6c61726973",{"2":{"320":1}}],["namespace=00000000000000000000000000000000000000000008e5f679bf7116cb",{"2":{"232":1}}],["namespace=$",{"2":{"213":1}}],["namespace",{"2":{"106":2,"181":1,"196":1,"213":1,"232":3,"233":3,"242":4,"320":1,"322":2,"350":3}}],["name",{"2":{"32":1,"33":1,"34":1,"35":1,"37":1,"70":2,"76":8,"95":1,"96":1,"97":1,"98":1,"99":1,"145":1,"207":1,"218":2,"252":6,"281":6,"283":1,"288":2,"289":8,"326":6,"327":2,"338":1,"339":5,"340":1,"353":1}}],["name=",{"2":{"338":1}}],["name=omni",{"2":{"302":1}}],["name=rollup",{"2":{"29":1}}],["name=validator1",{"2":{"29":1}}],["naming",{"2":{"2":1}}],["native",{"2":{"10":1,"78":1,"129":1,"256":3}}],["navigate",{"2":{"5":1,"81":1,"126":1,"145":1}}],["award",{"2":{"369":1}}],["away",{"2":{"8":1}}],["a736683c",{"2":{"365":1}}],["a+jox",{"2":{"327":1}}],["a5wpm5wzfniprgyha",{"2":{"327":1}}],["af16c1a5e68c",{"2":{"326":1}}],["afterward",{"2":{"74":1}}],["after",{"0":{"107":1},"1":{"108":1,"109":1,"110":1,"111":1,"112":1,"113":1},"2":{"16":1,"41":1,"46":1,"60":1,"77":1,"113":1,"120":1,"194":1,"222":1,"230":1,"251":1,"258":1,"260":1,"301":1,"320":1,"328":1,"352":1,"362":1,"372":1,"388":4}}],["auto",{"2":{"285":1,"288":1,"289":1}}],["automatic",{"2":{"263":1}}],["automatically",{"2":{"140":1}}],["authorized",{"2":{"330":1}}],["authentication",{"2":{"232":1}}],["authenticate",{"2":{"170":1,"184":1}}],["auth",{"2":{"196":2,"232":8,"233":1,"274":1,"319":1,"350":2,"376":1}}],["avail",{"0":{"219":1,"221":1,"226":1},"1":{"220":1,"221":1,"222":2,"223":1,"224":1,"225":1,"226":1,"227":1},"2":{"220":4,"221":1,"222":4,"224":1,"225":3,"226":1,"227":1,"242":1,"244":1}}],["available",{"0":{"94":1},"1":{"95":1,"96":1,"97":1,"98":1,"99":1},"2":{"9":1,"94":1,"194":1,"215":1,"244":1,"258":1,"259":1,"281":1,"301":1,"302":2,"348":1,"353":1}}],["availability",{"0":{"15":1,"174":1,"271":1},"1":{"175":1},"2":{"8":1,"10":2,"12":2,"13":1,"14":1,"15":4,"16":5,"18":3,"20":1,"55":1,"129":1,"140":1,"152":1,"153":1,"157":4,"162":1,"163":1,"170":1,"174":3,"175":1,"178":1,"185":1,"187":1,"194":1,"199":2,"200":5,"220":2,"229":1,"241":2,"242":2,"243":1,"271":1,"306":2,"320":1,"321":1,"324":1,"336":1,"388":1}}],["average",{"2":{"184":1}}],["avoid",{"2":{"59":2,"63":1,"70":1,"111":1,"161":1,"251":1,"369":1,"388":1}}],["ago",{"2":{"251":1,"254":3,"281":7,"326":7,"337":1,"340":7}}],["aggregating",{"2":{"185":1}}],["aggregationloop",{"2":{"178":2}}],["aggregation",{"0":{"89":1},"2":{"91":1}}],["aggregated",{"2":{"226":1,"233":1}}],["aggregate",{"2":{"170":1}}],["aggregator=false",{"2":{"59":2}}],["aggregator",{"2":{"25":1,"38":1,"59":1,"87":2,"89":2,"135":2,"213":1,"226":1,"233":1,"239":1,"251":1,"252":1,"281":1,"326":2,"338":1,"340":1,"348":1,"352":1,"360":1,"363":2,"366":2,"387":1,"388":1}}],["again",{"0":{"113":1},"2":{"46":1,"103":2,"104":2,"106":1,"133":1,"212":1,"255":1,"289":1,"297":1,"318":1,"341":1,"384":3}}],["against",{"2":{"7":1,"8":1,"63":1,"88":1,"229":1}}],["atoi",{"2":{"384":1}}],["atomic",{"2":{"185":1}}],["attributes",{"2":{"287":1,"388":1}}],["attributes=false",{"2":{"274":1}}],["attributes=true",{"2":{"274":1}}],["attract",{"2":{"156":1}}],["attempts",{"2":{"378":1}}],["attempting",{"2":{"339":1}}],["attempt",{"2":{"178":2}}],["attempt=3",{"2":{"108":1}}],["attempt=2",{"2":{"108":1}}],["attempt=1",{"2":{"108":1}}],["at",{"2":{"14":1,"16":1,"41":2,"44":1,"74":1,"76":1,"93":1,"103":1,"104":1,"119":1,"156":1,"173":1,"188":1,"199":1,"208":1,"214":1,"216":1,"232":1,"256":1,"281":1,"284":1,"287":1,"326":2,"327":1,"329":1,"339":2,"369":1,"389":1}}],["admin",{"2":{"288":1,"289":1}}],["adr",{"2":{"188":1}}],["adoption",{"2":{"156":1}}],["adjusting",{"2":{"260":1}}],["adjust",{"2":{"124":1}}],["adjustment",{"2":{"74":2,"136":2,"285":1,"288":1,"289":1}}],["adjusted",{"2":{"19":1}}],["advertises",{"2":{"181":1}}],["advice",{"2":{"52":1}}],["advise",{"2":{"45":1,"50":2}}],["advanced",{"0":{"166":1},"2":{"41":1,"325":1}}],["advantages",{"2":{"10":1}}],["addr",{"2":{"70":1,"74":3,"93":1,"136":3,"281":1}}],["address>",{"2":{"217":1,"218":1,"275":1,"297":1,"303":1,"318":1}}],["addresses",{"0":{"119":1},"2":{"59":1,"114":1,"115":1,"119":2}}],["address=localhost",{"2":{"352":1,"360":1,"365":1}}],["address=0x18df82c7e422a42d47345ed86b0e935e9718ebda",{"2":{"294":1,"315":1}}],["address=0x5c59c83c099f72fce832208f96a23a1e43737a14",{"2":{"149":1}}],["address=http",{"2":{"232":1,"239":1,"243":1}}],["address=`bitcoin",{"2":{"208":1}}],["address=127",{"2":{"135":2,"326":2}}],["address=",{"2":{"58":1,"135":2,"217":1,"218":1,"226":1,"303":1,"326":2}}],["address",{"2":{"37":3,"58":2,"59":5,"67":1,"71":2,"78":2,"79":1,"81":1,"93":1,"104":2,"109":1,"119":1,"120":1,"135":1,"136":4,"149":4,"150":2,"196":4,"208":1,"217":4,"218":4,"222":1,"225":1,"230":1,"232":1,"233":2,"238":2,"239":3,"252":2,"259":4,"261":1,"275":1,"289":5,"292":2,"294":2,"295":2,"296":2,"315":2,"316":2,"317":2,"319":1,"327":4,"330":1,"338":6,"350":3,"351":2,"352":6,"353":2,"359":2,"360":2,"369":1,"381":3,"384":2,"388":1}}],["added",{"2":{"48":1,"119":1,"175":1,"281":2,"306":1,"326":2,"339":2,"387":2}}],["addition",{"2":{"98":1,"250":1}}],["additionally",{"2":{"89":1,"157":1,"161":1,"349":1,"368":1}}],["additional",{"2":{"46":1,"106":1,"169":1,"179":1,"194":1}}],["additions",{"2":{"41":1,"146":1}}],["adding",{"0":{"33":1,"34":1,"44":1},"2":{"2":1,"16":1,"42":1,"83":1,"119":1,"124":1,"194":1,"281":3,"326":4,"339":2,"371":1}}],["add",{"0":{"22":1,"83":1,"119":1,"197":1},"2":{"16":2,"19":1,"22":2,"27":1,"33":2,"34":2,"39":1,"44":3,"45":1,"46":1,"49":1,"50":4,"75":1,"83":1,"89":1,"91":2,"115":1,"118":1,"133":1,"194":1,"197":2,"203":1,"208":1,"215":1,"222":1,"251":1,"252":1,"263":1,"275":1,"297":1,"318":1,"331":1,"337":1,"338":1,"375":2,"376":1,"384":2,"385":1}}],["apt",{"2":{"133":1,"202":3,"251":2}}],["apart",{"2":{"72":1}}],["append",{"2":{"146":2}}],["appear",{"2":{"120":1}}],["approve",{"2":{"330":1}}],["approach",{"2":{"140":1,"324":1}}],["appropriate",{"2":{"124":1}}],["approximately",{"2":{"14":1}}],["apply",{"2":{"43":1,"185":1,"260":1}}],["applications",{"2":{"18":1,"129":1,"157":1,"159":1,"163":1,"199":1,"270":1,"298":1,"324":1,"345":1}}],["application",{"0":{"171":1},"1":{"172":1,"173":1,"174":1,"175":1},"2":{"7":3,"9":2,"82":1,"99":1,"104":2,"129":1,"153":1,"155":2,"172":2,"173":1,"177":2,"179":1,"324":1,"329":1,"330":1,"331":1,"338":1,"373":1,"376":1}}],["apps",{"2":{"21":1,"82":1,"371":1,"375":1}}],["app",{"0":{"20":2,"22":1,"25":1,"80":1,"82":1,"329":1,"367":1},"1":{"21":2,"22":2,"23":2,"24":2,"25":2,"26":2,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"388":1,"389":1,"390":1},"2":{"20":3,"21":3,"22":1,"23":1,"25":2,"26":2,"80":1,"82":3,"91":3,"104":1,"106":4,"135":2,"196":1,"214":3,"222":1,"251":3,"258":2,"260":1,"274":2,"281":4,"296":1,"312":2,"317":1,"326":2,"330":1,"331":1,"340":6,"344":1,"367":1,"373":3,"374":1,"375":2,"390":1}}],["apis",{"2":{"179":1}}],["api",{"2":{"10":1,"59":2,"74":1,"136":1,"141":1,"147":3,"175":1,"196":3,"281":2,"326":2,"332":1,"340":2}}],["achieve",{"2":{"156":1,"369":1}}],["action",{"2":{"388":1}}],["activities",{"2":{"274":1}}],["activity",{"2":{"114":1}}],["active",{"2":{"181":1}}],["acts",{"2":{"366":1}}],["actual",{"2":{"225":1,"232":1}}],["act",{"2":{"161":1}}],["actor",{"2":{"47":1}}],["accaddress",{"2":{"385":2}}],["accaddressfrombech32",{"2":{"383":1,"384":1}}],["access",{"2":{"256":1,"259":1,"260":1}}],["accessed",{"2":{"174":1}}],["accelerated",{"2":{"147":1}}],["accepting",{"2":{"274":1}}],["accepted",{"2":{"63":2}}],["accept",{"2":{"8":1,"302":1,"327":1}}],["accordingly",{"2":{"194":1}}],["according",{"2":{"124":1}}],["accounts",{"0":{"259":1},"2":{"136":2,"196":2,"217":1,"259":3,"377":3,"387":3}}],["account",{"0":{"34":1,"75":1,"109":1},"2":{"27":1,"34":2,"39":1,"74":2,"107":1,"109":1,"118":2,"136":3,"196":3,"226":1,"233":1,"261":1,"275":2,"290":1,"292":1,"297":2,"303":1,"318":2,"319":1,"327":1,"387":2,"388":1}}],["across",{"2":{"9":1,"150":2,"332":1}}],["artroll",{"2":{"258":1,"259":3,"260":4}}],["artela",{"0":{"256":1,"257":1},"1":{"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1},"2":{"256":1,"257":4,"258":2,"260":1,"261":10,"264":1,"265":2}}],["artifacts",{"2":{"45":1,"281":1,"284":1,"285":1,"326":1,"339":1}}],["articles",{"2":{"5":1}}],["arabicamochamainnet",{"2":{"230":1}}],["arabica",{"2":{"163":1,"230":1,"232":2,"233":2,"319":1}}],["arm64",{"2":{"73":1}}],["architecture",{"2":{"140":1,"188":1,"369":1,"373":1}}],["arch",{"2":{"45":2}}],["argjson",{"2":{"37":1}}],["argument",{"2":{"19":1,"326":1,"339":1}}],["args",{"2":{"19":1,"106":1}}],["around",{"2":{"14":1,"18":2,"107":2,"389":1}}],["arbitrary",{"2":{"12":1,"13":1,"14":3,"174":1,"200":2}}],["are",{"2":{"12":1,"13":1,"14":1,"16":1,"49":2,"59":3,"72":2,"75":1,"87":1,"89":1,"91":1,"94":1,"97":1,"98":1,"101":1,"104":1,"107":2,"125":1,"149":1,"156":1,"157":4,"161":1,"177":1,"178":3,"179":1,"182":1,"184":2,"185":1,"187":1,"188":2,"189":1,"190":1,"194":2,"200":1,"202":2,"212":1,"215":1,"232":1,"244":1,"245":4,"254":3,"259":1,"261":2,"269":1,"275":1,"278":1,"284":1,"288":1,"297":1,"303":1,"306":2,"318":1,"336":1,"340":2,"348":3,"350":1,"353":2,"364":1,"366":2,"369":3,"372":2,"378":3,"379":1,"381":1,"383":2,"384":3,"388":2,"389":2}}],["array",{"2":{"9":1}}],["amt",{"2":{"385":2}}],["amazing",{"2":{"371":1}}],["amd",{"2":{"201":1,"203":1}}],["amd64",{"2":{"67":1,"203":3,"308":1}}],["among",{"2":{"194":1}}],["amount=",{"2":{"29":2}}],["amount",{"0":{"35":1},"2":{"8":1,"34":2,"35":2,"74":4,"78":3,"79":1,"136":6,"288":2,"289":1,"327":3,"328":2,"384":1,"388":1}}],["am",{"2":{"149":1,"208":1,"294":1,"315":1}}],["amp",{"0":{"4":1,"113":1},"2":{"2":2}}],["abcdefg",{"2":{"388":1}}],["abci",{"0":{"95":1,"172":1},"1":{"173":1},"2":{"9":3,"95":2,"107":1,"135":1,"153":2,"159":1,"162":1,"172":3,"173":2,"179":1,"188":1,"326":1}}],["abci++",{"2":{"7":2,"9":1,"10":1,"177":1}}],["abi",{"2":{"296":1,"317":1}}],["ability",{"2":{"7":2,"157":1,"168":1}}],["able",{"2":{"41":1,"156":1}}],["abstraction",{"2":{"382":1}}],["abstract",{"2":{"9":1}}],["about",{"0":{"152":1},"1":{"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1},"2":{"3":1,"26":1,"45":1,"46":1,"59":1,"64":1,"81":1,"153":1,"162":1,"170":1,"179":2,"184":1,"194":1,"232":1,"246":1,"274":1,"281":8,"320":1,"327":1,"332":1,"371":1,"373":1}}],["above",{"2":{"2":1,"19":1,"49":1,"51":1,"112":1,"156":1,"158":1,"232":2,"296":1,"297":1,"317":1,"318":1,"366":1,"384":1,"388":4}}],["alerting",{"2":{"120":1}}],["alerts",{"2":{"120":1}}],["alert",{"0":{"120":1},"2":{"115":1,"120":2,"162":1}}],["alice",{"2":{"104":1,"327":1,"387":2,"388":2}}],["align",{"2":{"8":1}}],["alignment",{"2":{"8":1}}],["algorithm",{"2":{"74":2,"136":2}}],["alphabet",{"2":{"383":2,"384":3}}],["alphabets",{"2":{"383":2}}],["alpha",{"2":{"41":1,"92":1,"162":1,"167":1}}],["already",{"2":{"19":1,"60":1,"107":3,"135":1,"223":1,"239":1,"258":1,"261":1,"269":1,"275":1,"303":1,"330":1,"352":1,"360":1,"383":2,"388":2}}],["alongside",{"2":{"54":1,"61":1,"330":1}}],["along",{"2":{"9":1,"13":1,"217":1,"281":1,"306":1,"326":1,"364":1}}],["also",{"2":{"8":1,"12":1,"63":1,"70":1,"72":1,"113":1,"140":1,"156":1,"157":1,"175":1,"177":1,"178":1,"199":1,"225":1,"232":1,"319":1,"368":1,"378":1,"381":1,"383":1,"387":1}}],["alloc",{"2":{"275":1}}],["allow",{"2":{"41":1,"146":1,"152":1,"250":1,"256":1,"336":1,"378":1,"385":1}}],["allowing",{"2":{"8":1,"86":1,"157":1,"159":1}}],["allows",{"2":{"7":1,"8":2,"9":1,"10":2,"12":1,"89":1,"167":1,"168":1,"174":1,"200":2,"251":1,"289":1,"305":1,"337":1,"381":1,"382":1,"383":1,"384":1}}],["alley",{"2":{"71":2,"75":2}}],["all",{"2":{"7":2,"30":1,"31":1,"39":1,"43":1,"47":1,"48":1,"49":1,"50":1,"60":1,"76":1,"77":1,"104":1,"133":1,"156":1,"178":2,"183":2,"187":1,"215":1,"226":1,"233":1,"245":1,"251":2,"252":3,"254":1,"264":1,"278":1,"280":1,"281":1,"301":1,"304":1,"325":1,"326":1,"327":1,"338":1,"340":1,"350":2,"385":1,"387":1,"388":1}}],["alter",{"2":{"377":1}}],["alternatively",{"2":{"19":1,"44":1,"76":1,"259":1}}],["alternative",{"2":{"9":1}}],["although",{"2":{"369":1}}],["alt",{"2":{"7":1}}],["always",{"2":{"2":1,"30":1,"63":1,"136":1}}],["answer",{"2":{"384":1}}],["anvil",{"2":{"217":6}}],["announce",{"2":{"12":1}}],["another",{"2":{"8":1,"18":1,"60":1,"160":1,"173":1,"194":1,"327":1,"388":2}}],["an",{"0":{"45":1,"50":1,"221":1,"226":1},"1":{"222":1},"2":{"4":1,"7":3,"8":6,"9":1,"12":1,"14":1,"15":3,"18":1,"19":1,"29":1,"30":2,"42":2,"45":1,"48":1,"58":1,"59":1,"60":2,"62":1,"64":3,"67":1,"72":1,"74":1,"78":1,"79":1,"89":1,"90":1,"91":1,"107":1,"116":1,"118":1,"120":2,"124":1,"129":1,"133":2,"135":2,"136":1,"141":1,"147":1,"148":1,"153":2,"157":1,"160":1,"162":1,"168":1,"169":1,"170":1,"173":1,"174":1,"179":1,"194":1,"201":1,"214":1,"217":2,"222":1,"225":2,"242":1,"256":1,"265":1,"274":1,"281":1,"286":1,"289":1,"290":2,"295":1,"297":2,"299":1,"305":1,"313":1,"316":1,"318":2,"322":1,"326":1,"327":1,"328":1,"329":1,"339":1,"349":1,"366":1,"368":1,"369":1,"371":2,"373":1,"382":1,"384":3,"388":4}}],["anyone",{"2":{"152":1,"168":1}}],["anywhere",{"0":{"140":1}}],["anyhow",{"2":{"47":2}}],["any",{"0":{"159":1},"2":{"4":1,"7":3,"9":1,"10":3,"16":1,"28":1,"31":2,"43":1,"47":1,"74":1,"106":1,"125":1,"126":1,"150":1,"153":1,"159":1,"172":1,"174":1,"185":1,"194":1,"196":1,"241":1,"243":1,"251":1,"278":1,"301":1,"329":1,"330":1,"337":1,"348":1,"363":1,"364":1,"383":1,"388":2}}],["and",{"0":{"49":1,"52":1,"57":1,"72":1,"119":1,"144":1,"147":1,"155":1,"156":1,"163":1,"192":1,"194":1,"215":1,"266":1,"274":1,"275":1,"296":1,"302":1,"303":1,"306":1,"317":1,"370":1,"387":1},"1":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"145":1,"146":1,"147":1,"164":1,"165":1,"166":1,"167":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1,"314":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"371":1,"372":1,"373":1},"2":{"0":1,"1":1,"2":4,"3":2,"7":6,"8":10,"9":5,"10":3,"12":1,"13":1,"14":2,"15":4,"16":7,"18":6,"19":3,"20":2,"21":1,"26":1,"27":1,"28":1,"30":2,"39":3,"41":5,"42":2,"46":5,"47":1,"49":3,"52":1,"54":2,"55":1,"57":1,"59":1,"60":3,"64":3,"67":1,"70":3,"72":1,"76":3,"77":1,"78":2,"79":1,"82":1,"86":1,"87":1,"88":2,"89":1,"91":3,"93":1,"100":1,"101":1,"103":1,"104":1,"106":2,"107":8,"113":1,"114":2,"115":3,"117":2,"118":1,"119":1,"120":1,"121":2,"122":1,"123":1,"124":2,"127":2,"129":1,"130":1,"131":1,"132":1,"133":2,"134":1,"135":1,"138":1,"140":3,"142":2,"143":1,"144":2,"146":4,"147":6,"148":2,"149":3,"150":2,"153":4,"156":5,"157":5,"158":1,"159":1,"160":3,"161":2,"162":3,"163":1,"167":1,"168":1,"169":2,"170":5,"172":1,"173":1,"174":1,"177":2,"178":3,"179":4,"181":2,"183":1,"184":1,"185":2,"188":8,"190":1,"194":8,"199":6,"200":4,"202":2,"203":1,"207":1,"208":2,"211":1,"213":1,"214":1,"215":3,"217":2,"218":1,"220":4,"221":1,"223":1,"224":1,"225":2,"226":1,"227":1,"229":1,"230":1,"233":1,"234":1,"236":1,"237":2,"240":2,"241":2,"242":1,"243":2,"245":4,"250":3,"251":6,"252":4,"254":3,"255":1,"256":1,"258":3,"259":2,"260":1,"261":4,"262":1,"263":2,"264":2,"265":2,"267":2,"269":1,"271":1,"272":1,"273":1,"274":6,"275":4,"277":1,"278":4,"281":6,"283":1,"285":2,"286":1,"288":1,"289":3,"290":2,"292":1,"294":1,"296":1,"297":1,"298":1,"299":2,"302":3,"303":1,"304":2,"305":2,"306":3,"309":1,"312":1,"314":1,"315":1,"317":1,"318":1,"319":5,"320":4,"324":1,"326":7,"327":2,"330":3,"331":1,"332":1,"336":2,"337":3,"338":4,"339":3,"340":7,"341":1,"343":1,"344":2,"345":2,"348":2,"349":2,"350":1,"352":1,"353":1,"354":1,"357":1,"358":2,"359":1,"361":1,"363":2,"364":1,"365":1,"366":2,"367":2,"371":2,"372":1,"373":4,"376":2,"377":1,"378":4,"381":1,"382":2,"383":1,"384":6,"385":1,"387":1,"388":7,"389":1,"390":1}}],["ask",{"2":{"388":1}}],["asking",{"2":{"18":1}}],["async",{"2":{"388":5}}],["asynchronously",{"2":{"388":1}}],["asynchronous",{"2":{"8":1}}],["astria",{"0":{"346":1},"2":{"363":1,"366":1}}],["aspect",{"2":{"261":6,"262":5,"263":11,"329":1}}],["asdf",{"2":{"203":7}}],["asset",{"2":{"377":1}}],["assembly",{"2":{"274":1}}],["assertion",{"2":{"215":2}}],["asserteq",{"2":{"215":4}}],["assert",{"2":{"41":1,"47":1,"215":1}}],["assist",{"2":{"256":1}}],["associated",{"2":{"131":1,"259":1,"343":1}}],["assume",{"2":{"135":1,"261":1,"351":1}}],["assumes",{"2":{"20":1,"142":1,"148":1,"290":1,"329":1}}],["assumptions",{"2":{"64":1,"157":1}}],["as",{"0":{"15":1,"128":1,"219":1,"228":1},"1":{"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1},"2":{"3":1,"7":3,"8":1,"9":2,"10":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":2,"24":1,"41":1,"44":1,"46":3,"48":1,"49":2,"59":1,"60":2,"78":1,"85":1,"91":1,"98":1,"107":1,"120":1,"129":3,"137":1,"138":1,"141":2,"142":1,"146":4,"147":1,"152":2,"153":4,"155":1,"156":1,"157":3,"158":1,"160":1,"161":2,"162":2,"168":2,"170":1,"172":1,"173":1,"174":2,"178":2,"179":2,"181":1,"187":1,"188":2,"194":3,"199":1,"200":1,"210":1,"217":4,"218":1,"220":1,"225":1,"227":2,"229":1,"232":1,"236":1,"241":1,"243":1,"245":1,"251":2,"274":1,"280":1,"281":2,"284":2,"285":1,"306":1,"313":1,"325":1,"326":3,"327":1,"329":2,"331":1,"336":1,"337":1,"339":1,"340":1,"348":1,"349":2,"350":1,"351":1,"357":1,"364":1,"366":2,"367":2,"372":1,"376":1,"377":1,"378":1,"379":2,"382":1,"383":1,"384":2,"388":4}}],["a",{"0":{"15":1,"20":1,"27":1,"33":1,"34":1,"48":1,"67":1,"80":1,"132":1,"144":1,"161":1,"163":1,"206":1,"207":1,"230":1,"237":1,"266":1,"271":1,"308":1,"319":1,"358":1,"377":1,"379":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"49":1,"50":1,"51":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"145":1,"146":1,"147":1,"164":1,"165":1,"166":1,"167":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"320":1,"321":1,"322":1},"2":{"2":4,"5":2,"7":11,"8":6,"9":2,"10":6,"11":1,"12":3,"13":3,"14":9,"15":2,"16":7,"17":3,"18":3,"19":1,"20":2,"21":1,"26":1,"27":2,"28":3,"30":1,"33":1,"34":1,"39":2,"41":2,"42":1,"43":1,"45":2,"46":2,"50":2,"54":5,"55":2,"57":1,"60":1,"61":1,"62":1,"63":3,"64":2,"67":2,"70":1,"72":4,"76":4,"80":1,"81":1,"82":1,"88":1,"89":1,"91":5,"92":1,"98":3,"103":1,"104":1,"107":3,"111":1,"118":1,"120":2,"121":1,"123":1,"129":5,"131":1,"132":2,"133":4,"136":10,"137":2,"138":2,"140":5,"141":1,"142":1,"143":1,"144":2,"145":1,"146":3,"147":2,"149":3,"150":2,"151":1,"152":2,"153":6,"155":2,"156":10,"157":8,"159":1,"160":4,"161":3,"162":4,"167":3,"168":1,"170":1,"172":2,"173":2,"174":1,"175":4,"177":2,"178":6,"181":1,"185":4,"187":3,"188":6,"190":2,"194":9,"199":6,"200":2,"205":1,"207":2,"208":5,"209":1,"210":1,"214":1,"215":3,"216":1,"217":2,"220":3,"221":1,"222":2,"224":2,"225":1,"227":1,"229":3,"230":3,"232":2,"234":1,"236":2,"237":1,"240":2,"241":3,"242":2,"243":4,"244":2,"245":3,"250":1,"251":2,"252":2,"254":1,"256":3,"258":1,"261":2,"262":1,"263":1,"267":3,"269":1,"271":2,"274":2,"275":2,"276":1,"279":1,"281":13,"284":1,"285":2,"286":1,"287":1,"288":1,"289":2,"290":2,"293":2,"294":2,"297":2,"298":2,"303":1,"306":5,"308":2,"312":2,"313":1,"314":2,"315":2,"318":2,"319":2,"320":2,"321":1,"324":4,"326":7,"327":3,"329":2,"330":1,"331":1,"336":2,"337":2,"338":7,"339":3,"340":2,"342":1,"343":1,"344":1,"345":2,"348":4,"349":3,"350":3,"351":1,"352":1,"357":2,"358":2,"363":4,"364":2,"365":4,"366":1,"367":1,"368":1,"369":10,"371":3,"372":4,"373":4,"376":2,"378":3,"379":3,"381":2,"382":3,"383":8,"384":11,"385":2,"387":4,"388":12,"389":6,"390":1}}],["ics",{"2":{"135":1}}],["ics20",{"2":{"50":1,"76":1,"136":2}}],["illustrates",{"2":{"114":1}}],["ip",{"2":{"70":1,"320":1}}],["ip4",{"2":{"58":1,"135":2,"326":2}}],["io",{"2":{"67":1,"252":2,"281":6,"283":2,"308":1,"320":1,"326":6,"339":2,"340":1,"383":1,"384":1}}],["i",{"2":{"67":1,"106":6,"146":2,"149":1,"167":1,"208":1,"294":1,"308":1,"315":1,"344":5,"352":1,"360":1}}],["i32",{"2":{"46":2}}],["ids",{"2":{"242":1}}],["idea",{"2":{"329":1}}],["ideas",{"2":{"261":1,"367":1}}],["ideal",{"2":{"161":1}}],["identity",{"2":{"222":5}}],["identifier",{"2":{"149":1,"215":2,"216":1}}],["identify",{"2":{"58":1}}],["id=1651",{"2":{"302":1}}],["id=$",{"2":{"287":1}}],["id=$chain",{"2":{"57":1}}],["id=0x03bc2b46dc4bef55",{"2":{"274":1}}],["id=wordle",{"2":{"252":1}}],["id=channel",{"2":{"78":1}}],["id=",{"2":{"58":1}}],["id=gm",{"2":{"29":1,"57":1}}],["id",{"2":{"29":2,"31":2,"32":3,"35":2,"37":4,"38":2,"45":3,"57":6,"59":2,"74":2,"76":35,"78":4,"79":2,"87":3,"95":1,"96":5,"97":7,"98":5,"99":2,"120":1,"136":8,"137":1,"146":2,"181":1,"196":7,"213":1,"222":1,"239":1,"242":3,"251":2,"252":2,"254":1,"281":1,"285":1,"287":5,"288":2,"289":5,"326":1,"327":1,"337":1,"338":1,"340":1,"350":3,"351":2,"352":4,"358":1,"359":2,"360":2,"387":1,"388":5}}],["igniteversiontag",{"2":{"81":1,"251":1,"371":1}}],["ignite",{"0":{"80":1,"81":1,"82":1,"370":1,"371":1},"1":{"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"371":1,"372":1,"373":1},"2":{"20":1,"21":1,"28":2,"38":1,"66":1,"67":3,"80":1,"81":4,"82":2,"88":1,"91":1,"251":5,"367":1,"371":7,"372":5,"375":2,"378":1,"387":1,"388":1,"389":1}}],["ibc",{"0":{"64":1,"72":1,"76":1,"128":1,"136":1},"1":{"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":2,"74":2,"75":2,"76":2,"77":2,"78":2,"79":2,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1},"2":{"7":1,"9":1,"64":5,"67":2,"70":2,"72":1,"76":9,"77":1,"78":5,"79":2,"91":2,"129":1,"135":3,"136":7,"137":1,"289":1}}],["if",{"2":{"4":1,"11":1,"19":1,"28":1,"30":1,"41":2,"47":1,"48":1,"59":1,"60":1,"63":1,"78":1,"79":1,"89":2,"92":1,"106":3,"107":1,"108":1,"109":1,"116":1,"133":1,"135":1,"143":1,"150":1,"152":1,"162":1,"167":1,"180":2,"194":2,"220":1,"222":1,"225":1,"243":1,"251":1,"258":2,"262":1,"269":1,"278":1,"285":1,"289":1,"296":1,"297":1,"301":2,"313":1,"317":1,"318":1,"330":1,"365":1,"371":1,"372":1,"383":8,"384":14,"388":1}}],["inner",{"2":{"169":1}}],["innovative",{"2":{"159":1,"261":1}}],["innovation",{"2":{"153":1}}],["innovate",{"2":{"153":1}}],["invalid",{"2":{"194":4,"388":2}}],["involved",{"2":{"120":1,"336":1}}],["involves",{"2":{"72":1}}],["invite",{"2":{"18":1}}],["indicators",{"2":{"369":1}}],["indicating",{"2":{"239":1,"273":1,"274":1,"302":1,"352":1,"360":1}}],["indicates",{"2":{"59":1,"60":1,"124":1,"302":1}}],["index",{"2":{"289":1,"383":4,"384":4,"388":1}}],["indexing",{"2":{"115":1,"117":1}}],["indexed",{"2":{"60":1,"106":2,"135":1,"258":1,"274":2,"281":1,"312":1,"326":1,"340":3}}],["indexerservice",{"2":{"135":1,"326":1}}],["indexers",{"2":{"9":1}}],["independently",{"2":{"8":1}}],["independent",{"2":{"7":1}}],["initiate",{"2":{"221":1,"225":1,"230":1,"233":1}}],["initial",{"2":{"47":1,"64":1,"378":2,"384":1}}],["initialization",{"2":{"344":1}}],["initializing",{"0":{"32":1,"123":1},"1":{"124":1},"2":{"75":1}}],["initialized",{"2":{"124":1,"278":1}}],["initialize",{"0":{"23":1,"24":1,"57":1,"85":1,"86":1,"134":1,"214":1},"1":{"86":1},"2":{"23":2,"24":1,"27":1,"28":1,"32":1,"39":1,"57":1,"85":2,"86":1,"121":1,"123":1,"127":1,"134":1,"213":1,"251":2,"338":1,"373":1,"384":1,"387":3}}],["initially",{"2":{"15":1}}],["init",{"2":{"23":1,"24":1,"30":1,"32":1,"47":1,"57":1,"67":2,"70":3,"74":1,"85":1,"86":1,"124":1,"133":2,"134":1,"136":1,"174":1,"213":1,"214":1,"218":3,"224":2,"251":2,"285":1,"288":1,"338":1,"387":2}}],["insights",{"2":{"344":1}}],["inside",{"2":{"45":2,"50":2,"260":1,"281":1,"326":1,"339":1,"373":2,"383":1,"385":1}}],["inspired",{"2":{"177":1}}],["insert",{"2":{"25":1}}],["inscriptions",{"2":{"14":2}}],["inscribe",{"2":{"14":2}}],["instrumentation",{"2":{"93":2}}],["instructions",{"2":{"3":1,"18":1,"136":1,"143":1,"258":1,"306":1,"320":2}}],["instantiating",{"2":{"288":1}}],["instantiation",{"0":{"288":1}}],["instantiated",{"2":{"287":1,"289":2}}],["instantiatemsg",{"2":{"41":1,"45":2,"47":2}}],["instantiate",{"2":{"41":1,"45":1,"47":1,"288":1}}],["instantaneous",{"2":{"220":1}}],["instance",{"2":{"49":1,"67":1,"148":1,"308":1}}],["installation",{"0":{"350":1},"2":{"131":2,"143":1,"204":1,"249":1,"269":2,"280":1,"301":1,"325":1,"335":1,"343":2,"371":1}}],["installer",{"2":{"130":1}}],["installed",{"2":{"20":1,"22":1,"55":1,"81":1,"88":1,"133":1,"141":1,"143":1,"203":1,"214":1,"215":1,"231":1,"249":1,"258":2,"261":1,"268":1,"278":1,"280":1,"281":1,"301":3,"303":1,"307":1,"325":1,"326":1,"329":1,"335":1,"368":1,"371":1}}],["installing",{"0":{"122":1,"143":1,"375":1},"2":{"121":1,"215":1,"229":1,"236":1,"258":1,"349":1,"357":1}}],["installs",{"2":{"82":1,"122":1,"371":1}}],["install",{"0":{"21":1,"69":1,"73":1,"81":1,"82":1,"131":1,"205":1,"291":1,"310":1,"343":1},"2":{"21":2,"67":2,"69":1,"73":1,"81":1,"82":3,"121":1,"122":2,"127":1,"130":2,"131":2,"132":1,"133":4,"136":2,"143":1,"199":2,"202":2,"203":4,"204":1,"205":2,"213":1,"237":2,"249":1,"251":8,"261":2,"269":1,"270":1,"271":1,"280":1,"291":1,"301":3,"303":2,"320":2,"325":1,"335":1,"343":2,"358":3,"368":2,"371":1,"375":2}}],["instead",{"2":{"7":1,"8":2,"72":1,"126":2,"149":1,"173":1,"232":1,"261":4,"285":1,"350":1}}],["inherits",{"2":{"18":1}}],["inherit",{"2":{"12":1,"157":1,"200":1}}],["inflationary",{"2":{"156":1}}],["inflating",{"2":{"8":1}}],["inference",{"2":{"140":3}}],["infos",{"2":{"327":1,"388":1}}],["inform",{"2":{"306":1}}],["information",{"2":{"111":1,"141":1,"179":5,"220":1,"278":1,"368":1,"378":1}}],["info",{"2":{"76":13,"104":2,"136":1,"179":1,"226":1,"259":4,"281":4,"289":2,"302":1,"326":7,"327":1,"339":12,"388":2}}],["inf",{"2":{"58":1,"60":1,"108":1,"135":24,"258":4,"274":24,"281":7,"312":10,"326":24,"340":12}}],["infrastructure",{"2":{"9":1,"147":1}}],["inclusion",{"0":{"355":1},"2":{"366":1}}],["includes",{"2":{"64":1,"133":1,"157":1,"173":1,"174":1}}],["included",{"2":{"14":1,"60":1,"179":1,"180":2,"194":2,"215":1,"353":1,"363":1,"369":1,"388":3}}],["include",{"2":{"14":2,"49":1,"59":1,"87":1,"106":2,"134":1,"146":1,"215":1,"239":1,"352":1,"360":1}}],["including",{"2":{"7":1,"17":1,"156":1,"157":1,"169":1,"363":1}}],["incoming",{"2":{"274":2}}],["incorporates",{"2":{"140":1}}],["incredibly",{"2":{"345":1}}],["increase",{"0":{"111":1},"2":{"107":3,"111":1,"328":1}}],["increasing",{"2":{"63":1}}],["incrementcounter",{"2":{"215":3,"217":1,"218":1}}],["increment",{"2":{"41":1,"46":2,"47":1,"384":2,"388":1}}],["incurring",{"2":{"156":1}}],["incur",{"2":{"18":1,"157":1}}],["incentive",{"2":{"8":1}}],["int",{"2":{"215":9,"217":1,"218":1,"384":1}}],["introduction",{"0":{"41":1,"54":1,"129":1,"140":1,"168":1,"220":1,"229":1,"236":1,"267":1,"324":1,"357":1},"2":{"42":1}}],["introduced",{"2":{"89":1,"332":1}}],["introduce",{"2":{"8":1}}],["integrity",{"2":{"220":1}}],["integrated",{"2":{"82":1,"88":1,"118":1,"119":1,"265":1,"305":1}}],["integrate",{"0":{"114":1,"117":1},"1":{"115":1,"116":1,"117":1,"118":2,"119":1,"120":1},"2":{"22":1,"41":2,"50":1,"51":1,"91":1,"115":1,"117":1,"129":1,"200":1,"242":1,"279":1}}],["integrating",{"0":{"15":1,"51":1},"2":{"14":1,"20":1,"42":1}}],["integrations",{"2":{"91":1,"175":1}}],["integration",{"0":{"43":1,"47":1,"48":1},"1":{"44":1,"45":1,"46":1,"47":1,"49":1,"50":1,"51":1},"2":{"12":1,"13":1,"17":1,"18":1,"41":2,"42":3,"47":1,"48":2,"50":1,"115":1,"174":1,"175":1,"200":2,"256":1,"306":2}}],["integers",{"2":{"383":1,"388":1}}],["integer",{"2":{"180":1}}],["intermediate",{"0":{"165":1},"2":{"188":1}}],["intermediaries",{"2":{"8":1}}],["interpreted",{"2":{"142":1}}],["interval",{"2":{"89":1}}],["inter",{"2":{"64":1}}],["interacted",{"2":{"289":1,"298":1}}],["interactive",{"2":{"133":1}}],["interacting",{"0":{"254":1,"340":1,"388":1},"2":{"52":1,"178":1,"254":1,"259":1,"261":1,"340":1}}],["interactions",{"2":{"47":1,"52":1,"382":2}}],["interaction",{"0":{"46":1,"275":1,"286":1,"289":1,"290":1,"303":1},"1":{"287":1,"288":1,"289":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1},"2":{"42":1,"46":1,"49":1,"242":1,"261":3,"275":1,"303":1,"377":1}}],["interact",{"0":{"150":1,"295":1,"297":1,"316":1,"318":1},"2":{"9":1,"41":2,"43":1,"127":1,"149":1,"150":1,"242":1,"254":3,"255":1,"273":1,"275":1,"286":1,"289":1,"290":1,"296":2,"297":1,"303":1,"317":2,"318":1,"327":1,"329":1,"340":3,"341":1,"382":1}}],["interchain",{"2":{"9":1}}],["interoperability",{"2":{"8":1}}],["interoperate",{"2":{"7":2}}],["internal",{"2":{"8":1}}],["interfaces",{"2":{"16":2,"50":1,"174":1,"179":1,"350":1,"377":1}}],["interface",{"0":{"45":1,"50":1,"172":1,"364":1},"1":{"173":1},"2":{"7":1,"9":1,"10":1,"16":6,"42":2,"45":9,"46":1,"50":7,"153":2,"162":1,"172":1,"173":1,"174":2,"175":1,"241":2,"242":4,"329":1,"348":1,"364":2,"366":2,"385":2,"389":1}}],["into",{"0":{"15":1,"20":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1},"2":{"7":1,"20":2,"26":1,"37":1,"41":1,"67":1,"82":1,"88":1,"91":2,"92":1,"115":1,"117":1,"119":1,"140":1,"167":1,"170":1,"185":1,"200":1,"214":1,"242":1,"243":1,"261":1,"285":2,"296":1,"297":1,"317":1,"318":1,"322":1,"325":1,"330":1,"344":1,"365":1}}],["in",{"0":{"35":1,"48":1,"108":1,"128":1,"184":1,"188":1,"389":1},"1":{"49":1,"50":1,"51":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1},"2":{"3":1,"4":2,"8":4,"9":1,"14":1,"15":2,"16":3,"18":1,"19":2,"21":2,"28":1,"29":1,"30":3,"35":1,"39":1,"41":3,"42":1,"44":2,"45":4,"46":5,"47":2,"48":1,"49":1,"50":3,"52":1,"54":1,"57":1,"62":1,"63":1,"64":4,"67":2,"70":2,"72":2,"76":5,"78":3,"81":1,"82":1,"89":3,"91":2,"92":2,"93":3,"97":3,"98":1,"102":1,"103":1,"104":2,"106":1,"107":7,"110":1,"111":1,"113":2,"114":1,"115":1,"117":1,"118":5,"119":1,"120":4,"124":2,"125":1,"131":1,"133":1,"135":3,"136":1,"140":1,"143":1,"144":1,"146":1,"147":2,"148":1,"149":2,"150":3,"152":1,"153":1,"156":2,"157":2,"158":2,"162":1,"167":3,"169":1,"170":1,"174":2,"177":1,"178":3,"181":1,"182":1,"185":2,"187":2,"188":4,"190":1,"194":9,"196":2,"199":2,"208":1,"212":1,"214":1,"215":4,"218":1,"220":1,"222":2,"226":1,"229":1,"230":1,"232":1,"233":1,"240":1,"243":1,"245":4,"250":1,"251":1,"252":1,"254":6,"255":1,"258":1,"259":2,"261":4,"279":1,"281":4,"283":1,"284":2,"285":5,"286":2,"287":1,"289":1,"290":1,"292":1,"294":1,"296":1,"297":4,"301":1,"306":1,"308":1,"311":1,"315":1,"317":1,"318":4,"319":3,"321":1,"322":2,"326":7,"327":1,"329":1,"330":1,"331":1,"332":1,"336":3,"337":1,"338":1,"339":2,"340":6,"341":1,"343":1,"348":2,"350":1,"351":1,"363":3,"365":1,"366":1,"367":1,"368":1,"369":5,"371":2,"372":1,"373":1,"376":2,"378":2,"379":1,"383":5,"384":3,"385":2,"387":1,"388":5,"389":1}}],["image=",{"2":{"338":1}}],["image",{"2":{"14":1,"251":4,"252":6,"254":1,"281":3,"283":2,"326":3,"337":4,"338":1,"339":2,"340":2}}],["images",{"0":{"301":1},"2":{"3":1,"251":1,"254":1,"281":1,"301":3,"326":1,"337":1,"339":1}}],["impact",{"2":{"261":1}}],["impl=node",{"2":{"135":1,"326":1}}],["impl=rpc",{"2":{"135":1,"326":1}}],["impl=indexerservice",{"2":{"135":1,"326":1}}],["impl=pubsub",{"2":{"135":1,"326":1}}],["impl=eventbus",{"2":{"135":1,"326":1}}],["impl=localclient",{"2":{"135":4,"326":4}}],["impl=multiappconn",{"2":{"135":1,"326":1}}],["implications",{"2":{"101":1}}],["impl",{"2":{"45":1}}],["implementing",{"2":{"16":1,"162":1,"277":1}}],["implementers",{"2":{"16":1}}],["implemented",{"2":{"16":1,"153":1,"175":1,"177":1,"181":1,"182":1,"185":1,"376":1,"385":1,"388":1}}],["implements",{"2":{"14":1,"46":1,"179":1,"241":1,"348":1,"366":1}}],["implementations",{"0":{"366":1},"2":{"174":1,"366":1,"367":1}}],["implementation",{"0":{"369":1},"2":{"12":1,"13":1,"15":1,"18":1,"157":1,"185":2,"366":1,"367":1}}],["implement",{"2":{"10":1,"16":2,"369":2,"382":1}}],["imported",{"2":{"385":1}}],["import",{"2":{"146":1,"149":2,"215":2,"216":2,"338":2,"383":1,"384":1}}],["importing",{"2":{"47":1,"50":1}}],["important",{"2":{"16":1,"106":1,"152":1,"174":1,"242":1,"349":1,"373":1}}],["imposed",{"2":{"10":1}}],["improves",{"2":{"388":1}}],["improve",{"2":{"263":1,"389":3}}],["improvements",{"2":{"4":1}}],["improving",{"2":{"2":1,"54":1}}],["itoa",{"2":{"384":2}}],["its",{"2":{"7":2,"9":1,"16":1,"58":1,"100":1,"131":1,"144":1,"181":1,"187":1,"194":1,"225":1,"232":1,"259":1,"260":1,"261":1,"287":1,"343":1,"376":2,"384":1}}],["it",{"2":{"2":2,"8":1,"9":2,"12":1,"14":2,"16":3,"18":3,"19":2,"23":1,"30":2,"41":3,"44":1,"45":2,"46":1,"57":1,"58":1,"60":1,"64":1,"73":1,"76":3,"85":1,"104":1,"106":2,"129":1,"130":1,"133":2,"140":1,"145":1,"146":2,"147":5,"149":2,"150":2,"152":1,"153":1,"156":2,"157":4,"160":1,"162":1,"167":1,"168":1,"169":1,"172":1,"174":1,"175":1,"177":1,"178":1,"181":1,"188":1,"194":1,"196":1,"200":3,"203":2,"208":2,"215":1,"216":1,"217":1,"218":1,"220":1,"222":1,"225":1,"230":1,"240":1,"241":3,"243":2,"250":1,"251":2,"254":2,"255":1,"256":1,"260":1,"262":1,"274":1,"280":1,"281":1,"283":1,"284":1,"285":1,"287":1,"289":1,"290":3,"292":1,"297":1,"298":1,"301":1,"305":1,"318":1,"324":1,"325":1,"326":1,"327":2,"329":1,"332":1,"335":1,"336":1,"337":1,"338":3,"340":3,"341":1,"345":2,"349":2,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"369":2,"371":2,"373":3,"377":1,"378":3,"381":1,"382":2,"383":1,"384":2,"385":1,"387":1,"388":3,"389":3}}],["isfound",{"2":{"383":2,"384":4}}],["isletter",{"2":{"383":3,"384":1}}],["isn",{"2":{"369":1}}],["isrs",{"2":{"188":1}}],["issues",{"2":{"251":1,"278":1,"301":1,"306":2,"330":1}}],["issue",{"2":{"4":1,"64":3,"92":1,"167":1,"220":1}}],["is",{"0":{"153":1,"154":1},"1":{"155":1,"156":1},"2":{"1":1,"7":1,"8":2,"9":1,"10":1,"12":3,"15":2,"18":4,"19":2,"21":1,"22":1,"24":1,"25":1,"29":1,"30":3,"39":1,"41":1,"46":1,"47":1,"50":1,"51":1,"59":1,"60":1,"62":1,"63":2,"70":2,"72":1,"76":3,"77":1,"78":1,"79":1,"81":1,"87":2,"90":1,"92":1,"93":1,"101":1,"106":1,"107":4,"108":1,"110":1,"115":1,"119":2,"120":1,"123":1,"124":2,"129":1,"133":1,"136":2,"143":1,"145":1,"146":1,"147":1,"148":1,"149":1,"152":1,"153":3,"155":2,"157":3,"160":1,"162":1,"167":2,"168":1,"169":1,"172":1,"174":1,"175":1,"177":3,"178":2,"180":2,"181":2,"185":1,"187":1,"188":1,"194":6,"195":1,"196":1,"200":1,"213":1,"215":1,"216":1,"218":1,"220":1,"221":1,"222":1,"225":4,"226":3,"232":8,"233":1,"239":2,"240":1,"241":3,"243":5,"244":1,"245":2,"246":1,"251":2,"252":3,"254":1,"256":1,"258":2,"267":2,"269":1,"270":1,"273":2,"274":4,"278":2,"279":3,"280":1,"281":2,"283":1,"285":1,"287":1,"288":2,"292":1,"294":1,"296":1,"301":2,"302":1,"306":4,"317":1,"320":1,"322":1,"324":1,"325":1,"326":3,"327":1,"329":1,"330":2,"332":3,"335":1,"336":1,"338":2,"340":2,"342":1,"345":3,"348":4,"349":1,"350":1,"351":1,"352":3,"353":1,"359":1,"360":1,"362":1,"365":5,"366":2,"368":1,"369":1,"371":1,"372":2,"373":3,"376":3,"377":2,"378":2,"381":3,"382":3,"383":5,"384":3,"385":2,"388":3,"389":1}}],["luck",{"2":{"227":1,"234":1,"345":1}}],["luxor",{"2":{"14":1}}],["l",{"2":{"204":1,"291":1,"310":1}}],["l3s",{"2":{"158":1}}],["lt",{"2":{"104":1,"106":1}}],["l2",{"2":{"8":2}}],["len",{"2":{"383":1,"384":1}}],["level",{"2":{"136":1,"143":1,"177":1,"256":1,"327":1}}],["leverages",{"2":{"140":1,"157":1}}],["leverage",{"2":{"20":1,"114":1,"160":1,"169":1,"256":1}}],["left",{"2":{"63":1,"106":1}}],["less",{"2":{"16":1,"114":1,"118":1}}],["letters",{"2":{"383":3,"384":2}}],["letter",{"2":{"369":6,"383":1,"384":1,"388":1}}],["lets",{"2":{"57":1}}],["let",{"2":{"8":1,"41":1,"47":5,"57":1,"92":1,"133":1,"149":1,"167":1,"215":2,"216":1,"225":2,"226":1,"232":4,"233":1,"261":1,"281":1,"283":1,"285":3,"287":1,"289":1,"326":1,"327":1,"329":1,"340":1,"387":1,"388":3}}],["leader",{"2":{"388":1}}],["leading",{"2":{"7":1}}],["least",{"2":{"188":1,"388":1}}],["leaf",{"2":{"136":2}}],["learnt",{"2":{"265":1}}],["learning",{"2":{"140":2}}],["learn",{"2":{"3":1,"26":1,"45":1,"52":1,"64":2,"121":1,"132":1,"153":1,"160":1,"162":1,"232":1,"246":1,"263":1,"313":1,"320":1,"332":1}}],["li",{"2":{"254":1}}],["lies",{"2":{"230":1}}],["license",{"2":{"149":1,"215":2,"216":1}}],["listed",{"2":{"156":1}}],["listen=0",{"2":{"320":1}}],["listen",{"2":{"74":1,"93":1,"135":1,"136":1,"237":1,"252":2,"254":1,"271":1,"281":1,"326":2,"340":1,"350":1,"358":1}}],["listening",{"2":{"58":1,"93":1,"132":1,"135":3,"273":1,"326":3,"353":1}}],["list",{"0":{"94":1},"1":{"95":1,"96":1,"97":1,"98":1,"99":1},"2":{"109":1,"136":1,"263":1,"287":1,"289":2,"327":2,"378":1,"388":2}}],["lifecycle",{"2":{"174":1,"256":1,"262":1}}],["life",{"2":{"91":1,"159":1}}],["limited",{"2":{"155":2}}],["limitations",{"2":{"155":1,"262":1}}],["limit",{"2":{"90":2,"136":1,"327":1,"388":1}}],["lines",{"2":{"146":1,"243":1,"365":1}}],["line",{"2":{"133":1,"285":2}}],["link",{"2":{"76":1,"270":1}}],["linked",{"2":{"28":1}}],["linux",{"2":{"67":1,"130":1,"203":3,"301":2,"308":1}}],["libraries",{"2":{"371":1}}],["library",{"2":{"52":1,"215":1}}],["libs",{"2":{"262":1}}],["libssl",{"2":{"202":1}}],["libp2p",{"2":{"98":1,"181":1}}],["lib",{"2":{"45":2,"46":1,"50":1}}],["live",{"2":{"16":1,"41":1,"52":1,"63":1,"216":1}}],["liquidity",{"2":{"8":1,"161":1}}],["light",{"0":{"184":1,"221":1,"226":1,"230":1,"233":1,"319":1,"320":1},"1":{"222":1,"320":1,"321":1,"322":1},"2":{"7":2,"8":1,"74":1,"107":1,"109":1,"136":1,"157":2,"162":1,"170":1,"175":1,"184":4,"185":1,"188":4,"190":2,"194":2,"221":1,"222":4,"224":1,"225":1,"230":2,"232":6,"319":2,"320":7,"322":1}}],["like",{"2":{"7":2,"8":1,"9":1,"45":1,"46":1,"60":1,"62":1,"72":2,"76":1,"78":1,"79":2,"90":1,"103":1,"104":1,"108":1,"124":1,"145":1,"150":1,"156":1,"157":1,"172":1,"173":1,"190":1,"202":1,"207":1,"225":1,"242":2,"245":1,"254":1,"281":1,"313":1,"326":2,"327":2,"338":1,"339":2,"388":1,"390":1}}],["larger",{"2":{"388":1}}],["largest",{"2":{"14":1}}],["label",{"2":{"288":1,"289":1}}],["labs",{"2":{"69":1,"145":1,"225":1}}],["later",{"2":{"89":1,"281":1,"286":1,"326":1,"340":1,"388":1}}],["latest",{"2":{"44":1,"96":2,"180":2,"210":1,"225":2,"251":1,"301":1,"337":1,"340":1,"381":1,"384":1}}],["lazy",{"0":{"89":1},"2":{"89":6,"91":1}}],["lastbatchhash",{"2":{"364":1}}],["lastly",{"2":{"199":1,"232":1}}],["last",{"2":{"79":1,"178":1,"196":4,"232":1,"353":3}}],["layar",{"2":{"60":1}}],["layers",{"0":{"244":1},"2":{"10":1,"15":2,"17":1,"18":1,"153":1,"157":2,"158":1,"161":2,"199":1,"200":2,"241":1,"242":2,"244":1}}],["layer",{"0":{"15":1,"161":1,"181":1},"2":{"7":5,"8":3,"10":1,"14":1,"16":2,"18":2,"107":1,"108":4,"156":2,"157":5,"160":2,"161":2,"162":1,"163":1,"170":1,"174":4,"175":1,"178":2,"181":2,"185":1,"187":1,"188":2,"194":4,"199":1,"200":1,"213":1,"225":2,"232":2,"234":1,"241":3,"242":2,"243":5,"244":1,"245":1,"256":2,"273":1,"279":1,"281":1,"306":1,"312":2,"320":1,"321":1,"338":1,"339":1,"349":5,"351":1,"352":2,"362":1,"366":1}}],["laddr",{"2":{"59":4,"281":2}}],["language",{"2":{"130":1}}],["land",{"2":{"45":1}}],["lanes",{"2":{"9":1}}],["launched",{"2":{"281":1,"326":1}}],["launches",{"2":{"258":1}}],["launching",{"2":{"7":1,"8":1,"11":1,"252":1}}],["launch",{"2":{"7":2,"8":1,"10":1,"103":1,"104":1,"152":1,"168":1,"281":1,"326":1,"342":1,"349":1}}],["l1",{"2":{"7":2,"8":1,"185":1}}],["l1s",{"2":{"7":1}}],["lots",{"2":{"371":1}}],["long",{"2":{"188":1,"383":1,"384":1,"388":1}}],["low",{"2":{"184":1}}],["loop",{"2":{"74":2,"136":2}}],["looks",{"2":{"124":1,"178":1,"190":1,"326":1,"339":1}}],["look",{"2":{"58":1,"62":1,"90":1,"103":1,"104":1,"108":1,"149":1,"150":1,"199":1,"207":1,"209":1,"232":2,"287":1,"289":2,"294":1,"312":1,"315":1,"329":1,"383":1}}],["looking",{"2":{"41":1,"119":1,"156":1,"169":1}}],["login",{"2":{"297":1,"318":1}}],["logic",{"2":{"225":1,"232":1,"256":1,"331":1,"376":1,"382":1,"388":1}}],["logging",{"2":{"215":1}}],["logger",{"2":{"47":1}}],["logsbloom",{"2":{"150":1}}],["logs",{"2":{"58":1,"135":1,"149":1,"150":1,"215":3,"243":1,"253":1,"258":2,"273":1,"278":1,"281":4,"289":1,"294":1,"312":1,"315":1,"326":4,"339":2,"340":4,"365":1,"388":1}}],["log",{"2":{"47":1,"104":4,"136":1,"215":3,"217":1,"239":1,"274":1,"289":1,"344":1,"352":1,"360":1,"388":2}}],["loading",{"2":{"171":1,"191":1,"192":1,"193":1,"194":1}}],["loads",{"2":{"146":1}}],["loaded",{"2":{"136":1}}],["load",{"2":{"47":1}}],["lock",{"2":{"47":1,"104":2}}],["location",{"2":{"212":1}}],["located",{"2":{"21":1,"93":1,"148":1,"214":1,"388":1}}],["localwasm",{"2":{"285":2,"288":2,"289":2}}],["locally",{"0":{"217":1},"2":{"216":1,"217":2,"218":1,"227":1,"326":2,"339":2}}],["localclient",{"2":{"135":4,"326":4}}],["localdalatesttag",{"2":{"132":1,"237":1,"252":1,"271":1}}],["localhost",{"2":{"59":2,"74":2,"78":2,"79":3,"93":1,"135":1,"136":1,"149":1,"225":2,"226":1,"232":1,"239":3,"243":1,"261":1,"294":1,"315":1,"330":1,"350":3,"351":3,"352":4,"353":1,"360":2}}],["local",{"0":{"68":1,"70":1,"78":1,"79":1,"132":1,"206":1,"212":1,"235":1,"237":1,"238":1,"271":1,"302":1,"308":1,"356":1,"358":2,"359":1},"1":{"69":1,"70":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"236":1,"237":1,"238":1,"239":1,"240":1,"357":1,"358":1,"359":1,"360":1,"361":1},"2":{"2":1,"17":1,"47":4,"55":1,"64":1,"67":4,"70":5,"74":2,"75":3,"76":6,"78":1,"85":1,"132":3,"133":1,"135":1,"138":2,"140":1,"199":1,"203":4,"205":1,"206":1,"214":1,"217":3,"220":2,"221":1,"225":2,"227":1,"229":1,"232":1,"234":1,"236":1,"237":3,"238":2,"239":1,"240":1,"244":1,"250":4,"252":11,"254":9,"256":1,"258":3,"259":1,"261":1,"265":1,"271":2,"273":1,"274":1,"278":1,"279":1,"281":12,"284":1,"287":1,"289":1,"299":1,"302":1,"305":1,"306":1,"308":2,"321":2,"326":14,"327":2,"330":1,"336":2,"338":3,"339":5,"340":6,"348":1,"349":1,"351":1,"352":2,"357":1,"358":4,"359":1,"360":1,"361":1,"366":1,"371":1,"372":1,"383":1,"384":1,"387":1,"389":1}}],["love",{"2":{"2":1,"11":1}}],["ll",{"2":{"0":1,"5":1,"23":1,"24":1,"64":1,"70":1,"82":1,"89":1,"91":2,"107":1,"109":1,"115":1,"116":1,"117":1,"121":1,"144":1,"199":1,"208":1,"245":1,"253":1,"289":2,"296":1,"297":1,"301":1,"317":1,"318":1,"319":2,"321":1,"327":1,"339":1}}],["w1",{"2":{"207":2}}],["wget",{"2":{"202":1,"203":1}}],["w",{"2":{"146":2}}],["worry",{"2":{"327":1}}],["word",{"2":{"369":7,"378":1,"379":4,"381":3,"383":6,"384":8,"388":4,"389":2}}],["wordle",{"0":{"104":1,"253":1,"339":1,"367":1,"370":1,"372":1,"373":1,"376":1,"380":1,"381":1,"386":1,"387":1},"1":{"368":1,"369":1,"370":1,"371":2,"372":2,"373":2,"374":1,"375":1,"376":1,"377":2,"378":1,"379":1,"380":1,"381":2,"382":1,"383":1,"384":1,"385":1,"386":1,"387":2,"388":2,"389":2,"390":1},"2":{"104":7,"165":1,"239":1,"246":1,"247":1,"250":1,"251":9,"252":8,"253":2,"254":7,"331":1,"332":1,"333":1,"336":2,"337":5,"338":17,"339":8,"340":7,"351":1,"352":1,"358":1,"360":1,"367":1,"369":7,"372":3,"373":1,"374":1,"376":1,"377":3,"378":3,"379":2,"381":3,"383":24,"384":17,"385":3,"387":4,"388":22,"389":2,"390":1}}],["words",{"2":{"75":1}}],["workdir",{"2":{"251":2}}],["working",{"2":{"135":1,"143":1,"144":1,"162":1,"251":2,"326":1}}],["work",{"0":{"184":1,"188":1},"2":{"64":1,"188":2,"190":1,"196":1,"199":1,"220":1,"281":1,"326":1,"366":1,"368":1,"371":1,"373":1,"377":1,"385":1}}],["workspace",{"0":{"48":1},"1":{"49":1,"50":1,"51":1},"2":{"42":1,"45":1,"50":4,"51":1,"119":1}}],["workspaces",{"2":{"41":1,"49":1}}],["works",{"2":{"16":1,"146":1,"199":1}}],["worldle",{"2":{"387":1}}],["world",{"0":{"323":1,"329":1},"1":{"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1},"2":{"64":1,"67":1,"116":1,"124":2,"129":1,"133":2,"164":1,"220":5,"223":1,"261":1,"263":1,"324":1,"340":1,"372":1}}],["would",{"2":{"62":1,"90":1,"106":1,"167":1,"173":1,"225":1,"243":1}}],["wrap",{"2":{"383":3,"384":4}}],["wrapper",{"2":{"45":2}}],["wrong",{"2":{"369":1,"384":2}}],["wrn",{"2":{"274":1}}],["written",{"2":{"146":2}}],["writing",{"2":{"16":1,"41":1,"44":1,"288":1}}],["writer",{"2":{"16":2}}],["write",{"2":{"16":3,"41":2,"92":1,"146":2,"167":1,"232":3,"279":1,"372":1,"383":1}}],["warning",{"2":{"67":1,"133":1,"190":1,"196":1,"207":1,"256":1,"266":1,"279":1,"290":1,"299":1,"306":1}}],["waiting",{"2":{"149":1,"294":1,"315":1}}],["wait",{"2":{"62":1,"64":1,"89":1,"350":1,"388":1}}],["wanted",{"2":{"289":2,"388":1}}],["want",{"2":{"41":1,"48":1,"89":1,"119":1,"152":1,"161":1,"220":1,"222":1,"254":1,"262":1,"284":1,"304":1,"321":1,"327":2,"340":1}}],["wants",{"2":{"16":1,"384":1}}],["ways",{"2":{"158":1,"245":1,"369":1,"389":1}}],["way",{"2":{"41":1,"245":1,"342":1,"384":1,"388":4}}],["walkthrough",{"2":{"142":1,"143":1}}],["walk",{"2":{"20":1,"27":1,"80":1,"101":1,"121":1,"269":1}}],["wall",{"2":{"14":1}}],["wallet",{"0":{"207":1,"330":1},"2":{"9":1,"75":1,"197":2,"207":1,"222":1,"230":1,"289":1,"297":3,"318":3,"329":3,"330":5}}],["waste",{"2":{"47":1}}],["wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z",{"2":{"289":2}}],["wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d",{"2":{"289":3}}],["wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5",{"2":{"196":4}}],["wasmvm",{"2":{"256":1}}],["wasmd",{"2":{"195":1,"196":1,"281":1,"284":1,"285":1,"287":1,"288":1,"289":6}}],["wasmpath",{"2":{"45":1}}],["wasm32",{"2":{"45":2}}],["wasm",{"2":{"45":4,"196":2,"279":1,"281":6,"284":2,"285":4,"287":1,"288":1,"289":7}}],["was",{"2":{"13":1,"14":2,"16":1,"89":1,"150":1,"203":1,"281":1,"326":1,"339":2,"363":2,"371":1,"383":1,"384":1,"388":3}}],["wire",{"2":{"373":1}}],["wip",{"2":{"332":1}}],["win",{"2":{"136":2}}],["windows",{"2":{"130":1,"301":2,"371":3}}],["window",{"2":{"82":1,"388":1}}],["widespread",{"2":{"156":1}}],["widely",{"2":{"143":1}}],["wide",{"2":{"91":1}}],["witnesses",{"2":{"14":2}}],["without",{"2":{"7":1,"8":1,"14":1,"108":1,"174":1,"185":1,"306":1,"348":1,"363":1}}],["within",{"2":{"7":1,"129":1,"145":1,"273":1,"384":1}}],["with",{"0":{"9":1,"12":1,"14":1,"40":1,"114":1,"139":1,"150":1,"159":1,"160":1,"254":1,"256":1,"258":1,"263":1,"266":1,"282":1,"295":1,"297":1,"299":1,"302":1,"316":1,"318":1,"319":1,"340":1,"388":1},"1":{"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"283":1,"284":1,"285":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"320":1,"321":1,"322":1},"2":{"1":1,"2":1,"3":1,"6":1,"7":5,"8":4,"9":4,"11":2,"12":2,"13":2,"14":2,"16":1,"18":3,"19":1,"32":1,"34":1,"38":2,"41":2,"42":1,"43":1,"45":2,"48":1,"51":1,"52":1,"58":1,"59":2,"63":1,"67":2,"70":1,"73":1,"74":2,"75":1,"76":1,"77":1,"81":1,"85":2,"87":1,"89":2,"91":2,"92":1,"101":1,"103":2,"104":2,"106":1,"113":1,"115":1,"127":1,"129":1,"133":3,"135":2,"136":2,"143":2,"144":1,"146":4,"147":1,"149":2,"150":1,"152":2,"153":2,"155":1,"156":2,"157":4,"160":1,"163":1,"166":1,"167":1,"173":3,"174":1,"178":5,"179":1,"185":1,"190":1,"194":1,"199":2,"200":2,"201":1,"203":1,"211":1,"215":3,"216":1,"217":4,"218":1,"222":2,"225":1,"226":1,"232":1,"233":1,"236":1,"238":1,"239":1,"241":2,"242":2,"244":1,"245":4,"250":2,"252":1,"253":1,"254":6,"255":2,"256":2,"258":1,"259":2,"261":8,"263":3,"265":1,"273":1,"274":3,"275":3,"276":1,"277":1,"279":1,"280":2,"281":5,"285":2,"286":1,"289":4,"290":1,"292":1,"293":1,"294":1,"296":3,"297":2,"298":1,"300":1,"301":4,"302":1,"303":3,"305":3,"306":1,"314":1,"315":1,"317":3,"318":2,"319":1,"325":1,"326":7,"327":1,"329":2,"338":2,"339":4,"340":6,"341":2,"349":2,"351":1,"352":2,"353":1,"357":1,"358":1,"359":1,"360":1,"364":1,"367":1,"371":1,"372":2,"374":1,"377":5,"378":2,"379":1,"381":1,"382":2,"383":2,"384":5,"385":2,"387":3,"388":8,"389":1}}],["wizards",{"2":{"14":1}}],["will",{"2":{"10":1,"18":1,"19":1,"20":1,"27":1,"28":1,"39":1,"41":3,"43":1,"48":1,"58":1,"62":1,"63":2,"67":1,"70":1,"71":2,"75":2,"78":2,"80":1,"81":1,"82":1,"86":1,"91":2,"92":1,"93":1,"101":1,"102":1,"103":4,"104":3,"105":1,"106":3,"107":3,"108":1,"111":1,"120":1,"121":1,"129":2,"131":1,"133":1,"135":1,"136":1,"140":4,"143":1,"145":2,"146":1,"147":5,"148":1,"149":2,"150":3,"156":1,"163":1,"167":1,"170":2,"180":2,"188":3,"194":5,"199":5,"202":1,"203":1,"207":1,"209":1,"210":1,"214":1,"215":1,"217":2,"218":1,"225":1,"232":2,"237":2,"240":1,"243":1,"250":2,"256":1,"259":1,"260":1,"261":1,"269":1,"271":1,"273":1,"279":2,"281":1,"284":1,"285":2,"286":1,"287":1,"289":2,"290":1,"293":1,"294":2,"296":2,"299":1,"301":1,"302":1,"304":1,"306":1,"312":1,"314":1,"315":2,"317":2,"319":3,"324":2,"326":1,"330":1,"336":2,"338":1,"340":1,"343":1,"344":1,"349":1,"354":1,"358":2,"361":1,"365":1,"367":3,"368":1,"369":5,"372":2,"373":2,"377":2,"378":1,"380":1,"382":1,"383":2,"384":2,"387":3,"388":6}}],["whoever",{"2":{"369":1}}],["who",{"2":{"161":1,"368":1}}],["why",{"0":{"157":1}}],["whatever",{"2":{"145":1}}],["what",{"0":{"153":1,"154":1},"1":{"155":1,"156":1},"2":{"108":1,"162":1,"190":1,"225":1,"244":1,"345":1,"352":1,"359":1}}],["whammy",{"2":{"76":1}}],["whitelist",{"2":{"50":1}}],["while",{"2":{"9":1,"14":1,"15":1,"156":1,"167":1,"194":1,"208":1,"245":2,"267":1,"376":1}}],["whichever",{"2":{"162":1}}],["which",{"2":{"7":1,"8":1,"16":2,"30":1,"63":1,"64":1,"67":1,"70":1,"72":1,"79":1,"82":1,"92":1,"93":1,"115":1,"129":1,"141":1,"153":2,"156":1,"157":2,"167":1,"173":2,"178":3,"194":2,"220":1,"221":1,"223":1,"226":1,"229":1,"232":2,"236":1,"237":1,"241":1,"271":1,"284":1,"302":1,"303":1,"319":1,"345":1,"349":1,"357":1,"358":1,"366":2,"369":1,"372":1,"377":2,"383":2,"384":2}}],["where",{"2":{"8":1,"15":1,"18":1,"19":1,"21":1,"24":1,"28":1,"49":2,"64":1,"106":2,"107":1,"110":1,"124":1,"147":1,"157":1,"167":1,"208":2,"338":2,"350":1,"363":1,"388":1}}],["when",{"0":{"162":1},"2":{"7":1,"10":1,"45":1,"49":1,"50":2,"63":2,"72":1,"75":1,"76":1,"91":1,"103":2,"104":2,"106":2,"125":1,"146":1,"170":1,"178":1,"188":1,"194":1,"261":2,"304":1,"320":1,"349":1,"353":1,"384":1,"389":2}}],["whether",{"2":{"2":1,"188":1,"388":1}}],["web",{"2":{"373":1}}],["webassembly",{"2":{"279":1}}],["websockets",{"2":{"179":1}}],["weight",{"2":{"184":1}}],["well",{"2":{"49":1,"98":1,"141":1,"174":1,"181":1,"217":1,"227":2,"234":1,"281":1,"326":1,"367":1}}],["welcome",{"2":{"0":1,"5":1,"91":1,"168":1,"342":1}}],["we",{"2":{"2":1,"4":1,"11":1,"12":1,"16":3,"17":1,"18":2,"19":1,"41":3,"43":1,"45":1,"48":1,"50":2,"59":5,"64":1,"70":2,"87":1,"89":1,"107":2,"113":1,"115":1,"117":1,"120":1,"129":1,"133":1,"135":4,"136":2,"140":2,"143":2,"144":1,"145":1,"146":1,"148":1,"150":2,"162":1,"163":1,"168":2,"177":1,"199":4,"202":1,"203":1,"208":1,"214":1,"215":2,"216":2,"217":3,"218":6,"224":2,"225":1,"232":1,"243":2,"250":4,"251":1,"252":4,"254":5,"261":1,"274":2,"279":2,"280":2,"281":6,"283":1,"284":2,"285":1,"286":1,"287":2,"288":2,"289":3,"293":1,"296":1,"306":2,"314":1,"317":1,"319":1,"324":1,"325":3,"326":6,"327":4,"336":3,"337":1,"338":4,"340":6,"365":2,"368":2,"369":5,"372":4,"373":1,"374":2,"376":1,"377":2,"378":2,"379":3,"380":2,"381":1,"382":1,"383":9,"384":12,"385":2,"387":2,"388":4}}],["dc4026b38a604b82af88a0cd9bedb245",{"2":{"340":2}}],["dc4026b38a60",{"2":{"339":1}}],["df",{"2":{"301":1}}],["d532fc82579f",{"2":{"281":1}}],["dl",{"2":{"203":1}}],["d7d4c5a2ac271061512789bee3718305beaa519b",{"2":{"196":2}}],["d7e7e6ec0299c120c0e32167c11f0b60921ef88cc6524345bceb3b266ef727aa",{"2":{"76":1}}],["dht",{"2":{"181":3}}],["db",{"2":{"104":3,"350":1}}],["dbg",{"2":{"60":1}}],["dst",{"2":{"76":3,"136":2}}],["dynamic",{"2":{"256":1}}],["dyn",{"2":{"45":1}}],["dual",{"2":{"256":2}}],["dumps",{"2":{"146":1}}],["duplicate",{"2":{"107":1}}],["duplication",{"2":{"41":1}}],["during",{"2":{"63":1,"101":2,"157":1,"243":1,"365":1}}],["duration=46",{"2":{"274":1}}],["duration>",{"2":{"89":1}}],["duration",{"2":{"62":1,"74":2,"136":2,"350":1}}],["due",{"2":{"13":1,"107":1}}],["dramatically",{"2":{"388":1}}],["drive",{"2":{"385":1}}],["dr",{"0":{"13":1}}],["d",{"2":{"11":1,"106":1,"208":1,"258":1,"283":1,"313":1,"320":1}}],["das",{"2":{"319":1}}],["dastartheight",{"2":{"178":1}}],["date",{"2":{"278":1,"383":1,"388":1,"389":1}}],["database",{"2":{"350":1}}],["datadir",{"2":{"60":1}}],["dataavailabilitylayerclient",{"2":{"16":1,"174":1}}],["data",{"0":{"14":1,"15":1,"16":1,"31":1,"174":1,"271":1},"1":{"175":1},"2":{"8":1,"10":2,"12":2,"13":2,"14":8,"15":4,"16":7,"18":3,"20":1,"31":2,"55":1,"60":3,"101":1,"103":1,"104":6,"129":2,"140":1,"152":1,"153":1,"157":4,"162":1,"163":1,"169":1,"170":1,"174":3,"175":1,"178":3,"185":1,"187":1,"194":1,"196":2,"199":2,"200":6,"220":3,"222":1,"223":1,"229":1,"230":1,"232":1,"234":1,"240":1,"241":2,"242":2,"243":1,"271":1,"289":2,"306":2,"319":2,"320":1,"321":1,"322":1,"324":2,"332":1,"336":1,"344":1,"364":1,"373":1,"388":2}}],["dae3359665f8",{"2":{"254":1}}],["daemon",{"2":{"206":1}}],["daemonbuilder",{"2":{"47":1}}],["danger",{"2":{"213":1,"285":1,"306":1}}],["daheight=1",{"2":{"352":1}}],["daheight=30",{"2":{"312":1}}],["daheight",{"2":{"178":1}}],["dablocktime",{"2":{"178":2}}],["dapp",{"2":{"166":1}}],["dappsys",{"2":{"215":1}}],["dapps",{"2":{"14":1,"261":1}}],["darwin",{"2":{"73":1}}],["days",{"2":{"345":1}}],["day",{"2":{"9":1,"16":1,"369":2,"378":1,"383":9,"384":15,"388":1,"389":1}}],["da",{"0":{"62":1,"90":1,"132":1,"219":1,"225":1,"228":1,"232":1,"235":1,"237":1,"238":1,"241":1,"242":1,"243":1,"244":1,"271":1,"302":1},"1":{"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"236":1,"237":1,"238":1,"239":1,"240":1,"242":1,"243":1,"244":1},"2":{"7":1,"8":2,"10":2,"16":4,"26":1,"55":2,"59":1,"60":1,"62":4,"63":5,"85":1,"88":1,"90":1,"91":1,"106":1,"107":3,"108":5,"129":1,"132":3,"133":1,"135":2,"138":1,"153":2,"157":1,"163":1,"170":1,"174":4,"175":3,"178":1,"179":1,"180":1,"188":2,"194":4,"196":1,"213":4,"220":4,"225":8,"226":5,"229":2,"232":16,"233":4,"234":1,"236":1,"237":3,"238":3,"239":5,"240":1,"241":5,"242":6,"243":6,"244":5,"245":1,"250":3,"252":8,"254":6,"256":1,"258":1,"265":1,"271":2,"278":1,"279":1,"281":14,"289":1,"299":1,"302":1,"305":1,"312":2,"320":7,"321":3,"324":1,"326":15,"336":3,"338":12,"339":6,"340":6,"348":1,"349":5,"350":8,"351":4,"352":4,"353":5,"362":1,"366":1,"387":1,"388":1,"390":1}}],["doing",{"2":{"383":1,"384":2}}],["do",{"2":{"49":1,"50":1,"126":1,"133":1,"208":1,"216":1,"218":1,"254":1,"285":1,"327":1,"340":1}}],["dotenv",{"2":{"47":2}}],["door",{"2":{"12":1}}],["done",{"2":{"47":1,"116":1,"208":1,"227":1,"234":1,"254":1,"296":1,"304":1,"317":1,"340":1}}],["don",{"2":{"8":1,"28":1,"107":1,"173":1,"183":1,"197":1,"301":1,"327":1}}],["doesn",{"2":{"151":1}}],["does",{"2":{"8":1,"159":1,"167":1,"225":1,"232":1,"243":1,"320":1,"332":2,"388":1}}],["downloaded",{"2":{"281":2}}],["downloads",{"2":{"122":1}}],["downloading",{"2":{"70":1,"202":1}}],["download",{"2":{"67":2,"130":1,"133":2,"157":1,"194":1,"251":1,"258":1,"283":1}}],["down",{"2":{"7":1,"19":1,"162":1,"254":1,"264":1,"340":1}}],["dockerfile",{"0":{"251":1,"337":1},"2":{"250":2,"251":4,"337":3}}],["dockerfiles",{"2":{"250":1}}],["docker",{"0":{"246":1,"249":1,"252":1,"258":1,"270":1,"301":1},"1":{"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1},"2":{"66":1,"245":1,"246":2,"249":1,"250":1,"251":2,"252":5,"253":1,"254":7,"255":2,"258":3,"259":1,"260":2,"270":2,"281":2,"283":1,"284":2,"285":1,"301":4,"307":1,"321":2,"326":2,"327":2,"337":3,"338":1,"340":8,"341":1}}],["docs",{"2":{"1":1,"100":1,"168":1,"220":1,"368":1,"371":1,"373":1,"376":1,"377":1,"378":1,"382":1}}],["documentation",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1},"2":{"0":1,"1":1,"3":1,"4":1,"41":1,"45":1,"46":1,"52":1,"152":1,"160":1,"169":2,"278":1,"373":1}}],["did",{"2":{"243":1,"365":1,"384":1,"388":4}}],["didn",{"2":{"109":1,"388":1}}],["divided",{"2":{"115":1}}],["dive",{"2":{"91":1,"261":1}}],["disk",{"2":{"301":1}}],["distinct",{"2":{"261":1}}],["disable",{"2":{"213":1}}],["disabled",{"2":{"93":1}}],["disputes",{"2":{"161":1}}],["displayed",{"2":{"330":1}}],["display",{"2":{"131":1,"259":1,"296":1,"317":1,"343":1,"388":1}}],["discover",{"2":{"345":1}}],["discovery",{"2":{"181":1}}],["discard",{"2":{"103":1,"104":1}}],["disclaimer",{"2":{"64":1,"101":1,"220":1,"245":1,"332":1}}],["discrepancies",{"2":{"4":1}}],["dir",{"2":{"30":1,"45":1,"57":3,"124":4,"134":1}}],["directories",{"2":{"104":2,"373":1}}],["directory",{"0":{"3":1,"373":1},"2":{"21":1,"28":2,"30":3,"39":1,"44":1,"45":1,"60":2,"67":1,"74":2,"81":1,"103":5,"104":3,"124":2,"125":1,"126":1,"133":1,"134":1,"136":2,"145":2,"147":1,"148":2,"149":1,"208":1,"214":2,"215":1,"223":1,"224":1,"251":6,"252":1,"283":1,"284":1,"296":1,"317":1,"322":1,"326":1,"337":1,"339":1,"372":2,"373":4,"387":2,"388":1}}],["direct",{"2":{"74":2,"136":2,"142":1,"174":1,"181":1}}],["directly",{"2":{"7":1,"8":1,"14":1,"52":1,"72":1,"157":1,"242":1}}],["difference",{"2":{"229":1,"230":1}}],["differently",{"2":{"377":1}}],["different",{"2":{"10":1,"18":2,"59":1,"60":1,"72":1,"78":1,"149":1,"153":1,"158":1,"185":1,"199":1,"200":1,"244":1,"277":1,"297":1,"318":1,"363":1,"366":1}}],["diff",{"2":{"48":1}}],["difficult",{"2":{"8":1}}],["diagrams",{"2":{"3":1}}],["debian",{"2":{"251":1,"281":1,"326":1,"340":1}}],["debug",{"2":{"9":1,"74":2,"136":2,"172":1}}],["deloyment",{"2":{"216":1}}],["delegating",{"2":{"377":1}}],["delegate",{"2":{"10":2}}],["delete",{"2":{"103":1,"104":2}}],["deleting",{"2":{"30":1,"101":1}}],["dedicated",{"2":{"157":1,"181":1}}],["deep",{"2":{"140":1}}],["deeper",{"2":{"91":1,"129":1,"262":1}}],["deterministic",{"2":{"364":1}}],["determine",{"2":{"225":1,"232":1}}],["detect",{"2":{"188":1}}],["detected",{"2":{"120":1}}],["detail",{"2":{"91":1}}],["details",{"0":{"196":1},"1":{"197":1},"2":{"3":1,"16":1,"18":1,"49":1,"100":1,"226":1,"289":1}}],["detailed",{"2":{"2":1,"188":1,"278":1}}],["desc",{"2":{"289":2}}],["describing",{"2":{"373":1}}],["described",{"2":{"285":1,"366":1}}],["description",{"2":{"95":1,"96":1,"97":1,"98":1,"99":1,"144":1,"338":1,"353":1}}],["desktop",{"2":{"249":1}}],["desired",{"2":{"222":1}}],["designs",{"2":{"378":1}}],["design",{"0":{"369":1},"2":{"144":1,"174":1,"188":2,"200":1,"367":1,"369":2,"378":1}}],["designed",{"2":{"91":1,"132":1,"306":1,"372":2}}],["designate",{"2":{"10":1}}],["denom",{"2":{"78":5,"79":3,"135":1,"136":2,"288":2,"327":1,"328":2}}],["de5f15d2ceb85278fa916185a01fba5da604563462893288ec7a8745fb597b96",{"2":{"76":1}}],["decrementcounter",{"2":{"215":2}}],["decreasing",{"2":{"63":1}}],["decision",{"2":{"188":1}}],["decide",{"2":{"181":1,"194":1}}],["decoded",{"2":{"150":1}}],["decentralized",{"2":{"140":1,"155":1,"156":1,"185":2,"194":1}}],["decentralization",{"2":{"54":1}}],["def",{"2":{"338":1}}],["defer",{"2":{"185":1}}],["defaults",{"2":{"63":1}}],["default",{"2":{"47":1,"63":1,"74":2,"75":2,"93":3,"113":1,"135":1,"177":1,"187":1,"196":1,"225":1,"232":3,"320":1,"322":1,"326":1,"350":5,"353":1,"373":1}}],["definition",{"2":{"101":1,"373":1}}],["definitions",{"2":{"46":1}}],["defining",{"2":{"50":1}}],["defined",{"2":{"49":2,"107":1,"364":1,"376":1,"377":1,"382":1,"385":1}}],["defines",{"2":{"16":2,"107":1,"242":2,"364":1,"378":1}}],["define",{"2":{"7":2,"8":1,"45":1,"242":1,"243":1,"252":3,"338":4,"365":1}}],["derived",{"2":{"292":1}}],["derive",{"2":{"46":4,"49":1}}],["dep",{"2":{"377":1}}],["depends",{"2":{"252":1}}],["dependency",{"0":{"202":1,"280":1},"1":{"203":1,"204":1,"205":1},"2":{"173":2,"377":2}}],["dependencies",{"0":{"49":1,"130":1,"248":1,"325":1,"334":1},"1":{"249":1,"335":1},"2":{"42":1,"44":1,"47":2,"202":1,"251":2,"376":1}}],["depth",{"2":{"41":1,"136":1,"144":1,"350":1}}],["deployed",{"2":{"146":1,"147":1,"157":1,"195":1,"217":1,"218":2,"245":1,"287":2,"298":1}}],["deployment",{"0":{"163":1,"216":1,"275":1,"282":1,"285":1,"303":1},"1":{"164":1,"165":1,"166":1,"167":1,"283":1,"284":1,"285":1},"2":{"41":1,"149":2,"157":1,"245":1,"281":1,"285":1,"294":2,"315":2}}],["deploy",{"0":{"147":1,"148":1,"149":1,"294":1,"302":1,"315":1},"1":{"149":1},"2":{"7":1,"18":1,"91":1,"140":2,"148":1,"149":1,"153":1,"157":2,"175":1,"185":1,"199":1,"200":1,"213":1,"216":1,"217":1,"218":1,"245":3,"246":1,"273":1,"275":1,"285":3,"286":1,"290":1,"294":2,"302":1,"303":1,"306":1,"313":2,"315":2,"332":1}}],["deploying",{"0":{"144":1,"217":1,"218":1,"245":1},"1":{"145":1,"146":1,"147":1},"2":{"7":2,"10":1,"18":1,"153":2,"155":1,"156":3,"157":2,"160":1,"161":1,"216":1,"218":1,"220":1,"229":1,"245":2,"261":1,"284":1}}],["demonstrated",{"2":{"331":1}}],["demonstrates",{"2":{"129":1,"276":1}}],["demo",{"0":{"17":1},"2":{"13":1,"17":1}}],["demand",{"2":{"10":1}}],["degree",{"2":{"8":1}}],["devices",{"2":{"184":1}}],["devnetmocha",{"2":{"232":1}}],["devnet",{"0":{"308":1},"2":{"67":2,"140":1,"163":1,"230":1,"302":1,"303":1,"304":1,"306":1,"308":2,"319":1,"321":1}}],["developing",{"2":{"91":1,"92":1,"167":1}}],["development",{"0":{"40":1,"214":1},"1":{"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1},"2":{"8":1,"42":1,"101":1,"129":1,"143":1,"184":1,"214":1,"221":1,"225":1,"240":1,"243":1,"258":2,"259":1,"260":2,"261":1,"324":1,"365":1,"369":1,"372":1,"373":1}}],["developers",{"2":{"7":2,"8":3,"9":3,"10":1,"12":1,"15":1,"16":1,"114":1,"153":2,"156":3,"157":3,"159":2,"160":2,"161":1,"168":1,"169":1,"200":2,"256":1,"267":1,"368":1}}],["developer",{"2":{"7":1,"9":1,"155":1,"245":1,"251":1,"337":1}}],["dev",{"2":{"1":1,"47":1,"67":1,"70":1,"122":1,"130":1,"131":1,"132":1,"133":1,"196":6,"202":1,"237":1,"251":2,"271":1,"296":1,"317":1,"343":1,"358":2,"368":1}}],["b�",{"2":{"312":1}}],["b",{"2":{"272":1,"300":1,"388":5}}],["b917289ec7566b57b2d0ec759f2e703dbd652f9044362e78c05c4f6df8fd7ac7",{"2":{"76":1}}],["black",{"2":{"263":1}}],["blank",{"2":{"76":1}}],["blob",{"2":{"63":2,"242":3,"274":4,"353":2}}],["blobs=0",{"2":{"274":1}}],["blobs",{"2":{"14":1,"106":1,"242":2}}],["block=true",{"2":{"274":2}}],["blockinch",{"2":{"178":1}}],["blockmanager",{"2":{"178":3}}],["blocktime",{"2":{"178":1}}],["blocknumber",{"2":{"150":1}}],["blockhash",{"2":{"150":1}}],["blockhash=7897885b959f52bf0d772e35f8da638cf8bbc361c819c3fd3e61dcef5034d1cc",{"2":{"60":1}}],["blockheight=5532",{"2":{"60":1}}],["blockretriever",{"2":{"16":1,"174":1}}],["blocks=100",{"2":{"90":1}}],["blockspace",{"2":{"12":1,"14":1}}],["blocks",{"0":{"90":1,"208":1},"1":{"209":1,"210":1,"211":1,"212":1},"2":{"10":1,"16":2,"19":1,"55":1,"60":1,"89":2,"90":3,"91":1,"107":2,"117":1,"157":3,"170":3,"174":1,"179":2,"181":1,"183":2,"185":1,"188":3,"208":2,"222":1,"226":1,"229":1,"230":1,"233":1,"274":1,"352":1,"353":2,"363":1}}],["blocksdk",{"2":{"7":1,"9":1}}],["block",{"0":{"19":1,"62":1,"178":1,"193":1,"209":1,"210":1,"211":1},"2":{"9":2,"10":1,"14":1,"19":7,"60":1,"62":4,"74":2,"87":1,"89":4,"91":2,"96":4,"99":1,"103":1,"104":1,"106":11,"107":1,"108":1,"135":6,"136":2,"149":1,"150":1,"174":2,"178":10,"179":3,"180":3,"184":1,"185":1,"188":3,"194":7,"196":10,"208":4,"209":1,"210":3,"211":2,"222":2,"225":9,"226":1,"232":6,"233":2,"258":5,"274":19,"281":9,"294":1,"312":10,"315":1,"321":5,"326":6,"340":15,"344":3,"353":2,"363":1,"388":7}}],["blockchain",{"0":{"85":1},"1":{"86":1},"2":{"8":3,"9":1,"10":1,"14":1,"18":1,"20":1,"22":1,"25":1,"54":2,"64":1,"72":1,"81":3,"82":1,"83":1,"85":2,"86":1,"88":1,"129":2,"133":1,"152":1,"153":1,"155":2,"156":1,"157":1,"168":1,"172":1,"179":2,"199":1,"241":1,"256":2,"324":2,"329":1,"345":1,"372":5,"373":4,"376":1,"382":1,"385":1}}],["blockchains",{"2":{"7":2,"9":1,"72":6,"168":1,"371":1,"372":1}}],["blog",{"0":{"5":1},"1":{"6":1},"2":{"3":3,"5":1,"151":1,"153":1,"199":1}}],["bit",{"2":{"281":2,"326":2,"340":2,"383":1,"384":1}}],["bitcoin",{"0":{"12":1,"14":1,"15":1,"16":1,"17":1,"198":1,"205":1,"206":1},"1":{"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":2,"208":2,"209":2,"210":2,"211":2,"212":2,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1},"2":{"6":1,"7":1,"12":6,"13":4,"14":9,"15":3,"16":7,"17":1,"18":3,"187":1,"199":5,"200":7,"205":3,"208":3,"212":1,"213":3,"214":3}}],["bid",{"2":{"136":2}}],["bin",{"2":{"133":2,"203":3,"208":1,"251":2,"259":1,"260":1,"281":6,"326":6,"338":1,"340":6}}],["binary",{"0":{"69":1},"2":{"30":2,"106":1,"223":1,"224":1,"251":1,"373":1}}],["big",{"2":{"14":1}}],["bog",{"2":{"339":3}}],["body",{"2":{"327":1,"384":2,"385":1,"388":1}}],["bodies",{"2":{"178":1}}],["bool",{"2":{"383":1}}],["boogas",{"2":{"295":1,"316":1}}],["booga",{"0":{"294":1,"315":1},"2":{"295":2,"297":2,"313":1,"314":1,"316":2,"318":2}}],["bookworm",{"2":{"251":1}}],["bootstrapping",{"2":{"8":1}}],["bootstrap",{"2":{"7":1,"12":1,"156":1,"157":1,"181":2}}],["bonus",{"2":{"173":1}}],["bot",{"2":{"389":1}}],["bottom",{"2":{"146":1}}],["both",{"2":{"10":1,"19":1,"120":1}}],["bob",{"2":{"104":1,"274":2,"327":1,"387":2,"388":5}}],["box",{"2":{"45":2}}],["bar",{"2":{"168":1}}],["barrier",{"2":{"156":1}}],["back",{"0":{"79":1},"2":{"113":1,"287":1}}],["backend",{"0":{"33":1},"2":{"33":2,"34":1,"35":1,"74":2,"78":1,"109":1,"120":1,"136":5,"137":2,"218":1,"285":1,"288":1,"289":1,"327":2,"388":5}}],["bankkeeper",{"2":{"383":1,"384":1,"385":2}}],["bank",{"2":{"78":1,"79":2,"120":1,"136":2,"137":1,"289":2,"327":2,"328":2,"377":5,"385":1}}],["balances",{"0":{"328":1},"2":{"78":2,"79":5,"136":2,"289":3,"328":3,"377":1}}],["balance",{"2":{"78":1,"79":1,"107":1,"136":4,"275":3,"328":2}}],["batched",{"2":{"366":1}}],["batches",{"2":{"222":1,"226":1,"230":1,"233":1,"348":1,"350":1,"352":1}}],["batchhash",{"2":{"364":1}}],["batch",{"2":{"74":2,"136":2,"350":2,"364":3}}],["battle",{"2":{"9":1}}],["basename",{"2":{"284":1}}],["baseaccount",{"2":{"196":1}}],["base",{"2":{"49":2,"50":3,"251":1,"388":1}}],["based",{"0":{"347":1},"2":{"10":1,"20":1,"54":1,"181":1,"267":1,"366":1}}],["basics",{"2":{"121":1}}],["basic",{"2":{"39":1,"215":2,"261":1,"263":1,"265":1,"276":1,"344":1,"388":1}}],["bash7",{"2":{"312":1}}],["bash24",{"2":{"302":1}}],["bash2024",{"2":{"76":1}}],["bashmake",{"2":{"301":1,"302":1,"303":1,"304":1}}],["bashname",{"2":{"289":1}}],["bashwordle=$",{"2":{"340":1}}],["bashwasmd",{"2":{"287":1,"289":1}}],["bashwget",{"2":{"67":1,"70":1}}],["bashtx",{"2":{"285":1,"388":1}}],["bashtree",{"2":{"103":1,"104":1}}],["bashkurtosis",{"2":{"280":1,"281":1,"325":1,"326":1,"335":1,"338":1,"339":1,"340":1}}],["bashkeyname",{"2":{"71":2}}],["bashopenssl",{"2":{"232":1,"320":1}}],["bashosmosisd",{"2":{"78":1,"79":1}}],["bashosmo",{"2":{"78":1}}],["bashda",{"2":{"225":1,"232":3}}],["bashdocker",{"2":{"67":1,"249":2,"251":2,"253":1,"254":2,"258":2,"259":1,"260":2,"264":1,"281":2,"283":3,"285":2,"308":1,"320":1,"326":2,"327":1,"337":2,"340":3}}],["bashhttp",{"2":{"222":1}}],["bashaddress",{"2":{"313":1}}],["bashauth",{"2":{"232":3,"327":1,"388":1}}],["bashavail",{"2":{"222":1}}],["bashanvil",{"2":{"217":1}}],["bashaccount",{"2":{"136":1,"137":1}}],["bashforge",{"2":{"214":1,"215":1,"217":1,"218":1,"294":1,"315":1}}],["bashfoundryup",{"2":{"204":1}}],["bashfound",{"2":{"124":1}}],["basherror",{"2":{"289":1}}],["bashexit",{"2":{"254":1,"340":1}}],["bashexport",{"2":{"58":1,"147":1,"149":2,"208":1,"209":1,"210":1,"213":1,"217":3,"218":1,"294":2,"297":1,"315":2,"318":1,"327":1}}],["bashethermintd",{"2":{"213":1}}],["bash1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5",{"2":{"210":1}}],["bash12",{"2":{"135":1}}],["bashbrew",{"2":{"301":1}}],["bashbitcoin",{"2":{"205":1,"206":1,"207":1,"209":1,"210":1,"211":2}}],["bashbalances",{"2":{"78":1,"328":2}}],["bashbash",{"2":{"67":1,"70":1,"208":1,"213":1}}],["bashsource",{"2":{"204":1}}],["bashsudo",{"2":{"202":2,"205":1,"284":1}}],["bashver=",{"2":{"203":1}}],["bashversion",{"2":{"73":1}}],["bashprivatekey",{"2":{"292":1}}],["bashprivate",{"2":{"218":1,"259":1}}],["bashpython3",{"2":{"147":1}}],["bashpip",{"2":{"143":1}}],["bashgm=$",{"2":{"326":1}}],["bashgmd",{"2":{"78":1,"79":2,"120":1}}],["bashgo",{"2":{"301":1}}],["bashgas",{"2":{"289":1}}],["bashgit",{"2":{"136":1,"213":1,"257":1,"300":1}}],["bash4980",{"2":{"209":1}}],["bash4",{"2":{"108":1}}],["bash$home",{"2":{"104":1}}],["bashregister=",{"2":{"289":1}}],["bashrepository",{"2":{"251":1,"337":1}}],["bashrc",{"2":{"203":3,"204":1}}],["bashrm",{"2":{"103":1,"212":1,"223":1}}],["bashrly",{"2":{"73":1,"74":1,"75":1,"76":3,"77":1,"136":7}}],["bashrollkit",{"2":{"24":1,"25":1,"57":1,"59":1,"62":1,"63":2,"86":1,"87":1,"90":1,"104":1,"106":2,"124":1,"131":1,"135":1,"136":2,"233":1,"327":2,"328":2,"343":1,"344":1,"387":2,"388":7}}],["bashcode",{"2":{"287":1,"388":1}}],["bashcontainer",{"2":{"254":1,"281":1,"326":1,"340":1}}],["bashcw=$",{"2":{"281":1}}],["bashcli",{"2":{"280":1,"325":1,"335":1}}],["bashcargo",{"2":{"222":1}}],["bashcast",{"2":{"150":2,"217":2,"218":2,"295":2,"316":2}}],["bashcalldata=$",{"2":{"150":1}}],["bashcd",{"2":{"67":2,"69":1,"73":1,"81":1,"109":1,"134":1,"145":2,"149":3,"224":1,"271":1,"272":1,"273":1,"274":1,"293":1,"294":1,"296":2,"309":1,"311":1,"314":1,"315":1,"317":2,"321":1,"322":1,"373":1}}],["bashcurl",{"2":{"67":1,"81":1,"122":1,"130":1,"131":1,"133":1,"204":1,"237":1,"291":1,"310":1,"343":1,"358":2,"368":1,"371":1}}],["bashcp",{"2":{"57":1}}],["bashinitializing",{"2":{"387":1}}],["bashinit=",{"2":{"288":1}}],["bashinfo",{"2":{"281":1,"326":1,"339":1}}],["bashinterface",{"2":{"50":1}}],["bashi",{"2":{"106":2,"344":1}}],["bashibc",{"2":{"79":1}}],["bashignite",{"2":{"21":1,"22":1,"23":1,"81":1,"82":1,"83":1,"84":1,"85":1,"371":1,"372":1,"375":2,"377":1,"379":2,"381":2,"387":1}}],["bash",{"2":{"19":4,"57":1,"62":1,"67":1,"81":1,"89":3,"90":1,"126":1,"130":1,"132":2,"203":3,"204":1,"208":1,"215":1,"224":1,"225":1,"226":1,"232":2,"237":1,"245":1,"251":1,"258":1,"259":2,"260":1,"274":1,"275":1,"281":1,"289":2,"291":1,"310":1,"321":1,"326":1,"327":2,"340":1,"358":2,"371":1}}],["bashyarn",{"2":{"1":1}}],["berachain",{"2":{"306":1,"309":1}}],["beacond",{"2":{"274":1}}],["beacon",{"2":{"272":2,"273":1,"274":7,"275":1}}],["beaconkit",{"0":{"266":1,"272":1,"274":1},"1":{"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1},"2":{"267":2,"272":1,"273":1,"275":1,"276":2,"278":2}}],["begin",{"2":{"268":1,"312":1}}],["beginner",{"0":{"164":1}}],["being",{"2":{"209":1,"242":1,"243":1,"253":1,"365":1,"388":1}}],["benefits",{"2":{"245":1}}],["benefit",{"2":{"157":1}}],["below",{"2":{"17":1,"27":1,"43":1,"44":2,"46":1,"141":1,"209":1,"260":1,"285":1,"289":2,"320":1,"364":1}}],["behavior",{"2":{"16":1,"144":1}}],["because",{"2":{"107":1,"136":1,"143":2,"181":1,"243":1,"284":1,"332":1,"365":1,"372":1,"388":2}}],["became",{"2":{"14":1}}],["become",{"2":{"14":2}}],["becoming",{"2":{"8":1}}],["beta",{"2":{"229":1,"230":2,"232":1,"233":1,"319":1}}],["better",{"2":{"14":1,"244":1,"245":1,"285":1}}],["between",{"2":{"8":1,"10":3,"64":1,"70":1,"72":3,"76":1,"77":1,"161":1,"174":1,"181":1,"188":2,"252":1,"364":1,"377":1}}],["best",{"0":{"9":1}}],["been",{"2":{"8":1,"63":1,"78":1,"79":1,"194":1,"217":1,"218":1,"251":1,"289":1,"306":1,"383":1,"384":1,"388":2}}],["be",{"0":{"11":1},"2":{"7":1,"9":2,"10":1,"16":2,"18":1,"19":1,"41":1,"43":1,"45":1,"46":1,"59":1,"62":1,"63":4,"76":1,"78":1,"82":1,"93":3,"98":1,"103":1,"104":1,"118":1,"135":2,"136":1,"141":1,"142":1,"144":1,"149":1,"150":1,"151":1,"153":2,"156":4,"158":1,"160":1,"162":1,"169":1,"170":1,"172":1,"173":1,"174":2,"175":1,"177":1,"180":2,"184":1,"188":1,"194":3,"196":2,"210":1,"211":1,"214":1,"225":2,"232":2,"241":1,"245":1,"261":1,"279":1,"284":1,"292":1,"296":1,"301":1,"303":1,"306":1,"317":1,"319":3,"320":1,"327":1,"330":1,"349":1,"353":1,"366":1,"369":2,"372":1,"377":1,"380":2,"383":3,"384":3,"385":2,"389":1}}],["before",{"2":{"2":1,"41":1,"55":1,"67":1,"85":1,"89":1,"111":1,"133":1,"194":1,"220":1,"221":1,"229":1,"230":1,"236":1,"245":1,"252":1,"258":1,"268":1,"296":1,"301":1,"307":1,"308":1,"317":1,"319":1,"321":1,"327":1,"349":2,"350":1,"357":1,"369":1,"374":1,"388":2}}],["business",{"2":{"156":1}}],["buffer",{"2":{"89":1,"373":1}}],["budget",{"2":{"12":1,"47":1}}],["button",{"2":{"118":1,"330":1}}],["but",{"2":{"10":1,"12":1,"70":1,"140":1,"143":1,"156":1,"173":1,"181":1,"189":1,"218":1,"368":1,"369":1,"371":1,"372":1,"373":1}}],["bugs",{"2":{"7":1,"8":1,"92":1,"167":1}}],["builder=false",{"2":{"274":1}}],["builder",{"2":{"274":5}}],["builds",{"2":{"132":1,"271":1,"274":1}}],["build",{"0":{"9":1,"84":1,"161":1,"261":1,"263":1,"274":1,"301":1},"1":{"262":1,"263":1},"2":{"3":1,"7":1,"18":2,"47":1,"84":2,"102":1,"104":1,"129":1,"133":1,"140":1,"143":1,"156":1,"160":1,"167":1,"200":2,"202":1,"203":1,"227":1,"234":1,"236":1,"237":1,"243":1,"247":1,"251":8,"256":1,"263":1,"274":1,"279":1,"298":1,"301":5,"324":1,"333":1,"337":3,"345":1,"349":1,"350":2,"351":2,"357":1,"358":1,"365":1,"367":1,"368":1,"372":3,"377":1,"387":1}}],["building",{"0":{"1":1,"133":1,"163":1,"224":1,"266":1,"387":1},"1":{"164":1,"165":1,"166":1,"167":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1},"2":{"7":1,"8":1,"11":1,"89":2,"129":2,"162":1,"163":1,"236":1,"241":1,"245":1,"261":1,"267":3,"324":2,"349":1,"357":1,"367":1,"371":1,"374":1}}],["built",{"2":{"1":1,"16":1,"28":1,"138":1,"144":2,"147":1,"157":1,"160":1,"227":1,"234":1,"243":1,"251":1,"252":1,"263":1,"274":1,"279":1,"283":1,"337":1,"338":1,"365":1,"366":1,"390":1}}],["briefly",{"2":{"158":1}}],["bring",{"2":{"157":1,"159":1}}],["bridge",{"2":{"8":1}}],["bridging",{"2":{"8":1}}],["brew",{"2":{"133":1}}],["breaking",{"2":{"101":1}}],["break",{"0":{"11":1}}],["broken",{"2":{"220":1}}],["broadcasting",{"2":{"179":1,"327":1,"388":1}}],["broadcast",{"2":{"74":2,"136":2,"149":2,"217":1,"218":1,"294":2,"315":2}}],["broccoli",{"2":{"47":1}}],["browser",{"2":{"197":1,"329":1,"330":1}}],["browse",{"2":{"41":1}}],["brought",{"2":{"7":1}}],["branches",{"2":{"9":1,"173":1}}],["branch",{"2":{"2":3,"136":1,"272":1,"300":1,"309":1,"314":1,"321":1,"350":1}}],["byte",{"2":{"383":2,"384":3}}],["bytecode",{"2":{"284":1}}],["bytes",{"2":{"96":1,"97":4,"98":10,"232":2}}],["by",{"2":{"3":1,"7":5,"8":1,"9":1,"12":1,"14":3,"16":1,"18":1,"20":1,"24":1,"26":1,"28":1,"30":1,"39":1,"46":1,"47":1,"50":1,"60":1,"63":4,"70":1,"76":1,"83":1,"86":1,"88":1,"93":3,"94":1,"98":1,"99":1,"101":1,"107":1,"110":1,"127":1,"131":1,"133":1,"140":1,"144":1,"146":1,"147":1,"152":2,"153":1,"157":5,"175":1,"177":3,"178":1,"184":1,"185":1,"187":1,"188":2,"189":1,"195":1,"199":1,"205":1,"208":1,"217":1,"218":1,"222":1,"224":1,"225":1,"226":1,"232":2,"233":1,"240":1,"247":1,"249":1,"251":2,"253":1,"254":4,"257":1,"259":1,"260":2,"261":2,"267":1,"279":2,"280":1,"281":2,"287":2,"288":1,"289":2,"306":1,"319":2,"320":1,"325":1,"326":2,"327":1,"333":1,"335":1,"337":2,"339":1,"340":5,"342":1,"343":1,"348":2,"350":1,"353":1,"354":1,"361":1,"366":1,"368":1,"372":1,"373":1,"375":1,"376":1,"380":1,"384":1,"387":1,"388":1,"389":1}}],["cbf66a881cb2",{"2":{"340":1}}],["cb1fa1d3309513fc6c8599606defe75164f4cae2abd101d78133b287862a5aca",{"2":{"76":1}}],["c5363b77b543",{"2":{"326":1}}],["c147257485b72e7ffa5fdb943c94ce951a37817554339586ffd645ad2aa397c3",{"2":{"289":1}}],["c71b0308616d",{"2":{"281":1}}],["c71b0308616d40ad919ad24c3d14f35b",{"2":{"281":3}}],["ctx",{"2":{"242":2,"383":4,"384":6,"385":2}}],["ctrl+c",{"2":{"208":1}}],["csrjjpfudtnftzgho69v0d",{"2":{"232":1}}],["cpu",{"2":{"201":1}}],["cp",{"2":{"149":2,"283":1,"285":1,"296":1,"317":1}}],["circom",{"2":{"145":1,"149":1,"150":1}}],["circuit",{"0":{"144":1,"147":1},"1":{"145":1,"146":1,"147":1},"2":{"140":3,"144":2,"145":6,"146":6,"147":6,"149":1,"150":2,"151":1}}],["c3e53d20bc7a4cc993b17c7971f8ecd06a433c10b6a96f4c4c3714f0624c56da",{"2":{"135":1,"136":1,"137":1}}],["cmd=",{"2":{"338":1}}],["cmd",{"2":{"124":3,"134":1,"251":2,"338":2,"373":1}}],["c",{"2":{"110":1,"113":1,"203":1,"281":5,"326":5,"338":1,"340":5}}],["c053d637cca2a2ba030e2c5ee1b28a16f71ccb0e45e8be52766dc1b241b77878",{"2":{"78":1}}],["cd",{"2":{"69":1,"73":1,"109":1,"132":1,"136":1,"203":1,"213":1,"214":1,"257":1,"272":1,"293":1,"300":1,"309":1,"314":1,"350":1}}],["cutting",{"2":{"157":1,"220":1}}],["cumulativegasused",{"2":{"150":1}}],["curl",{"2":{"132":1,"179":1,"202":1,"225":1,"251":2,"271":1,"321":1}}],["currentcount",{"2":{"384":2}}],["currenttimeguesserhashstring",{"2":{"384":4}}],["currenttimeguesserhash",{"2":{"384":2}}],["currenttimeguesserbytes",{"2":{"384":2}}],["currenttimehashstring",{"2":{"383":3,"384":2}}],["currenttimehash",{"2":{"383":2,"384":2}}],["currenttimebytes",{"2":{"383":2,"384":2}}],["currenttime",{"2":{"383":2,"384":3}}],["currently",{"2":{"162":2,"167":2,"177":1,"179":1,"184":1,"189":1,"213":1,"220":1,"332":2,"366":1,"383":1,"388":1}}],["current",{"2":{"46":2,"104":2,"124":1,"188":2,"209":1,"251":1,"306":1,"369":1,"383":4,"384":7,"388":1,"389":1}}],["customization",{"2":{"256":2}}],["customizability",{"0":{"155":1},"2":{"157":1}}],["customizable",{"2":{"152":1,"157":1,"267":1}}],["customizing",{"2":{"241":1,"373":1}}],["customize",{"2":{"10":1,"18":2,"24":1,"119":1,"157":1,"168":1,"199":1,"200":2,"277":1}}],["custom",{"2":{"9":1,"15":1,"17":1,"46":1,"70":1,"89":2,"118":1,"147":1,"159":1,"199":1,"256":1,"277":1,"373":1}}],["cfg",{"2":{"45":2}}],["cwinfer2ikqgxgo0da9j7ubq+e1ljwztmdjwdt",{"2":{"327":1}}],["cw1",{"2":{"50":2}}],["cw20",{"2":{"49":3,"50":6}}],["cwenv>",{"2":{"45":1}}],["cw",{"0":{"40":1,"44":1},"1":{"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1},"2":{"41":6,"42":2,"43":1,"44":4,"45":2,"46":7,"47":1,"48":2,"49":1,"50":2,"52":2,"283":3,"284":1,"285":4,"286":1}}],["certain",{"2":{"369":1}}],["certificates",{"2":{"251":1}}],["ce2291909a3d",{"2":{"340":1}}],["cee974a1c2b141478c9eb2a9b1e4f87f",{"2":{"281":2}}],["cease",{"2":{"264":1}}],["censorship",{"2":{"185":1,"348":1,"363":1}}],["centralizedsequencerlatesttag",{"2":{"350":1}}],["centralized",{"0":{"100":1,"348":1,"350":1,"351":1},"1":{"349":1,"350":1,"351":1,"352":1,"353":1,"354":1},"2":{"37":1,"91":1,"100":2,"162":1,"185":1,"339":2,"348":2,"349":4,"350":4,"351":3,"352":1,"353":1,"354":1,"359":1,"366":5}}],["celenium",{"2":{"196":1,"233":1,"322":1}}],["celestianodemainnettag",{"2":{"230":1}}],["celestianodemainnetrollkittag",{"2":{"230":1}}],["celestianodemochatag",{"2":{"230":1}}],["celestianodemocharollkittag",{"2":{"230":1}}],["celestianodearabicatag",{"2":{"230":1}}],["celestianodearabicarollkittag",{"2":{"230":1}}],["celestiaorg",{"2":{"213":1}}],["celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu",{"2":{"136":2}}],["celestia",{"0":{"136":1,"175":1,"228":1,"230":1,"233":1,"308":1,"319":1},"1":{"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"320":1,"321":1,"322":1},"2":{"15":1,"67":2,"107":4,"109":2,"135":2,"136":4,"140":2,"151":1,"153":2,"157":1,"163":2,"166":1,"167":1,"170":1,"175":5,"229":2,"230":5,"232":6,"233":2,"234":1,"242":1,"244":1,"306":2,"308":2,"319":2,"320":10,"321":2,"322":1,"348":1,"366":1,"390":1}}],["cel",{"2":{"109":1}}],["cast",{"2":{"217":2,"218":2,"297":1,"318":1}}],["cases",{"2":{"63":1,"157":1,"194":1,"263":1,"325":1}}],["case",{"2":{"15":1,"106":1,"107":1,"113":1,"157":1,"170":1,"194":2,"212":1,"287":1,"377":1}}],["capabilities",{"2":{"169":1,"179":1,"256":1,"262":1,"265":1,"305":1,"348":1,"377":1}}],["capital",{"2":{"156":1}}],["calculate",{"2":{"135":1}}],["calling",{"2":{"274":2}}],["calldata=true",{"2":{"146":1}}],["calldata",{"2":{"146":15,"147":3,"150":3}}],["calls",{"2":{"46":1}}],["call",{"2":{"16":1,"57":1,"150":2,"163":1,"217":2,"218":2,"295":1,"316":1}}],["called",{"2":{"16":1,"251":1,"252":1,"284":1,"337":1,"372":1,"381":1,"382":1}}],["cached",{"2":{"326":2,"339":2}}],["cache",{"2":{"74":1,"136":1,"251":1,"284":2}}],["cat",{"2":{"150":1}}],["catalog",{"2":{"47":1}}],["catch",{"2":{"41":1}}],["cargo",{"0":{"44":1},"2":{"42":1,"44":1,"50":4,"284":1}}],["canary",{"2":{"196":1}}],["candidate",{"2":{"76":2}}],["canonical",{"2":{"7":1}}],["can",{"0":{"158":1,"162":1},"1":{"159":1,"160":1,"161":1},"2":{"7":2,"8":1,"9":2,"14":2,"15":1,"16":3,"19":1,"20":1,"22":1,"24":1,"25":1,"28":1,"30":1,"44":1,"45":2,"46":1,"47":2,"48":1,"50":1,"51":1,"52":1,"63":2,"67":2,"70":1,"72":2,"76":1,"77":1,"81":2,"93":3,"104":1,"106":1,"109":1,"110":1,"114":1,"119":2,"120":2,"125":1,"127":1,"133":1,"135":1,"141":1,"145":1,"150":2,"152":1,"153":3,"156":2,"157":4,"160":2,"162":1,"163":1,"169":1,"172":2,"173":1,"174":2,"175":1,"177":1,"184":2,"185":1,"188":4,"194":2,"196":3,"205":1,"212":1,"215":2,"216":1,"217":4,"218":5,"220":1,"221":1,"222":1,"226":1,"230":1,"232":1,"233":1,"241":1,"242":2,"244":1,"245":1,"246":1,"249":2,"250":2,"251":1,"254":7,"259":1,"260":1,"262":1,"263":1,"267":1,"274":2,"275":1,"279":1,"280":2,"281":5,"283":1,"285":2,"286":1,"287":1,"289":1,"296":2,"298":1,"301":1,"303":2,"307":1,"308":1,"313":1,"317":2,"319":3,"320":2,"325":2,"326":6,"327":1,"332":1,"335":2,"336":2,"337":1,"340":8,"345":1,"353":1,"354":1,"361":1,"366":1,"368":1,"369":1,"371":2,"376":1,"378":1,"383":2,"384":3,"388":2,"389":7}}],["chmod",{"2":{"251":1}}],["chid",{"2":{"98":2}}],["checked",{"2":{"384":1}}],["checks",{"2":{"178":1,"194":1,"384":1}}],["checktx",{"2":{"177":1}}],["checking",{"0":{"328":1},"2":{"131":1,"281":1,"326":1,"340":1,"343":1}}],["checkout",{"2":{"69":1,"73":1,"213":1,"272":1,"309":1,"314":1,"321":1}}],["check",{"2":{"26":1,"78":1,"79":1,"150":1,"151":1,"167":1,"187":1,"203":1,"205":1,"209":1,"210":1,"278":1,"279":1,"301":1,"314":1,"319":1,"368":1,"371":1,"383":4,"384":5,"388":1}}],["cheaper",{"2":{"14":1}}],["choosing",{"2":{"19":1,"362":1}}],["choose",{"2":{"10":3,"47":1,"118":1,"162":1,"245":1,"362":1}}],["choice",{"2":{"10":2,"185":3,"241":1,"245":1}}],["characters",{"2":{"232":1,"383":1,"384":3,"388":1}}],["challenge",{"2":{"245":1}}],["challenges",{"2":{"156":1,"157":1}}],["challenging",{"2":{"156":1}}],["changing",{"2":{"108":1,"113":1}}],["changed",{"2":{"19":1,"72":1,"93":1,"296":1,"317":1}}],["change",{"0":{"19":1},"2":{"41":1,"67":1,"70":1,"91":1,"134":1,"173":1,"214":1,"218":1,"296":2,"317":2,"319":1,"321":1,"322":1,"371":1,"382":1}}],["changes",{"2":{"2":4,"101":1,"260":2}}],["channel",{"0":{"76":1},"2":{"76":17,"78":3,"79":1,"135":3,"136":6,"178":2}}],["channels",{"2":{"72":2,"136":1,"178":1}}],["chain=regtest",{"2":{"206":1}}],["chain>",{"2":{"45":1}}],["chainflag=",{"2":{"29":1}}],["chains",{"2":{"8":1,"52":1,"64":1,"70":1,"74":1,"76":1,"136":1,"156":2,"157":1,"163":1}}],["chain",{"0":{"30":1,"31":1,"38":1,"57":1,"62":1,"67":1,"78":1,"79":1,"84":1,"87":1,"101":1,"150":1,"207":1,"223":1,"253":1,"254":1,"339":1,"340":1,"352":1,"359":1,"360":1,"370":1,"372":1,"386":1,"387":1,"388":1},"1":{"102":1,"103":1,"104":1,"371":1,"372":1,"373":1,"387":1,"388":1,"389":1},"2":{"7":3,"10":1,"11":2,"14":1,"18":2,"19":1,"27":2,"28":6,"29":4,"30":3,"31":1,"32":2,"35":1,"38":2,"39":1,"45":1,"47":4,"57":7,"62":1,"67":3,"70":1,"71":2,"74":2,"75":1,"76":20,"78":4,"79":1,"81":1,"84":2,"87":4,"88":1,"89":1,"91":1,"95":1,"96":6,"97":7,"98":1,"99":2,"101":3,"102":1,"103":4,"104":4,"107":1,"108":1,"111":1,"113":2,"120":1,"124":4,"134":1,"136":5,"137":1,"140":1,"147":1,"148":1,"150":1,"153":1,"156":2,"157":1,"160":2,"167":1,"194":3,"196":2,"212":1,"213":3,"218":2,"236":4,"239":1,"241":1,"243":1,"246":1,"247":2,"250":3,"251":7,"252":4,"253":3,"254":7,"255":1,"259":1,"263":2,"267":1,"277":1,"285":1,"288":1,"289":1,"302":4,"311":1,"313":1,"327":1,"332":1,"333":2,"336":5,"337":4,"338":5,"339":2,"340":10,"341":1,"349":4,"351":1,"352":4,"354":2,"357":4,"358":2,"359":1,"360":3,"361":2,"365":1,"368":2,"372":2,"373":1,"377":1,"387":4,"388":5,"389":2,"390":1}}],["crtl+c",{"2":{"254":1}}],["critical",{"2":{"156":1,"241":1,"327":1,"388":1}}],["creator",{"2":{"289":1,"383":2,"384":3,"388":1}}],["creative",{"2":{"232":1,"320":1}}],["creation",{"2":{"45":1,"256":1,"281":1,"326":1,"339":1}}],["creating",{"0":{"45":1,"50":1,"120":1,"376":1},"1":{"377":1},"2":{"42":2,"45":1,"72":1,"106":2,"135":1,"199":1,"222":1,"258":1,"261":1,"274":3,"276":1,"281":3,"312":1,"326":2,"339":1,"340":3,"344":1,"372":3,"378":1,"380":1}}],["createwallet",{"2":{"207":1}}],["creates",{"2":{"30":1,"76":1,"224":1,"379":1}}],["created",{"2":{"28":2,"76":2,"103":1,"104":2,"181":1,"194":1,"214":1,"251":1,"254":1,"281":3,"289":1,"326":3,"337":1,"339":2,"340":1,"380":1,"384":1}}],["create",{"0":{"27":1,"72":1,"75":1,"76":1,"80":1,"207":1},"1":{"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1},"2":{"2":3,"12":1,"24":1,"50":1,"58":1,"64":1,"67":1,"70":1,"76":3,"80":1,"81":1,"91":2,"103":1,"115":1,"118":1,"120":1,"136":3,"140":1,"153":1,"159":1,"160":1,"199":3,"200":1,"207":1,"214":1,"215":1,"251":2,"252":2,"267":1,"337":2,"338":1,"373":1,"379":2,"382":1,"383":2,"384":2,"387":1,"389":2}}],["crates",{"2":{"49":1,"50":1}}],["crater",{"2":{"47":1}}],["crate",{"0":{"50":1},"2":{"41":1,"42":1,"45":6,"46":1,"47":1,"50":2}}],["cross",{"2":{"41":1,"251":1,"285":1,"382":1}}],["crucial",{"2":{"24":1}}],["crypto",{"2":{"7":1,"327":2,"383":1,"384":1}}],["clang",{"2":{"202":1}}],["classes",{"2":{"153":1}}],["clay",{"2":{"71":2,"75":2}}],["clarity",{"2":{"2":1}}],["cleaning",{"0":{"223":1}}],["clean",{"2":{"41":1,"222":1,"304":2,"340":1}}],["clears",{"2":{"264":1}}],["clear",{"2":{"2":1,"14":1,"212":1,"223":1}}],["cloning",{"2":{"257":1}}],["clone",{"0":{"145":1,"257":1,"272":1,"300":1,"309":1},"2":{"1":1,"2":2,"69":1,"73":1,"136":1,"145":2,"213":2,"257":1,"272":2,"293":2,"300":2,"309":2,"314":2,"350":1}}],["cloud",{"2":{"196":2}}],["close",{"2":{"14":1,"79":1}}],["clip",{"2":{"47":1}}],["cli",{"0":{"24":1,"86":1,"121":1,"122":1,"125":1,"131":1,"335":1,"343":1},"1":{"122":1,"123":1,"124":1,"125":1,"126":2,"127":1},"2":{"9":1,"20":1,"24":1,"39":1,"55":1,"67":1,"81":1,"86":2,"88":1,"91":1,"121":2,"122":2,"125":1,"127":1,"172":1,"196":1,"205":1,"207":1,"208":4,"209":1,"210":1,"211":2,"229":1,"231":1,"236":1,"251":2,"254":2,"255":1,"269":1,"286":1,"303":3,"319":2,"327":1,"329":1,"335":1,"340":2,"341":1,"342":1,"344":1,"349":1,"357":1,"367":1,"368":1,"371":3,"372":2,"373":1,"384":1}}],["clients",{"2":{"7":1,"8":1,"64":2,"72":1,"76":1,"136":1,"157":1,"170":1,"185":1,"267":1}}],["client",{"0":{"273":1},"2":{"7":1,"9":1,"16":1,"47":1,"60":1,"76":14,"104":1,"135":5,"136":2,"153":2,"172":1,"173":1,"273":2,"274":2,"275":1,"278":1,"326":5}}],["click",{"2":{"7":1,"118":1,"185":1,"197":1,"330":1}}],["copied",{"2":{"284":1}}],["copy",{"0":{"57":1},"2":{"37":1,"54":1,"57":1,"149":2,"251":11,"283":1}}],["co",{"2":{"256":1,"281":1,"326":1,"340":1}}],["cool",{"0":{"144":1},"1":{"145":1,"146":1,"147":1}}],["cover",{"2":{"129":1,"170":1,"324":1}}],["covers",{"2":{"54":1,"106":1,"107":1,"220":1,"229":1,"236":1,"349":1,"357":1}}],["coins",{"2":{"327":1,"383":1,"384":1,"385":2}}],["coinbase=$",{"2":{"208":1}}],["coin",{"2":{"74":2,"136":2,"377":1}}],["coyote",{"2":{"47":1}}],["collector",{"2":{"93":1,"281":1,"326":1,"340":1}}],["collection",{"2":{"50":1}}],["collecting",{"0":{"36":1}}],["collect",{"2":{"36":2,"170":1,"196":1}}],["corner",{"2":{"118":1}}],["correct",{"2":{"321":1,"369":2,"384":2,"388":1,"389":1}}],["correctly",{"2":{"30":1,"278":2,"369":1,"384":2}}],["correlation",{"2":{"174":1}}],["corresponding",{"2":{"45":1,"78":1,"144":1,"178":1}}],["core",{"2":{"8":1,"16":1,"63":2,"76":8,"199":1,"201":1,"205":3,"206":1,"207":1,"208":4,"209":1,"210":1,"211":2,"242":1,"281":1,"320":1,"326":1,"340":1,"382":2}}],["codebase",{"2":{"367":1,"369":1,"374":1,"389":1}}],["codespace",{"2":{"108":3,"289":1,"388":1}}],["codecs",{"2":{"74":2,"136":2}}],["code",{"0":{"140":1},"2":{"19":2,"30":1,"41":3,"45":1,"48":1,"57":2,"62":2,"76":3,"89":2,"90":2,"107":2,"108":3,"111":1,"137":1,"145":1,"146":7,"147":2,"195":1,"215":2,"216":1,"251":1,"252":1,"261":1,"275":3,"281":1,"284":2,"285":1,"287":4,"289":6,"294":1,"312":3,"315":1,"321":2,"326":2,"327":1,"328":4,"337":1,"338":1,"339":2,"372":1,"376":1,"383":2,"384":2,"385":1,"388":1}}],["counts",{"2":{"384":1}}],["count",{"2":{"41":5,"46":8,"47":5,"215":7,"381":3,"384":12,"388":1}}],["counterscript",{"2":{"216":1,"217":1,"218":1}}],["countertest",{"2":{"215":1}}],["counterparty",{"2":{"76":4}}],["counterquerymsgfns",{"2":{"46":1,"47":1}}],["counterexecutemsgfns",{"2":{"46":1,"47":1}}],["countercontract",{"2":{"45":3,"47":2}}],["counter",{"2":{"41":3,"43":1,"45":2,"46":2,"47":7,"52":1,"97":4,"98":4,"99":1,"214":1,"215":16,"216":4,"217":1,"218":1}}],["council",{"2":{"8":1}}],["could",{"2":{"14":1,"19":1,"124":1,"126":1,"158":1,"160":1,"225":1,"232":2,"320":1}}],["couple",{"2":{"10":1}}],["cost",{"2":{"18":1,"150":1}}],["costs",{"2":{"8":1,"157":1}}],["cosmwasm",{"0":{"195":1,"279":1,"280":1,"282":1,"286":1},"1":{"196":1,"197":1,"280":1,"281":1,"282":1,"283":2,"284":2,"285":2,"286":1,"287":2,"288":2,"289":2},"2":{"9":1,"17":1,"41":1,"45":1,"91":1,"165":1,"195":2,"196":1,"279":3,"281":10,"284":2,"285":1,"289":2}}],["cosmos1mr9p6wql4mmtp9xvsuklpw7fxx6g0qte7qd5q9",{"2":{"388":1}}],["cosmossdk",{"2":{"383":1,"384":1}}],["cosmos",{"0":{"160":1,"173":1},"2":{"7":4,"9":4,"10":1,"17":1,"67":3,"73":2,"74":2,"76":4,"107":1,"129":2,"136":3,"152":2,"160":4,"162":1,"163":1,"173":5,"196":2,"279":2,"324":2,"327":3,"331":1,"367":1,"368":3,"371":2,"372":2,"373":2,"376":4,"377":1,"378":3,"382":3,"383":4,"384":4,"388":1,"390":1}}],["connected",{"0":{"226":1,"233":1},"2":{"239":1,"330":1,"352":1,"354":1,"360":1,"361":1}}],["connects",{"2":{"181":1,"338":1,"366":1}}],["connect",{"0":{"238":1,"359":1},"2":{"163":1,"224":1,"238":1,"252":3,"261":1,"320":1,"330":3,"338":1,"352":1,"359":1,"363":1}}],["connecting",{"0":{"136":1,"330":1},"2":{"60":1,"220":1,"281":1,"329":3,"331":1,"338":1,"339":1,"363":1,"366":1,"390":1}}],["connection=consensus",{"2":{"135":1,"326":1}}],["connection=mempool",{"2":{"135":1,"326":1}}],["connection=snapshot",{"2":{"135":1,"326":1}}],["connection=query",{"2":{"135":1,"326":1}}],["connections",{"2":{"72":1,"135":1,"326":1}}],["connection",{"0":{"58":1,"64":1,"72":1},"1":{"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":2,"74":2,"75":2,"76":2,"77":2,"78":2,"79":2},"2":{"64":1,"67":1,"70":1,"76":9,"91":1,"95":1,"135":1,"136":3,"162":1,"225":1,"330":1}}],["congratulations",{"0":{"151":1,"312":1},"2":{"138":1,"147":1,"151":1,"213":1,"227":1,"234":1,"253":1,"255":1,"265":1,"276":1,"322":1,"331":1,"339":1,"341":1,"390":1}}],["congrats",{"2":{"113":1,"118":1,"120":1}}],["congestion",{"2":{"63":1}}],["conditions",{"2":{"277":1}}],["condition",{"2":{"76":2}}],["conditional",{"2":{"64":2}}],["confirming",{"2":{"330":1,"352":1,"388":4}}],["confirm",{"2":{"327":2,"388":3}}],["confirmations",{"2":{"185":1}}],["config=serviceconfig",{"2":{"338":1}}],["config=",{"2":{"213":1}}],["config",{"0":{"57":1,"74":1},"2":{"26":1,"30":1,"31":2,"37":4,"57":6,"74":4,"93":4,"103":2,"104":2,"124":5,"134":1,"136":3,"202":1,"206":1,"222":2,"251":1,"252":1,"260":3,"261":1,"344":3,"373":1}}],["configurable",{"2":{"178":1}}],["configuration",{"0":{"24":1,"86":1,"134":1},"2":{"3":1,"24":3,"30":1,"74":1,"86":2,"91":1,"100":1,"121":1,"123":1,"124":1,"127":1,"134":2,"225":1,"232":1,"260":3,"373":1,"387":1}}],["configuring",{"0":{"37":1,"225":1,"232":1,"238":1,"260":1,"359":1},"2":{"39":1,"129":1,"226":1,"324":1}}],["configures",{"2":{"63":2,"274":1}}],["configured",{"2":{"25":1,"63":2,"88":1,"181":1,"274":1,"350":1,"353":1}}],["configure",{"0":{"62":1,"63":1,"90":1,"93":1},"1":{"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1},"2":{"10":1,"62":1,"90":1,"91":4,"111":1,"136":1,"240":1,"260":1}}],["conflicts",{"2":{"59":2,"70":1}}],["convert",{"2":{"384":1}}],["converted",{"2":{"26":1}}],["convenience",{"2":{"327":1}}],["convincing",{"2":{"8":1}}],["console",{"2":{"207":1}}],["consist",{"2":{"383":1,"384":1}}],["consists",{"2":{"188":1,"364":1}}],["consider",{"2":{"194":1,"277":1,"331":1,"369":1}}],["consumed",{"2":{"93":1}}],["constrain",{"2":{"262":1}}],["constructor",{"2":{"215":1}}],["const",{"2":{"45":1,"47":1}}],["constants",{"2":{"21":1,"81":1,"82":1,"122":1,"130":1,"131":1,"132":1,"230":6,"237":1,"251":2,"252":2,"271":1,"343":1,"350":1,"358":2,"368":1,"371":1,"375":1}}],["consensus",{"2":{"7":1,"8":1,"15":2,"18":1,"37":1,"99":2,"107":1,"140":1,"156":1,"157":1,"194":1,"196":1,"267":1,"306":1}}],["conclude",{"2":{"367":1}}],["conclusion",{"0":{"18":1,"61":1,"265":1,"276":1,"298":1,"305":1,"345":1}}],["concepts",{"2":{"262":1}}],["concept",{"2":{"153":1}}],["concise",{"2":{"2":1}}],["context",{"2":{"242":4,"256":1,"383":3,"384":3,"385":4}}],["contents",{"0":{"6":1},"2":{"150":1,"338":1,"384":1}}],["content",{"2":{"2":1,"5":1,"6":1,"45":1,"74":1}}],["contained",{"2":{"378":1}}],["containerized",{"2":{"270":1}}],["containers",{"2":{"254":1,"264":1,"304":1,"340":1}}],["container",{"2":{"251":2,"252":7,"254":7,"255":1,"259":1,"260":3,"281":4,"283":3,"285":3,"326":4,"327":2,"338":1,"339":1,"340":8,"341":1}}],["contain",{"2":{"174":1}}],["contains",{"2":{"143":1,"145":1,"178":1,"188":1,"195":1,"251":1,"373":1,"376":1,"382":1,"383":1,"384":1}}],["containing",{"2":{"125":1,"126":1}}],["continuation",{"2":{"142":1}}],["continues",{"2":{"106":1}}],["continue",{"2":{"106":1,"374":1,"384":1}}],["contribute",{"2":{"169":1}}],["contributions",{"2":{"2":1}}],["contribution",{"0":{"2":1},"2":{"2":2}}],["contract=$",{"2":{"289":1}}],["contracting",{"2":{"279":1}}],["contracttest",{"2":{"215":1}}],["contractaddress",{"2":{"150":1}}],["contractwrapper",{"2":{"45":1}}],["contracts",{"0":{"51":1,"119":1},"2":{"9":1,"41":4,"42":1,"45":1,"49":1,"50":3,"51":1,"52":1,"91":1,"115":1,"119":1,"149":4,"213":1,"215":1,"261":1,"273":1,"275":1,"277":1,"279":1,"283":2,"285":1,"287":2,"289":2,"294":1,"296":2,"303":1,"315":1,"317":2}}],["contract",{"0":{"43":1,"148":1,"150":1,"215":1,"275":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1,"290":1,"294":1,"295":1,"303":1,"315":1,"316":1},"1":{"44":1,"45":1,"46":1,"47":1,"149":1,"283":1,"284":1,"285":1,"287":1,"288":1,"289":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1},"2":{"8":1,"41":2,"42":1,"43":2,"44":2,"45":13,"46":2,"47":5,"49":2,"50":1,"52":1,"140":1,"146":10,"147":3,"148":1,"149":10,"150":4,"152":1,"153":1,"155":2,"157":2,"168":1,"214":1,"215":4,"216":3,"217":5,"218":6,"261":4,"275":1,"279":3,"281":1,"283":5,"284":1,"285":4,"286":2,"287":3,"288":2,"289":11,"290":1,"293":1,"294":7,"295":1,"296":5,"297":1,"298":1,"303":1,"313":1,"314":1,"315":7,"316":1,"317":5,"318":1}}],["controlled",{"2":{"240":1}}],["controls",{"2":{"178":1}}],["control",{"0":{"8":1},"2":{"110":1,"113":1,"185":1}}],["coming",{"2":{"162":1,"346":1,"347":1,"355":1,"372":1}}],["com",{"2":{"21":1,"67":3,"69":1,"73":1,"81":1,"82":1,"136":2,"145":1,"213":1,"225":1,"251":1,"257":1,"261":1,"272":1,"281":2,"293":1,"300":1,"301":1,"306":1,"309":1,"314":1,"326":4,"338":4,"339":3,"350":1,"371":1,"375":1,"383":2,"384":2}}],["combining",{"2":{"267":1,"276":1}}],["combination",{"2":{"10":1}}],["combine",{"2":{"7":1}}],["come",{"2":{"8":1,"71":2,"75":2,"157":1,"177":1,"185":1}}],["comes",{"2":{"7":1,"8":1,"9":1,"245":1,"372":2}}],["cometbft",{"0":{"20":1,"22":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1},"2":{"7":1,"9":2,"20":3,"21":1,"25":1,"26":1,"91":1,"93":1,"95":1,"96":5,"97":7,"98":7,"99":2,"135":1,"153":1,"172":1,"173":3,"177":1,"179":1,"326":1,"367":1,"388":1}}],["compressing",{"2":{"326":1,"339":1}}],["comprehensive",{"2":{"0":1,"169":1,"220":1,"229":1,"236":1,"349":1,"357":1}}],["computed",{"2":{"274":1}}],["computing",{"2":{"274":2}}],["computational",{"2":{"155":1,"157":2}}],["compiling",{"2":{"149":2,"202":1,"215":2,"294":2,"315":2}}],["compiled",{"2":{"284":1,"285":1,"373":1}}],["compiler",{"2":{"149":1,"215":1,"294":1,"315":1}}],["compile",{"0":{"283":1},"2":{"146":1,"147":3,"283":1,"284":1,"385":1}}],["comparing",{"2":{"188":1}}],["compare",{"2":{"150":1}}],["compact",{"2":{"140":1}}],["compatibility",{"2":{"9":1,"67":1,"172":1}}],["compatible",{"2":{"7":1,"10":1,"41":1,"150":1,"153":2,"159":1,"160":1,"230":1}}],["complex",{"2":{"156":1,"263":1,"298":1}}],["complexity",{"2":{"43":1}}],["completions",{"2":{"203":1}}],["completion",{"2":{"101":1,"188":1}}],["completing",{"2":{"77":1,"247":1,"333":1}}],["completed",{"2":{"102":1,"220":1,"229":1,"236":1,"349":2,"357":1}}],["complete",{"2":{"48":1,"54":1,"102":1,"116":1}}],["compose",{"0":{"246":1,"249":1,"252":1,"258":1},"1":{"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1},"2":{"245":1,"246":2,"249":3,"250":1,"252":3,"253":2,"255":1,"258":1,"260":1,"264":1,"337":1}}],["composability",{"2":{"8":1,"185":1}}],["component",{"2":{"241":1}}],["components",{"0":{"176":1},"1":{"177":1,"178":1,"179":1,"180":1,"181":1},"2":{"10":1,"157":3,"169":1,"170":1,"339":2,"368":1}}],["compelled",{"2":{"8":1}}],["common",{"2":{"209":1}}],["communicating",{"2":{"364":1}}],["communication",{"2":{"64":1,"72":1,"181":1}}],["communicate",{"2":{"72":1,"178":1,"190":1,"241":1,"363":1}}],["communities",{"2":{"18":1,"157":1}}],["community",{"2":{"2":1,"4":1,"7":1,"8":1,"156":1,"263":1}}],["command>",{"2":{"126":2}}],["commands",{"0":{"125":1},"1":{"126":1},"2":{"76":1,"121":1,"125":1,"127":1,"203":1,"205":1,"214":1,"254":1,"285":1,"291":1,"340":1,"371":1,"372":1,"384":1}}],["command",{"2":{"19":1,"21":1,"22":1,"23":1,"24":2,"25":1,"30":2,"38":2,"39":1,"44":1,"50":1,"59":3,"62":1,"74":1,"75":1,"76":2,"78":1,"79":1,"81":2,"82":1,"83":1,"84":1,"86":1,"87":1,"89":2,"90":1,"104":2,"106":2,"122":2,"124":1,"125":1,"131":1,"133":1,"147":1,"196":1,"211":1,"212":1,"215":1,"222":2,"225":1,"232":5,"239":1,"251":2,"252":3,"253":1,"254":2,"258":3,"260":1,"264":1,"274":1,"281":2,"284":1,"285":4,"297":1,"301":4,"302":1,"304":1,"318":1,"320":2,"326":2,"337":1,"338":3,"339":1,"340":2,"343":1,"350":1,"351":1,"352":1,"360":1,"371":1,"372":3,"375":1,"377":1,"379":1,"387":2,"388":1}}],["commitments",{"2":{"220":1}}],["commit",{"2":{"2":3,"73":1,"131":1,"196":2,"343":1}}],["switch",{"2":{"272":1,"309":1}}],["sweet",{"2":{"47":1}}],["snap",{"2":{"205":1}}],["snapd",{"2":{"202":1}}],["snapshots",{"2":{"104":2}}],["skills",{"2":{"199":1}}],["skipping",{"2":{"274":2}}],["skip",{"2":{"7":1,"9":1,"81":1,"152":1,"162":1}}],["ssd",{"2":{"201":1}}],["ssl",{"2":{"122":1,"130":1,"131":1,"132":1,"133":1,"237":1,"251":1,"271":1,"343":1,"358":2,"368":1}}],["sst",{"2":{"103":2,"104":1}}],["small",{"2":{"284":1}}],["smart",{"0":{"148":1,"275":1,"283":1,"284":1,"290":1,"303":1},"1":{"149":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1},"2":{"9":1,"41":2,"43":1,"45":1,"91":1,"140":1,"146":10,"147":3,"148":1,"149":2,"150":1,"152":1,"153":1,"155":2,"157":2,"168":1,"213":1,"214":1,"216":1,"218":1,"261":1,"273":1,"275":1,"277":1,"279":4,"283":1,"284":1,"285":2,"289":2,"290":1,"293":1,"294":2,"296":1,"298":1,"303":1,"313":1,"314":1,"315":2,"317":1}}],["smoothly",{"2":{"72":1}}],["symbol",{"2":{"136":2}}],["syncloop",{"2":{"178":3}}],["sync",{"2":{"76":2,"91":1,"221":1,"222":2,"230":1,"320":1,"388":1}}],["syncing",{"0":{"62":1},"2":{"174":1}}],["synced",{"2":{"16":1,"62":1,"319":1,"320":1}}],["systems",{"2":{"157":1}}],["system",{"2":{"55":1,"188":1,"258":1,"270":1,"301":1}}],["src",{"2":{"50":1,"76":3,"136":3,"149":3,"214":1,"215":2,"216":1,"296":1,"317":1}}],["slot",{"2":{"274":1}}],["slot=41",{"2":{"274":2}}],["slot=40",{"2":{"274":5}}],["slot=0x28",{"2":{"274":2}}],["slow",{"2":{"19":1}}],["sleep",{"2":{"208":1}}],["slashing",{"2":{"194":1,"376":1}}],["slim",{"2":{"251":1}}],["slightly",{"2":{"14":1}}],["slinky",{"2":{"7":1,"9":1}}],["safe",{"2":{"274":2}}],["save",{"2":{"113":1,"146":3,"147":2,"150":1,"250":1,"336":1}}],["satisfy",{"2":{"16":1}}],["sample",{"2":{"115":1,"120":1}}],["samplingstats",{"2":{"319":1}}],["sampling",{"2":{"8":1}}],["same",{"2":{"7":1,"8":1,"59":1,"63":1,"106":2,"107":1,"136":1,"161":1,"181":1,"195":1,"289":1,"336":1,"348":1,"388":4}}],["side",{"2":{"331":1}}],["sidecars",{"2":{"274":2}}],["sidecars=true",{"2":{"274":2}}],["sizes",{"2":{"97":1}}],["size",{"2":{"74":1,"96":2,"97":5,"136":2,"251":1,"337":1,"353":2}}],["signer",{"2":{"327":1,"388":1}}],["signaled",{"2":{"178":1}}],["signal",{"2":{"87":1,"178":1}}],["signatures",{"2":{"196":1,"327":1,"388":1}}],["signature",{"2":{"64":1,"196":1}}],["significant",{"2":{"156":1}}],["significantly",{"2":{"41":1}}],["signing",{"2":{"74":2,"136":2,"327":1,"388":1}}],["sign",{"2":{"74":2,"136":2,"327":1}}],["similarly",{"2":{"160":1,"366":1}}],["similar",{"2":{"58":1,"60":1,"106":1,"124":1,"149":1,"187":1,"209":1,"215":1,"232":3,"289":2,"294":1,"312":1,"315":1,"320":1}}],["simplicity",{"2":{"369":1}}],["simplify",{"2":{"41":1,"45":1,"46":2}}],["simpler",{"2":{"72":1}}],["simple",{"2":{"28":2,"38":1,"41":1,"43":1,"133":1,"243":1,"263":1,"331":1,"336":1,"338":1,"345":1,"365":1,"367":1,"369":1}}],["simply",{"2":{"16":1,"25":1,"106":1,"224":1,"251":1,"330":1,"337":1}}],["sister",{"2":{"47":1}}],["sindri",{"0":{"139":1,"143":1,"144":1,"147":1},"1":{"140":1,"141":1,"142":1,"143":1,"144":1,"145":2,"146":2,"147":2,"148":1,"149":1,"150":1,"151":1},"2":{"140":4,"141":2,"143":3,"144":1,"145":7,"146":3,"147":7,"149":1,"150":1,"151":2}}],["single",{"0":{"43":1,"51":1},"1":{"44":1,"45":1,"46":1,"47":1},"2":{"42":2,"45":1,"51":1,"64":1,"147":1,"167":1,"188":1,"388":1}}],["since",{"2":{"14":1,"99":1,"183":1,"254":2,"287":1,"327":1,"340":2}}],["site",{"0":{"0":1,"1":1},"1":{"1":1,"2":1,"3":1,"4":1},"2":{"1":1}}],["shi",{"2":{"352":2,"360":1}}],["shusage",{"2":{"350":1}}],["shutdown",{"2":{"264":1}}],["shut",{"2":{"254":1,"340":1}}],["shgit",{"2":{"350":1}}],["shelli",{"2":{"239":1,"243":1,"365":1}}],["shell",{"2":{"208":1}}],["shellcargo",{"2":{"44":1,"50":2}}],["shcurl",{"2":{"179":1}}],["shchain",{"2":{"57":1}}],["should",{"2":{"60":1,"73":1,"76":1,"78":1,"79":1,"118":1,"124":1,"135":1,"136":1,"142":1,"223":1,"225":1,"232":1,"239":1,"245":1,"251":1,"254":1,"261":1,"274":1,"281":1,"302":1,"326":1,"327":1,"328":1,"337":1,"338":1,"340":2,"349":1,"350":1,"351":1,"352":2,"360":1,"371":2,"385":1,"388":1}}],["show",{"2":{"52":1,"136":2,"137":1,"140":1,"246":1,"263":1,"286":1,"328":1,"332":1,"369":1}}],["showcase",{"2":{"52":1}}],["shows",{"2":{"48":1,"369":1,"388":2}}],["shown",{"2":{"44":1,"350":1,"364":1,"388":1}}],["short",{"2":{"14":1}}],["sharing",{"2":{"157":1,"161":1}}],["share",{"2":{"8":1,"87":1,"155":1,"157":1,"161":1}}],["shared",{"2":{"7":1,"10":1,"152":1,"155":2,"157":1,"185":1}}],["sha256",{"2":{"135":1,"383":3,"384":4}}],["shaddress=$",{"2":{"37":1}}],["shrm",{"2":{"31":1}}],["shrollkit",{"2":{"30":2,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"38":1,"230":3,"239":2,"352":2,"360":2}}],["sh",{"2":{"30":1,"59":1,"67":2,"70":3,"122":2,"130":1,"131":2,"132":1,"133":4,"208":2,"213":1,"218":3,"224":2,"237":1,"251":2,"254":1,"271":2,"281":5,"285":2,"321":1,"326":5,"327":1,"338":1,"340":6,"343":2,"351":2,"358":2,"368":2}}],["shvalidator",{"2":{"29":1}}],["spun",{"2":{"330":1}}],["sparse",{"2":{"326":3}}],["space",{"2":{"301":2}}],["spins",{"2":{"338":1}}],["spinned",{"2":{"290":1}}],["spinning",{"2":{"185":2}}],["spikes",{"2":{"63":1}}],["spoiler",{"2":{"162":1}}],["spots",{"2":{"48":1}}],["spdx",{"2":{"149":1,"215":2,"216":1}}],["split",{"2":{"10":1}}],["spent",{"2":{"99":1}}],["spending",{"2":{"8":1}}],["speed",{"0":{"19":1,"40":1},"1":{"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1},"2":{"19":2,"42":1,"91":1,"152":1}}],["spec",{"2":{"373":1}}],["special",{"2":{"161":1,"377":1}}],["specialized",{"2":{"157":1}}],["specifying",{"2":{"288":1}}],["specify",{"2":{"60":1,"76":1,"89":1}}],["specified",{"2":{"34":1,"122":1,"135":1,"180":1,"350":1}}],["specifically",{"2":{"188":1,"226":1,"372":1}}],["specifications",{"0":{"169":1},"2":{"169":1}}],["specifics",{"2":{"45":1}}],["specific",{"2":{"16":1,"78":1,"91":1,"120":1,"129":1,"159":1,"181":1,"278":1,"324":1,"365":1,"373":1,"376":1,"378":1,"389":2}}],["specs",{"2":{"16":1}}],["speak",{"2":{"9":1}}],["scope",{"2":{"279":1,"373":1}}],["scheme",{"2":{"194":1,"245":1,"362":1}}],["schemes",{"2":{"10":1,"157":1,"185":1}}],["scalability",{"0":{"155":1},"2":{"140":1,"155":1,"157":2,"277":1}}],["scalable",{"2":{"7":1,"199":1,"220":1}}],["scaffolds",{"2":{"372":1}}],["scaffoldings",{"2":{"371":1}}],["scaffolding",{"0":{"370":1,"372":1,"377":1,"379":1,"381":1},"1":{"371":1,"372":1,"373":1},"2":{"372":1}}],["scaffold",{"2":{"67":2,"81":2,"372":1,"377":2,"379":2,"381":2}}],["script",{"0":{"216":1,"321":1},"2":{"67":1,"70":3,"130":1,"132":1,"133":3,"146":1,"147":1,"149":9,"208":4,"216":5,"217":2,"218":4,"224":1,"237":2,"251":1,"269":1,"271":1,"285":2,"294":5,"315":5,"358":2}}],["scripts",{"0":{"52":1},"2":{"42":1,"47":1,"245":2}}],["scripting",{"2":{"41":1,"216":1,"286":1}}],["s",{"2":{"7":1,"9":1,"12":1,"13":2,"14":1,"44":2,"45":1,"46":1,"50":1,"54":1,"57":1,"58":1,"64":1,"70":1,"72":1,"93":2,"101":1,"107":1,"122":1,"130":2,"131":1,"132":1,"133":1,"135":1,"140":1,"143":1,"144":1,"145":1,"146":4,"147":3,"149":8,"150":1,"151":1,"152":1,"156":2,"157":1,"162":2,"163":2,"169":1,"174":1,"175":1,"179":2,"181":2,"184":1,"185":2,"188":1,"190":1,"194":1,"200":1,"208":1,"215":3,"216":2,"217":1,"218":1,"220":1,"222":1,"225":2,"226":1,"227":1,"229":3,"230":2,"232":4,"233":2,"234":1,"237":1,"251":1,"261":1,"262":1,"265":1,"271":1,"281":2,"283":1,"285":3,"286":1,"287":2,"289":2,"290":1,"294":3,"305":2,"315":3,"319":1,"320":1,"321":1,"322":2,"326":1,"327":1,"328":2,"329":1,"340":1,"343":1,"344":1,"345":2,"358":2,"363":1,"368":1,"369":3,"373":1,"382":1,"383":4,"384":4,"387":1,"388":5,"389":2}}],["soon",{"2":{"306":1,"346":1,"347":1,"355":1}}],["soft",{"2":{"185":1}}],["software",{"0":{"66":1},"2":{"172":1,"268":1,"307":1}}],["sound",{"2":{"156":1}}],["source=registry",{"2":{"284":1}}],["source=",{"2":{"284":1}}],["source",{"2":{"153":1,"157":1,"203":2,"371":1,"389":1}}],["solves",{"2":{"157":1}}],["solving",{"0":{"154":1},"1":{"155":1,"156":1}}],["solution",{"2":{"156":1,"181":1,"381":1}}],["solc",{"2":{"149":1,"215":3,"294":1,"315":1}}],["solidity",{"2":{"149":1,"215":4,"216":3}}],["sol",{"2":{"146":1,"147":1,"149":14,"214":1,"215":5,"216":3,"217":1,"218":1,"294":2,"296":2,"315":2,"317":2}}],["somewhat",{"2":{"156":1}}],["something",{"2":{"72":1,"76":1,"78":1,"79":1,"227":1,"234":1,"338":1}}],["some",{"2":{"52":2,"79":1,"91":2,"101":1,"147":1,"152":1,"156":1,"213":1,"265":1,"275":1,"292":1,"303":1,"368":1,"389":1}}],["so",{"2":{"16":1,"45":1,"72":1,"116":1,"146":1,"155":2,"157":1,"216":1,"218":1,"245":1,"281":1,"285":1,"326":1,"330":1,"388":1,"389":1}}],["social",{"2":{"7":1,"8":1,"194":1}}],["sovereignty",{"2":{"7":1,"157":2}}],["sovereign",{"0":{"7":1,"11":1,"12":1,"133":1,"160":1,"218":1,"266":1,"344":1},"1":{"8":1,"9":1,"10":1,"11":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1},"2":{"6":2,"7":10,"8":5,"10":1,"11":2,"12":3,"13":2,"14":1,"15":1,"17":1,"18":5,"91":1,"129":2,"152":1,"153":2,"157":1,"158":1,"160":1,"161":1,"163":1,"167":1,"199":3,"200":3,"220":1,"267":2,"269":1,"276":1,"324":2,"342":2,"344":1,"345":1,"367":1,"373":1}}],["session",{"2":{"263":2,"371":1}}],["selection",{"2":{"388":1}}],["selecting",{"2":{"194":1,"320":1,"363":1}}],["self",{"2":{"7":1,"45":2}}],["seal",{"2":{"312":1}}],["search",{"2":{"179":1,"322":1}}],["seamless",{"2":{"174":1}}],["sendcoins",{"2":{"385":1}}],["sendcoinsfrommoduletoaccount",{"2":{"384":1,"385":1}}],["sendcoinsfromaccounttomodule",{"2":{"383":1,"385":1}}],["senderaddr",{"2":{"385":1}}],["sendermodule",{"2":{"385":1}}],["sender",{"2":{"328":1}}],["sender=",{"2":{"196":1}}],["sends",{"2":{"327":1}}],["sending",{"2":{"217":1,"218":1,"385":1}}],["send",{"2":{"98":3,"109":1,"120":1,"136":1,"137":3,"150":3,"217":2,"218":2,"295":2,"297":1,"316":2,"318":1,"327":1,"384":1}}],["sent",{"2":{"72":1,"98":3}}],["serving",{"2":{"135":1,"326":1}}],["service=engine",{"2":{"274":2}}],["service=execution",{"2":{"274":4}}],["service=blockchain",{"2":{"274":5}}],["service=prepare",{"2":{"274":2}}],["service=payload",{"2":{"274":2}}],["service=validator",{"2":{"274":4}}],["services",{"2":{"245":3,"252":1,"280":1,"281":2,"325":1,"326":2,"339":1}}],["service",{"2":{"135":20,"242":1,"252":4,"281":8,"288":1,"289":1,"326":28,"338":1,"339":6}}],["serves",{"2":{"174":1,"220":1,"229":1,"236":1,"349":1,"357":1}}],["server",{"2":{"135":2,"222":2,"239":1,"243":1,"273":1,"326":2,"348":2,"383":1,"384":1}}],["served",{"2":{"93":1,"177":1}}],["serve",{"2":{"93":1,"185":1,"350":1}}],["serde",{"2":{"46":3}}],["separate",{"2":{"50":1,"67":1,"70":1,"226":1,"308":1,"376":1}}],["seen",{"2":{"245":1}}],["seed",{"2":{"59":1,"135":1,"326":1}}],["seeds",{"2":{"59":1}}],["see",{"2":{"16":1,"17":1,"18":1,"60":2,"63":1,"67":1,"78":1,"79":1,"100":1,"103":1,"104":1,"106":2,"111":1,"124":1,"135":1,"141":1,"144":1,"150":1,"168":1,"225":1,"226":1,"239":1,"243":1,"245":1,"251":2,"253":1,"254":3,"274":1,"280":1,"281":3,"289":3,"302":1,"325":1,"326":3,"327":2,"335":1,"337":2,"339":1,"340":4,"350":1,"352":2,"360":1,"365":1,"368":1,"371":1,"373":1,"383":2,"388":2}}],["seeking",{"2":{"10":1}}],["segwit",{"2":{"14":2}}],["sequenced",{"2":{"348":1,"350":1,"364":1}}],["sequence",{"2":{"196":1}}],["sequencers",{"2":{"157":1,"185":2,"188":1}}],["sequencer",{"0":{"58":1,"96":1,"100":1,"185":1,"348":1,"350":1,"351":1,"356":1,"358":1,"359":1,"365":1},"1":{"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"357":1,"358":1,"359":1,"360":1,"361":1},"2":{"10":2,"19":1,"37":2,"38":1,"54":1,"55":1,"57":1,"58":1,"59":2,"61":1,"87":3,"88":1,"91":1,"96":5,"100":2,"157":2,"162":1,"167":1,"170":1,"178":1,"185":7,"188":1,"194":6,"239":1,"250":3,"251":1,"252":7,"254":3,"274":1,"338":3,"348":3,"349":4,"350":7,"351":3,"352":14,"353":6,"354":1,"357":1,"358":5,"359":5,"360":8,"361":1,"365":5,"366":9,"387":1}}],["sequencing",{"0":{"89":1,"346":1,"347":1,"362":1,"363":1,"364":1,"366":1},"1":{"363":1,"364":1,"365":1,"366":1},"2":{"10":3,"26":1,"89":2,"91":1,"252":1,"332":1,"348":3,"362":1,"363":3,"364":4,"366":7}}],["several",{"2":{"9":1,"372":1,"373":1,"377":1}}],["setguess",{"2":{"384":1}}],["setwordle",{"2":{"383":1}}],["settings",{"2":{"118":1,"277":1}}],["setting",{"0":{"29":1,"35":1,"56":1,"142":1,"237":1,"250":1,"336":1,"358":1,"374":1},"1":{"57":1,"58":1,"59":1,"251":1,"252":1,"253":1,"337":1,"338":1,"339":1,"375":1},"2":{"27":1,"168":1,"220":1,"226":1,"258":1,"369":1}}],["settle",{"2":{"8":1}}],["settled",{"2":{"8":1}}],["settlement",{"0":{"161":1},"2":{"7":3,"8":3,"15":1,"158":1,"161":3,"245":1}}],["sets",{"2":{"24":1,"251":2,"337":2}}],["setup",{"0":{"53":1,"72":1,"74":1,"202":1,"321":1},"1":{"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"203":1,"204":1,"205":1},"2":{"19":1,"47":1,"51":1,"59":1,"67":1,"127":1,"133":1,"149":1,"215":1,"216":1,"220":2,"240":1,"256":1,"258":1,"265":1,"276":1,"305":1,"367":1,"384":2}}],["set",{"0":{"58":1},"2":{"7":1,"8":1,"10":1,"20":1,"29":1,"30":2,"32":1,"35":1,"39":1,"47":1,"54":1,"57":2,"59":1,"61":1,"72":1,"78":1,"79":1,"86":1,"93":1,"120":1,"124":1,"125":1,"132":1,"156":3,"157":1,"180":1,"185":1,"199":1,"203":1,"204":1,"205":1,"206":1,"209":1,"210":1,"213":1,"217":3,"218":1,"225":2,"232":5,"237":1,"240":1,"251":3,"252":4,"256":1,"265":1,"271":1,"276":1,"297":2,"299":1,"302":1,"305":1,"306":1,"318":2,"319":1,"320":1,"321":1,"330":1,"338":1,"354":1,"358":1,"361":1,"372":1,"374":1,"383":1}}],["secp256k1",{"2":{"327":2}}],["secret",{"2":{"222":1}}],["section",{"2":{"51":1,"91":2,"106":1,"107":1,"112":1,"114":1,"118":1,"119":1,"120":1,"124":1,"148":1,"152":1,"162":2,"245":1}}],["sections",{"2":{"26":1,"115":1}}],["second",{"2":{"19":2,"208":3,"378":1,"381":1}}],["seconds",{"2":{"7":1,"19":1,"62":1,"95":1,"118":1,"225":1,"232":1,"251":1,"254":3,"326":8,"337":1,"340":14,"350":1}}],["security",{"0":{"156":1},"2":{"7":2,"12":1,"54":1,"140":1,"152":1,"157":3,"183":1,"200":1}}],["securely",{"2":{"241":1}}],["secured",{"2":{"184":1}}],["secures",{"2":{"140":1}}],["secure",{"2":{"7":1,"8":1,"156":4,"377":1}}],["sdkerrors",{"2":{"383":4,"384":5}}],["sdk=github",{"2":{"67":1}}],["sdk",{"0":{"143":1,"160":1,"173":1},"2":{"7":3,"9":4,"10":1,"17":1,"67":1,"73":1,"107":1,"108":3,"129":2,"141":1,"143":2,"152":2,"160":4,"162":1,"163":1,"173":5,"279":1,"324":2,"331":1,"367":1,"368":3,"371":2,"372":2,"373":2,"376":4,"377":1,"378":3,"382":2,"383":7,"384":7,"385":4,"388":1,"390":1}}],["superior",{"2":{"261":1}}],["supports",{"2":{"17":1,"167":1,"187":2,"256":1}}],["supported",{"2":{"15":1,"179":1,"189":1,"213":1}}],["support",{"0":{"92":1,"167":1},"2":{"12":1,"64":1,"85":1,"167":1,"177":1,"185":1,"306":1,"332":2}}],["supporting",{"2":{"9":1}}],["supply",{"2":{"8":1}}],["sum256",{"2":{"383":2,"384":3}}],["sum",{"2":{"251":1}}],["summary",{"0":{"26":1,"39":1,"42":1,"88":1,"127":1,"240":1,"354":1,"361":1},"2":{"42":1}}],["sustainably",{"2":{"156":1}}],["sustainable",{"2":{"12":1,"18":1}}],["sustainability",{"2":{"156":1}}],["sufficient",{"2":{"301":1}}],["sufficiently",{"2":{"156":2}}],["suffice",{"2":{"143":1}}],["sudo",{"2":{"133":1,"202":1,"203":2}}],["suitable",{"2":{"243":1,"365":1}}],["suit",{"2":{"71":2,"75":2}}],["suggested",{"2":{"274":1}}],["suggest",{"2":{"41":1}}],["suggestions",{"0":{"4":1},"2":{"4":1}}],["sure",{"2":{"28":1,"39":1,"59":2,"72":2,"101":1,"118":1,"202":1,"211":1,"214":1,"247":1,"258":1,"262":1,"292":1,"301":2,"330":1,"333":1,"352":1,"360":1}}],["succeeded",{"2":{"274":1}}],["succeeds",{"2":{"63":1}}],["success",{"2":{"137":1,"149":1,"156":1,"294":1,"315":1}}],["successful",{"2":{"76":4,"120":1,"131":1,"149":2,"194":1,"215":2,"294":2,"315":2,"343":1}}],["successfully",{"2":{"26":1,"60":1,"76":2,"88":1,"113":1,"149":1,"215":1,"222":1,"230":1,"253":1,"265":1,"274":2,"276":1,"281":3,"294":1,"298":1,"305":1,"312":1,"315":1,"319":1,"326":3,"330":1,"339":4,"352":2,"354":1,"361":1,"371":1}}],["such",{"2":{"3":1,"18":1,"41":1,"63":1,"153":1,"162":1,"170":1,"179":2,"194":2,"348":1,"366":1}}],["subsequent",{"2":{"383":1}}],["substitute",{"2":{"153":1}}],["subsystem",{"2":{"94":1}}],["submitguess",{"0":{"384":1},"2":{"378":1,"379":1,"384":1}}],["submitwordle",{"0":{"383":1},"2":{"378":1,"379":1,"383":3}}],["submitrolluptransaction",{"2":{"364":1}}],["submits",{"2":{"242":1,"350":1,"366":1,"389":1}}],["submit",{"2":{"194":2,"242":2,"327":2,"378":1,"379":4,"383":1,"384":2,"387":1,"388":9}}],["submitteraddress",{"2":{"383":2}}],["submitter",{"2":{"381":4,"383":1,"384":8,"388":1}}],["submittedsolutionhashstring",{"2":{"383":2,"384":3}}],["submittedsolutionhash",{"2":{"383":2,"384":2}}],["submitted",{"2":{"98":1,"194":3,"312":1,"352":1,"353":1,"363":1,"369":1,"378":1,"381":3,"383":10,"384":1,"388":5,"389":1}}],["submitting",{"2":{"108":1,"190":1,"312":1,"326":1,"352":1,"354":1,"361":1,"388":3,"389":1}}],["submitblocks",{"2":{"174":1}}],["submitblock",{"2":{"16":2}}],["submission",{"0":{"90":1,"191":1},"2":{"63":2,"90":1,"108":3,"353":1}}],["subkeys",{"2":{"50":1}}],["sub",{"2":{"19":1}}],["subordinate",{"2":{"8":1}}],["stick",{"2":{"389":1}}],["still",{"2":{"9":1,"14":1,"92":1,"107":1,"135":1,"162":1,"167":1,"184":1,"188":1,"190":1}}],["storing",{"2":{"381":1}}],["stored",{"2":{"286":1}}],["store",{"2":{"285":1,"381":1,"382":2,"383":2,"384":1}}],["storage",{"2":{"169":1}}],["stopbroadcast",{"2":{"149":1,"216":1}}],["stop",{"2":{"110":1,"174":1,"208":1,"304":2,"320":1}}],["stopping",{"0":{"110":1,"264":1,"304":1},"2":{"113":1}}],["stuck",{"2":{"107":1}}],["std",{"2":{"47":1,"149":1,"215":1,"216":1}}],["steak",{"2":{"47":2}}],["steps",{"0":{"118":1,"124":1,"138":1,"227":1,"234":1,"255":1,"277":1,"331":1,"341":1,"390":1},"2":{"27":1,"39":1,"41":2,"43":1,"49":1,"77":1,"88":1,"115":1,"123":1,"127":1,"240":1,"260":1,"286":1,"319":1,"351":1,"354":1,"361":1,"368":1,"380":1}}],["step",{"2":{"3":2,"70":1,"76":1,"79":1,"119":1,"136":1,"141":1,"147":1,"261":2,"301":1,"306":2,"362":1}}],["strconv",{"2":{"384":4}}],["strategies",{"2":{"366":1}}],["strategy",{"2":{"363":2}}],["straightforward",{"2":{"46":1,"329":1,"331":1,"372":2}}],["strong",{"2":{"156":1}}],["str+",{"2":{"146":1}}],["string",{"2":{"79":1,"180":2,"295":1,"316":1,"319":1,"350":7,"383":3,"384":3,"385":4,"389":1}}],["string=youribc",{"2":{"79":1}}],["struct",{"2":{"45":2,"46":1}}],["structure",{"0":{"3":1,"171":1},"1":{"172":1,"173":1,"174":1,"175":1},"2":{"24":1,"50":1,"123":1,"124":1,"373":1}}],["str",{"2":{"45":1,"47":1,"146":6}}],["stands",{"2":{"324":1}}],["standard",{"2":{"14":2,"215":1}}],["status",{"2":{"150":1,"179":1,"185":1,"254":1,"280":1,"281":3,"302":1,"319":1,"325":1,"326":3,"335":1,"339":2,"340":1,"353":2,"364":1}}],["statefile=",{"2":{"344":1}}],["state",{"0":{"99":1,"101":1,"186":1},"1":{"102":1,"103":1,"104":1,"187":1,"188":1,"189":1},"2":{"8":1,"9":1,"10":1,"46":1,"60":1,"64":2,"99":2,"101":3,"103":2,"104":2,"159":2,"162":1,"170":1,"173":1,"181":1,"184":1,"185":1,"188":11,"194":2,"274":8,"289":1,"344":1,"366":1,"378":1,"382":1,"384":1}}],["stage",{"2":{"92":1,"162":1,"167":1,"251":5}}],["stake",{"2":{"78":1,"79":1,"136":1,"327":1,"328":2}}],["staking",{"0":{"35":1},"2":{"29":1,"35":1}}],["star",{"2":{"338":3}}],["starlark",{"2":{"281":2,"326":3,"339":3}}],["starship",{"2":{"41":1}}],["startbuild",{"2":{"351":1,"358":1}}],["startbroadcast",{"2":{"149":1,"216":1}}],["startwordle",{"2":{"239":1,"352":1,"360":1}}],["starts",{"2":{"178":1,"261":1,"274":1,"349":1}}],["starting",{"0":{"38":1,"135":1,"281":1,"326":1},"2":{"39":1,"55":1,"60":1,"76":1,"85":1,"103":1,"104":1,"135":14,"181":1,"212":1,"213":1,"222":1,"230":1,"243":1,"252":1,"321":1,"326":14,"339":1,"349":1,"365":1}}],["start",{"0":{"25":1,"59":1,"72":1,"77":1,"87":1,"103":1,"208":1,"256":1,"273":1,"296":1,"299":1,"311":1,"317":1,"320":1,"322":1,"342":1},"1":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"209":1,"210":1,"211":1,"212":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"343":1,"344":1,"345":1},"2":{"7":1,"9":1,"19":5,"25":3,"27":1,"38":4,"41":2,"47":1,"59":2,"62":2,"63":2,"67":1,"70":2,"75":1,"77":2,"87":3,"89":4,"90":2,"99":1,"102":1,"103":2,"104":1,"106":4,"107":1,"115":1,"117":1,"119":1,"126":2,"129":1,"135":12,"136":2,"162":1,"174":1,"178":1,"208":3,"213":3,"217":1,"218":1,"221":1,"222":2,"225":3,"226":2,"229":1,"230":2,"231":1,"232":3,"233":2,"236":1,"237":1,"239":3,"241":1,"243":1,"244":1,"251":1,"252":2,"254":1,"257":1,"258":1,"261":1,"269":1,"273":2,"274":1,"288":1,"302":2,"308":2,"311":2,"312":1,"320":4,"321":1,"322":1,"324":1,"326":12,"338":7,"339":1,"344":2,"345":1,"349":1,"351":1,"352":3,"354":1,"357":1,"358":1,"360":3,"361":1,"365":1,"368":1,"378":1,"383":1,"387":2}}],["started",{"2":{"1":1,"11":1,"39":1,"106":2,"142":1,"163":2,"217":1,"251":1,"300":1,"309":1,"313":1,"339":3,"344":1,"369":1,"371":1}}],["stay",{"2":{"6":1}}],["stack",{"0":{"170":1,"200":1},"1":{"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1},"2":{"3":1,"153":1,"157":1,"166":1,"168":1}}],["gz",{"2":{"203":3}}],["gb",{"2":{"201":1}}],["g",{"2":{"185":1,"196":1,"203":1,"261":2,"363":1}}],["gwei",{"2":{"149":1,"294":1,"315":1}}],["gpu",{"2":{"147":1}}],["global",{"2":{"136":1}}],["gt",{"2":{"104":1,"106":1,"307":1}}],["giant",{"2":{"388":2}}],["give",{"2":{"217":1,"287":1}}],["gives",{"2":{"153":1,"159":1}}],["given",{"2":{"98":3,"242":1,"378":1,"388":5}}],["git",{"2":{"69":2,"73":2,"131":1,"136":1,"145":2,"202":1,"213":2,"257":1,"261":1,"272":3,"293":2,"300":1,"309":3,"314":3,"321":1,"343":1,"350":1}}],["github",{"2":{"21":1,"67":1,"69":1,"73":1,"82":1,"92":1,"136":1,"145":2,"167":1,"213":1,"257":1,"261":1,"272":1,"278":1,"281":3,"293":1,"300":1,"301":1,"306":1,"309":1,"314":1,"326":5,"338":4,"339":4,"346":1,"347":1,"350":1,"375":1,"383":2,"384":2}}],["gateway",{"2":{"320":1}}],["gaming",{"2":{"263":1}}],["game",{"2":{"165":1,"263":1,"367":2}}],["gain",{"2":{"156":1,"262":1}}],["gauge",{"2":{"96":5,"97":2,"98":3,"353":5}}],["gasprice=",{"2":{"352":1}}],["gasprice",{"2":{"242":1}}],["gasused",{"2":{"150":1}}],["gas",{"0":{"63":1,"111":1,"113":1,"128":1},"1":{"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1},"2":{"10":1,"59":1,"63":15,"74":8,"76":4,"79":1,"91":2,"107":3,"108":1,"111":2,"113":1,"129":4,"135":2,"136":9,"137":2,"138":1,"149":1,"215":3,"226":4,"285":3,"288":3,"289":7,"294":1,"315":1,"327":1,"353":2,"388":3}}],["ghcr",{"2":{"67":1,"252":2,"281":6,"283":2,"308":1,"320":1,"326":6,"339":2,"340":1}}],["grey",{"2":{"369":1}}],["green",{"2":{"369":1}}],["grep",{"2":{"281":1,"326":1,"340":1}}],["great",{"2":{"160":2,"162":1,"227":1,"234":1,"243":1,"245":1,"365":1}}],["greater",{"2":{"63":1}}],["grotto",{"2":{"326":3}}],["grow",{"2":{"220":1}}],["growth",{"2":{"160":1}}],["grouped",{"2":{"94":1}}],["granter",{"2":{"327":1,"388":1}}],["grasp",{"2":{"262":1}}],["grab",{"2":{"150":1,"388":1}}],["gradually",{"2":{"63":1}}],["grpc",{"2":{"59":2,"135":1,"226":1,"281":1,"320":2,"326":1,"348":1,"363":1}}],["gms",{"2":{"295":1,"316":1}}],["gmportalscript",{"2":{"294":2,"315":2}}],["gmportal",{"2":{"149":3,"294":2,"296":5,"315":2,"317":5}}],["gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3",{"2":{"327":2}}],["gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx",{"2":{"327":2}}],["gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc",{"2":{"136":3}}],["gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy",{"2":{"71":1,"76":2}}],["gmd",{"2":{"124":3,"133":1,"134":1,"223":2,"224":1,"225":1,"226":1}}],["gm",{"0":{"67":1,"323":1,"329":1},"1":{"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1},"2":{"30":1,"64":1,"67":9,"70":1,"71":2,"74":3,"75":1,"76":22,"77":1,"78":5,"81":4,"87":2,"115":1,"116":1,"117":1,"120":4,"124":6,"129":1,"133":3,"134":4,"136":24,"137":2,"148":1,"149":5,"164":1,"220":5,"223":3,"224":2,"261":2,"280":1,"293":3,"294":1,"295":1,"296":6,"313":1,"314":3,"315":1,"316":1,"317":6,"324":2,"326":19,"327":1}}],["gui",{"2":{"369":1}}],["guide",{"0":{"53":1,"256":1,"299":1,"342":1},"1":{"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"343":1,"344":1,"345":1},"2":{"20":2,"26":1,"27":1,"28":4,"30":1,"39":1,"41":1,"54":1,"80":1,"89":1,"101":2,"102":1,"105":1,"111":1,"115":1,"121":1,"129":2,"140":2,"142":1,"143":1,"220":1,"226":1,"229":1,"236":1,"256":1,"261":1,"269":1,"286":1,"299":1,"324":2,"349":1,"357":1,"367":1,"368":1,"369":1,"373":1}}],["guidelines",{"0":{"2":1},"2":{"2":1,"67":1}}],["guides",{"0":{"91":1},"1":{"92":1},"2":{"0":1,"91":3,"92":1,"267":1}}],["guessing",{"2":{"384":1}}],["guessed",{"2":{"384":2}}],["guesseraddress",{"2":{"384":2}}],["guesser",{"2":{"384":2,"385":1}}],["guesses",{"2":{"369":2,"381":1,"383":2,"384":2}}],["guess",{"2":{"369":2,"378":2,"379":3,"381":3,"383":1,"384":19,"388":8,"389":1}}],["guard",{"2":{"263":1}}],["guarantees",{"2":{"12":1,"157":1,"200":2,"241":1,"243":1}}],["gotype",{"2":{"385":1}}],["gomessage",{"2":{"385":1}}],["goctx",{"2":{"383":2,"384":2}}],["gopackage",{"2":{"383":1,"384":1}}],["goreleaser",{"2":{"301":8}}],["gosubmitrolluptransaction",{"2":{"364":1}}],["gosequencinglatesttag",{"2":{"252":1,"358":2}}],["gossips",{"2":{"194":1}}],["gossipping",{"2":{"190":1}}],["gossiped",{"2":{"188":1}}],["gossip",{"0":{"194":1},"2":{"181":1,"188":2,"194":1}}],["go$ver",{"2":{"203":3}}],["golang",{"0":{"203":1},"2":{"203":2,"251":1,"269":1}}],["golangversion",{"2":{"130":1}}],["good",{"2":{"199":1,"227":1,"234":1,"281":1,"324":1,"326":1,"345":1}}],["godocs",{"2":{"169":1}}],["going",{"2":{"143":1,"162":1,"246":1,"332":1,"373":1}}],["go1",{"2":{"73":1}}],["gone",{"2":{"19":1,"91":1,"368":1}}],["goal",{"2":{"18":1,"129":1,"153":1,"157":1,"200":1,"324":1}}],["go",{"0":{"242":1,"273":1},"2":{"10":2,"16":1,"41":1,"48":1,"64":1,"66":1,"67":3,"73":1,"89":1,"91":1,"98":1,"107":1,"115":1,"118":1,"124":3,"130":2,"133":2,"134":1,"173":1,"175":1,"178":2,"203":4,"220":1,"227":1,"234":1,"241":1,"242":3,"251":4,"252":1,"273":1,"289":1,"301":1,"307":1,"319":1,"330":1,"348":1,"364":1,"367":3,"368":1,"369":1,"373":1,"383":3,"384":1,"385":1}}],["governance",{"2":{"7":1,"8":1}}],["gentxs",{"2":{"36":1}}],["gentx",{"2":{"31":1,"35":1,"104":2}}],["genesis",{"0":{"27":1,"31":1,"34":1,"35":1,"36":1,"37":1,"57":1},"1":{"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1},"2":{"27":2,"31":2,"34":3,"35":2,"36":2,"37":3,"39":2,"57":3,"91":1,"103":1,"104":1,"275":2,"344":2}}],["generation",{"2":{"46":2}}],["generating",{"0":{"208":1},"1":{"209":1,"210":1,"211":1,"212":1},"2":{"24":1,"76":1,"208":2,"350":1}}],["generates",{"2":{"222":1,"230":1}}],["generatetoaddress",{"2":{"208":2}}],["generatefraudproof",{"2":{"188":1}}],["generated",{"2":{"46":1,"140":2,"146":1,"147":1,"217":1,"218":1,"232":1,"373":1}}],["generate",{"0":{"124":1},"2":{"30":1,"74":1,"86":1,"124":1,"157":1,"188":2,"194":1,"208":3,"320":1}}],["generic",{"2":{"7":1,"174":1,"242":1}}],["getguess",{"2":{"384":1}}],["getwordle",{"2":{"383":1,"384":1}}],["getnextbatch",{"2":{"364":2,"366":1}}],["getnewaddress`",{"2":{"208":1}}],["getnewaddress",{"2":{"208":1}}],["gettotalgms",{"2":{"295":1,"316":1}}],["getting",{"2":{"179":2,"384":1}}],["geth",{"0":{"273":1},"2":{"273":2,"275":2,"278":1,"312":2}}],["getblockheader",{"2":{"211":2}}],["getblockhash",{"2":{"210":1}}],["getblockcount",{"2":{"209":1}}],["getapphash",{"2":{"188":1}}],["gets",{"2":{"72":1,"363":1,"369":1}}],["getcountresponse",{"2":{"46":2}}],["getcount",{"2":{"46":2,"215":4,"217":1,"218":1}}],["get",{"0":{"259":1},"2":{"1":1,"8":1,"11":1,"41":2,"46":1,"47":1,"50":1,"67":1,"81":1,"107":2,"109":1,"133":2,"136":1,"146":2,"152":1,"163":2,"211":1,"222":1,"232":1,"242":2,"251":3,"261":1,"275":1,"285":1,"287":1,"295":1,"300":1,"301":1,"303":1,"309":1,"313":1,"316":1,"320":1,"369":1,"371":2,"383":1,"384":3,"388":2}}],["omni",{"0":{"299":1,"300":1,"302":1},"1":{"300":1,"301":1,"302":1,"303":1,"304":1,"305":1},"2":{"299":1,"300":3,"301":2,"302":3,"303":4,"304":1,"305":2}}],["omnilayer",{"2":{"187":1}}],["octane",{"0":{"299":1},"1":{"300":1,"301":1,"302":1,"303":1,"304":1,"305":1},"2":{"294":1}}],["occurred",{"2":{"188":1}}],["occasional",{"2":{"63":1}}],["ooga",{"0":{"294":1,"315":1},"2":{"295":3,"297":2,"313":1,"314":1,"316":3,"318":2}}],["old",{"2":{"212":1,"223":1}}],["os",{"2":{"202":1,"251":1}}],["osmo",{"2":{"74":2,"75":1,"76":12}}],["osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll",{"2":{"71":1,"76":2}}],["osmosis",{"0":{"68":1,"69":1,"70":1,"78":1,"79":1},"1":{"69":1,"70":1},"2":{"64":1,"69":3,"70":6,"71":2,"74":2,"76":6,"77":1,"78":3,"79":2}}],["observe",{"2":{"258":1}}],["observed",{"2":{"76":4}}],["objects",{"2":{"146":3,"378":1,"388":1}}],["obtained",{"2":{"141":1,"261":2}}],["obtain",{"2":{"140":1,"146":2,"232":1,"319":1}}],["obvious",{"2":{"47":1}}],["ok",{"2":{"47":2,"215":1}}],["opportunity",{"2":{"160":1}}],["operate",{"2":{"241":1}}],["operators",{"2":{"89":1,"151":1}}],["operation",{"0":{"60":1},"2":{"344":1}}],["operations",{"2":{"30":1,"39":1,"178":1,"217":1,"218":1,"226":1,"264":1}}],["operational",{"2":{"8":1,"116":1,"141":1,"148":1}}],["openapi",{"2":{"373":1}}],["openssl",{"2":{"213":1}}],["opens",{"2":{"200":1}}],["open",{"2":{"21":1,"72":1,"124":1,"146":3,"149":1,"153":1,"157":1,"207":1,"215":2,"274":1,"275":1,"330":1,"338":2,"371":1,"383":1,"384":1,"389":1}}],["opening",{"2":{"12":1,"153":1,"199":1}}],["optionally",{"2":{"225":1,"232":1}}],["optional",{"2":{"188":1,"203":1}}],["option",{"2":{"15":2}}],["options",{"2":{"3":1,"74":2,"136":2,"194":1,"327":2,"388":2}}],["optimistic=true",{"2":{"274":1}}],["optimistic=false",{"2":{"274":1}}],["optimistically",{"2":{"274":1}}],["optimistic",{"0":{"188":1},"2":{"10":2,"157":1,"170":1,"183":1,"194":1}}],["optimizer",{"2":{"284":2}}],["optimized",{"0":{"284":1},"2":{"284":1}}],["optimize",{"0":{"10":1},"2":{"10":1,"277":1}}],["overlook",{"2":{"262":1}}],["overall",{"2":{"188":1}}],["override",{"2":{"107":1,"136":2,"274":1}}],["over",{"2":{"9":1,"89":1,"115":1,"179":3,"185":1,"188":2,"251":1,"319":1,"367":3,"368":1,"369":2,"373":1,"383":2}}],["overhead",{"2":{"7":2,"8":1,"10":1,"18":1,"156":1}}],["overview",{"0":{"115":1},"2":{"5":1,"120":1}}],["onwards",{"2":{"363":1}}],["onstart",{"2":{"178":1}}],["onto",{"2":{"170":1,"281":1}}],["once",{"0":{"140":1},"2":{"25":1,"81":1,"119":1,"125":1,"177":1,"188":1,"217":2,"218":1,"249":1,"252":1,"254":1,"280":1,"301":1,"325":1,"330":1,"335":1,"340":1}}],["onchain",{"2":{"8":1}}],["only",{"0":{"187":1},"2":{"10":2,"12":1,"15":1,"16":1,"63":1,"64":1,"135":1,"140":1,"167":1,"178":1,"187":1,"245":1,"296":1,"317":1,"326":1,"378":1,"383":6,"384":3}}],["ones",{"2":{"194":1}}],["one",{"2":{"7":1,"9":1,"19":1,"46":1,"76":3,"107":1,"119":1,"185":1,"188":1,"217":2,"230":1,"233":1,"243":1,"245":1,"261":2,"279":1,"297":1,"318":1,"320":2,"321":1,"327":1,"339":1,"349":1,"365":1,"373":1,"378":2,"383":2,"384":1,"388":1}}],["on",{"0":{"12":1,"14":1,"17":1,"147":1,"150":1,"261":1,"282":1,"286":1,"290":1},"1":{"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"262":1,"263":1,"283":1,"284":1,"285":1,"287":1,"288":1,"289":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1},"2":{"5":1,"6":1,"7":3,"8":4,"10":2,"12":5,"13":1,"14":6,"16":2,"17":1,"18":2,"30":1,"46":1,"49":4,"52":1,"55":2,"58":1,"59":1,"66":1,"71":2,"72":2,"89":1,"91":1,"93":1,"107":1,"118":1,"132":2,"133":2,"135":2,"136":8,"137":4,"140":7,"146":1,"147":2,"148":2,"149":1,"150":1,"151":1,"152":1,"153":1,"155":1,"157":2,"162":1,"167":1,"169":1,"175":1,"177":2,"183":1,"184":1,"188":1,"196":1,"199":3,"200":3,"214":1,"220":1,"221":1,"226":2,"229":1,"230":2,"232":1,"233":2,"237":2,"250":1,"252":1,"258":1,"261":6,"263":2,"268":1,"269":1,"270":1,"271":1,"273":2,"275":2,"277":1,"278":1,"281":2,"285":1,"287":1,"289":1,"290":2,"293":1,"294":1,"296":3,"297":2,"298":2,"301":6,"303":2,"307":2,"313":1,"314":1,"315":1,"317":3,"318":2,"320":1,"321":1,"322":1,"326":6,"330":1,"336":1,"339":1,"340":1,"345":1,"346":1,"347":1,"350":1,"351":1,"358":2,"368":1,"369":1,"371":1,"374":1,"382":1,"384":1,"388":1,"389":1}}],["our",{"2":{"5":2,"18":1,"46":1,"52":1,"59":1,"92":1,"102":1,"107":1,"113":1,"115":1,"117":1,"120":1,"135":1,"136":4,"137":1,"146":4,"148":1,"152":1,"153":1,"157":1,"167":1,"195":1,"199":1,"203":1,"216":1,"218":2,"224":2,"225":1,"226":2,"232":1,"250":2,"251":1,"252":1,"254":1,"263":1,"269":1,"275":1,"281":1,"283":1,"285":1,"287":3,"289":2,"293":1,"296":2,"303":1,"314":1,"317":2,"326":1,"327":2,"331":1,"336":1,"337":1,"340":1,"369":1,"371":1,"372":2,"374":2,"377":1,"378":3,"385":1,"387":1}}],["outline",{"2":{"382":1}}],["outside",{"2":{"279":1,"373":1}}],["outputs",{"2":{"388":1}}],["output",{"2":{"60":2,"74":2,"106":1,"124":2,"136":2,"137":2,"149":2,"150":2,"207":1,"209":1,"210":1,"215":1,"218":1,"225":1,"232":2,"251":1,"253":1,"254":1,"258":1,"274":1,"281":2,"285":1,"287":3,"289":5,"294":2,"302":1,"315":2,"326":2,"327":2,"328":1,"337":1,"339":2,"340":2,"344":1,"350":1,"371":1,"388":3}}],["out",{"0":{"107":1},"1":{"108":1,"109":1,"110":1,"111":1,"112":1,"113":1},"2":{"0":1,"11":1,"26":1,"30":1,"46":1,"107":2,"108":1,"113":1,"118":1,"151":1,"217":1,"254":1,"279":1,"283":1,"286":1,"296":2,"314":1,"317":2,"340":1,"368":1,"371":1,"385":1,"388":1}}],["others",{"2":{"389":1}}],["other",{"2":{"3":1,"7":2,"52":1,"70":1,"72":3,"107":1,"155":1,"157":2,"185":1,"194":1,"233":1,"274":1,"329":1,"366":1,"377":1,"382":1}}],["owner",{"2":{"289":2}}],["own",{"2":{"3":1,"7":3,"8":1,"11":1,"15":1,"100":1,"152":1,"157":1,"232":1,"267":1,"276":1,"313":1,"320":1,"322":1,"338":1,"371":1,"376":1}}],["original",{"2":{"79":1,"261":1}}],["originally",{"2":{"12":1,"297":1,"318":1}}],["orch",{"0":{"44":1},"2":{"41":3,"42":1,"43":1,"44":3,"45":2,"46":3,"47":1,"48":1,"49":1,"50":1,"52":1}}],["orchestrator",{"0":{"40":1},"1":{"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1},"2":{"41":2,"42":1,"44":1,"46":1,"52":1,"285":1,"286":1}}],["ordinals",{"2":{"13":1,"14":2,"200":1}}],["ordering",{"2":{"177":1,"185":2,"363":1}}],["ordered",{"2":{"170":1,"348":1}}],["order",{"2":{"8":1,"41":1,"45":1,"50":1,"76":1,"102":1,"106":1,"107":2,"111":1,"113":1,"152":1,"156":1,"187":1,"284":1,"285":1,"297":1,"318":1,"319":1,"348":1,"363":1,"385":1}}],["org",{"2":{"12":1,"203":1,"339":2}}],["organize",{"2":{"8":1}}],["oracles",{"2":{"9":1}}],["or",{"2":{"2":1,"4":1,"7":5,"8":1,"10":5,"16":1,"17":1,"18":1,"19":1,"25":1,"47":2,"72":1,"78":1,"79":1,"92":1,"102":1,"108":1,"119":1,"120":1,"130":1,"133":1,"147":1,"151":1,"157":4,"159":1,"162":1,"163":1,"167":1,"180":1,"183":1,"184":1,"188":1,"194":2,"196":1,"200":1,"216":1,"229":1,"230":1,"232":1,"233":1,"236":1,"242":2,"243":1,"262":1,"285":1,"294":1,"297":1,"301":3,"318":1,"320":2,"322":1,"349":1,"357":1,"363":1,"365":1,"366":1,"371":1,"372":1,"383":1,"384":1,"388":1}}],["offered",{"2":{"376":1}}],["offering",{"2":{"256":1}}],["offers",{"2":{"220":1}}],["offs",{"2":{"153":1,"156":1,"157":1}}],["offset",{"2":{"8":1}}],["offloading",{"2":{"15":1}}],["off",{"2":{"14":1,"106":1,"157":1,"261":1}}],["offchain",{"2":{"8":1}}],["official",{"2":{"0":1,"152":1}}],["of",{"0":{"6":1,"19":1,"90":1,"94":1,"101":1,"107":1,"196":1},"1":{"95":1,"96":1,"97":1,"98":1,"99":1,"102":1,"103":1,"104":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"197":1},"2":{"0":1,"2":1,"5":2,"7":6,"8":5,"9":2,"10":6,"11":1,"13":2,"14":8,"15":1,"16":3,"18":2,"19":1,"20":1,"24":1,"27":1,"30":3,"39":1,"41":3,"44":1,"45":1,"46":1,"50":1,"54":1,"63":4,"64":2,"70":1,"72":1,"74":1,"77":1,"78":1,"79":1,"80":1,"89":1,"90":1,"91":3,"96":4,"97":7,"98":8,"99":1,"101":3,"103":1,"107":3,"108":1,"109":1,"113":1,"115":2,"118":1,"121":1,"122":1,"123":1,"126":2,"129":2,"133":1,"135":1,"136":1,"140":3,"142":1,"143":2,"144":1,"145":1,"147":1,"148":1,"149":2,"150":3,"152":1,"153":2,"156":6,"157":5,"159":1,"161":2,"162":1,"167":1,"169":2,"170":2,"173":3,"174":2,"175":1,"177":1,"178":2,"180":1,"181":1,"185":1,"188":2,"194":3,"199":2,"200":4,"204":1,"208":1,"210":1,"212":1,"214":1,"215":1,"217":3,"218":1,"220":1,"221":1,"222":2,"225":2,"230":3,"232":6,"233":1,"241":2,"243":1,"244":1,"245":3,"251":1,"252":7,"253":1,"254":1,"256":2,"258":1,"259":1,"260":1,"261":5,"262":1,"263":2,"265":2,"267":1,"276":1,"277":1,"279":2,"283":1,"285":2,"287":1,"288":1,"289":1,"292":1,"302":1,"306":1,"313":1,"319":1,"321":1,"324":1,"327":1,"329":2,"332":1,"337":1,"340":1,"349":1,"350":1,"353":4,"358":1,"363":1,"364":3,"365":1,"366":2,"367":1,"368":1,"369":5,"371":3,"372":3,"373":4,"377":1,"378":2,"381":2,"382":4,"383":7,"384":11,"388":2}}],["md",{"2":{"373":1}}],["m",{"2":{"208":2}}],["my",{"2":{"208":1,"351":1,"352":1,"358":1,"360":1}}],["mykey4",{"2":{"259":1}}],["mykey3",{"2":{"259":1}}],["mykey2",{"2":{"259":1}}],["mykey",{"2":{"70":1,"218":2,"259":1}}],["ml",{"2":{"140":2,"143":2,"144":1,"145":2,"149":1,"150":1,"151":1}}],["mkdir",{"2":{"136":1,"281":1,"326":1,"340":1}}],["mnemonics",{"2":{"75":1,"136":1}}],["mnemonic",{"2":{"47":3,"71":2,"75":1,"222":2}}],["msgsubmitguessresponse",{"2":{"384":3,"385":2}}],["msgsubmitguess",{"2":{"384":1}}],["msgsubmitwordleresponse",{"2":{"383":2}}],["msgsubmitwordle",{"2":{"383":1,"388":1}}],["msgserver",{"2":{"383":1,"384":1}}],["msgsend",{"2":{"327":1}}],["msg=",{"2":{"135":10,"326":10}}],["msgchannelopenconfirm",{"2":{"76":1}}],["msgchannelopenack",{"2":{"76":1}}],["msgchannelopentry",{"2":{"76":1}}],["msgchannelopeninit",{"2":{"76":1}}],["msgupdateclient",{"2":{"76":4}}],["msg",{"2":{"45":1,"46":2,"47":1,"76":4,"383":7,"384":8}}],["much",{"2":{"372":1}}],["multiappconn",{"2":{"135":1,"326":1}}],["multiplier=1",{"2":{"63":1}}],["multiplier",{"2":{"63":2}}],["multiple",{"2":{"41":1,"119":1,"150":1,"181":1,"185":1,"188":1}}],["multi",{"2":{"41":1,"377":1}}],["must",{"2":{"7":1,"156":2,"194":1,"369":1,"372":1,"377":2,"383":2,"384":2}}],["mv",{"2":{"37":1}}],["mb",{"2":{"14":1}}],["middlewares",{"2":{"366":1}}],["middleware",{"2":{"242":1,"348":1,"366":2}}],["middleman",{"2":{"72":1}}],["mission",{"2":{"152":1}}],["missing",{"2":{"14":1}}],["mit",{"2":{"149":1,"215":2,"216":1}}],["might",{"2":{"101":1,"156":1,"181":1,"243":1,"331":1,"365":1}}],["migrate",{"2":{"45":2}}],["migratemsg",{"2":{"45":2}}],["millions",{"2":{"156":1}}],["milliseconds",{"2":{"10":1,"19":1}}],["milk",{"2":{"71":2,"75":2}}],["minutes",{"2":{"114":1,"157":1,"254":2,"281":6,"326":1}}],["minute",{"2":{"89":1,"281":8}}],["minus",{"2":{"79":1}}],["min",{"2":{"74":4,"136":4}}],["mind",{"2":{"18":1,"150":1,"174":1}}],["mine",{"2":{"208":2}}],["miner",{"2":{"14":1}}],["mined",{"2":{"14":1}}],["minimizes",{"2":{"372":1}}],["minimized",{"2":{"8":1,"64":1,"161":1,"170":1,"184":1}}],["minimization",{"2":{"188":1}}],["minimizing",{"2":{"157":1}}],["minimal",{"2":{"81":1,"153":1}}],["minimum",{"2":{"59":1,"63":1,"135":1,"226":2}}],["mining",{"2":{"14":1}}],["morning",{"2":{"324":1}}],["more",{"0":{"52":1,"262":1},"2":{"6":1,"7":1,"9":1,"12":1,"19":1,"26":1,"41":1,"42":1,"45":1,"46":1,"49":1,"52":2,"64":1,"81":1,"109":1,"111":1,"141":1,"144":1,"153":2,"162":1,"169":1,"194":1,"199":1,"220":1,"232":1,"245":2,"246":1,"256":1,"263":2,"278":1,"298":1,"320":1,"324":1,"325":1,"331":1,"332":1,"368":1,"371":1,"372":1}}],["mount",{"2":{"284":2}}],["monitoring",{"2":{"202":1,"389":1}}],["monitored",{"2":{"120":1}}],["monitor",{"2":{"114":1,"119":1,"120":1,"258":1}}],["months",{"2":{"7":1,"157":1}}],["mocha=",{"2":{"136":1}}],["mocha",{"0":{"136":1},"2":{"107":2,"135":1,"136":24,"163":1,"196":1,"230":1,"232":2,"233":1,"319":2,"320":6,"321":1,"322":1}}],["mock",{"0":{"243":1,"365":1},"2":{"88":2,"220":1,"243":3,"365":3}}],["mockcontract",{"2":{"45":1}}],["moment",{"2":{"47":1,"383":1}}],["moving",{"2":{"41":1,"388":1}}],["move",{"2":{"8":1,"18":1,"281":1,"285":1,"325":1}}],["modified",{"2":{"306":1,"385":1}}],["modify",{"0":{"146":1},"2":{"70":1,"145":1,"149":2,"218":1,"251":1,"260":2,"263":1,"275":1,"337":1}}],["mod",{"2":{"45":1,"67":3,"251":2}}],["modulename",{"2":{"383":1,"384":1}}],["modules",{"2":{"256":1,"371":1,"373":2,"376":3,"377":1}}],["module=baseapp",{"2":{"274":2}}],["module=blockmanager",{"2":{"60":1,"106":6,"108":4,"135":4,"258":3,"274":4,"281":6,"312":5,"326":4,"340":9,"344":2,"352":1}}],["module=main",{"2":{"239":1,"243":1,"344":4,"352":2,"360":2,"365":1}}],["module=grpc",{"2":{"135":1,"326":1}}],["module=polaris",{"2":{"312":2}}],["module=p2p",{"2":{"135":3,"326":3}}],["module=pubsub",{"2":{"135":1,"326":1}}],["module=proxy",{"2":{"135":1,"326":1}}],["module=events",{"2":{"135":1,"326":1}}],["module=abci",{"2":{"135":4,"326":4}}],["module=server",{"2":{"135":7,"274":17,"312":2,"326":7}}],["module=txindex",{"2":{"60":1,"106":2,"135":2,"258":1,"274":2,"281":1,"312":1,"326":2,"340":3}}],["module",{"0":{"376":1,"377":1},"1":{"377":1},"2":{"15":1,"16":1,"18":1,"45":1,"200":1,"338":1,"372":3,"376":4,"377":6,"378":2,"382":3}}],["modularism",{"2":{"18":1}}],["modularity",{"2":{"16":1,"20":1}}],["modular",{"2":{"10":1,"15":1,"152":1,"153":2,"157":1,"166":1,"196":2,"200":1,"256":1,"267":2,"269":1}}],["mode",{"2":{"74":4,"135":1,"136":4,"167":1,"213":1,"252":1,"258":1,"326":1}}],["models",{"2":{"140":1}}],["model",{"2":{"10":1,"140":1,"144":1}}],["modes",{"0":{"186":1},"1":{"187":1,"188":1,"189":1},"2":{"10":1}}],["mostly",{"2":{"16":1}}],["most",{"2":{"0":1,"14":1,"16":1,"41":1,"63":1,"242":1,"373":2,"382":1}}],["messaging",{"2":{"389":1}}],["messages",{"0":{"378":1},"1":{"379":1},"2":{"50":1,"72":1,"274":1,"278":1,"327":1,"352":1,"360":1,"371":1,"378":7,"380":1,"388":1}}],["message",{"0":{"379":1},"2":{"2":1,"72":1,"98":6,"108":3,"196":1,"239":1,"281":3,"288":1,"289":2,"302":1,"326":3,"339":1,"352":1,"376":2,"379":5,"381":2,"382":2,"388":2}}],["meet",{"2":{"258":1}}],["mean",{"2":{"388":1}}],["meaning",{"2":{"348":1,"371":1}}],["meanwhile",{"2":{"196":1}}],["means",{"2":{"7":1,"60":1,"151":1,"157":1,"349":1,"369":3,"383":2}}],["mentioned",{"2":{"158":1,"351":1}}],["meter",{"2":{"388":1}}],["metadata",{"2":{"104":1}}],["method",{"2":{"95":3,"245":1,"319":1,"385":1}}],["methods",{"2":{"16":3,"46":2,"173":1,"174":2,"188":1,"319":1,"385":1}}],["metrics",{"0":{"93":1,"94":1,"353":1},"1":{"94":1,"95":2,"96":2,"97":2,"98":2,"99":2,"100":1},"2":{"91":1,"93":4,"94":1,"98":1,"100":1,"353":6}}],["memory",{"2":{"243":1,"365":1}}],["memo",{"2":{"74":1,"136":2,"327":1,"388":1}}],["members",{"2":{"50":1}}],["mempoolttl=25",{"2":{"135":1,"326":1}}],["mempool",{"0":{"97":1,"177":1},"2":{"14":2,"63":1,"97":10,"107":3,"135":1,"177":3,"194":3,"326":1}}],["mev",{"2":{"9":1}}],["media",{"2":{"3":1}}],["map",{"2":{"381":3}}],["maple",{"2":{"71":2,"75":2}}],["maliciously",{"2":{"194":1}}],["made",{"2":{"135":1,"168":1,"200":2,"348":1}}],["maxbytes",{"2":{"364":1}}],["maximum",{"0":{"90":1},"2":{"90":1,"384":1}}],["maximalism",{"2":{"18":1}}],["max",{"2":{"74":2,"90":3,"91":1,"136":3,"384":1}}],["maid",{"2":{"47":1}}],["mainly",{"2":{"364":1,"366":1}}],["mainnet",{"2":{"229":1,"230":2,"233":1,"319":1}}],["maintains",{"2":{"54":1}}],["maintaining",{"2":{"10":1}}],["maintain",{"2":{"8":1}}],["main",{"2":{"2":1,"47":1,"124":3,"134":1,"157":1,"170":1,"230":1,"338":3,"373":1,"382":1}}],["macos",{"2":{"130":1,"133":1,"301":2,"371":1}}],["macro",{"2":{"46":1}}],["macros",{"2":{"46":2}}],["machines",{"2":{"159":1,"371":1}}],["machine",{"2":{"2":1,"9":1,"10":1,"59":1,"66":1,"132":1,"140":2,"148":1,"159":2,"201":1,"237":1,"267":1,"268":1,"269":1,"301":1,"306":1,"307":2,"358":1,"371":1}}],["manner",{"2":{"177":1}}],["many",{"2":{"155":1,"158":1,"162":1,"202":1,"376":1,"381":1,"389":1}}],["manifest",{"2":{"103":1,"104":3,"145":1}}],["managing",{"2":{"86":1,"156":1,"280":1,"325":1}}],["managed",{"2":{"245":1}}],["manager",{"0":{"178":1},"2":{"178":1}}],["manage",{"2":{"15":1,"127":1,"157":1,"245":1}}],["manually",{"2":{"44":1,"63":2,"124":1,"133":1}}],["matt",{"2":{"326":1,"339":1}}],["matter",{"2":{"43":1}}],["matches",{"2":{"352":2,"359":1,"360":1}}],["match",{"2":{"28":1}}],["materials",{"2":{"0":1,"3":1}}],["marked",{"2":{"60":1}}],["market",{"0":{"156":1},"2":{"12":1,"136":2,"157":2}}],["march",{"2":{"12":1}}],["maybe",{"2":{"185":2}}],["may",{"2":{"8":2,"59":1,"63":2,"76":1,"133":1,"152":1,"174":1,"181":1,"194":1,"203":1,"261":1,"297":1,"318":1}}],["making",{"2":{"2":1,"18":1,"200":1,"260":1,"261":1,"279":1}}],["makes",{"2":{"7":1,"41":1,"72":2,"363":1}}],["make",{"2":{"0":1,"2":1,"16":1,"18":1,"28":1,"39":1,"41":1,"59":2,"69":1,"73":1,"76":1,"78":1,"79":1,"91":1,"101":1,"118":1,"133":1,"136":1,"149":1,"153":1,"157":2,"184":1,"200":1,"202":2,"213":1,"241":1,"245":1,"247":1,"258":1,"260":1,"261":2,"262":1,"273":1,"274":1,"292":1,"293":1,"301":2,"311":1,"314":1,"321":1,"322":1,"330":1,"333":1,"350":1,"352":1,"360":1,"372":1,"378":1}}],["f159e11116ec9505fc2c0d97e605357fec0f3dae06b57bfb17ea6a548905043e",{"2":{"388":1}}],["f1a64151bd29",{"2":{"340":1}}],["f921884f4132",{"2":{"326":1}}],["fc0kermqylp8voivw8qfywgeldflbaufcmpm7tb7ptlb4opwzjaost6hbo",{"2":{"196":1}}],["fcfs",{"2":{"177":1,"363":1}}],["fwsrxeovry",{"2":{"196":1}}],["flu",{"2":{"281":1,"326":1,"340":1}}],["fluent",{"2":{"281":3,"326":3,"340":3}}],["float64",{"2":{"242":1}}],["flow",{"0":{"190":1},"1":{"191":1,"192":1,"193":1,"194":1},"2":{"190":1,"194":1}}],["flexible",{"2":{"181":1}}],["flexibility",{"2":{"155":1,"159":1,"168":1,"245":2}}],["flags=",{"2":{"209":1}}],["flags>",{"2":{"25":1}}],["flags",{"0":{"225":1,"232":1},"2":{"19":2,"59":1,"62":2,"63":1,"87":1,"89":2,"90":2,"104":1,"106":1,"209":1,"225":1,"226":1,"232":1,"233":1,"281":1,"326":1,"327":1,"339":1}}],["flag",{"2":{"19":2,"45":1,"62":1,"63":2,"70":1,"89":1,"90":1,"106":2,"196":1,"225":1,"232":1,"238":1,"239":1,"252":1,"319":1,"352":2,"353":2,"359":1,"360":1,"372":1}}],["f",{"2":{"146":6,"251":1,"258":1}}],["fn",{"2":{"45":2,"47":1,"57":2,"60":1}}],["far",{"2":{"245":1,"281":1,"326":1,"388":1}}],["fallbackfee=0",{"2":{"206":1}}],["false",{"2":{"136":2,"383":1}}],["familiar",{"2":{"152":1,"275":1,"303":1}}],["familiarity",{"2":{"152":1}}],["faucet",{"2":{"136":1,"196":2,"222":1,"319":1}}],["failed",{"2":{"97":2,"108":3,"215":1,"289":2}}],["failures",{"2":{"63":1}}],["face",{"2":{"157":1,"384":1}}],["factor",{"2":{"63":2}}],["facilitate",{"2":{"8":1,"16":1,"161":1,"256":1}}],["fast",{"2":{"48":1}}],["faster",{"2":{"19":1,"157":1,"185":1}}],["func",{"2":{"383":2,"384":1}}],["functionalities",{"2":{"263":1}}],["functionality",{"2":{"46":1,"93":1,"143":1,"215":1,"276":1,"366":1,"382":1}}],["functional",{"2":{"172":1,"306":1}}],["function",{"0":{"383":1,"384":1},"2":{"46":2,"149":2,"215":7,"216":2,"383":3,"384":1}}],["functions",{"0":{"382":1},"1":{"383":1,"384":1,"385":1},"2":{"16":1,"46":1,"215":1,"242":2,"261":1,"364":1,"366":1,"373":2,"382":1,"385":1}}],["fun",{"2":{"372":1,"388":1}}],["funded",{"2":{"136":2,"290":1,"294":1,"297":1,"315":1,"318":1,"319":1}}],["funding",{"2":{"108":1}}],["fund",{"0":{"109":1},"2":{"107":1,"136":2,"221":1,"222":1,"230":2,"275":1,"292":1,"297":1,"303":2,"318":1,"320":1}}],["funds",{"0":{"71":1,"107":1,"292":1,"313":1},"1":{"108":1,"109":1,"110":1,"111":1,"112":1,"113":1},"2":{"71":2,"107":1,"313":1}}],["furthermore",{"2":{"147":1,"167":2}}],["further",{"2":{"24":1,"151":1,"277":1,"289":1,"345":1,"348":1,"369":1}}],["future",{"0":{"389":1},"2":{"18":1,"156":1,"158":1,"194":1,"367":1,"384":1,"388":1}}],["fullnode",{"2":{"57":2}}],["fully",{"2":{"8":2,"172":1,"179":1,"183":1,"245":1,"262":1,"263":1,"306":1,"319":1,"320":1,"332":1}}],["full",{"0":{"53":1,"56":1,"59":1,"60":1,"183":1,"187":1},"1":{"54":1,"55":1,"56":1,"57":2,"58":2,"59":2,"60":1,"61":1},"2":{"7":1,"19":1,"41":1,"48":1,"52":1,"54":2,"57":1,"59":3,"60":2,"61":1,"91":1,"156":1,"157":2,"166":1,"167":1,"169":1,"170":1,"174":1,"183":1,"187":1,"188":7,"194":6}}],["fen",{"2":{"281":3}}],["few",{"2":{"245":1,"326":1,"352":1,"369":1,"383":1,"385":1,"388":1}}],["fetch",{"2":{"146":1,"188":1}}],["feature",{"2":{"89":1}}],["features",{"0":{"22":1,"49":1,"83":1},"2":{"20":1,"22":1,"42":1,"83":1,"88":1,"153":1,"162":1}}],["feb",{"2":{"14":1}}],["feel",{"2":{"384":1}}],["feegrants",{"2":{"74":2,"136":2}}],["fee",{"0":{"111":1,"113":1},"2":{"12":1,"76":4,"107":3,"108":1,"111":1,"113":1,"274":2,"327":1,"388":1}}],["fees",{"2":{"10":1,"76":4,"78":1,"79":2,"120":1,"136":1,"327":1}}],["feedback",{"0":{"4":1},"2":{"4":1}}],["front",{"2":{"389":2}}],["frontend",{"0":{"293":1,"296":1,"297":1,"314":1,"317":1,"318":1},"1":{"294":1,"295":1,"296":1,"297":1,"298":1,"315":1,"316":1,"317":1,"318":1},"2":{"290":1,"293":1,"296":8,"297":1,"298":1,"314":1,"317":8,"318":1}}],["from=base",{"2":{"251":4}}],["from",{"0":{"78":1,"79":1},"2":{"2":1,"4":1,"9":2,"11":1,"45":1,"46":1,"57":1,"58":1,"59":1,"60":1,"62":1,"70":1,"72":1,"78":2,"79":2,"89":1,"98":1,"106":1,"124":1,"136":1,"149":2,"150":1,"157":3,"158":1,"170":1,"174":1,"188":1,"208":1,"211":1,"216":1,"218":1,"222":2,"223":1,"226":1,"229":1,"231":1,"243":1,"251":6,"252":2,"261":2,"274":1,"285":1,"288":1,"289":1,"294":1,"296":2,"297":1,"315":1,"317":2,"318":1,"319":1,"321":1,"327":3,"331":1,"337":1,"364":1,"365":1,"366":2,"372":2,"376":1,"377":1,"378":1,"382":1,"383":2,"385":1,"388":8}}],["fresh",{"2":{"372":1}}],["fred",{"2":{"289":3}}],["frequency",{"2":{"178":1}}],["free",{"0":{"11":1},"2":{"9":1,"301":1,"384":1}}],["freedom",{"2":{"7":1,"153":1}}],["fraudulent",{"2":{"157":1,"188":2}}],["fraud",{"0":{"188":1,"194":1},"2":{"7":1,"67":1,"157":1,"162":1,"167":1,"170":2,"173":1,"181":1,"183":2,"184":1,"188":7,"190":1,"194":1}}],["framework",{"0":{"7":1},"1":{"8":1,"9":1,"10":1,"11":1},"2":{"6":1,"7":1,"12":1,"14":1,"15":1,"39":1,"41":1,"91":1,"153":2,"157":1,"162":1,"267":2,"269":1,"342":1}}],["five",{"2":{"369":2,"388":1}}],["fit",{"2":{"168":1,"241":1}}],["finish",{"2":{"204":1,"211":1}}],["finished",{"2":{"149":1,"215":2,"294":1,"315":1}}],["finalizing",{"2":{"312":1}}],["finalized",{"2":{"106":2,"135":1,"170":1,"258":1,"274":3,"281":2,"312":1,"326":1,"340":3,"344":1}}],["finalizeblock",{"2":{"99":1}}],["finality",{"2":{"225":1,"232":1,"241":1,"243":1}}],["final",{"2":{"52":1,"379":1}}],["finally",{"2":{"38":1,"137":1,"147":1,"233":1}}],["finding",{"2":{"226":1}}],["find",{"2":{"0":1,"4":1,"5":1,"45":1,"46":2,"52":1,"91":2,"124":1,"145":1,"188":1,"194":1,"320":1,"322":1}}],["fixed",{"2":{"63":1}}],["fix",{"2":{"18":1,"146":1,"220":1}}],["fixing",{"2":{"2":1}}],["filter",{"2":{"136":1}}],["file",{"0":{"37":1,"44":1,"57":1,"252":1,"385":1},"2":{"24":3,"30":2,"42":1,"44":2,"45":4,"47":1,"50":1,"57":2,"74":2,"86":2,"93":2,"121":1,"123":3,"124":5,"125":2,"126":1,"127":1,"134":1,"145":1,"146":8,"147":1,"215":1,"222":2,"251":2,"252":2,"259":1,"275":1,"337":1,"338":4,"344":1,"373":4,"383":1,"384":1,"385":2,"387":1}}],["filesystem",{"2":{"301":1}}],["files",{"2":{"3":1,"50":1,"145":1,"146":1,"149":1,"202":1,"215":1,"251":4,"260":2,"275":1,"281":1,"294":1,"315":1,"326":1,"337":1,"339":1,"373":2,"385":1,"387":1}}],["fill",{"2":{"11":1,"118":1,"385":1}}],["firstly",{"2":{"74":1}}],["first",{"0":{"7":1,"120":1},"1":{"8":1,"9":1,"10":1,"11":1},"2":{"6":1,"12":1,"29":1,"57":1,"91":1,"106":1,"109":1,"115":1,"116":1,"119":1,"120":1,"135":1,"150":1,"177":2,"185":2,"199":1,"202":1,"210":1,"214":1,"218":1,"225":1,"232":1,"241":1,"243":1,"251":1,"260":1,"261":1,"271":1,"283":1,"285":1,"287":1,"293":1,"296":1,"301":1,"303":1,"311":1,"314":1,"317":1,"321":1,"327":1,"337":1,"365":1,"368":1,"372":2,"378":1,"383":2,"385":1}}],["four",{"2":{"157":1,"259":1}}],["foundation",{"2":{"372":1}}],["foundations",{"2":{"241":1}}],["foundryup",{"2":{"291":1,"311":1}}],["foundry",{"0":{"204":1,"291":1,"310":1},"2":{"204":3,"214":3,"215":1,"291":2,"294":1,"310":1,"315":1,"372":1}}],["found",{"2":{"14":1,"76":2,"133":1,"169":1,"173":1,"336":1,"339":1,"344":3}}],["food",{"2":{"145":2,"149":1,"150":1}}],["folder",{"2":{"50":1,"208":1,"212":1}}],["follows",{"2":{"85":1,"173":1}}],["follow",{"2":{"13":1,"27":1,"30":1,"112":1,"123":1,"220":1,"258":1,"260":1,"269":1,"270":1,"275":1,"303":1,"313":1,"320":1,"363":1}}],["following",{"2":{"1":1,"9":1,"21":1,"22":1,"23":1,"25":1,"26":1,"28":1,"30":2,"38":1,"39":1,"41":1,"50":1,"59":1,"71":2,"74":1,"81":1,"82":1,"83":1,"84":1,"86":1,"87":1,"88":1,"89":1,"94":1,"103":1,"104":2,"109":1,"122":1,"124":1,"127":1,"131":1,"134":1,"143":1,"146":2,"149":1,"150":1,"163":2,"178":1,"179":1,"195":1,"196":1,"205":1,"207":1,"208":1,"211":1,"212":1,"215":4,"216":1,"218":1,"222":3,"232":1,"237":1,"239":2,"240":1,"251":3,"252":1,"253":1,"254":2,"258":2,"260":2,"261":5,"268":1,"281":1,"284":1,"286":1,"287":1,"288":1,"291":1,"301":1,"304":1,"307":1,"313":1,"326":1,"327":1,"337":3,"338":3,"339":2,"340":3,"343":1,"350":1,"351":1,"352":2,"353":1,"354":1,"358":1,"360":2,"361":1,"369":1,"371":1,"372":1,"375":1,"376":1,"377":2,"379":1,"382":1,"383":3,"384":3,"385":1,"387":1,"388":3}}],["foam",{"2":{"47":1}}],["focus",{"2":{"8":1,"76":3,"140":1,"250":1,"275":3,"294":1,"312":3,"315":1,"327":1,"328":4,"336":1}}],["forced",{"0":{"355":1},"2":{"366":1}}],["forgotten",{"2":{"281":3}}],["forget",{"2":{"173":1}}],["forge",{"2":{"149":3,"215":3,"216":1,"294":1,"315":1}}],["forth",{"2":{"227":1,"234":1}}],["formula",{"2":{"135":1}}],["formatting",{"2":{"146":1}}],["formatted",{"2":{"146":2,"147":1}}],["format",{"2":{"74":2,"136":2,"259":1,"281":1,"326":1,"338":3,"340":1,"383":1,"384":2}}],["form",{"2":{"11":1,"18":1,"118":1}}],["forward",{"2":{"8":1,"388":1}}],["forkchoice",{"2":{"274":3}}],["forking",{"0":{"194":1}}],["forks",{"2":{"8":1}}],["fork",{"2":{"2":3,"7":1,"10":1,"174":1,"185":3,"194":1,"217":1}}],["for",{"0":{"10":1,"27":1,"207":1,"225":1,"232":1,"256":1,"299":1},"1":{"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1},"2":{"0":1,"2":1,"3":1,"4":1,"6":1,"7":3,"8":2,"9":1,"10":2,"12":3,"13":2,"14":2,"15":3,"16":5,"17":1,"18":1,"19":1,"23":1,"24":1,"27":1,"28":1,"29":1,"30":1,"38":1,"39":3,"41":2,"45":3,"46":4,"49":3,"50":2,"52":1,"57":2,"59":1,"60":1,"62":1,"64":3,"67":1,"72":1,"75":1,"76":3,"78":1,"86":1,"89":2,"90":1,"91":1,"95":1,"100":1,"106":3,"111":1,"119":1,"124":1,"126":1,"129":2,"132":1,"133":1,"135":1,"136":1,"140":2,"144":2,"145":1,"146":3,"147":3,"149":2,"151":2,"153":3,"156":4,"157":4,"160":1,"161":3,"162":1,"168":1,"169":1,"172":1,"173":1,"174":1,"175":1,"178":4,"179":2,"183":2,"184":1,"185":3,"190":1,"194":1,"195":1,"196":2,"199":1,"200":4,"203":1,"206":1,"209":1,"213":1,"214":1,"215":2,"220":2,"222":2,"225":5,"226":3,"229":1,"230":1,"232":4,"233":2,"236":1,"240":1,"242":2,"243":2,"245":3,"250":1,"251":1,"252":6,"256":2,"259":1,"261":2,"263":1,"267":2,"269":1,"270":1,"274":5,"278":2,"279":5,"281":2,"283":1,"285":2,"286":2,"287":1,"288":1,"289":1,"292":1,"294":2,"301":1,"306":1,"315":1,"319":1,"322":1,"324":2,"326":4,"327":2,"328":1,"332":1,"336":1,"337":1,"338":1,"339":2,"340":1,"348":1,"349":1,"350":1,"357":1,"363":3,"364":1,"365":2,"366":3,"367":2,"368":2,"369":5,"371":6,"372":1,"373":6,"376":3,"377":4,"378":2,"380":1,"381":1,"382":3,"383":6,"384":10,"385":2,"387":1,"388":5,"389":1}}],["rly",{"2":{"73":2,"75":1,"76":2,"136":8}}],["rpcuser",{"2":{"213":1}}],["rpcuser=rpcuser",{"2":{"206":1,"207":1,"208":4,"209":2}}],["rpcpass",{"2":{"213":1}}],["rpcpassword=rpcpass",{"2":{"206":1,"207":1,"208":4,"209":2}}],["rpcport=18332",{"2":{"206":1,"207":1,"208":4,"209":2}}],["rpc",{"0":{"179":1},"1":{"180":1},"2":{"59":2,"70":1,"74":2,"118":1,"135":1,"136":3,"149":4,"150":2,"179":6,"196":4,"217":6,"218":3,"225":2,"273":1,"281":1,"289":2,"290":1,"294":4,"295":2,"297":1,"302":2,"303":1,"315":4,"316":2,"318":1,"319":2,"320":1,"321":1,"326":1}}],["rpcs",{"2":{"9":1}}],["rt",{"2":{"47":2}}],["rs",{"2":{"45":4,"46":2,"50":4}}],["r",{"2":{"37":2,"136":1,"137":1,"223":1,"225":1,"232":1,"285":1,"287":1,"289":1,"321":2,"383":2,"388":1}}],["rm",{"2":{"31":1,"203":2,"223":1,"251":1,"283":1,"284":1}}],["rf",{"2":{"31":1,"103":1,"203":1,"212":1,"223":1}}],["rol",{"2":{"254":1}}],["rollupid=test",{"2":{"365":1}}],["rollupid=my",{"2":{"352":1,"360":1}}],["rollupid",{"2":{"350":1,"352":1,"360":1,"364":3}}],["rollup=",{"2":{"136":1,"137":1}}],["rollup>d",{"2":{"126":3}}],["rollup",{"0":{"7":1,"27":1,"53":1,"67":1,"78":1,"79":1,"105":1,"106":1,"107":1,"110":1,"112":1,"114":1,"117":1,"125":1,"128":1,"133":1,"135":1,"139":1,"159":1,"160":1,"163":1,"198":1,"213":1,"218":1,"224":1,"226":1,"233":1,"238":1,"239":1,"245":1,"266":1,"279":1,"281":1,"290":1,"322":1,"323":1,"326":1,"344":1},"1":{"8":1,"9":1,"10":1,"11":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"106":1,"107":1,"108":2,"109":2,"110":2,"111":2,"112":2,"113":2,"115":1,"116":1,"117":1,"118":2,"119":1,"120":1,"126":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"164":1,"165":1,"166":1,"167":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":2,"215":2,"216":2,"217":2,"218":2,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"280":1,"281":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1},"2":{"6":1,"7":2,"8":1,"12":2,"13":1,"14":1,"17":1,"19":2,"24":1,"27":2,"30":3,"38":1,"39":3,"57":1,"60":2,"62":1,"63":3,"64":2,"67":2,"71":1,"87":2,"89":2,"91":8,"105":1,"106":8,"107":1,"110":1,"112":1,"113":1,"114":1,"115":2,"116":1,"117":1,"118":2,"119":1,"120":2,"121":1,"123":1,"124":3,"125":1,"127":2,"129":6,"133":4,"135":1,"136":13,"137":3,"138":1,"140":2,"153":1,"157":4,"159":1,"160":2,"164":1,"165":1,"170":3,"172":1,"173":1,"174":2,"175":1,"178":2,"179":5,"181":3,"183":1,"184":2,"185":3,"187":3,"190":2,"194":5,"196":1,"199":1,"205":1,"213":1,"218":1,"220":4,"221":1,"222":1,"223":2,"224":2,"225":1,"226":4,"227":1,"229":2,"230":2,"233":3,"234":1,"238":1,"239":3,"240":1,"241":1,"245":3,"251":1,"252":3,"256":1,"258":2,"261":3,"264":1,"265":1,"267":2,"276":1,"277":3,"280":1,"281":6,"285":1,"290":2,"293":1,"298":2,"306":1,"312":2,"314":1,"321":1,"322":1,"324":4,"326":7,"327":1,"329":3,"330":1,"331":2,"338":1,"342":2,"344":1,"345":2,"348":2,"350":3,"351":3,"352":6,"358":2,"359":2,"360":4,"363":1,"364":2,"365":1,"366":4,"367":1,"387":1}}],["rollups",{"0":{"12":1},"1":{"13":1,"14":1,"15":1,"16":1,"17":1,"18":1},"2":{"3":1,"6":1,"7":6,"8":4,"9":2,"10":3,"12":5,"13":1,"14":1,"15":2,"18":3,"107":1,"153":4,"157":8,"158":1,"161":4,"163":1,"167":1,"183":1,"185":3,"187":2,"189":1,"199":2,"200":6,"220":1,"245":2,"267":1,"269":1}}],["rollkitheight=11",{"2":{"312":1}}],["rollkitlatesttag",{"2":{"122":1,"131":1,"251":1,"343":1,"368":1}}],["rollkitigniteappversion",{"2":{"21":1,"82":1,"375":1}}],["rollkit",{"0":{"0":1,"7":1,"12":1,"15":1,"16":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"80":1,"82":1,"83":1,"86":1,"121":1,"122":1,"123":1,"124":1,"125":1,"131":1,"134":1,"142":1,"148":1,"152":1,"153":1,"154":1,"157":1,"158":1,"162":1,"170":1,"182":1,"256":1,"257":1,"266":1,"269":1,"282":1,"299":1,"302":1,"306":1,"311":1,"343":1,"363":1,"374":1,"375":1},"1":{"1":1,"2":1,"3":1,"4":1,"8":1,"9":1,"10":1,"11":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"122":1,"123":1,"124":2,"125":1,"126":2,"127":1,"149":1,"153":1,"154":1,"155":2,"156":2,"157":1,"158":1,"159":2,"160":2,"161":2,"162":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":2,"184":2,"185":2,"186":1,"187":1,"188":1,"189":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"283":1,"284":1,"285":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1,"314":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"375":1},"2":{"0":2,"3":3,"6":2,"7":5,"9":3,"10":5,"11":1,"12":5,"13":2,"15":3,"16":3,"17":2,"18":4,"19":7,"20":2,"21":2,"22":4,"23":3,"24":5,"25":3,"26":1,"30":3,"37":1,"38":2,"39":3,"54":1,"55":2,"57":1,"59":3,"61":1,"62":4,"63":5,"64":1,"67":5,"70":1,"80":1,"82":4,"83":2,"85":2,"86":5,"87":5,"88":2,"89":7,"90":4,"91":6,"92":1,"93":1,"103":8,"104":3,"105":1,"106":1,"107":1,"113":1,"114":1,"116":1,"118":2,"121":2,"122":3,"123":2,"124":6,"125":3,"126":4,"127":2,"129":1,"130":2,"131":3,"132":1,"133":1,"134":3,"135":3,"136":2,"137":3,"140":2,"141":1,"142":2,"146":4,"148":2,"149":3,"151":2,"152":2,"153":3,"157":8,"158":1,"159":2,"160":2,"162":2,"163":1,"167":3,"168":3,"169":5,"170":1,"172":1,"173":6,"174":1,"175":3,"178":3,"179":1,"181":2,"182":1,"184":1,"185":1,"187":1,"188":6,"189":1,"195":1,"196":8,"199":6,"200":5,"213":5,"220":1,"225":4,"226":3,"229":2,"231":1,"232":6,"233":5,"236":1,"237":1,"238":1,"239":4,"241":3,"243":1,"244":1,"245":1,"251":18,"252":8,"254":3,"255":1,"256":1,"257":3,"258":1,"265":2,"267":2,"269":2,"271":1,"272":4,"274":2,"276":2,"277":1,"278":1,"279":1,"281":7,"283":2,"289":1,"293":1,"294":1,"299":1,"300":3,"301":1,"302":1,"305":2,"306":6,"307":1,"308":1,"309":2,"312":2,"315":1,"319":1,"320":2,"321":1,"324":1,"326":12,"327":1,"329":1,"332":1,"338":10,"339":2,"340":4,"341":1,"342":2,"343":3,"344":4,"345":2,"348":1,"349":1,"350":1,"352":10,"357":1,"358":2,"359":2,"360":5,"363":4,"364":2,"365":1,"366":3,"367":2,"368":2,"374":1,"375":4,"387":5,"388":4,"390":1}}],["routing",{"2":{"376":1}}],["routines",{"2":{"178":2}}],["round",{"2":{"196":1}}],["rosm",{"0":{"196":1,"197":1},"1":{"197":1},"2":{"196":9,"197":1}}],["roadmap",{"2":{"157":1}}],["root=0x9676648a3c292540562b082c20c4b6663986182f5d8733f84fb3f1445b66a4ce",{"2":{"274":1}}],["root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037",{"2":{"274":4}}],["roots",{"2":{"188":1,"274":1}}],["rootcodespace",{"2":{"107":1}}],["root",{"2":{"30":2,"39":1,"57":2,"60":1,"74":2,"103":1,"124":1,"134":1,"150":1,"185":1,"204":1,"208":2,"251":4,"252":1,"260":2,"274":3,"283":1,"285":1,"337":1,"344":4}}],["risk",{"2":{"156":1}}],["right",{"2":{"72":1,"118":1,"321":1,"369":1,"385":1}}],["rich",{"2":{"9":1}}],["rid",{"2":{"8":1}}],["rustpub",{"2":{"46":1}}],["rustuse",{"2":{"45":1,"47":1}}],["rust",{"2":{"41":1,"45":2,"46":1,"279":1,"284":2,"285":1,"286":1}}],["rustcounter",{"2":{"41":1}}],["rule",{"0":{"120":1},"2":{"10":1,"136":1,"185":3}}],["rules",{"2":{"8":1,"369":2}}],["runs",{"2":{"107":1,"108":1,"132":1,"232":1,"271":1,"332":1}}],["runtime",{"2":{"47":3,"251":2,"256":2,"260":1,"262":1,"337":1}}],["running",{"0":{"107":1,"125":1,"132":1,"206":1,"213":1,"221":1,"226":1,"230":1,"233":1,"319":1,"387":1},"1":{"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"126":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"222":1,"320":1,"321":1,"322":1},"2":{"13":1,"30":1,"55":2,"59":1,"61":1,"63":1,"66":1,"70":2,"86":2,"87":1,"107":1,"109":1,"110":1,"113":1,"133":3,"135":1,"148":1,"167":1,"184":1,"205":2,"208":1,"213":1,"215":1,"217":1,"222":1,"224":2,"226":1,"229":1,"233":1,"236":1,"239":1,"241":1,"245":2,"249":1,"251":3,"252":2,"253":1,"254":7,"258":1,"260":1,"264":1,"267":1,"270":1,"273":1,"274":1,"278":2,"280":2,"281":8,"283":1,"285":1,"296":1,"301":2,"304":1,"306":1,"307":1,"312":1,"317":1,"319":1,"320":1,"325":2,"326":10,"327":2,"335":2,"337":2,"339":4,"340":8,"345":1,"348":1,"349":2,"351":2,"352":1,"357":1,"360":1,"368":2,"375":1,"387":2,"389":1}}],["run",{"0":{"67":1,"68":1,"70":1,"239":1,"253":1,"258":1,"271":1,"274":1,"308":1,"339":1,"344":1,"351":1,"352":1,"360":1,"386":1},"1":{"69":1,"70":1,"387":1,"388":1,"389":1},"2":{"1":2,"8":1,"12":1,"17":1,"18":1,"21":1,"22":1,"23":1,"30":2,"44":1,"54":1,"59":2,"67":3,"70":1,"81":1,"82":2,"88":1,"91":2,"92":1,"103":1,"106":2,"109":1,"121":1,"124":1,"125":1,"127":1,"130":1,"131":1,"132":1,"146":1,"147":3,"149":2,"153":1,"167":1,"175":1,"178":3,"199":1,"203":1,"204":1,"207":1,"208":1,"211":1,"214":1,"215":1,"216":1,"218":1,"222":2,"226":1,"237":2,"250":3,"251":14,"252":1,"253":2,"255":1,"258":1,"274":1,"280":1,"281":4,"283":2,"284":2,"285":1,"291":1,"294":1,"299":1,"301":1,"305":1,"306":1,"307":1,"308":1,"315":1,"320":3,"325":1,"326":4,"330":1,"336":2,"337":3,"338":4,"339":6,"340":1,"341":1,"343":1,"358":2,"366":1,"371":2,"372":1,"375":1,"379":1,"387":2,"388":1}}],["ram",{"2":{"201":1}}],["raw",{"2":{"179":1,"289":1,"388":2}}],["rabbit",{"2":{"162":1}}],["rather",{"2":{"157":2}}],["ratio",{"2":{"14":1}}],["rapid",{"2":{"153":1}}],["rand",{"2":{"213":1,"232":1,"320":1}}],["ran",{"2":{"104":1,"106":1,"107":1,"149":1,"178":1,"294":1,"315":1,"372":1}}],["range",{"0":{"114":1},"1":{"115":1,"116":1,"117":1,"118":1,"119":1,"120":1},"2":{"5":1,"91":2,"114":1,"115":1,"117":1,"118":2,"119":1,"383":1}}],["raise",{"2":{"4":1}}],["reward",{"2":{"383":3,"384":4,"385":1}}],["revealed",{"2":{"389":1}}],["reverse",{"2":{"281":1,"326":1,"339":1,"340":1}}],["revisit",{"2":{"243":1,"365":1}}],["review",{"2":{"2":1,"41":3,"48":1,"278":1}}],["reentrancy",{"2":{"263":1}}],["reorganization",{"2":{"225":1,"232":1}}],["remainder",{"2":{"285":1,"313":1}}],["remaining",{"2":{"188":1,"202":1}}],["remotely",{"2":{"281":2}}],["removeguess",{"2":{"384":1}}],["remove",{"2":{"7":1,"8":1,"60":1,"251":1,"384":1}}],["remember",{"2":{"208":1,"383":1}}],["reuse",{"2":{"157":1,"181":1,"376":1}}],["registry",{"2":{"284":1}}],["register",{"2":{"107":1,"289":3}}],["regtest",{"2":{"205":1,"206":1,"207":1,"208":4,"209":2,"212":1}}],["regret",{"2":{"136":2,"306":1}}],["reiterate",{"2":{"111":1}}],["rejected",{"2":{"97":2}}],["replay",{"2":{"187":1}}],["replacements",{"2":{"261":2}}],["replacement",{"2":{"172":1,"388":1}}],["replace",{"2":{"67":1,"74":1,"146":2,"173":2,"211":1,"225":1,"232":1,"261":2,"338":3,"383":1,"384":1}}],["repositories",{"2":{"389":1}}],["repository",{"0":{"257":1,"272":1,"300":1},"2":{"0":1,"1":1,"2":2,"4":1,"48":1,"133":1,"173":2,"257":1,"272":1,"278":1,"293":1,"300":1,"309":1,"314":1,"338":1}}],["reports",{"2":{"353":1}}],["report",{"2":{"93":1}}],["repo",{"0":{"309":1},"2":{"52":1,"145":1,"261":1}}],["recipent=",{"2":{"274":1}}],["recipientmodule",{"2":{"385":1}}],["recipientaddr",{"2":{"385":1}}],["recipient",{"2":{"274":1}}],["record",{"2":{"188":1,"289":2}}],["recommend",{"2":{"113":1,"368":1}}],["recommended",{"2":{"64":1,"184":1,"332":1}}],["receipts",{"2":{"149":2,"294":2,"315":2}}],["receives",{"2":{"348":1}}],["receive",{"2":{"98":2,"157":1,"170":1,"178":2}}],["receiver=",{"2":{"297":1,"318":1}}],["receiver",{"2":{"78":2,"79":1,"136":1,"297":1,"318":1,"328":1}}],["received",{"2":{"75":1,"98":2,"178":2,"274":3,"348":1}}],["receiving",{"2":{"64":1}}],["rechecked",{"2":{"97":1}}],["recheck",{"2":{"97":1}}],["recreate",{"2":{"30":1}}],["recruit",{"2":{"7":1}}],["reducing",{"2":{"41":1}}],["reduce",{"0":{"113":1},"2":{"10":1,"157":1}}],["rebuild",{"0":{"30":1},"2":{"30":1,"224":1,"251":1,"337":1}}],["retrieving",{"2":{"319":1}}],["retrieves",{"2":{"366":1}}],["retrieved",{"2":{"274":1}}],["retrieve",{"2":{"178":1,"259":1,"319":1}}],["retrieveloop",{"2":{"178":3}}],["retrieveblocks",{"2":{"16":1,"174":1}}],["retrieveblock",{"2":{"16":1}}],["returning",{"2":{"177":1}}],["returned",{"2":{"99":1,"180":1,"281":1,"326":1,"339":1}}],["returns",{"2":{"45":1,"46":2,"215":1,"242":1,"364":4}}],["return",{"2":{"45":1,"63":1,"73":1,"76":1,"78":1,"79":1,"215":1,"260":1,"383":7,"384":7}}],["retain",{"2":{"7":1}}],["reach",{"2":{"384":1}}],["reached",{"2":{"384":1}}],["real",{"2":{"117":1,"119":1,"185":2,"243":1,"263":1}}],["reality",{"2":{"13":1,"14":1}}],["reasons",{"2":{"190":1}}],["reason",{"2":{"101":1}}],["readme",{"2":{"373":2}}],["ready",{"2":{"18":1,"19":1,"41":1,"59":1,"87":1,"91":1,"162":1,"213":1,"245":1,"247":1,"302":1,"333":1,"349":1}}],["reading",{"2":{"16":1,"151":1}}],["reader",{"2":{"16":2}}],["read",{"2":{"16":3,"81":1,"153":1,"194":1,"199":1,"217":1,"218":1,"371":1,"373":1,"388":1}}],["res=2",{"2":{"274":1}}],["res=0",{"2":{"106":2,"135":1,"258":1,"281":2,"312":1,"326":1,"340":3,"344":1}}],["respective",{"2":{"250":1,"376":1}}],["responsible",{"2":{"178":1,"185":1,"363":1,"373":1,"376":1,"377":1}}],["response",{"2":{"46":2,"289":1,"388":3}}],["resource",{"2":{"169":1,"184":1}}],["resources",{"2":{"8":1,"9":1,"145":3,"149":1,"150":1,"155":1,"156":1,"157":2}}],["resolve",{"2":{"161":1,"289":1}}],["resist",{"2":{"136":2}}],["resistance",{"2":{"12":1,"185":1}}],["restrict",{"2":{"159":1}}],["restricted",{"2":{"155":1}}],["rest",{"2":{"157":1}}],["restarted",{"2":{"113":1}}],["restarting",{"0":{"112":1,"212":1},"2":{"106":1,"111":1,"113":1}}],["restart",{"0":{"105":1,"106":1,"107":1,"113":1},"1":{"106":1,"107":1,"108":2,"109":2,"110":2,"111":2,"112":2,"113":2},"2":{"91":1,"105":1,"106":3,"107":2,"108":1,"112":1,"164":1,"260":2,"275":1}}],["restore",{"2":{"75":2,"136":3}}],["results",{"2":{"194":1,"196":1}}],["result",{"2":{"47":1,"194":1,"196":1,"215":1,"225":1,"232":1,"321":2}}],["reseting",{"2":{"101":1}}],["reset",{"0":{"101":1},"1":{"102":1,"103":1,"104":1},"2":{"31":3,"46":3,"101":2,"103":1,"104":2}}],["resetting",{"0":{"31":1}}],["research",{"2":{"12":1,"13":1,"15":1,"18":1}}],["rent",{"2":{"10":1}}],["refresh",{"2":{"371":1}}],["refreshed",{"2":{"274":1}}],["refactored",{"2":{"366":1,"384":1}}],["refused",{"2":{"194":1}}],["refers",{"2":{"185":1}}],["refer",{"2":{"49":1,"220":1,"263":1}}],["references",{"2":{"382":1}}],["reference",{"2":{"0":1,"3":1,"50":1,"149":1,"285":1}}],["refined",{"2":{"9":1}}],["reliable",{"2":{"220":1}}],["rely",{"2":{"140":1,"183":1}}],["relying",{"2":{"8":1}}],["relatively",{"2":{"336":1}}],["related",{"2":{"9":1}}],["relays",{"2":{"364":1,"366":1}}],["relayed",{"2":{"78":1,"79":1}}],["relayers",{"2":{"72":2}}],["relayer",{"0":{"72":1,"73":1,"74":1,"75":1},"1":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1},"2":{"64":1,"72":4,"73":2,"74":3,"136":14}}],["relaying",{"0":{"72":1,"77":1},"1":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1},"2":{"75":1,"77":1}}],["relay",{"2":{"70":1,"71":2,"79":1}}],["relevant",{"2":{"28":1,"114":1}}],["relevantly",{"2":{"2":1}}],["release",{"2":{"9":1,"173":1,"222":1,"306":1}}],["requisites",{"0":{"65":1,"247":1,"333":1,"368":1},"1":{"66":1}}],["requisities",{"0":{"28":1}}],["require",{"2":{"157":1,"188":1}}],["requirements",{"0":{"66":1}}],["required",{"2":{"10":1,"129":1,"242":1,"324":1}}],["requires",{"2":{"8":1,"156":2,"185":2,"205":1,"225":1,"232":1,"284":1,"301":1}}],["requesting",{"2":{"274":1}}],["requested",{"2":{"180":1}}],["request",{"2":{"2":2,"196":1,"289":1,"330":1}}],["re",{"0":{"109":1},"2":{"2":1,"7":1,"8":1,"11":1,"12":1,"16":1,"19":1,"30":3,"41":1,"45":1,"46":1,"70":1,"103":1,"104":1,"107":2,"143":2,"152":1,"155":1,"162":2,"167":1,"168":2,"184":1,"213":1,"225":1,"304":1,"321":1}}],["tsx",{"2":{"296":1,"317":1}}],["ttl",{"2":{"135":1,"326":1}}],["tmp",{"2":{"132":1,"136":2}}],["txindex=1",{"2":{"206":1}}],["txt",{"2":{"146":1,"147":1,"150":1}}],["txhash",{"2":{"137":1,"285":1,"289":1,"327":1,"388":6}}],["txs",{"2":{"96":2,"97":3,"98":1,"106":2,"135":1,"196":2,"258":1,"274":1,"281":2,"312":1,"326":1,"340":3,"344":1}}],["txs=0",{"2":{"60":1,"312":1}}],["tx",{"2":{"76":4,"78":2,"79":1,"97":1,"107":2,"120":1,"126":2,"136":6,"137":3,"285":1,"286":1,"287":1,"288":1,"289":2,"327":1,"385":1,"388":7}}],["two",{"2":{"76":1,"190":1,"225":1,"242":1,"252":1,"327":1,"381":1}}],["tweet",{"2":{"14":1}}],["tcp",{"2":{"58":1,"59":4,"78":2,"79":3,"120":1,"135":2,"254":2,"281":14,"326":13,"338":1,"339":2,"340":9}}],["title",{"2":{"384":2,"385":1}}],["ti",{"2":{"259":1}}],["timberio",{"2":{"281":1,"326":1,"340":1}}],["timing",{"2":{"95":2}}],["timezone",{"2":{"389":1}}],["timer",{"2":{"178":3}}],["time=1000",{"2":{"135":1,"326":1}}],["time=1m0s",{"2":{"89":1}}],["time=30s",{"2":{"62":1}}],["timeout",{"2":{"74":5,"136":5,"327":1,"388":2}}],["timestamp",{"2":{"196":1,"275":1,"289":1,"364":2,"388":1}}],["times",{"2":{"19":2,"97":2,"384":2}}],["time",{"0":{"62":1,"156":1},"2":{"7":1,"10":1,"14":1,"19":5,"41":1,"44":1,"62":3,"89":4,"91":1,"99":2,"117":1,"119":1,"120":1,"156":1,"157":2,"185":2,"196":3,"222":1,"225":3,"230":1,"232":3,"241":1,"250":1,"281":1,"326":1,"336":1,"339":1,"350":1,"373":1,"382":1,"383":2,"384":2,"385":1,"389":1}}],["tia",{"0":{"128":1},"1":{"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1},"2":{"91":1,"107":1,"113":2,"129":3,"135":1,"136":3,"137":1,"138":1,"230":2,"319":1}}],["tidy",{"2":{"67":1}}],["tip",{"2":{"28":1,"30":1,"60":1,"67":1,"70":1,"76":1,"78":1,"129":1,"133":1,"150":1,"152":1,"214":1,"225":1,"232":2,"246":1,"256":1,"258":1,"261":2,"266":1,"279":1,"290":1,"296":1,"299":1,"306":1,"317":1,"319":1,"320":1,"324":1,"327":1,"330":1,"332":1,"349":1,"351":1,"367":1,"388":1}}],["troubleshooting",{"0":{"278":1}}],["trigger",{"2":{"378":1}}],["triggering",{"2":{"274":1}}],["tries",{"2":{"369":2,"384":2}}],["triple",{"2":{"76":1}}],["trying",{"2":{"388":1}}],["try",{"2":{"216":1,"261":1,"289":1,"383":1,"384":2,"388":3}}],["true",{"2":{"74":2,"156":1,"213":2,"383":1}}],["trusted",{"2":{"8":1}}],["trust",{"2":{"8":2,"64":2,"71":2,"75":2,"157":1,"161":1,"170":1,"184":1,"188":1}}],["traefik",{"2":{"281":1,"326":1,"340":1}}],["tradeoffs",{"2":{"157":1}}],["trade",{"2":{"153":1,"156":1,"157":1}}],["tracked",{"2":{"306":1}}],["track",{"2":{"109":1,"346":1,"347":1}}],["tracking",{"2":{"64":1,"377":1}}],["transport",{"2":{"338":1}}],["transitions",{"2":{"378":1}}],["transition",{"2":{"188":2}}],["transient",{"2":{"63":1}}],["transfers",{"2":{"136":1,"161":1,"377":2}}],["transfer",{"0":{"78":1,"79":1},"2":{"76":11,"77":1,"78":5,"79":4,"135":2,"136":4,"288":2,"297":1,"318":1}}],["transact",{"2":{"76":4,"194":1}}],["transactionindex",{"2":{"150":1}}],["transactionhash",{"2":{"150":1}}],["transaction",{"0":{"35":1,"190":1,"191":1,"192":1},"1":{"191":1,"192":1,"193":1,"194":1},"2":{"14":2,"35":1,"63":2,"76":5,"78":1,"79":1,"97":1,"107":2,"120":3,"137":2,"169":1,"179":1,"185":1,"190":1,"194":6,"256":1,"285":1,"287":1,"327":6,"328":1,"353":5,"363":1,"366":1,"376":1,"388":8}}],["transactions",{"0":{"36":1,"137":1,"327":1},"2":{"14":1,"16":1,"36":1,"54":1,"60":1,"89":2,"96":2,"97":5,"98":1,"114":1,"115":1,"117":1,"119":2,"120":1,"129":1,"157":2,"167":1,"170":1,"177":2,"179":2,"181":1,"185":2,"187":1,"188":2,"190":1,"194":2,"196":1,"217":1,"218":1,"302":1,"324":1,"326":1,"348":2,"350":1,"354":1,"361":1,"363":1,"364":2,"366":2,"377":1,"378":1,"387":1,"388":2}}],["traits",{"2":{"46":1}}],["tlht0okdlzs1o4gb1d1ku+xug+",{"2":{"327":1}}],["tls",{"2":{"213":1}}],["tl",{"0":{"13":1}}],["tech",{"2":{"281":1,"326":1,"339":1}}],["technology",{"2":{"261":1}}],["techniques",{"2":{"147":1}}],["technical",{"0":{"169":1},"2":{"3":1}}],["team",{"2":{"279":1,"284":1}}],["teach",{"2":{"105":1}}],["tether",{"2":{"187":1}}],["telegram",{"2":{"92":1,"167":1}}],["text",{"2":{"74":1}}],["termination",{"2":{"76":8}}],["terminal",{"2":{"21":1,"29":1,"57":1,"67":1,"70":1,"81":1,"82":1,"110":1,"131":1,"133":1,"207":1,"254":1,"274":1,"297":1,"308":1,"311":1,"318":1,"322":1,"343":1,"371":3,"389":1}}],["terms",{"2":{"72":1}}],["template",{"2":{"373":1}}],["temp",{"2":{"37":2}}],["tendermint",{"2":{"31":1,"76":8,"104":1,"196":1}}],["testutil",{"2":{"373":1}}],["testapp",{"2":{"321":1}}],["testdecrement",{"2":{"215":2}}],["testincrement",{"2":{"215":2}}],["testing",{"2":{"41":1,"52":1,"101":1,"240":1,"243":1,"259":4,"275":1,"365":1,"373":1}}],["testgetcount",{"2":{"215":2}}],["testnetmainnet",{"2":{"232":1}}],["testnets",{"2":{"227":1,"229":1}}],["testnet",{"0":{"68":1,"70":1,"136":1,"163":1,"195":1,"196":1,"222":1},"1":{"69":1,"70":1,"164":1,"165":1,"166":1,"167":1,"196":1,"197":2},"2":{"64":1,"70":3,"74":2,"76":6,"77":1,"78":2,"79":1,"107":2,"135":1,"136":4,"163":1,"195":1,"197":1,"199":1,"217":1,"221":2,"222":2,"225":2,"226":1,"230":2,"232":1,"233":2,"261":1,"319":3,"320":1,"322":1}}],["tests",{"0":{"215":1},"2":{"47":2,"215":1}}],["test",{"0":{"259":1},"2":{"9":1,"17":2,"33":1,"34":1,"35":1,"41":3,"74":3,"78":1,"91":1,"104":1,"109":1,"120":1,"136":5,"137":2,"172":1,"203":1,"215":10,"216":1,"217":1,"218":2,"221":1,"259":2,"265":1,"277":1,"285":2,"288":1,"289":1,"327":2,"339":1,"385":1,"388":6}}],["tested",{"2":{"9":1,"216":1,"218":1}}],["t",{"2":{"8":1,"28":1,"67":1,"107":1,"109":1,"116":1,"135":1,"151":1,"173":1,"183":1,"197":1,"215":2,"251":1,"301":1,"308":1,"327":1,"337":1,"369":1,"384":2,"388":1}}],["tag",{"2":{"251":1,"337":1}}],["tags",{"2":{"95":1,"96":1,"97":1,"98":1,"99":1,"353":1}}],["tar",{"2":{"202":1,"203":4}}],["targeted",{"2":{"368":1}}],["target=",{"2":{"284":2}}],["target",{"2":{"45":3,"284":1}}],["tasks",{"2":{"202":1}}],["taking",{"2":{"160":1}}],["takes",{"2":{"157":1,"379":1}}],["taken",{"2":{"124":1,"289":1}}],["take",{"0":{"8":1},"2":{"287":1,"326":1,"371":1,"385":1}}],["tailored",{"2":{"159":1}}],["tail",{"2":{"136":1,"251":1}}],["tab",{"2":{"118":1,"119":1,"120":1}}],["table",{"0":{"6":1}}],["talk",{"2":{"72":1}}],["talking",{"2":{"72":1}}],["taproot",{"0":{"14":1},"2":{"13":1,"14":5,"16":3,"200":1}}],["tap",{"2":{"7":1}}],["typical",{"2":{"190":1}}],["typically",{"2":{"185":1}}],["typing",{"2":{"7":1}}],["type=light",{"2":{"320":1}}],["type=hash",{"2":{"287":1,"388":1}}],["type=volume",{"2":{"284":2}}],["typed",{"2":{"107":1}}],["type",{"2":{"74":4,"76":4,"95":2,"96":1,"97":1,"98":5,"99":1,"109":1,"136":4,"150":1,"161":1,"196":1,"242":1,"327":5,"353":1,"373":1,"381":3,"383":1,"384":3,"388":2}}],["types",{"0":{"182":1,"380":1,"381":1},"1":{"183":1,"184":1,"185":1,"381":1},"2":{"50":1,"76":4,"371":1,"380":1,"383":8,"384":9,"385":1}}],["typos",{"2":{"2":1}}],["tue",{"2":{"326":1,"339":1}}],["turing",{"0":{"222":1},"2":{"221":2,"222":3,"225":3,"226":1}}],["turtorial",{"2":{"104":1}}],["turning",{"2":{"20":1}}],["turn",{"0":{"20":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1},"2":{"8":1,"89":1,"91":1,"93":1}}],["tube",{"2":{"41":1}}],["tutorial",{"0":{"64":1,"139":1,"198":1},"1":{"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1},"2":{"19":1,"26":1,"64":1,"102":2,"106":1,"116":1,"124":2,"129":2,"144":1,"145":1,"195":1,"199":2,"213":1,"214":1,"220":4,"223":1,"229":2,"231":1,"236":2,"246":1,"247":1,"250":1,"254":1,"261":6,"267":1,"275":1,"279":3,"285":1,"290":2,"292":1,"303":1,"306":2,"313":1,"319":1,"322":1,"324":2,"331":1,"332":2,"333":1,"336":1,"337":1,"338":1,"340":1,"349":3,"357":2,"367":3,"368":1,"371":1,"373":1}}],["tutorials",{"2":{"0":1,"3":1,"91":1,"145":1,"149":1,"150":1,"152":1,"162":1,"163":2,"167":1,"243":2,"245":2,"349":1,"365":2}}],["tuned",{"2":{"6":1}}],["thu",{"2":{"281":1}}],["thus",{"2":{"150":1}}],["throttler",{"2":{"263":1}}],["throughout",{"2":{"43":1,"153":1,"256":1}}],["through",{"2":{"5":1,"8":1,"14":2,"19":1,"20":1,"27":1,"72":1,"80":1,"91":1,"101":1,"121":1,"129":1,"157":1,"178":3,"194":1,"200":1,"220":2,"261":1,"267":1,"269":1,"319":1,"324":1,"368":1}}],["three",{"2":{"115":1,"232":1}}],["though",{"2":{"388":1}}],["thousands",{"2":{"14":1}}],["those",{"2":{"26":1,"49":1,"156":1,"163":1,"243":1,"365":1,"369":1}}],["thanks",{"2":{"15":1,"172":1}}],["than",{"2":{"14":2,"16":1,"41":2,"63":1,"78":1,"114":1,"118":1,"157":2,"185":1,"245":1,"256":1,"297":1,"318":1,"388":1}}],["that",{"2":{"7":3,"8":4,"9":1,"10":1,"12":2,"14":4,"16":3,"18":2,"22":1,"30":2,"45":1,"46":1,"47":1,"48":1,"49":2,"50":1,"51":1,"60":1,"62":1,"63":1,"72":1,"75":1,"87":1,"91":1,"106":3,"107":5,"119":3,"120":1,"123":1,"124":1,"129":1,"133":1,"135":1,"136":1,"138":1,"140":2,"145":1,"146":1,"147":3,"149":1,"150":1,"153":2,"155":1,"157":2,"160":1,"161":1,"163":1,"173":1,"174":1,"178":2,"184":1,"187":2,"188":4,"194":1,"200":2,"202":1,"203":1,"212":1,"213":1,"216":1,"217":1,"218":1,"220":2,"222":1,"227":1,"229":1,"230":1,"232":1,"234":1,"236":1,"239":1,"241":3,"243":4,"244":2,"245":3,"254":1,"256":2,"261":2,"263":2,"273":2,"274":1,"278":2,"281":1,"285":1,"288":1,"289":2,"290":1,"297":2,"302":1,"305":1,"306":2,"318":2,"324":1,"326":1,"327":1,"329":1,"330":1,"336":1,"338":1,"340":1,"344":1,"345":1,"348":3,"349":3,"352":2,"357":1,"360":1,"365":3,"366":2,"368":1,"369":2,"372":2,"373":2,"378":1,"379":1,"381":2,"382":1,"383":2,"384":6,"385":1,"387":1,"388":2,"389":2}}],["third",{"2":{"366":1}}],["things",{"2":{"245":2,"383":1,"384":1,"388":1}}],["think",{"2":{"161":1,"372":1}}],["thinking",{"2":{"11":1}}],["this",{"0":{"108":1},"2":{"1":1,"2":2,"4":1,"5":1,"7":3,"8":6,"9":2,"11":1,"15":1,"16":1,"18":1,"20":2,"24":3,"26":1,"27":1,"28":3,"30":1,"39":1,"41":4,"43":1,"45":3,"46":1,"48":1,"50":1,"54":1,"59":2,"60":1,"62":1,"63":2,"64":2,"70":4,"72":1,"74":1,"75":1,"76":3,"78":3,"79":2,"80":1,"81":2,"82":1,"86":1,"87":1,"89":3,"90":1,"91":1,"93":1,"101":3,"102":1,"103":1,"104":1,"105":1,"106":1,"107":7,"108":1,"114":1,"115":1,"121":1,"122":1,"123":1,"124":2,"127":1,"129":2,"132":1,"133":1,"135":1,"140":3,"142":2,"143":1,"144":2,"147":1,"148":2,"156":1,"157":1,"160":1,"170":1,"172":1,"174":1,"177":1,"181":1,"185":1,"188":2,"194":1,"199":2,"200":1,"204":1,"205":1,"208":2,"214":1,"215":1,"216":1,"220":3,"224":1,"225":2,"226":1,"229":1,"232":4,"236":1,"237":1,"240":1,"241":1,"243":1,"245":2,"246":1,"250":2,"251":4,"254":1,"256":1,"258":2,"259":1,"261":2,"264":1,"265":1,"267":1,"271":1,"274":1,"276":1,"279":3,"281":2,"284":1,"285":2,"287":2,"289":1,"290":2,"292":1,"296":1,"297":1,"299":1,"301":2,"304":1,"305":1,"306":3,"312":1,"313":1,"317":1,"318":1,"319":1,"320":2,"324":2,"326":3,"327":2,"332":3,"336":2,"337":2,"338":2,"339":1,"340":1,"349":3,"352":1,"357":1,"358":1,"365":1,"367":3,"368":1,"369":3,"371":3,"372":2,"373":1,"377":1,"379":1,"381":2,"383":5,"384":4,"385":2,"387":2,"388":5,"389":1}}],["these",{"2":{"16":2,"39":1,"46":1,"59":1,"72":1,"76":1,"77":1,"88":1,"91":1,"98":1,"104":1,"123":1,"127":1,"136":1,"146":1,"157":2,"178":1,"188":2,"202":1,"203":1,"240":1,"245":1,"256":1,"258":1,"260":1,"262":1,"263":1,"267":1,"319":1,"345":1,"351":1,"354":1,"361":1,"378":1,"387":1}}],["therefore",{"2":{"167":1}}],["there",{"2":{"10":2,"14":1,"72":1,"89":1,"107":1,"174":1,"188":1,"194":1,"229":1,"245":2,"259":1,"336":1,"366":1,"369":2,"383":1,"388":1,"389":1}}],["they",{"2":{"7":3,"8":3,"157":1,"161":2,"168":1,"183":2,"184":1,"194":2,"242":1,"251":1,"256":1,"269":1,"348":1,"384":1}}],["then",{"2":{"7":1,"14":1,"19":1,"45":2,"76":1,"78":1,"79":1,"133":1,"147":1,"149":1,"150":1,"188":2,"194":1,"199":1,"217":2,"218":1,"237":1,"251":3,"254":1,"283":1,"311":1,"337":3,"340":1,"352":1,"358":1,"366":2,"383":2,"384":3,"388":1}}],["their",{"2":{"3":1,"7":3,"8":3,"15":1,"93":1,"94":1,"114":1,"152":2,"157":2,"159":1,"188":1,"194":2,"242":1,"250":1,"369":1}}],["themselves",{"2":{"188":1}}],["them",{"2":{"2":1,"7":1,"8":1,"18":1,"46":1,"49":1,"76":1,"104":1,"170":1,"194":1,"225":1,"232":1,"263":1,"366":1,"378":1}}],["the",{"0":{"1":1,"7":1,"9":1,"32":1,"35":2,"37":1,"38":1,"47":1,"59":1,"90":1,"101":1,"111":1,"142":1,"143":1,"150":1,"200":1,"207":1,"212":1,"213":1,"215":1,"216":1,"218":1,"238":1,"254":1,"257":1,"260":1,"264":1,"272":1,"273":1,"274":1,"283":1,"294":1,"295":1,"296":1,"297":1,"300":1,"304":1,"309":1,"311":1,"315":1,"316":1,"317":1,"318":1,"322":1,"340":1,"350":1,"351":1,"359":1,"370":1,"372":1,"376":1,"386":1,"388":1,"389":1},"1":{"8":1,"9":1,"10":1,"11":1,"102":1,"103":1,"104":1,"214":1,"215":1,"216":1,"217":1,"218":1,"371":1,"372":1,"373":1,"377":1,"387":1,"388":1,"389":1},"2":{"0":2,"1":2,"2":3,"3":3,"4":2,"6":1,"7":11,"8":8,"9":5,"10":10,"12":6,"13":2,"14":10,"16":13,"17":3,"18":5,"19":7,"20":1,"21":2,"22":1,"23":1,"24":5,"25":1,"27":3,"28":1,"29":2,"30":10,"32":2,"33":1,"34":1,"35":2,"36":1,"37":1,"38":3,"39":6,"41":8,"42":1,"43":2,"44":1,"45":7,"46":9,"47":2,"48":3,"49":6,"50":6,"51":1,"52":3,"54":2,"55":2,"57":8,"58":2,"59":9,"60":3,"62":4,"63":22,"64":2,"67":6,"70":6,"71":2,"72":7,"74":3,"75":3,"76":2,"78":4,"79":6,"80":1,"81":3,"82":4,"83":1,"84":1,"85":1,"86":5,"87":4,"88":1,"89":4,"90":2,"91":4,"92":1,"93":4,"94":1,"96":3,"97":3,"99":1,"100":2,"101":4,"102":2,"103":4,"104":5,"106":7,"107":13,"108":3,"109":2,"110":1,"111":3,"112":1,"113":4,"114":1,"115":3,"116":1,"118":5,"119":4,"120":4,"121":2,"122":2,"123":2,"124":10,"125":4,"126":2,"127":2,"129":8,"130":3,"131":4,"132":1,"133":5,"134":4,"135":6,"136":13,"137":2,"138":1,"140":5,"141":1,"142":1,"143":3,"145":7,"146":7,"147":8,"148":1,"149":7,"150":11,"152":2,"153":4,"155":2,"156":7,"157":18,"158":1,"159":2,"160":3,"161":1,"162":4,"163":2,"167":4,"168":3,"169":3,"170":4,"173":7,"174":5,"175":3,"177":4,"178":14,"179":8,"180":4,"181":3,"182":1,"184":1,"185":2,"187":2,"188":6,"190":2,"194":31,"195":4,"196":5,"197":1,"199":2,"200":3,"202":3,"203":1,"204":2,"205":2,"206":1,"207":1,"208":2,"209":2,"210":4,"211":7,"212":3,"213":5,"214":4,"215":11,"216":3,"217":8,"218":12,"220":4,"221":1,"222":7,"223":3,"224":2,"225":9,"226":3,"229":3,"230":2,"231":1,"232":17,"233":3,"236":3,"237":3,"238":3,"239":4,"241":5,"242":5,"243":5,"244":1,"245":8,"246":1,"247":1,"249":1,"250":2,"251":32,"252":27,"253":2,"254":16,"255":2,"256":3,"257":1,"258":7,"259":6,"260":11,"261":18,"263":1,"264":2,"265":1,"267":2,"268":1,"269":3,"270":1,"272":2,"273":3,"274":2,"275":3,"276":1,"277":1,"278":4,"279":6,"280":4,"281":12,"283":8,"284":5,"285":16,"286":2,"287":6,"288":2,"289":8,"291":1,"292":2,"293":1,"294":5,"295":1,"296":6,"297":5,"300":2,"301":6,"302":4,"303":3,"304":3,"306":3,"307":1,"309":2,"311":1,"312":1,"313":2,"314":2,"315":4,"316":1,"317":6,"318":5,"319":7,"320":5,"321":3,"322":3,"324":4,"325":3,"326":14,"327":8,"328":3,"329":4,"330":5,"331":2,"332":2,"333":1,"335":3,"336":6,"337":16,"338":18,"339":5,"340":23,"341":2,"342":2,"343":4,"344":2,"346":1,"347":1,"348":11,"349":8,"350":7,"351":3,"352":10,"353":9,"354":1,"357":3,"358":4,"359":5,"360":4,"361":1,"362":1,"363":3,"364":6,"365":4,"366":17,"367":6,"368":6,"369":19,"371":3,"372":8,"373":10,"375":2,"376":4,"377":9,"378":7,"379":4,"380":2,"381":6,"382":12,"383":24,"384":35,"385":8,"387":5,"388":39,"389":6}}],["tomorrow",{"2":{"384":1}}],["tomlentrypoint",{"2":{"124":1,"134":1}}],["tomlcounter",{"2":{"47":1}}],["toml",{"0":{"44":1,"123":1,"124":1,"134":1},"1":{"124":1},"2":{"24":4,"30":4,"39":1,"42":1,"44":3,"50":3,"57":1,"86":3,"93":1,"103":1,"104":3,"121":1,"123":1,"124":7,"125":2,"126":1,"127":1,"134":3,"222":4,"251":7,"260":2,"387":2,"388":1}}],["together",{"2":{"373":1}}],["touch",{"2":{"222":1}}],["touppercase",{"2":{"135":1}}],["toutf8",{"2":{"135":1}}],["tohex",{"2":{"135":1}}],["top",{"2":{"107":1,"118":1,"188":1}}],["topics",{"2":{"2":1,"5":1,"91":1}}],["total",{"2":{"78":1,"79":1,"96":2,"97":1,"98":4,"136":1,"196":3,"287":1,"289":2,"295":1,"316":1,"328":2}}],["tokio",{"2":{"47":2}}],["token=$",{"2":{"232":3}}],["tokens",{"2":{"8":1,"75":1,"77":1,"107":1,"109":1,"156":1,"222":1,"275":1,"303":1,"369":1}}],["token",{"0":{"78":1,"79":1,"128":2},"1":{"129":2,"130":2,"131":2,"132":2,"133":2,"134":2,"135":2,"136":2,"137":2,"138":2},"2":{"7":1,"8":3,"10":3,"29":1,"34":1,"78":1,"79":1,"91":2,"129":5,"135":2,"137":1,"138":1,"161":1,"232":9,"233":2,"274":1,"319":1,"321":2,"350":3,"383":1,"384":1}}],["towards",{"2":{"18":1,"188":1}}],["today",{"2":{"12":1,"162":1,"383":1,"384":3,"388":1}}],["too",{"2":{"319":1}}],["tool",{"2":{"133":1,"261":2,"262":1,"284":1,"371":1}}],["tools",{"2":{"9":1,"172":1,"261":1,"267":1,"275":1,"303":1}}],["toolings",{"2":{"371":1}}],["tooling",{"2":{"7":1,"9":1,"160":1}}],["took",{"2":{"7":2,"16":1}}],["to",{"0":{"16":1,"19":1,"20":1,"22":1,"27":1,"33":1,"44":1,"58":1,"62":1,"63":1,"78":1,"79":1,"80":2,"89":1,"90":1,"91":1,"93":1,"101":1,"105":1,"114":1,"121":1,"124":1,"128":1,"136":1,"144":1,"148":1,"156":1,"197":1,"218":1,"226":1,"233":1,"238":2,"262":1,"359":2,"363":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"81":2,"82":2,"83":2,"84":2,"85":2,"86":2,"87":2,"88":2,"92":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"102":1,"103":1,"104":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"145":1,"146":1,"147":1,"149":1},"2":{"0":2,"1":1,"2":4,"3":1,"5":2,"7":13,"8":13,"9":6,"10":8,"11":1,"12":6,"13":1,"14":7,"15":2,"16":9,"17":2,"18":7,"19":6,"21":1,"22":2,"23":3,"24":3,"25":1,"26":2,"27":1,"28":3,"30":3,"33":1,"41":9,"42":1,"43":2,"44":3,"45":8,"46":3,"47":2,"48":1,"49":5,"50":5,"52":1,"54":2,"55":1,"57":1,"58":1,"59":6,"60":3,"62":2,"63":5,"64":3,"67":3,"70":5,"72":3,"75":1,"76":2,"78":3,"79":2,"80":1,"81":2,"82":1,"85":1,"86":2,"87":4,"88":1,"89":5,"90":1,"91":6,"93":1,"98":4,"101":2,"102":2,"103":1,"104":2,"105":1,"106":10,"107":12,"108":1,"109":3,"111":4,"113":2,"114":1,"116":2,"118":1,"119":2,"120":1,"121":1,"122":1,"123":2,"124":5,"126":1,"129":2,"130":1,"131":1,"132":2,"133":4,"134":2,"135":4,"136":2,"138":1,"140":2,"143":1,"145":3,"146":8,"147":6,"148":1,"149":5,"150":5,"151":1,"152":7,"153":5,"155":2,"156":6,"157":13,"158":2,"159":4,"160":4,"161":3,"162":6,"163":2,"167":3,"168":3,"169":2,"170":1,"172":2,"173":4,"174":3,"175":2,"178":3,"180":1,"181":3,"185":4,"187":2,"188":7,"190":1,"194":10,"196":2,"197":2,"199":8,"200":7,"202":2,"203":2,"204":1,"207":1,"208":2,"209":1,"211":3,"212":1,"213":2,"215":4,"216":3,"217":2,"218":8,"220":4,"221":1,"222":3,"223":1,"224":3,"225":3,"226":1,"227":1,"229":1,"230":3,"232":7,"233":1,"234":1,"237":2,"238":3,"239":2,"240":2,"241":7,"242":2,"244":2,"245":4,"246":2,"250":4,"251":8,"252":7,"254":2,"255":1,"256":4,"258":2,"260":5,"261":4,"262":3,"263":6,"264":1,"265":1,"269":1,"270":1,"272":1,"273":2,"274":2,"275":3,"277":2,"278":1,"279":3,"280":3,"281":3,"283":1,"284":3,"285":5,"286":1,"289":6,"290":1,"291":1,"292":2,"294":3,"295":1,"296":3,"297":5,"298":1,"300":1,"301":4,"302":2,"303":4,"304":1,"305":1,"306":5,"307":1,"308":1,"309":2,"312":4,"313":3,"314":1,"315":3,"316":1,"317":3,"318":5,"319":8,"320":8,"321":3,"322":2,"324":2,"325":3,"326":3,"327":6,"329":4,"330":5,"331":3,"332":2,"335":1,"336":2,"337":5,"338":7,"339":3,"340":4,"341":1,"342":2,"343":1,"344":1,"345":1,"349":4,"350":4,"352":8,"353":2,"354":2,"358":2,"359":4,"360":2,"361":2,"362":1,"363":4,"364":1,"366":5,"367":3,"368":3,"369":6,"371":3,"372":5,"373":3,"374":1,"375":3,"376":2,"377":1,"378":5,"379":1,"380":1,"381":2,"382":3,"383":9,"384":11,"385":7,"387":3,"388":13,"389":4,"390":1}}]],"serializationVersion":2}';export{e as default}; diff --git a/pr-528/assets/chunks/VPLocalSearchBox.2WiG7WtP.js b/pr-528/assets/chunks/VPLocalSearchBox.2WiG7WtP.js new file mode 100644 index 000000000..342b45fc8 --- /dev/null +++ b/pr-528/assets/chunks/VPLocalSearchBox.2WiG7WtP.js @@ -0,0 +1,7 @@ +var Ft=Object.defineProperty;var Ot=(a,e,t)=>e in a?Ft(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Me=(a,e,t)=>Ot(a,typeof e!="symbol"?e+"":e,t);import{V as Rt,p as ie,h as me,a5 as et,a6 as Ct,a7 as Mt,q as $e,a8 as At,d as Lt,D as xe,a9 as tt,aa as Dt,ab as zt,s as Pt,ac as jt,v as Ae,P as he,O as Se,ad as Vt,ae as $t,W as Bt,R as Wt,$ as Kt,o as H,b as Jt,j as S,a0 as Ut,k as L,af as qt,ag as Gt,ah as Ht,c as Z,n as st,e as _e,C as nt,F as it,a as fe,t as pe,ai as Qt,aj as rt,ak as Yt,al as Zt,am as Xt,an as es,_ as ts}from"./framework.B8-VHxRu.js";import{u as ss,c as ns}from"./theme.Ds20UUID.js";const is={root:()=>Rt(()=>import("./@localSearchIndexroot.BvuN70QE.js"),[])};/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var mt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=mt.join(","),gt=typeof Element>"u",ae=gt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fe=!gt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},Oe=function a(e,t){var s;t===void 0&&(t=!0);var n=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),r=n===""||n==="true",i=r||t&&e&&a(e.parentNode);return i},rs=function(e){var t,s=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return s===""||s==="true"},bt=function(e,t,s){if(Oe(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ae.call(e,Ne)&&n.unshift(e),n=n.filter(s),n},yt=function a(e,t,s){for(var n=[],r=Array.from(e);r.length;){var i=r.shift();if(!Oe(i,!1))if(i.tagName==="SLOT"){var o=i.assignedElements(),l=o.length?o:i.children,c=a(l,!0,s);s.flatten?n.push.apply(n,c):n.push({scopeParent:i,candidates:c})}else{var h=ae.call(i,Ne);h&&s.filter(i)&&(t||!e.includes(i))&&n.push(i);var m=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),f=!Oe(m,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(m&&f){var b=a(m===!0?i.children:m.children,!0,s);s.flatten?n.push.apply(n,b):n.push({scopeParent:i,candidates:b})}else r.unshift.apply(r,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},re=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rs(e))&&!wt(e)?0:e.tabIndex},as=function(e,t){var s=re(e);return s<0&&t&&!wt(e)?0:s},os=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ls=function(e){return xt(e)&&e.type==="hidden"},cs=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return t},us=function(e,t){for(var s=0;ssummary:first-of-type"),i=r?e.parentElement:e;if(ae.call(i,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof n=="function"){for(var o=e;e;){var l=e.parentElement,c=Fe(e);if(l&&!l.shadowRoot&&n(l)===!0)return at(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=o}if(ps(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return at(e);return!1},ms=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var s=0;s=0)},bs=function a(e){var t=[],s=[];return e.forEach(function(n,r){var i=!!n.scopeParent,o=i?n.scopeParent:n,l=as(o,i),c=i?a(n.candidates):o;l===0?i?t.push.apply(t,c):t.push(o):s.push({documentOrder:r,tabIndex:l,item:n,isScope:i,content:c})}),s.sort(os).reduce(function(n,r){return r.isScope?n.push.apply(n,r.content):n.push(r.content),n},[]).concat(t)},ys=function(e,t){t=t||{};var s;return t.getShadowRoot?s=yt([e],t.includeContainer,{filter:Be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gs}):s=bt(e,t.includeContainer,Be.bind(null,t)),bs(s)},ws=function(e,t){t=t||{};var s;return t.getShadowRoot?s=yt([e],t.includeContainer,{filter:Re.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s=bt(e,t.includeContainer,Re.bind(null,t)),s},oe=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,Ne)===!1?!1:Be(t,e)},xs=mt.concat("iframe").join(","),Le=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,xs)===!1?!1:Re(t,e)};/*! +* focus-trap 7.6.0 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function Ss(a,e,t){return(e=Es(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function ot(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,s)}return t}function lt(a){for(var e=1;e0){var s=e[e.length-1];s!==t&&s.pause()}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var s=e.indexOf(t);s!==-1&&e.splice(s,1),e.length>0&&e[e.length-1].unpause()}},Ts=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Is=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ge=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},ks=function(e){return ge(e)&&!e.shiftKey},Ns=function(e){return ge(e)&&e.shiftKey},ut=function(e){return setTimeout(e,0)},dt=function(e,t){var s=-1;return e.every(function(n,r){return t(n)?(s=r,!1):!0}),s},ve=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?g-1:0),T=1;T=0)d=s.activeElement;else{var u=i.tabbableGroups[0],g=u&&u.firstTabbableNode;d=g||h("fallbackFocus")}if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},f=function(){if(i.containerGroups=i.containers.map(function(d){var u=ys(d,r.tabbableOptions),g=ws(d,r.tabbableOptions),E=u.length>0?u[0]:void 0,T=u.length>0?u[u.length-1]:void 0,N=g.find(function(v){return oe(v)}),O=g.slice().reverse().find(function(v){return oe(v)}),A=!!u.find(function(v){return re(v)>0});return{container:d,tabbableNodes:u,focusableNodes:g,posTabIndexesFound:A,firstTabbableNode:E,lastTabbableNode:T,firstDomTabbableNode:N,lastDomTabbableNode:O,nextTabbableNode:function(p){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=u.indexOf(p);return F<0?_?g.slice(g.indexOf(p)+1).find(function(z){return oe(z)}):g.slice(0,g.indexOf(p)).reverse().find(function(z){return oe(z)}):u[F+(_?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(d){return d.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(d){return d.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(d){var u=d.activeElement;if(u)return u.shadowRoot&&u.shadowRoot.activeElement!==null?b(u.shadowRoot):u},y=function(d){if(d!==!1&&d!==b(document)){if(!d||!d.focus){y(m());return}d.focus({preventScroll:!!r.preventScroll}),i.mostRecentlyFocusedNode=d,Ts(d)&&d.select()}},x=function(d){var u=h("setReturnFocus",d);return u||(u===!1?!1:d)},w=function(d){var u=d.target,g=d.event,E=d.isBackward,T=E===void 0?!1:E;u=u||Ee(g),f();var N=null;if(i.tabbableGroups.length>0){var O=c(u,g),A=O>=0?i.containerGroups[O]:void 0;if(O<0)T?N=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:N=i.tabbableGroups[0].firstTabbableNode;else if(T){var v=dt(i.tabbableGroups,function(j){var I=j.firstTabbableNode;return u===I});if(v<0&&(A.container===u||Le(u,r.tabbableOptions)&&!oe(u,r.tabbableOptions)&&!A.nextTabbableNode(u,!1))&&(v=O),v>=0){var p=v===0?i.tabbableGroups.length-1:v-1,_=i.tabbableGroups[p];N=re(u)>=0?_.lastTabbableNode:_.lastDomTabbableNode}else ge(g)||(N=A.nextTabbableNode(u,!1))}else{var F=dt(i.tabbableGroups,function(j){var I=j.lastTabbableNode;return u===I});if(F<0&&(A.container===u||Le(u,r.tabbableOptions)&&!oe(u,r.tabbableOptions)&&!A.nextTabbableNode(u))&&(F=O),F>=0){var z=F===i.tabbableGroups.length-1?0:F+1,P=i.tabbableGroups[z];N=re(u)>=0?P.firstTabbableNode:P.firstDomTabbableNode}else ge(g)||(N=A.nextTabbableNode(u))}}else N=h("fallbackFocus");return N},R=function(d){var u=Ee(d);if(!(c(u,d)>=0)){if(ve(r.clickOutsideDeactivates,d)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}ve(r.allowOutsideClick,d)||d.preventDefault()}},C=function(d){var u=Ee(d),g=c(u,d)>=0;if(g||u instanceof Document)g&&(i.mostRecentlyFocusedNode=u);else{d.stopImmediatePropagation();var E,T=!0;if(i.mostRecentlyFocusedNode)if(re(i.mostRecentlyFocusedNode)>0){var N=c(i.mostRecentlyFocusedNode),O=i.containerGroups[N].tabbableNodes;if(O.length>0){var A=O.findIndex(function(v){return v===i.mostRecentlyFocusedNode});A>=0&&(r.isKeyForward(i.recentNavEvent)?A+1=0&&(E=O[A-1],T=!1))}}else i.containerGroups.some(function(v){return v.tabbableNodes.some(function(p){return re(p)>0})})||(T=!1);else T=!1;T&&(E=w({target:i.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(i.recentNavEvent)})),y(E||i.mostRecentlyFocusedNode||m())}i.recentNavEvent=void 0},J=function(d){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=d;var g=w({event:d,isBackward:u});g&&(ge(d)&&d.preventDefault(),y(g))},Q=function(d){(r.isKeyForward(d)||r.isKeyBackward(d))&&J(d,r.isKeyBackward(d))},W=function(d){Is(d)&&ve(r.escapeDeactivates,d)!==!1&&(d.preventDefault(),o.deactivate())},V=function(d){var u=Ee(d);c(u,d)>=0||ve(r.clickOutsideDeactivates,d)||ve(r.allowOutsideClick,d)||(d.preventDefault(),d.stopImmediatePropagation())},$=function(){if(i.active)return ct.activateTrap(n,o),i.delayInitialFocusTimer=r.delayInitialFocus?ut(function(){y(m())}):y(m()),s.addEventListener("focusin",C,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",V,{capture:!0,passive:!1}),s.addEventListener("keydown",Q,{capture:!0,passive:!1}),s.addEventListener("keydown",W),o},be=function(){if(i.active)return s.removeEventListener("focusin",C,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",V,!0),s.removeEventListener("keydown",Q,!0),s.removeEventListener("keydown",W),o},M=function(d){var u=d.some(function(g){var E=Array.from(g.removedNodes);return E.some(function(T){return T===i.mostRecentlyFocusedNode})});u&&y(m())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(M):void 0,q=function(){U&&(U.disconnect(),i.active&&!i.paused&&i.containers.map(function(d){U.observe(d,{subtree:!0,childList:!0})}))};return o={get active(){return i.active},get paused(){return i.paused},activate:function(d){if(i.active)return this;var u=l(d,"onActivate"),g=l(d,"onPostActivate"),E=l(d,"checkCanFocusTrap");E||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=s.activeElement,u==null||u();var T=function(){E&&f(),$(),q(),g==null||g()};return E?(E(i.containers.concat()).then(T,T),this):(T(),this)},deactivate:function(d){if(!i.active)return this;var u=lt({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},d);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,be(),i.active=!1,i.paused=!1,q(),ct.deactivateTrap(n,o);var g=l(u,"onDeactivate"),E=l(u,"onPostDeactivate"),T=l(u,"checkCanReturnFocus"),N=l(u,"returnFocus","returnFocusOnDeactivate");g==null||g();var O=function(){ut(function(){N&&y(x(i.nodeFocusedBeforeActivation)),E==null||E()})};return N&&T?(T(x(i.nodeFocusedBeforeActivation)).then(O,O),this):(O(),this)},pause:function(d){if(i.paused||!i.active)return this;var u=l(d,"onPause"),g=l(d,"onPostPause");return i.paused=!0,u==null||u(),be(),q(),g==null||g(),this},unpause:function(d){if(!i.paused||!i.active)return this;var u=l(d,"onUnpause"),g=l(d,"onPostUnpause");return i.paused=!1,u==null||u(),f(),$(),q(),g==null||g(),this},updateContainerElements:function(d){var u=[].concat(d).filter(Boolean);return i.containers=u.map(function(g){return typeof g=="string"?s.querySelector(g):g}),i.active&&f(),q(),this}},o.updateContainerElements(e),o};function Rs(a,e={}){let t;const{immediate:s,...n}=e,r=ie(!1),i=ie(!1),o=f=>t&&t.activate(f),l=f=>t&&t.deactivate(f),c=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)},m=me(()=>{const f=et(a);return(Array.isArray(f)?f:[f]).map(b=>{const y=et(b);return typeof y=="string"?y:Ct(y)}).filter(Mt)});return $e(m,f=>{f.length&&(t=Os(f,{...n,onActivate(){r.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){r.value=!1,e.onDeactivate&&e.onDeactivate()}}),s&&o())},{flush:"post"}),At(()=>l()),{hasFocus:r,isPaused:i,activate:o,deactivate:l,pause:c,unpause:h}}class ce{constructor(e,t=!0,s=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=s,this.iframesTimeout=n}static matches(e,t){const s=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let r=!1;return s.every(i=>n.call(e,i)?(r=!0,!1):!0),r}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(s=>{const n=t.filter(r=>r.contains(s)).length>0;t.indexOf(s)===-1&&!n&&t.push(s)}),t}getIframeContents(e,t,s=()=>{}){let n;try{const r=e.contentWindow;if(n=r.document,!r||!n)throw new Error("iframe inaccessible")}catch{s()}n&&t(n)}isIframeBlank(e){const t="about:blank",s=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&s!==t&&s}observeIframeLoad(e,t,s){let n=!1,r=null;const i=()=>{if(!n){n=!0,clearTimeout(r);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,s))}catch{s()}}};e.addEventListener("load",i),r=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,s){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,s):this.getIframeContents(e,t,s):this.observeIframeLoad(e,t,s)}catch{s()}}waitForIframes(e,t){let s=0;this.forEachIframe(e,()=>!0,n=>{s++,this.waitForIframes(n.querySelector("html"),()=>{--s||t()})},n=>{n||t()})}forEachIframe(e,t,s,n=()=>{}){let r=e.querySelectorAll("iframe"),i=r.length,o=0;r=Array.prototype.slice.call(r);const l=()=>{--i<=0&&n(o)};i||l(),r.forEach(c=>{ce.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,s(h)),l()},l)})}createIterator(e,t,s){return document.createNodeIterator(e,t,s,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,s){const n=e.compareDocumentPosition(s),r=Node.DOCUMENT_POSITION_PRECEDING;if(n&r)if(t!==null){const i=t.compareDocumentPosition(s),o=Node.DOCUMENT_POSITION_FOLLOWING;if(i&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let s;return t===null?s=e.nextNode():s=e.nextNode()&&e.nextNode(),{prevNode:t,node:s}}checkIframeFilter(e,t,s,n){let r=!1,i=!1;return n.forEach((o,l)=>{o.val===s&&(r=l,i=o.handled)}),this.compareNodeIframe(e,t,s)?(r===!1&&!i?n.push({val:s,handled:!0}):r!==!1&&!i&&(n[r].handled=!0),!0):(r===!1&&n.push({val:s,handled:!1}),!1)}handleOpenIframes(e,t,s,n){e.forEach(r=>{r.handled||this.getIframeContents(r.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,s,n)})})}iterateThroughNodes(e,t,s,n,r){const i=this.createIterator(t,e,n);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(i),c);for(;m();)this.iframes&&this.forEachIframe(t,f=>this.checkIframeFilter(c,h,f,o),f=>{this.createInstanceOnIframe(f).forEachNode(e,b=>l.push(b),n)}),l.push(c);l.forEach(f=>{s(f)}),this.iframes&&this.handleOpenIframes(o,e,s,n),r()}forEachNode(e,t,s,n=()=>{}){const r=this.getContexts();let i=r.length;i||n(),r.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,s,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(o,l):l()})}}let Cs=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[t]=="function"&&s[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let r in t)if(t.hasOwnProperty(r)){const i=t[r],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${s}`),n+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,s,n)=>{let r=n.charAt(s+1);return/[(|)\\]/.test(r)||r===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&t.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach(r=>{s.every(i=>{if(i.indexOf(r)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,n=typeof s=="string"?s:s.value,r=typeof s=="string"?[]:s.limiters,i="";switch(r.forEach(o=>{i+=`|${this.escapeStr(o)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):s.trim()&&t.indexOf(s)===-1&&t.push(s)}),{keywords:t.sort((s,n)=>n.length-s.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let s=0;return e.sort((n,r)=>n.start-r.start).forEach(n=>{let{start:r,end:i,valid:o}=this.callNoMatchOnInvalidRanges(n,s);o&&(n.start=r,n.length=i-r,t.push(n),s=i)}),t}callNoMatchOnInvalidRanges(e,t){let s,n,r=!1;return e&&typeof e.start<"u"?(s=parseInt(e.start,10),n=s+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-s>0?r=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:s,end:n,valid:r}}checkWhitespaceRanges(e,t,s){let n,r=!0,i=s.length,o=t-i,l=parseInt(e.start,10)-o;return l=l>i?i:l,n=l+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),l<0||n-l<0||l>i||n>i?(r=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):s.substring(l,n).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:n,valid:r}}getTextNodes(e){let t="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{s.push({start:t.length,end:(t+=n.textContent).length,node:n})},n=>this.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:s})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,s){const n=this.opt.element?this.opt.element:"mark",r=e.splitText(t),i=r.splitText(s-t);let o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=r.textContent,r.parentNode.replaceChild(o,r),i}wrapRangeInMappedTextNode(e,t,s,n,r){e.nodes.every((i,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!n(i.node))return!1;const c=t-i.start,h=(s>i.end?i.end:s)-i.start,m=e.value.substr(0,i.start),f=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,c,h),e.value=m+f,e.nodes.forEach((b,y)=>{y>=o&&(e.nodes[y].start>0&&y!==o&&(e.nodes[y].start-=h),e.nodes[y].end-=h)}),s-=h,r(i.node.previousSibling,i.start),s>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,s,n,r){const i=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[i]!=="";){if(!s(c[i],l))continue;let h=c.index;if(i!==0)for(let m=1;m{let l;for(;(l=e.exec(o.value))!==null&&l[i]!=="";){let c=l.index;if(i!==0)for(let m=1;ms(l[i],m),(m,f)=>{e.lastIndex=f,n(m)})}r()})}wrapRangeFromIndex(e,t,s,n){this.getTextNodes(r=>{const i=r.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,i,r.value);m&&this.wrapRangeInMappedTextNode(r,c,h,f=>t(f,o,r.value.substring(c,h),l),f=>{s(f,o)})}),n()})}unwrapMatches(e){const t=e.parentNode;let s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let s=0,n="wrapMatches";const r=i=>{s++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,o)=>this.opt.filter(o,i,s),r,()=>{s===0&&this.opt.noMatch(e),this.opt.done(s)})}mark(e,t){this.opt=t;let s=0,n="wrapMatches";const{keywords:r,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(f,b)=>this.opt.filter(b,c,s,m),f=>{m++,s++,this.opt.each(f)},()=>{m===0&&this.opt.noMatch(c),r[i-1]===c?this.opt.done(s):l(r[r.indexOf(c)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(s):l(r[0])}markRanges(e,t){this.opt=t;let s=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(r,i,o,l)=>this.opt.filter(r,i,o,l),(r,i)=>{s++,this.opt.each(r,i)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const n=ce.matches(s,t),r=this.matchesExclude(s);return!n||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function Ms(a){const e=new Cs(a);return this.mark=(t,s)=>(e.mark(t,s),this),this.markRegExp=(t,s)=>(e.markRegExp(t,s),this),this.markRanges=(t,s)=>(e.markRanges(t,s),this),this.unmark=t=>(e.unmark(t),this),this}function ke(a,e,t,s){function n(r){return r instanceof t?r:new t(function(i){i(r)})}return new(t||(t=Promise))(function(r,i){function o(h){try{c(s.next(h))}catch(m){i(m)}}function l(h){try{c(s.throw(h))}catch(m){i(m)}}function c(h){h.done?r(h.value):n(h.value).then(o,l)}c((s=s.apply(a,[])).next())})}const As="ENTRIES",St="KEYS",_t="VALUES",D="";class De{constructor(e,t){const s=e._tree,n=Array.from(s.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:s,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=le(this._path);if(le(t)===D)return{done:!1,value:this.result()};const s=e.get(le(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=le(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>le(e)).filter(e=>e!==D).join("")}value(){return le(this._path).node.get(D)}result(){switch(this._type){case _t:return this.value();case St:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const le=a=>a[a.length-1],Ls=(a,e,t)=>{const s=new Map;if(e===void 0)return s;const n=e.length+1,r=n+t,i=new Uint8Array(r*n).fill(t+1);for(let o=0;o{const l=r*i;e:for(const c of a.keys())if(c===D){const h=n[l-1];h<=t&&s.set(o,[a.get(c),h])}else{let h=r;for(let m=0;mt)continue e}Et(a.get(c),e,t,s,n,h,i,o+c)}};class X{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,s]=Ce(this._tree,e.slice(this._prefix.length));if(t===void 0){const[n,r]=Ue(s);for(const i of n.keys())if(i!==D&&i.startsWith(r)){const o=new Map;return o.set(i.slice(r.length),n.get(i)),new X(o,e)}}return new X(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Ds(this._tree,e)}entries(){return new De(this,As)}forEach(e){for(const[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return Ls(this._tree,e,t)}get(e){const t=We(this._tree,e);return t!==void 0?t.get(D):void 0}has(e){const t=We(this._tree,e);return t!==void 0&&t.has(D)}keys(){return new De(this,St)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ze(this._tree,e).set(D,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=ze(this._tree,e);return s.set(D,t(s.get(D))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=ze(this._tree,e);let n=s.get(D);return n===void 0&&s.set(D,n=t()),n}values(){return new De(this,_t)}[Symbol.iterator](){return this.entries()}static from(e){const t=new X;for(const[s,n]of e)t.set(s,n);return t}static fromObject(e){return X.from(Object.entries(e))}}const Ce=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const s of a.keys())if(s!==D&&e.startsWith(s))return t.push([a,s]),Ce(a.get(s),e.slice(s.length),t);return t.push([a,e]),Ce(void 0,"",t)},We=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==D&&e.startsWith(t))return We(a.get(t),e.slice(t.length))},ze=(a,e)=>{const t=e.length;e:for(let s=0;a&&s{const[t,s]=Ce(a,e);if(t!==void 0){if(t.delete(D),t.size===0)Tt(s);else if(t.size===1){const[n,r]=t.entries().next().value;It(s,n,r)}}},Tt=a=>{if(a.length===0)return;const[e,t]=Ue(a);if(e.delete(t),e.size===0)Tt(a.slice(0,-1));else if(e.size===1){const[s,n]=e.entries().next().value;s!==D&&It(a.slice(0,-1),s,n)}},It=(a,e,t)=>{if(a.length===0)return;const[s,n]=Ue(a);s.set(n+e,t),s.delete(n)},Ue=a=>a[a.length-1],qe="or",kt="and",zs="and_not";class ue{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},je),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ht),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},Bs),e.autoSuggestOptions||{})}),this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Je,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:s,processTerm:n,fields:r,idField:i}=this._options,o=t(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(o))throw new Error(`MiniSearch: duplicate ID ${o}`);const l=this.addDocumentId(o);this.saveStoredFields(l,e);for(const c of r){const h=t(e,c);if(h==null)continue;const m=s(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.addFieldLength(l,f,this._documentCount-1,b);for(const y of m){const x=n(y,c);if(Array.isArray(x))for(const w of x)this.addTerm(f,l,w);else x&&this.addTerm(f,l,x)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:s=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:r,promise:i}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%s===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),n);return i.then(()=>this.addAll(r))}remove(e){const{tokenize:t,processTerm:s,extractField:n,fields:r,idField:i}=this._options,o=n(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const l=this._idToShortId.get(o);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${o}: it is not in the index`);for(const c of r){const h=n(e,c);if(h==null)continue;const m=t(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.removeFieldLength(l,f,this._documentCount,b);for(const y of m){const x=s(y,c);if(Array.isArray(x))for(const w of x)this.removeTerm(f,l,w);else x&&this.removeTerm(f,l,x)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(o),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,n)=>{this.removeFieldLength(t,n,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:s}=this._options,n=s(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Je,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return ke(this,void 0,void 0,function*(){const s=this._dirtCount;if(this.vacuumConditionsMet(t)){const n=e.batchSize||Ke.batchSize,r=e.batchWait||Ke.batchWait;let i=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),i%n===0&&(yield new Promise(c=>setTimeout(c,r))),i+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||Ve.minDirtCount,s=s||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const s=this.executeQuery(e,t),n=[];for(const[r,{score:i,terms:o,match:l}]of s){const c=o.length||1,h={id:this._documentIds.get(r),score:i*c,terms:Object.keys(l),queryTerms:o,match:l};Object.assign(h,this._storedFields.get(r)),(t.filter==null||t.filter(h))&&n.push(h)}return e===ue.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||n.sort(pt),n}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);const s=new Map;for(const{score:r,terms:i}of this.search(e,t)){const o=i.join(" "),l=s.get(o);l!=null?(l.score+=r,l.count+=1):s.set(o,{score:r,terms:i,count:1})}const n=[];for(const[r,{score:i,terms:o,count:l}]of s)n.push({suggestion:r,terms:o,score:i/l});return n.sort(pt),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return ke(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(je.hasOwnProperty(e))return Pe(je,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Te(n),l._fieldLength=Te(r),l._storedFields=Te(i);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of s){const m=new Map;for(const f of Object.keys(h)){let b=h[f];o===1&&(b=b.ds),m.set(parseInt(f,10),Te(b))}l._index.set(c,m)}return l}static loadJSAsync(e,t){return ke(this,void 0,void 0,function*(){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=yield Ie(n),l._fieldLength=yield Ie(r),l._storedFields=yield Ie(i);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of s){const f=new Map;for(const b of Object.keys(m)){let y=m[b];o===1&&(y=y.ds),f.set(parseInt(b,10),yield Ie(y))}++c%1e3===0&&(yield Nt(0)),l._index.set(h,f)}return l})}static instantiateMiniSearch(e,t){const{documentCount:s,nextId:n,fieldIds:r,averageFieldLength:i,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new ue(t);return c._documentCount=s,c._nextId=n,c._idToShortId=new Map,c._fieldIds=r,c._avgFieldLength=i,c._dirtCount=o||0,c._index=new X,c}executeQuery(e,t={}){if(e===ue.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),b=e.queries.map(y=>this.executeQuery(y,f));return this.combineResults(b,f.combineWith)}const{tokenize:s,processTerm:n,searchOptions:r}=this._options,i=Object.assign(Object.assign({tokenize:s,processTerm:n},r),t),{tokenize:o,processTerm:l}=i,m=o(e).flatMap(f=>l(f)).filter(f=>!!f).map($s(i)).map(f=>this.executeQuerySpec(f,i));return this.combineResults(m,i.combineWith)}executeQuerySpec(e,t){const s=Object.assign(Object.assign({},this._options.searchOptions),t),n=(s.fields||this._options.fields).reduce((x,w)=>Object.assign(Object.assign({},x),{[w]:Pe(s.boost,w)||1}),{}),{boostDocument:r,weights:i,maxFuzzy:o,bm25:l}=s,{fuzzy:c,prefix:h}=Object.assign(Object.assign({},ht.weights),i),m=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,m,n,r,l);let b,y;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const x=e.fuzzy===!0?.2:e.fuzzy,w=x<1?Math.min(o,Math.round(e.term.length*x)):x;w&&(y=this._index.fuzzyGet(e.term,w))}if(b)for(const[x,w]of b){const R=x.length-e.term.length;if(!R)continue;y==null||y.delete(x);const C=h*x.length/(x.length+.3*R);this.termResults(e.term,x,C,e.termBoost,w,n,r,l,f)}if(y)for(const x of y.keys()){const[w,R]=y.get(x);if(!R)continue;const C=c*x.length/(x.length+R);this.termResults(e.term,x,C,e.termBoost,w,n,r,l,f)}return f}executeWildcardQuery(e){const t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(const[n,r]of this._documentIds){const i=s.boostDocument?s.boostDocument(r,"",this._storedFields.get(n)):1;t.set(n,{score:i,terms:[],match:{}})}return t}combineResults(e,t=qe){if(e.length===0)return new Map;const s=t.toLowerCase(),n=Ps[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,s]of this._index){const n={};for(const[r,i]of s)n[r]=Object.fromEntries(i);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,n,r,i,o,l,c=new Map){if(r==null)return c;for(const h of Object.keys(i)){const m=i[h],f=this._fieldIds[h],b=r.get(f);if(b==null)continue;let y=b.size;const x=this._avgFieldLength[f];for(const w of b.keys()){if(!this._documentIds.has(w)){this.removeTerm(f,w,t),y-=1;continue}const R=o?o(this._documentIds.get(w),t,this._storedFields.get(w)):1;if(!R)continue;const C=b.get(w),J=this._fieldLength.get(w)[f],Q=Vs(C,y,this._documentCount,J,x,l),W=s*n*m*R*Q,V=c.get(w);if(V){V.score+=W,Ws(V.terms,e);const $=Pe(V.match,t);$?$.push(h):V.match[t]=[h]}else c.set(w,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,s){const n=this._index.fetch(s,vt);let r=n.get(e);if(r==null)r=new Map,r.set(t,1),n.set(e,r);else{const i=r.get(t);r.set(t,(i||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}const n=this._index.fetch(s,vt),r=n.get(e);r==null||r.get(t)==null?this.warnDocumentChanged(t,e,s):r.get(t)<=1?r.size<=1?n.delete(e):r.delete(t):r.set(t,r.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${s}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;tObject.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Ps={[qe]:(a,e)=>{for(const t of e.keys()){const s=a.get(t);if(s==null)a.set(t,e.get(t));else{const{score:n,terms:r,match:i}=e.get(t);s.score=s.score+n,s.match=Object.assign(s.match,i),ft(s.terms,r)}}return a},[kt]:(a,e)=>{const t=new Map;for(const s of e.keys()){const n=a.get(s);if(n==null)continue;const{score:r,terms:i,match:o}=e.get(s);ft(n.terms,i),t.set(s,{score:n.score+r,terms:n.terms,match:Object.assign(n.match,o)})}return t},[zs]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},js={k:1.2,b:.7,d:.5},Vs=(a,e,t,s,n,r)=>{const{k:i,b:o,d:l}=r;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(i+1)/(a+i*(1-o+o*s/n)))},$s=a=>(e,t,s)=>{const n=typeof a.fuzzy=="function"?a.fuzzy(e,t,s):a.fuzzy||!1,r=typeof a.prefix=="function"?a.prefix(e,t,s):a.prefix===!0,i=typeof a.boostTerm=="function"?a.boostTerm(e,t,s):1;return{term:e,fuzzy:n,prefix:r,termBoost:i}},je={idField:"id",extractField:(a,e)=>a[e],tokenize:a=>a.split(Ks),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ht={combineWith:qe,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:js},Bs={combineWith:kt,prefix:(a,e,t)=>e===t.length-1},Ke={batchSize:1e3,batchWait:10},Je={minDirtFactor:.1,minDirtCount:20},Ve=Object.assign(Object.assign({},Ke),Je),Ws=(a,e)=>{a.includes(e)||a.push(e)},ft=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},pt=({score:a},{score:e})=>e-a,vt=()=>new Map,Te=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=a=>ke(void 0,void 0,void 0,function*(){const e=new Map;let t=0;for(const s of Object.keys(a))e.set(parseInt(s,10),a[s]),++t%1e3===0&&(yield Nt(0));return e}),Nt=a=>new Promise(e=>setTimeout(e,a)),Ks=/[\n\r\p{Z}\p{P}]+/u;class Js{constructor(e=10){Me(this,"max");Me(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Us=["aria-owns"],qs={class:"shell"},Gs=["title"],Hs={class:"search-actions before"},Qs=["title"],Ys=["aria-activedescendant","aria-controls","placeholder"],Zs={class:"search-actions"},Xs=["title"],en=["disabled","title"],tn=["id","role","aria-labelledby"],sn=["id","aria-selected"],nn=["href","aria-label","onMouseenter","onFocusin","data-index"],rn={class:"titles"},an=["innerHTML"],on={class:"title main"},ln=["innerHTML"],cn={key:0,class:"excerpt-wrapper"},un={key:0,class:"excerpt",inert:""},dn=["innerHTML"],hn={key:0,class:"no-results"},fn={class:"search-keyboard-shortcuts"},pn=["aria-label"],vn=["aria-label"],mn=["aria-label"],gn=["aria-label"],bn=Lt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var O,A;const t=e,s=xe(),n=xe(),r=xe(is),i=ss(),{activate:o}=Rs(s,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=i,h=tt(async()=>{var v,p,_,F,z,P,j,I,K;return rt(ue.loadJSON((_=await((p=(v=r.value)[l.value])==null?void 0:p.call(v)))==null?void 0:_.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((F=c.value.search)==null?void 0:F.provider)==="local"&&((P=(z=c.value.search.options)==null?void 0:z.miniSearch)==null?void 0:P.searchOptions)},...((j=c.value.search)==null?void 0:j.provider)==="local"&&((K=(I=c.value.search.options)==null?void 0:I.miniSearch)==null?void 0:K.options)}))}),f=me(()=>{var v,p;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((p=c.value.search.options)==null?void 0:p.disableQueryPersistence)===!0}).value?ie(""):Dt("vitepress:local-search-filter",""),b=zt("vitepress:local-search-detailed-list",((O=c.value.search)==null?void 0:O.provider)==="local"&&((A=c.value.search.options)==null?void 0:A.detailedView)===!0),y=me(()=>{var v,p,_;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((p=c.value.search.options)==null?void 0:p.disableDetailedView)===!0||((_=c.value.search.options)==null?void 0:_.detailedView)===!1)}),x=me(()=>{var p,_,F,z,P,j,I;const v=((p=c.value.search)==null?void 0:p.options)??c.value.algolia;return((P=(z=(F=(_=v==null?void 0:v.locales)==null?void 0:_[l.value])==null?void 0:F.translations)==null?void 0:z.button)==null?void 0:P.buttonText)||((I=(j=v==null?void 0:v.translations)==null?void 0:j.button)==null?void 0:I.buttonText)||"Search"});Pt(()=>{y.value&&(b.value=!1)});const w=xe([]),R=ie(!1);$e(f,()=>{R.value=!1});const C=tt(async()=>{if(n.value)return rt(new Ms(n.value))},null),J=new Js(16);jt(()=>[h.value,f.value,b.value],async([v,p,_],F,z)=>{var ee,ye,Ge,He;(F==null?void 0:F[0])!==v&&J.clear();let P=!1;if(z(()=>{P=!0}),!v)return;w.value=v.search(p).slice(0,16),R.value=!0;const j=_?await Promise.all(w.value.map(B=>Q(B.id))):[];if(P)return;for(const{id:B,mod:te}of j){const se=B.slice(0,B.indexOf("#"));let Y=J.get(se);if(Y)continue;Y=new Map,J.set(se,Y);const G=te.default??te;if(G!=null&&G.render||G!=null&&G.setup){const ne=Yt(G);ne.config.warnHandler=()=>{},ne.provide(Zt,i),Object.defineProperties(ne.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Qe=document.createElement("div");ne.mount(Qe),Qe.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(de=>{var Xe;const we=(Xe=de.querySelector("a"))==null?void 0:Xe.getAttribute("href"),Ye=(we==null?void 0:we.startsWith("#"))&&we.slice(1);if(!Ye)return;let Ze="";for(;(de=de.nextElementSibling)&&!/^h[1-6]$/i.test(de.tagName);)Ze+=de.outerHTML;Y.set(Ye,Ze)}),ne.unmount()}if(P)return}const I=new Set;if(w.value=w.value.map(B=>{const[te,se]=B.id.split("#"),Y=J.get(te),G=(Y==null?void 0:Y.get(se))??"";for(const ne in B.match)I.add(ne);return{...B,text:G}}),await he(),P)return;await new Promise(B=>{var te;(te=C.value)==null||te.unmark({done:()=>{var se;(se=C.value)==null||se.markRegExp(T(I),{done:B})}})});const K=((ee=s.value)==null?void 0:ee.querySelectorAll(".result .excerpt"))??[];for(const B of K)(ye=B.querySelector('mark[data-markjs="true"]'))==null||ye.scrollIntoView({block:"center"});(He=(Ge=n.value)==null?void 0:Ge.firstElementChild)==null||He.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function Q(v){const p=Xt(v.slice(0,v.indexOf("#")));try{if(!p)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(p)}}catch(_){return console.error(_),{id:v,mod:{}}}}const W=ie(),V=me(()=>{var v;return((v=f.value)==null?void 0:v.length)<=0});function $(v=!0){var p,_;(p=W.value)==null||p.focus(),v&&((_=W.value)==null||_.select())}Ae(()=>{$()});function be(v){v.pointerType==="mouse"&&$()}const M=ie(-1),U=ie(!0);$e(w,v=>{M.value=v.length?0:-1,q()});function q(){he(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}Se("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=w.value.length-1),U.value=!0,q()}),Se("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=w.value.length&&(M.value=0),U.value=!0,q()});const k=Vt();Se("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const p=w.value[M.value];if(v.target instanceof HTMLInputElement&&!p){v.preventDefault();return}p&&(k.go(p.id),t("close"))}),Se("Escape",()=>{t("close")});const u=ns({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Ae(()=>{window.history.pushState(null,"",null)}),$t("popstate",v=>{v.preventDefault(),t("close")});const g=Bt(Wt?document.body:null);Ae(()=>{he(()=>{g.value=!0,he().then(()=>o())})}),Kt(()=>{g.value=!1});function E(){f.value="",he().then(()=>$(!1))}function T(v){return new RegExp([...v].sort((p,_)=>_.length-p.length).map(p=>`(${es(p)})`).join("|"),"gi")}function N(v){var F;if(!U.value)return;const p=(F=v.target)==null?void 0:F.closest(".result"),_=Number.parseInt(p==null?void 0:p.dataset.index);_>=0&&_!==M.value&&(M.value=_),U.value=!1}return(v,p)=>{var _,F,z,P,j;return H(),Jt(Qt,{to:"body"},[S("div",{ref_key:"el",ref:s,role:"button","aria-owns":(_=w.value)!=null&&_.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[S("div",{class:"backdrop",onClick:p[0]||(p[0]=I=>v.$emit("close"))}),S("div",qs,[S("form",{class:"search-bar",onPointerup:p[4]||(p[4]=I=>be(I)),onSubmit:p[5]||(p[5]=Ut(()=>{},["prevent"]))},[S("label",{title:x.value,id:"localsearch-label",for:"localsearch-input"},p[7]||(p[7]=[S("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)]),8,Gs),S("div",Hs,[S("button",{class:"back-button",title:L(u)("modal.backButtonTitle"),onClick:p[1]||(p[1]=I=>v.$emit("close"))},p[8]||(p[8]=[S("span",{class:"vpi-arrow-left local-search-icon"},null,-1)]),8,Qs)]),qt(S("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":p[2]||(p[2]=I=>Ht(f)?f.value=I:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(F=w.value)!=null&&F.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:x.value,spellcheck:"false",type:"search"},null,8,Ys),[[Gt,L(f)]]),S("div",Zs,[y.value?_e("",!0):(H(),Z("button",{key:0,class:st(["toggle-layout-button",{"detailed-list":L(b)}]),type:"button",title:L(u)("modal.displayDetails"),onClick:p[3]||(p[3]=I=>M.value>-1&&(b.value=!L(b)))},p[9]||(p[9]=[S("span",{class:"vpi-layout-list local-search-icon"},null,-1)]),10,Xs)),S("button",{class:"clear-button",type:"reset",disabled:V.value,title:L(u)("modal.resetButtonTitle"),onClick:E},p[10]||(p[10]=[S("span",{class:"vpi-delete local-search-icon"},null,-1)]),8,en)])],32),S("ul",{ref_key:"resultsEl",ref:n,id:(z=w.value)!=null&&z.length?"localsearch-list":void 0,role:(P=w.value)!=null&&P.length?"listbox":void 0,"aria-labelledby":(j=w.value)!=null&&j.length?"localsearch-label":void 0,class:"results",onMousemove:N},[(H(!0),Z(it,null,nt(w.value,(I,K)=>(H(),Z("li",{key:I.id,id:"localsearch-item-"+K,"aria-selected":M.value===K?"true":"false",role:"option"},[S("a",{href:I.id,class:st(["result",{selected:M.value===K}]),"aria-label":[...I.titles,I.title].join(" > "),onMouseenter:ee=>!U.value&&(M.value=K),onFocusin:ee=>M.value=K,onClick:p[6]||(p[6]=ee=>v.$emit("close")),"data-index":K},[S("div",null,[S("div",rn,[p[12]||(p[12]=S("span",{class:"title-icon"},"#",-1)),(H(!0),Z(it,null,nt(I.titles,(ee,ye)=>(H(),Z("span",{key:ye,class:"title"},[S("span",{class:"text",innerHTML:ee},null,8,an),p[11]||(p[11]=S("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),S("span",on,[S("span",{class:"text",innerHTML:I.title},null,8,ln)])]),L(b)?(H(),Z("div",cn,[I.text?(H(),Z("div",un,[S("div",{class:"vp-doc",innerHTML:I.text},null,8,dn)])):_e("",!0),p[13]||(p[13]=S("div",{class:"excerpt-gradient-bottom"},null,-1)),p[14]||(p[14]=S("div",{class:"excerpt-gradient-top"},null,-1))])):_e("",!0)])],42,nn)],8,sn))),128)),L(f)&&!w.value.length&&R.value?(H(),Z("li",hn,[fe(pe(L(u)("modal.noResultsText"))+' "',1),S("strong",null,pe(L(f)),1),p[15]||(p[15]=fe('" '))])):_e("",!0)],40,tn),S("div",fn,[S("span",null,[S("kbd",{"aria-label":L(u)("modal.footer.navigateUpKeyAriaLabel")},p[16]||(p[16]=[S("span",{class:"vpi-arrow-up navigate-icon"},null,-1)]),8,pn),S("kbd",{"aria-label":L(u)("modal.footer.navigateDownKeyAriaLabel")},p[17]||(p[17]=[S("span",{class:"vpi-arrow-down navigate-icon"},null,-1)]),8,vn),fe(" "+pe(L(u)("modal.footer.navigateText")),1)]),S("span",null,[S("kbd",{"aria-label":L(u)("modal.footer.selectKeyAriaLabel")},p[18]||(p[18]=[S("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)]),8,mn),fe(" "+pe(L(u)("modal.footer.selectText")),1)]),S("span",null,[S("kbd",{"aria-label":L(u)("modal.footer.closeKeyAriaLabel")},"esc",8,gn),fe(" "+pe(L(u)("modal.footer.closeText")),1)])])])],8,Us)])}}}),En=ts(bn,[["__scopeId","data-v-68e678c9"]]);export{En as default}; diff --git a/pr-528/assets/chunks/arc.BNNkY6t3.js b/pr-528/assets/chunks/arc.BNNkY6t3.js new file mode 100644 index 000000000..942eab899 --- /dev/null +++ b/pr-528/assets/chunks/arc.BNNkY6t3.js @@ -0,0 +1 @@ +import{K as ln,L as un,M as y,N as tn,O as W,P as O,Q as _,R as an,S as rn,T as Z,V as o,W as M,X as sn,Y as on,Z as fn}from"../app.CKrDwBa1.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,N,u){var E=D-l,i=S-h,n=N-v,d=u-R,a=d*E-n*i;if(!(a*ar*r+V*V&&(K=w,L=p),{cx:K,cy:L,x01:-n,y01:-d,x11:K*(v/T-1),y11:L*(v/T-1)}}function hn(){var l=cn,h=yn,D=M(0),S=null,v=gn,R=dn,N=mn,u=null,E=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,Q=an(c-f),t=c>f;if(u||(u=n=E()),sy))u.moveTo(0,0);else if(Q>tn-y)u.moveTo(s*W(f),s*O(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*W(c),a*O(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=Q,I=Q,K=N.apply(this,arguments)/2,L=K>y&&(S?+S.apply(this,arguments):Z(a*a+s*s)),w=_(an(s-a)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(L>y){var V=sn(L/a*O(K)),j=sn(L/s*O(K));(P-=V*2)>y?(V*=t?1:-1,A+=V,T-=V):(P=0,A=T=(f+c)/2),(I-=j*2)>y?(j*=t?1:-1,m+=j,g-=j):(I=0,m=g=(f+c)/2)}var X=s*W(m),Y=s*O(m),z=a*W(T),B=a*O(T);if(w>y){var C=s*W(g),F=s*O(g),H=a*W(A),J=a*O(A),q;if(Qy?x>y?(e=G(H,J,X,Y,s,x,t),r=G(C,F,z,B,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(z,B):p>y?(e=G(z,B,C,F,a,-p,t),r=G(X,Y,H,J,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ph?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=a},function(A,G,N){var g=N(0);function s(){}for(var i in g)s[i]=g[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=s},function(A,G,N){function g(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},A.exports=g},function(A,G,N){var g=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),a=N(13),y=N(12),t=N(11);function h(c,l,T){g.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(g.prototype);for(var o in g)h[o]=g[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(M,1),u.target!=u.source&&u.target.edges.splice(P,1);var F=u.source.owner.getEdges().indexOf(u);if(F==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,u,d,L=this.getNodes(),F=L.length,M=0;MT&&(c=T),l>u&&(l=u)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,d=-s.MAX_VALUE,L,F,M,P,J,V=this.nodes,Q=V.length,D=0;DL&&(l=L),TM&&(u=M),dL&&(l=L),TM&&(u=M),d=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},A.exports=h},function(A,G,N){var g,s=N(1);function i(r){g=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,a,y){if(f==null&&a==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,a=e,f=r;var t=a.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,a,y);if(f.isInterGraph=!0,f.source=a,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var a,y=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(ay)return e[0]=h,e[1]=a,e[2]=P,e[3]=t,!1;if(fy?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):v===p&&(f>y?(e[0]=h,e[1]=o,n=!0):(e[0]=u,e[1]=T,n=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=M,m=!0):E===p&&(y>f?(e[2]=F,e[3]=M,m=!0):(e[2]=Q,e[3]=V,m=!0)),n&&m)return!1;if(f>y?a>t?(I=this.getCardinalDirection(v,p,4),w=this.getCardinalDirection(E,p,2)):(I=this.getCardinalDirection(-v,p,3),w=this.getCardinalDirection(-E,p,1)):a>t?(I=this.getCardinalDirection(-v,p,1),w=this.getCardinalDirection(-E,p,3)):(I=this.getCardinalDirection(v,p,2),w=this.getCardinalDirection(E,p,4)),!n)switch(I){case 1:H=o,R=f+-L/p,e[0]=R,e[1]=H;break;case 2:R=u,H=a+d*p,e[0]=R,e[1]=H;break;case 3:H=T,R=f+L/p,e[0]=R,e[1]=H;break;case 4:R=l,H=a+-d*p,e[0]=R,e[1]=H;break}if(!m)switch(w){case 1:k=M,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=void 0,d=void 0,L=void 0,F=void 0,M=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,M=a-t,J=t*y-a*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*M,Q===0?null:(u=(M*V-P*J)/Q,d=(F*J-L*V)/Q,new g(u,d))},s.angleOfVector=function(i,r,e,f){var a=void 0;return i!==e?(a=Math.atan((f-r)/(e-i)),e=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),u=(-o-Math.sqrt(o*o-4*h*c))/(2*h),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,A.exports=s},function(A,G,N){function g(){}g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},A.exports=g},function(A,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g},function(A,G,N){var g=function(){function a(y,t){for(var h=0;h"u"?"undefined":g(i);return i==null||r!="object"&&r!="function"},A.exports=s},function(A,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(M[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var J=P.getEdges(),u=0;u-1&&M.splice(rt,1)}d=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(l),u=0;u=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),v=m-1;v==1&&P.push(n),T.set(n,v)}})}l=l.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},h.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=h},function(A,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g},function(A,G,N){var g=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new g(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=s},function(A,G,N){function g(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},a.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var F=0;Fa}}]),e}();A.exports=r},function(A,G,N){function g(){}g.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,a=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var p=E+1;p=0;W--){if(function(Nt,Mt){return Nt&&Mt}(W0;){var q=void 0,Rt=void 0;for(q=n-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=q&&Lt!==q;Lt--){var vt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===q?Rt=3:Lt===n-1?Rt=1:(Rt=2,q=Lt)}switch(q++,Rt){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=q;ut--){var Tt=g.hypot(this.s[ut],it),At=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==q&&(it=-Dt*r[ut-1],r[ut-1]=At*r[ut-1]);for(var mt=0;mt=this.s[q+1]);){var Ct=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Ct,qMath.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=g},function(A,G,N){var g=function(){function r(e,f){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=a,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function a(){}for(var y in f)a[y]=f[y];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,i.exports=a},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},880:(i,r,e)=>{var f=e(551).LGraph;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},578:(i,r,e)=>{var f=e(551).LGraphManager;function a(t){f.call(this,t)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},765:(i,r,e)=>{var f=e(551).FDLayout,a=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,d=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new a(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new y(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new h(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return n.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},v=0;v0&&this.updateDisplacements();for(var v=0;v0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,v=0;v=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(X)||(n.nodesInRelativeHorizontal.push(X),n.nodeToRelativeConstraintMapHorizontal.set(X,[]),n.dummyToNodeForVerticalAlignment.has(X)?n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(X).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,Rt=new Set,Lt=0;return X.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(q.push(ut),Rt.add(ut),_[Lt].push(ut);q.length!=0;){ut=q.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=X.get(ut);Tt.forEach(function(At){Rt.has(At)||(q.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,v=0;v1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,v){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(n),I=new V;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(v.x),I.setWorldOrgY(v.y);for(var w=0;w1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-v)/U,q=O;et!=U;q=++q%z){var Rt=W[q].getOtherEnd(n);if(Rt!=m){var Lt=(v+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,n,Lt,vt,p+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=M.MIN_VALUE,v=0;vm&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var v=[],E=this.graphManager.getAllNodes(),p=0;p"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;n.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(n.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,n.idToDummyNode[x]=W;var U=n.getGraphManager().add(n.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;zp?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],v=m.id,E=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],m.rect.x,m.rect.y,E,p,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(v){var E=n.idToDummyNode[v],p=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[v],E.rect.x,E.rect.y,p,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var v=n.getChild();if(v==null)return this.toBeTiled[m]=!1,!1;for(var E=v.getNodes(),p=0;p0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),v=0,E=0;Ek&&(k=U.rect.height)}v+=k+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var v=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var p=m[E];if(v.tiledMemberPack[E]=v.tileNodes(n[E],p.paddingLeft+p.paddingRight),p.rect.width=v.tiledMemberPack[E].width,p.rect.height=v.tiledMemberPack[E].height,p.setCenter(v.tiledMemberPack[E].centerX,v.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(n,m){var v=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),p=this.getOrgRatio(v),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var H=I/p,x=w/p,k=Math.pow(v-E,2)+4*(H+E)*(x+v)*p,W=(E-v+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,v){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,v));var R=function(O){return O.rect.width*O.rect.height},H=function(O,X){return R(X)-R(O)};n.sort(function(z,O){var X=H;return w.idealRowWidth?(X=I,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W0&&(w+=n.horizontalPadding),n.rowWidth[v]=w,n.width0&&(R+=n.verticalPadding);var H=0;R>n.rowHeight[v]&&(H=n.rowHeight[v],n.rowHeight[v]=R,H=n.rowHeight[v]-H),n.height+=H,n.rows[v].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,v=Number.MAX_VALUE,E=0;Ev&&(m=E,v=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,v){if(n.idealRowWidth){var E=n.rows.length-1,p=n.rowWidth[E];return p+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=v+n.verticalPadding-n.rowHeight[I]);var H;n.width-w>=m+n.horizontalPadding?H=(n.height+R)/(w+m+n.horizontalPadding):H=(n.height+R)/n.width,R=v+n.verticalPadding;var x;return n.widthI&&m!=v){E.splice(-1,1),n.rows[v].push(p),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[v]=n.rowWidth[v]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var H=n.rowHeight[m]+n.rowHeight[v];n.rowHeight[m]=w,n.rowHeight[v]0)for(var et=p;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=M.MAX_VALUE,O,X,B=0;B{var f=e(551).FDLayoutNode,a=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,u.has(ht)?d[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,u.has(ht)?L[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:Z.get(ht):ct+=u.has(ht)?L[u.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw Zt}}var ce=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[u.get(j.left)]-d[u.get(j.right)]>=0?$++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gtK)for(var ot=0;otat)for(var tt=0;tt1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[d[u.get(S.nodeId)],L[u.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[u.get(yt)]],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},K=0;K0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[d[u.get(yt)],wt],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},gt=0;gtW&&(W=k[et].length,U=et);if(W0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:d[u.get(S.nodeId)],y:L[u.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){d[u.get(S.nodeId)]=S.position.x,L[u.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=d[u.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(at){R.has(at)||(d[u.get(at)]=Z)})},Vt=0;Vt0?Z=L[u.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(at){R.has(at)||(L[u.get(at)]=Z)})},bt=0;bt{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(45);return s})()})}(pe)),pe.exports}(function(C,Y){(function(G,N){C.exports=N(cr())})(Te,function(A){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),a=1;a{var f=function(){function t(h,o){var c=[],l=!0,T=!1,u=void 0;try{for(var d=h[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,u=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=u[0],F=L.connectedEdges().length,u.forEach(function(p){p.connectedEdges().length0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,F=void 0;try{for(var M=h.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var n=rt.boundingBox(),m=h.xCoords[D]-n.w/2,v=h.xCoords[D]+n.w/2,E=h.yCoords[D]-n.h/2,p=h.yCoords[D]+n.h/2;ml&&(l=v),Eu&&(u=p)}}}catch(x){L=!0,F=x}finally{try{!d&&M.return&&M.return()}finally{if(L)throw F}}var I=t.x-(l+c)/2,w=t.y-(u+T)/2;h.xCoords=h.xCoords.map(function(x){return x+I}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;Wl&&(l=U),etu&&(u=z)});var R=t.x-(l+c)/2,H=t.y-(u+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+R,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,M=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;QL&&(l=L),TM&&(u=M),d{var f=e(548),a=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(d,L){var F=d.cy,M=d.eles,P=M.nodes(),J=M.edges(),V=void 0,Q=void 0,D=void 0,rt={};d.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,k){return n(x)?x(k):x},v=f.calcParentsWithoutChildren(F,M),E=function H(x,k,W,U){for(var et=k.length,z=0;z0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new a,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),p(w,R,J),I(w,d),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function d(L,F){for(var M=0;M0)if(v){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,V.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,H=[],x=[],k=0,W={nodeIndexes:R,xCoords:H,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Tt){w.merge(vt.nodes()[Tt]),ut.isParent()||(W.nodeIndexes.set(vt.nodes()[Tt].id(),k++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){M.eles=vt,Q.push(l(M,V[it])),t.relocateComponent(rt[it],Q[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],V[it],M)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var ut=void 0;if(M.quality=="draft"&&(ut=V[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=ut.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[At]-Dt.boundingbox().w/2,y:V[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,M.randomize).shifts;if(M.quality=="draft")V.forEach(function(vt,it){var ut=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=ut,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(Q[vt]).forEach(function(it){var ut=Q[vt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var p=o(M);V.push(p)}M.quality=="default"||M.quality=="proof"?(Q.push(l(M,V[0])),t.relocateComponent(rt[0],Q[0],M)):t.relocateComponent(rt[0],V[0],M)}var q=function(it,ut){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,At=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(vt){return vt.css("display")=="none"});M.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,M,q),Rt.length>0&&Rt.forEach(function(vt){vt.position(q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();i.exports=u},657:(i,r,e)=>{var f=e(548),a=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),d=new Map,L=new Map,F=new Map,M=[],P=[],J=[],V=[],Q=[],D=[],rt=[],n=[],m=void 0,v=1e8,E=1e-9,p=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,H=function(){for(var b=0,$=0,K=!1;$=at;){ot=Z[at++];for(var It=M[ot],ft=0;ftdt&&(dt=Q[Ct],wt=Ct)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(F.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,M[$].push(K),M[L.get(K)].push(b)})},vt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(S){it=!0,ut=S}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){R=m{var f=e(212),a=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&a(cytoscape),i.exports=a},140:i=>{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(579);return s})()})})(be);var gr=be.exports;const ur=ke(gr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:nt((C,Y)=>C-Y+2,"L"),R:nt((C,Y)=>C-2,"R"),T:nt((C,Y)=>C-Y+2,"T"),B:nt((C,Y)=>C-2,"B")},dr=nt(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=nt(function(C){const Y=C;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=nt(function(C){const Y=C;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=nt(function(C){const Y=C;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=nt(function(C,Y){const A=zt(C)&&Qt(Y),G=Qt(C)&&zt(Y);return A||G},"isArchitectureDirectionXY"),vr=nt(function(C){const Y=C[0],A=C[1],G=zt(Y)&&Qt(A),N=Qt(Y)&&zt(A);return G||N},"isArchitecturePairXY"),pr=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(C,Y){const A=`${C}${Y}`;return pr(A)?A:void 0},"getArchitectureDirectionPair"),yr=nt(function([C,Y],A){const G=A[0],N=A[1];return zt(G)?Qt(N)?[C+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[C+(G==="L"?-1:1),Y]:zt(N)?[C+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[C,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=nt(function(C){return C.type==="service"},"isArchitectureService"),Tr=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),Ge=nt(C=>C.data(),"edgeData"),ne=nt(C=>C.data(),"nodeData"),Ue=qe.architecture,pt=new hr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=nt(()=>{pt.reset(),ar()},"clear"),Lr=nt(function({id:C,icon:Y,in:A,title:G,iconText:N}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:Y,iconText:N,title:G,edges:[],in:A}},"addService"),Cr=nt(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Mr=nt(function({id:C,in:Y}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:Y}},"addJunction"),Ar=nt(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Or=nt(C=>pt.records.nodes[C],"getNode"),Dr=nt(function({id:C,icon:Y,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:Y,title:G,in:A}},"addGroup"),xr=nt(()=>Object.values(pt.records.groups),"getGroups"),Ir=nt(function({lhsId:C,rhsId:Y,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:g,lhsGroup:s,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${A}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:C,lhsDir:A,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:g,rhsGroup:i,title:r};pt.records.edges.push(a),pt.records.nodes[C]&&pt.records.nodes[Y]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Rr=nt(()=>pt.records.edges,"getEdges"),Sr=nt(()=>{if(pt.records.dataStructures===void 0){const C=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const a=me(f.lhsDir,f.rhsDir);a&&(e[a]=f.rhsId)}else{const a=me(f.rhsDir,f.lhsDir);a&&(e[a]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(C)[0],A={[Y]:1},G=Object.keys(C).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=nt(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){A[e]=1,delete G[e];const f=C[e],[a,y]=i[e];Object.entries(f).forEach(([t,h])=>{A[h]||(i[h]=yr([a,y],t),r.push(h))})}}return i},"BFS"),g=[N(Y)];for(;Object.keys(G).length>0;)g.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:C,spatialMaps:g}}return pt.records.dataStructures},"getDataStructures"),Fr=nt((C,Y)=>{pt.records.elements[C]=Y},"setElementForId"),br=nt(C=>pt.records.elements[C],"getElementById"),le={clear:Nr,setDiagramTitle:Ke,getDiagramTitle:je,setAccTitle:_e,getAccTitle:tr,setAccDescription:er,getAccDescription:rr,addService:Lr,getServices:Cr,addJunction:Mr,getJunctions:Ar,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Ir,getEdges:Rr,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(C){const Y=fe().architecture;return Y!=null&&Y[C]?Y[C]:Ue[C]}nt(Pt,"getConfigField");var Pr=nt((C,Y)=>{sr(C,Y),C.groups.map(Y.addGroup),C.services.map(A=>Y.addService({...A,type:"service"})),C.junctions.map(A=>Y.addJunction({...A,type:"junction"})),C.edges.map(Y.addEdge)},"populateDb"),Gr={parse:nt(async C=>{const Y=await lr("architecture",C);Se.debug(Y),Pr(Y,le)},"parse")},Ur=nt(C=>` + .edge { + stroke-width: ${C.archEdgeWidth}; + stroke: ${C.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${C.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${C.archGroupBorderColor}; + stroke-width: ${C.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"),Yr=Ur,ae=nt(C=>`${C}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ae('')},server:{body:ae('')},disk:{body:ae('')},internet:{body:ae('')},cloud:{body:ae('')},unknown:Je,blank:{body:ae("")}}},Xr=nt(async function(C,Y){const A=Pt("padding"),G=Pt("iconSize"),N=G/2,g=G/6,s=g/2;await Promise.all(Y.edges().map(async i=>{var P,J;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:a,target:y,targetDir:t,targetArrow:h,targetGroup:o,label:c}=Ge(i);let{x:l,y:T}=i[0].sourceEndpoint();const{x:u,y:d}=i[0].midpoint();let{x:L,y:F}=i[0].targetEndpoint();const M=A+4;if(a&&(zt(e)?l+=e==="L"?-M:M:T+=e==="T"?-M:M+18),o&&(zt(t)?L+=t==="L"?-M:M:F+=t==="T"?-M:M+18),!a&&((P=le.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?l+=e==="L"?N:-N:T+=e==="T"?N:-N),!o&&((J=le.getNode(y))==null?void 0:J.type)==="junction"&&(zt(t)?L+=t==="L"?N:-N:F+=t==="T"?N:-N),i[0]._private.rscratch){const V=C.insert("g");if(V.insert("path").attr("d",`M ${l},${T} L ${u},${d} L${L},${F} `).attr("class","edge"),f){const Q=zt(e)?he[e](l,g):l-s,D=Qt(e)?he[e](T,g):T-s;V.insert("polygon").attr("points",Ie[e](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(h){const Q=zt(t)?he[t](L,g):L-s,D=Qt(t)?he[t](F,g):F-s;V.insert("polygon").attr("points",Ie[t](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(c){const Q=Pe(e,t)?"XY":zt(e)?"X":"Y";let D=0;Q==="X"?D=Math.abs(l-L):Q==="Y"?D=Math.abs(T-F)/1.5:D=Math.abs(l-L)/2;const rt=V.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},fe()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Q==="X")rt.attr("transform","translate("+u+", "+d+")");else if(Q==="Y")rt.attr("transform","translate("+u+", "+d+") rotate(-90)");else if(Q==="XY"){const n=me(e,t);if(n&&vr(n)){const m=rt.node().getBoundingClientRect(),[v,E]=Er(n);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*v*E*45})`);const p=rt.node().getBoundingClientRect();rt.attr("transform",` + translate(${u}, ${d-m.height/2}) + translate(${v*p.width/2}, ${E*p.height/2}) + rotate(${-1*v*E*45}, 0, ${m.height/2}) + `)}}}}}))},"drawEdges"),Hr=nt(async function(C,Y){const G=Pt("padding")*.75,N=Pt("fontSize"),s=Pt("iconSize")/2;await Promise.all(Y.nodes().map(async i=>{const r=ne(i);if(r.type==="group"){const{h:e,w:f,x1:a,y1:y}=i.boundingBox();C.append("rect").attr("x",a+s).attr("y",y+s).attr("width",f).attr("height",e).attr("class","node-bkg");const t=C.append("g");let h=a,o=y;if(r.icon){const c=t.append("g");c.html(`${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(h+s+1)+", "+(o+s+1)+")"),h+=G,o+=N/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},fe()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(h+s+4)+", "+(o+s+2)+")")}}}))},"drawGroups"),Wr=nt(async function(C,Y,A){for(const G of A){const N=Y.append("g"),g=Pt("iconSize");if(G.title){const e=N.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:g*1.5,classes:"architecture-service-label"},fe()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+g/2+", "+g+")")}const s=N.append("g");if(G.icon)s.html(`${await Ee(G.icon,{height:g,width:g,fallbackPrefix:oe.prefix})}`);else if(G.iconText){s.html(`${await Ee("blank",{height:g,width:g,fallbackPrefix:oe.prefix})}`);const a=s.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html(G.iconText),y=parseInt(window.getComputedStyle(a.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;a.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/y)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);N.attr("class","architecture-service");const{width:i,height:r}=N._groups[0][0].getBBox();G.width=i,G.height=r,C.setElementForId(G.id,N)}return 0},"drawServices"),Vr=nt(function(C,Y,A){A.forEach(G=>{const N=Y.append("g"),g=Pt("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",g).attr("height",g),N.attr("class","architecture-junction");const{width:i,height:r}=N._groups[0][0].getBBox();N.width=i,N.height=r,C.setElementForId(G.id,N)})},"drawJunctions");Qe([{name:oe.prefix,icons:oe}]);Fe.use(ur);function Ye(C,Y){C.forEach(A=>{Y.add({group:"nodes",data:{type:"service",id:A.id,icon:A.icon,label:A.title,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}nt(Ye,"addServices");function Xe(C,Y){C.forEach(A=>{Y.add({group:"nodes",data:{type:"junction",id:A.id,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}nt(Xe,"addJunctions");function He(C,Y){Y.nodes().map(A=>{const G=ne(A);if(G.type==="group")return;G.x=A.position().x,G.y=A.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}nt(He,"positionNodes");function We(C,Y){C.forEach(A=>{Y.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}nt(We,"addGroups");function Ve(C,Y){C.forEach(A=>{const{lhsId:G,rhsId:N,lhsInto:g,lhsGroup:s,rhsInto:i,lhsDir:r,rhsDir:e,rhsGroup:f,title:a}=A,y=Pe(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:a,source:G,sourceDir:r,sourceArrow:g,sourceGroup:s,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:i,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};Y.add({group:"edges",data:t,classes:y})})}nt(Ve,"addEdges");function ze(C){const Y=C.map(N=>{const g={},s={};return Object.entries(N).forEach(([i,[r,e]])=>{g[e]||(g[e]=[]),s[r]||(s[r]=[]),g[e].push(i),s[r].push(i)}),{horiz:Object.values(g).filter(i=>i.length>1),vert:Object.values(s).filter(i=>i.length>1)}}),[A,G]=Y.reduce(([N,g],{horiz:s,vert:i})=>[[...N,...s],[...g,...i]],[[],[]]);return{horizontal:A,vertical:G}}nt(ze,"getAlignments");function Be(C){const Y=[],A=nt(N=>`${N[0]},${N[1]}`,"posToStr"),G=nt(N=>N.split(",").map(g=>parseInt(g)),"strToPos");return C.forEach(N=>{const g=Object.fromEntries(Object.entries(N).map(([e,f])=>[A(f),e])),s=[A([0,0])],i={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const e=s.shift();if(e){i[e]=1;const f=g[e];if(f){const a=G(e);Object.entries(r).forEach(([y,t])=>{const h=A([a[0]+t[0],a[1]+t[1]]),o=g[h];o&&!i[h]&&(s.push(h),Y.push({[xe[y]]:o,[xe[dr(y)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),Y}nt(Be,"getRelativeConstraints");function $e(C,Y,A,G,{spatialMaps:N}){return new Promise(g=>{const s=ir("body").append("div").attr("id","cy").attr("style","display:none"),i=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});s.remove(),We(A,i),Ye(C,i),Xe(Y,i),Ve(G,i);const r=ze(N),e=Be(N),f=i.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?.45:.001},alignmentConstraint:r,relativePlacementConstraint:e});f.one("layoutstop",()=>{var y;function a(t,h,o,c){let l,T;const{x:u,y:d}=t,{x:L,y:F}=h;T=(c-d+(u-o)*(d-F)/(u-L))/Math.sqrt(1+Math.pow((d-F)/(u-L),2)),l=Math.sqrt(Math.pow(c-d,2)+Math.pow(o-u,2)-Math.pow(T,2));const M=Math.sqrt(Math.pow(L-u,2)+Math.pow(F-d,2));l=l/M;let P=(L-u)*(c-d)-(F-d)*(o-u);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}let J=(L-u)*(o-u)+(F-d)*(c-d);switch(!0){case J>=0:J=1;break;case J<0:J=-1;break}return T=Math.abs(T)*P,l=l*J,{distances:T,weights:l}}nt(a,"getSegmentWeights"),i.startBatch();for(const t of Object.values(i.edges()))if((y=t.data)!=null&&y.call(t)){const{x:h,y:o}=t.source().position(),{x:c,y:l}=t.target().position();if(h!==c&&o!==l){const T=t.sourceEndpoint(),u=t.targetEndpoint(),{sourceDir:d}=Ge(t),[L,F]=Qt(d)?[T.x,u.y]:[u.x,T.y],{weights:M,distances:P}=a(T,u,L,F);t.style("segment-distances",P),t.style("segment-weights",M)}}i.endBatch(),f.run()}),f.run(),i.ready(a=>{Se.info("Ready",a),g(i)})})}nt($e,"layoutArchitecture");var zr=nt(async(C,Y,A,G)=>{const N=G.db,g=N.getServices(),s=N.getJunctions(),i=N.getGroups(),r=N.getEdges(),e=N.getDataStructures(),f=nr(Y),a=f.append("g");a.attr("class","architecture-edges");const y=f.append("g");y.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Wr(N,y,g),Vr(N,y,s);const h=await $e(g,s,i,r,e);await Xr(a,h),await Hr(t,h),He(N,h),or(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),Br={draw:zr},ei={parser:Gr,db:le,renderer:Br,styles:Yr};export{ei as diagram}; diff --git a/pr-528/assets/chunks/basePickBy.nUpO2mqN.js b/pr-528/assets/chunks/basePickBy.nUpO2mqN.js new file mode 100644 index 000000000..ab151d115 --- /dev/null +++ b/pr-528/assets/chunks/basePickBy.nUpO2mqN.js @@ -0,0 +1 @@ +import{e as I,c as l,g as m,k as A,j as N,l as P,m as M,n as b,t as p,o as w}from"./baseUniq.HRNeWzar.js";import{aM as g,aA as E,aN as F,aO as T,aP as _,aQ as o,aR as B,aS as S,aT as c,aU as R}from"../app.CKrDwBa1.js";var $=/\s/;function G(n){for(var r=n.length;r--&&$.test(n.charAt(r)););return r}var L=/^\s+/;function q(n){return n&&n.slice(0,G(n)+1).replace(L,"")}var x=NaN,z=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,H=/^0o[0-7]+$/i,K=parseInt;function Q(n){if(typeof n=="number")return n;if(I(n))return x;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=q(n);var t=C.test(n);return t||H.test(n)?K(n.slice(2),t?2:8):z.test(n)?x:+n}var v=1/0,U=17976931348623157e292;function W(n){if(!n)return n===0?n:0;if(n=Q(n),n===v||n===-v){var r=n<0?-1:1;return r*U}return n===n?n:0}function X(n){var r=W(n),t=r%1;return r===r?t?r-t:r:0}function tn(n){var r=n==null?0:n.length;return r?l(n):[]}var O=Object.prototype,Y=O.hasOwnProperty,an=E(function(n,r){n=Object(n);var t=-1,e=r.length,i=e>2?r[2]:void 0;for(i&&F(r[0],r[1],i)&&(e=1);++t-1?i[f?r[a]:a]:void 0}}var D=Math.max;function J(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var i=t==null?0:X(t);return i<0&&(i=D(e+i,0)),N(n,m(r),i)}var sn=y(J);function Z(n,r){var t=-1,e=o(n)?Array(n.length):[];return P(n,function(i,f,a){e[++t]=r(i,f,a)}),e}function fn(n,r){var t=B(n)?M:Z;return t(n,m(r))}function V(n,r){return n-1}function $(n){return sn(n)?Mn(n):mn(n)}var rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,er=/^\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:er.test(n)||!rr.test(n)||r!=null&&n in Object(r)}var tr=500;function ir(n){var r=Fn(n,function(t){return e.size===tr&&e.clear(),t}),e=r.cache;return r}var ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fr=/\\(\\)?/g,sr=ir(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(ar,function(e,t,a,i){r.push(a?i.replace(fr,"$1"):t||e)}),r});function ur(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:B(n,r)?[n]:sr(ur(n))}var or=1/0;function M(n){if(typeof n=="string"||U(n))return n;var r=n+"";return r=="0"&&1/n==-or?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&xe?new S:void 0;for(i.set(n,r),i.set(r,n);++o=It){var b=r?null:_t(n);if(b)return H(b);f=!1,a=Pn,u=new S}else u=r?[]:s;n:for(;++t"u"&&(w.yylloc={});var ee=w.yylloc;t.push(ee);var Ce=w.options&&w.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(z){r.length=r.length-2*z,p.length=p.length-z,t.length=t.length-z}h(Ae,"popStack");function ge(){var z;return z=u.pop()||w.lex()||B,typeof z!="number"&&(z instanceof Array&&(u=z,z=u.pop()),z=s.symbols_[z]||z),z}h(ge,"lex");for(var T,Y,A,te,V={},X,F,he,G;;){if(Y=r[r.length-1],this.defaultActions[Y]?A=this.defaultActions[Y]:((T===null||typeof T>"u")&&(T=ge()),A=b[Y]&&b[Y][T]),typeof A>"u"||!A.length||!A[0]){var se="";G=[];for(X in b[Y])this.terminals_[X]&&X>K&&G.push("'"+this.terminals_[X]+"'");w.showPosition?se="Parse error on line "+(P+1)+`: +`+w.showPosition()+` +Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":se="Parse error on line "+(P+1)+": Unexpected "+(T==B?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(se,{text:w.match,token:this.terminals_[T]||T,line:w.yylineno,loc:ee,expected:G})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+T);switch(A[0]){case 1:r.push(T),p.push(w.yytext),t.push(w.yylloc),r.push(A[1]),T=null,W=w.yyleng,n=w.yytext,P=w.yylineno,ee=w.yylloc;break;case 2:if(F=this.productions_[A[1]][1],V.$=p[p.length-F],V._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},Ce&&(V._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),te=this.performAction.apply(V,[n,W,P,M.yy,A[1],p,t].concat(ze)),typeof te<"u")return te;F&&(r=r.slice(0,-1*F*2),p=p.slice(0,-1*F),t=t.slice(0,-1*F)),r.push(this.productions_[A[1]][0]),p.push(V.$),t.push(V._$),he=b[r[r.length-2]][r[r.length-1]],r.push(he);break;case 3:return!0}}return!0},"parse")},k=function(){var N={EOF:1,parseError:h(function(s,r){if(this.yy.parser)this.yy.parser.parseError(s,r);else throw new Error(s)},"parseError"),setInput:h(function(c,s){return this.yy=s||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:h(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var s=c.match(/(?:\r\n?|\n).*/g);return s?(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:h(function(c){var s=c.length,r=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var p=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:r?(r.length===u.length?this.yylloc.first_column:0)+u[u.length-r.length].length-r[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(c){this.unput(this.match.slice(c))},"less"),pastInput:h(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:h(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:h(function(){var c=this.pastInput(),s=new Array(c.length+1).join("-");return c+this.upcomingInput()+` +`+s+"^"},"showPosition"),test_match:h(function(c,s){var r,u,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),u=c[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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],r=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,s,r,u;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;ts[0].length)){if(s=r,u=t,this.options.backtrack_lexer){if(c=this.test_match(r,p[t]),c!==!1)return c;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(c=this.test_match(s,p[u]),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:h(function(){var s=this.next();return s||this.lex()},"lex"),begin:h(function(s){this.conditionStack.push(s)},"begin"),popState:h(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:h(function(s){this.begin(s)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:h(function(s,r,u,p){switch(u){case 0:return 10;case 1:return s.getLogger().debug("Found space-block"),31;case 2:return s.getLogger().debug("Found nl-block"),31;case 3:return s.getLogger().debug("Found space-block"),29;case 4:s.getLogger().debug(".",r.yytext);break;case 5:s.getLogger().debug("_",r.yytext);break;case 6:return 5;case 7:return r.yytext=-1,28;case 8:return r.yytext=r.yytext.replace(/columns\s+/,""),s.getLogger().debug("COLUMNS (LEX)",r.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:s.getLogger().debug("LEX: POPPING STR:",r.yytext),this.popState();break;case 14:return s.getLogger().debug("LEX: STR end:",r.yytext),"STR";case 15:return r.yytext=r.yytext.replace(/space\:/,""),s.getLogger().debug("SPACE NUM (LEX)",r.yytext),21;case 16:return r.yytext="1",s.getLogger().debug("COLUMNS (LEX)",r.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),s.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),s.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),s.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),s.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),s.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),s.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),s.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),s.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),s.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),s.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return s.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return s.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return s.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return s.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return s.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return s.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return s.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),s.getLogger().debug("LEX ARR START"),38;case 75:return s.getLogger().debug("Lex: NODE_ID",r.yytext),32;case 76:return s.getLogger().debug("Lex: EOF",r.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:s.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:s.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return s.getLogger().debug("LEX: NODE_DESCR:",r.yytext),"NODE_DESCR";case 84:s.getLogger().debug("LEX POPPING"),this.popState();break;case 85:s.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return r.yytext=r.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (right): dir:",r.yytext),"DIR";case 87:return r.yytext=r.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (left):",r.yytext),"DIR";case 88:return r.yytext=r.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (x):",r.yytext),"DIR";case 89:return r.yytext=r.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (y):",r.yytext),"DIR";case 90:return r.yytext=r.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (up):",r.yytext),"DIR";case 91:return r.yytext=r.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (down):",r.yytext),"DIR";case 92:return r.yytext="]>",s.getLogger().debug("Lex (ARROW_DIR end):",r.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return s.getLogger().debug("Lex: LINK","#"+r.yytext+"#"),15;case 94:return s.getLogger().debug("Lex: LINK",r.yytext),15;case 95:return s.getLogger().debug("Lex: LINK",r.yytext),15;case 96:return s.getLogger().debug("Lex: LINK",r.yytext),15;case 97:return s.getLogger().debug("Lex: START_LINK",r.yytext),this.pushState("LLABEL"),16;case 98:return s.getLogger().debug("Lex: START_LINK",r.yytext),this.pushState("LLABEL"),16;case 99:return s.getLogger().debug("Lex: START_LINK",r.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return s.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),s.getLogger().debug("Lex: LINK","#"+r.yytext+"#"),15;case 103:return this.popState(),s.getLogger().debug("Lex: LINK",r.yytext),15;case 104:return this.popState(),s.getLogger().debug("Lex: LINK",r.yytext),15;case 105:return s.getLogger().debug("Lex: COLON",r.yytext),r.yytext=r.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();E.lexer=k;function v(){this.yy={}}return h(v,"Parser"),v.prototype=E,E.Parser=v,new v}();re.parser=re;var Ge=re,R=new Map,ne=[],ie=new Map,ue="color",de="fill",He="bgFill",be=",",qe=Le(),J=new Map,Je=h(e=>Ve.sanitizeText(e,qe),"sanitizeText"),Ze=h(function(e,l=""){let g=J.get(e);g||(g={id:e,styles:[],textStyles:[]},J.set(e,g)),l!=null&&l.split(be).forEach(a=>{const i=a.replace(/([^;]*);/,"$1").trim();if(RegExp(ue).exec(a)){const o=i.replace(de,He).replace(ue,de);g.textStyles.push(o)}g.styles.push(i)})},"addStyleClass"),Qe=h(function(e,l=""){const g=R.get(e);l!=null&&(g.styles=l.split(be))},"addStyle2Node"),$e=h(function(e,l){e.split(",").forEach(function(g){let a=R.get(g);if(a===void 0){const i=g.trim();a={id:i,type:"na",children:[]},R.set(i,a)}a.classes||(a.classes=[]),a.classes.push(l)})},"setCssClass"),me=h((e,l)=>{const g=e.flat(),a=[];for(const i of g){if(i.label&&(i.label=Je(i.label)),i.type==="classDef"){Ze(i.id,i.css);continue}if(i.type==="applyClass"){$e(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Qe(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")l.columns=i.columns??-1;else if(i.type==="edge"){const d=(ie.get(i.id)??0)+1;ie.set(i.id,d),i.id=d+"-"+i.id,ne.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const d=R.get(i.id);if(d===void 0?R.set(i.id,i):(i.type!=="na"&&(d.type=i.type),i.label!==i.id&&(d.label=i.label)),i.children&&me(i.children,i),i.type==="space"){const o=i.width??1;for(let f=0;f{L.debug("Clear called"),Ye(),j={id:"root",type:"composite",children:[],columns:-1},R=new Map([["root",j]]),ae=[],J=new Map,ne=[],ie=new Map},"clear");function ye(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}h(ye,"typeStr2Type");function Ee(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}h(Ee,"edgeTypeStr2Type");function _e(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}h(_e,"edgeStrToEdgeData");var pe=0,tt=h(()=>(pe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+pe),"generateId"),st=h(e=>{j.children=e,me(e,j),ae=j.children},"setHierarchy"),rt=h(e=>{const l=R.get(e);return l?l.columns?l.columns:l.children?l.children.length:-1:-1},"getColumns"),it=h(()=>[...R.values()],"getBlocksFlat"),nt=h(()=>ae||[],"getBlocks"),at=h(()=>ne,"getEdges"),ot=h(e=>R.get(e),"getBlock"),lt=h(e=>{R.set(e.id,e)},"setBlock"),ct=h(()=>console,"getLogger"),gt=h(function(){return J},"getClasses"),ht={getConfig:h(()=>U().block,"getConfig"),typeStr2Type:ye,edgeTypeStr2Type:Ee,edgeStrToEdgeData:_e,getLogger:ct,getBlocksFlat:it,getBlocks:nt,getEdges:at,setHierarchy:st,getBlock:ot,setBlock:lt,getColumns:rt,getClasses:gt,clear:et,generateId:tt},ut=ht,q=h((e,l)=>{const g=Xe,a=g(e,"r"),i=g(e,"g"),d=g(e,"b");return We(a,i,d,l)},"fade"),dt=h(e=>`.label { + 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: ${q(e.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${q(e.mainBkg,.5)}; + fill: ${q(e.clusterBkg,.5)}; + stroke: ${q(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}; + } +`,"getStyles"),pt=dt,fe,Se,y=((Se=(fe=Le())==null?void 0:fe.block)==null?void 0:Se.padding)??8;function we(e,l){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(l<0||!Number.isInteger(l))throw new Error("Position must be a non-negative integer."+l);if(e<0)return{px:l,py:0};if(e===1)return{px:0,py:l};const g=l%e,a=Math.floor(l/e);return{px:g,py:a}}h(we,"calculateBlockPosition");var ft=h(e=>{let l=0,g=0;for(const a of e.children){const{width:i,height:d,x:o,y:f}=a.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",a.id,"width:",i,"height:",d,"x:",o,"y:",f,a.type),a.type!=="space"&&(i>l&&(l=i/(e.widthInColumns??1)),d>g&&(g=d))}return{width:l,height:g}},"getMaxChildSize");function Z(e,l,g=0,a=0){var o,f,S,m,x,_,O,I,D,C,E;L.debug("setBlockSizes abc95 (start)",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x,"block width =",e==null?void 0:e.size,"sieblingWidth",g),(f=e==null?void 0:e.size)!=null&&f.width||(e.size={width:g,height:a,x:0,y:0});let i=0,d=0;if(((S=e.children)==null?void 0:S.length)>0){for(const p of e.children)Z(p,l);const k=ft(e);i=k.width,d=k.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,d);for(const p of e.children)p.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${p.id} ${i} ${d} ${JSON.stringify(p.size)}`),p.size.width=i*(p.widthInColumns??1)+y*((p.widthInColumns??1)-1),p.size.height=d,p.size.x=0,p.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${p.id} maxWidth:${i} maxHeight:${d}`));for(const p of e.children)Z(p,l,i,d);const v=e.columns??-1;let N=0;for(const p of e.children)N+=p.widthInColumns??1;let c=e.children.length;v>0&&v0?Math.min(e.children.length,v):e.children.length;if(p>0){const t=(r-p*y-y)/p;L.debug("abc95 (growing to fit) width",e.id,r,(O=e.size)==null?void 0:O.width,t);for(const b of e.children)b.size&&(b.size.width=t)}}e.size={width:r,height:u,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,(I=e==null?void 0:e.size)==null?void 0:I.x,(D=e==null?void 0:e.size)==null?void 0:D.width,(C=e==null?void 0:e.size)==null?void 0:C.y,(E=e==null?void 0:e.size)==null?void 0:E.height)}h(Z,"setBlockSizes");function oe(e,l){var a,i,d,o,f,S,m,x,_,O,I,D,C,E,k,v,N;L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(a=e==null?void 0:e.size)==null?void 0:a.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(d=e==null?void 0:e.size)==null?void 0:d.width}`);const g=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",g,e),e.children&&e.children.length>0){const c=((f=(o=e==null?void 0:e.children[0])==null?void 0:o.size)==null?void 0:f.width)??0,s=e.children.length*c+(e.children.length-1)*y;L.debug("widthOfChildren 88",s,"posX");let r=0;L.debug("abc91 block?.size?.x",e.id,(S=e==null?void 0:e.size)==null?void 0:S.x);let u=(m=e==null?void 0:e.size)!=null&&m.x?((x=e==null?void 0:e.size)==null?void 0:x.x)+(-((_=e==null?void 0:e.size)==null?void 0:_.width)/2||0):-y,p=0;for(const t of e.children){const b=e;if(!t.size)continue;const{width:n,height:P}=t.size,{px:W,py:K}=we(g,r);if(K!=p&&(p=K,u=(O=e==null?void 0:e.size)!=null&&O.x?((I=e==null?void 0:e.size)==null?void 0:I.x)+(-((D=e==null?void 0:e.size)==null?void 0:D.width)/2||0):-y,L.debug("New row in layout for block",e.id," and child ",t.id,p)),L.debug(`abc89 layout blocks (child) id: ${t.id} Pos: ${r} (px, py) ${W},${K} (${(C=b==null?void 0:b.size)==null?void 0:C.x},${(E=b==null?void 0:b.size)==null?void 0:E.y}) parent: ${b.id} width: ${n}${y}`),b.size){const B=n/2;t.size.x=u+y+B,L.debug(`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${B} padding=${y} width=${n} halfWidth=${B} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${n*((t==null?void 0:t.widthInColumns)??1)/2}`),u=t.size.x+B,t.size.y=b.size.y-b.size.height/2+K*(P+y)+P/2+y,L.debug(`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${y}${B}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${n*((t==null?void 0:t.widthInColumns)??1)/2}`)}t.children&&oe(t),r+=(t==null?void 0:t.widthInColumns)??1,L.debug("abc88 columnsPos",t,r)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(k=e==null?void 0:e.size)==null?void 0:k.x} y: ${(v=e==null?void 0:e.size)==null?void 0:v.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}h(oe,"layoutBlocks");function le(e,{minX:l,minY:g,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:d,y:o,width:f,height:S}=e.size;d-f/2a&&(a=d+f/2),o+S/2>i&&(i=o+S/2)}if(e.children)for(const d of e.children)({minX:l,minY:g,maxX:a,maxY:i}=le(d,{minX:l,minY:g,maxX:a,maxY:i}));return{minX:l,minY:g,maxX:a,maxY:i}}h(le,"findBounds");function De(e){const l=e.getBlock("root");if(!l)return;Z(l,e,0,0),oe(l),L.debug("getBlocks",JSON.stringify(l,null,2));const{minX:g,minY:a,maxX:i,maxY:d}=le(l),o=d-a,f=i-g;return{x:g,y:a,width:f,height:o}}h(De,"layout");function ce(e,l,g=!1){var O,I,D;const a=e;let i="default";(((O=a==null?void 0:a.classes)==null?void 0:O.length)||0)>0&&(i=((a==null?void 0:a.classes)??[]).join(" ")),i=i+" flowchart-label";let d=0,o="",f;switch(a.type){case"round":d=5,o="rect";break;case"composite":d=0,o="composite",f=0;break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}const S=Ke((a==null?void 0:a.styles)??[]),m=a.label,x=a.size??{width:0,height:0,x:0,y:0};return{labelStyle:S.labelStyle,shape:o,labelText:m,rx:d,ry:d,class:i,style:S.style,id:a.id,directions:a.directions,width:x.width,height:x.height,x:x.x,y:x.y,positioned:g,intersect:void 0,type:a.type,padding:f??((D=(I=U())==null?void 0:I.block)==null?void 0:D.padding)??0}}h(ce,"getNodeFromBlock");async function Ne(e,l,g){const a=ce(l,g,!1);if(a.type==="group")return;const i=U(),d=await xe(e,a,{config:i}),o=d.node().getBBox(),f=g.getBlock(a.id);f.size={width:o.width,height:o.height,x:0,y:0,node:d},g.setBlock(f),d.remove()}h(Ne,"calculateBlockSize");async function ve(e,l,g){const a=ce(l,g,!0);if(g.getBlock(a.id).type!=="space"){const d=U();await xe(e,a,{config:d}),l.intersect=a==null?void 0:a.intersect,Re(a)}}h(ve,"insertBlockPositioned");async function Q(e,l,g,a){for(const i of l)await a(e,i,g),i.children&&await Q(e,i.children,g,a)}h(Q,"performOperations");async function Ie(e,l,g){await Q(e,l,g,Ne)}h(Ie,"calculateBlockSizes");async function Te(e,l,g){await Q(e,l,g,ve)}h(Te,"insertBlocks");async function Oe(e,l,g,a,i){const d=new Ue({multigraph:!0,compound:!0});d.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const o of g)o.size&&d.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(const o of l)if(o.start&&o.end){const f=a.getBlock(o.start),S=a.getBlock(o.end);if(f!=null&&f.size&&(S!=null&&S.size)){const m=f.size,x=S.size,_=[{x:m.x,y:m.y},{x:m.x+(x.x-m.x)/2,y:m.y+(x.y-m.y)/2},{x:x.x,y:x.y}];Be(e,{v:o.start,w:o.end,name:o.id},{...o,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:_,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",d,i),o.label&&(await ke(e,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:_,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),Pe({...o,x:_[1].x,y:_[1].y},{originalPath:_}))}}}h(Oe,"insertEdges");var St=h(function(e,l){return l.db.getClasses()},"getClasses"),xt=h(async function(e,l,g,a){const{securityLevel:i,block:d}=U(),o=a.db;let f;i==="sandbox"&&(f=H("#i"+l));const S=i==="sandbox"?H(f.nodes()[0].contentDocument.body):H("body"),m=i==="sandbox"?S.select(`[id="${l}"]`):H(`[id="${l}"]`);Fe(m,["point","circle","cross"],a.type,l);const _=o.getBlocks(),O=o.getBlocksFlat(),I=o.getEdges(),D=m.insert("g").attr("class","block");await Ie(D,_,o);const C=De(o);if(await Te(D,_,o),await Oe(D,I,O,o,l),C){const E=C,k=Math.max(1,Math.round(.125*(E.width/E.height))),v=E.height+k+10,N=E.width+10,{useMaxWidth:c}=d;Me(m,v,N,!!c),L.debug("Here Bounds",C,E),m.attr("viewBox",`${E.x-5} ${E.y-5} ${E.width+10} ${E.height+10}`)}},"draw"),Lt={draw:xt,getClasses:St},vt={parser:Ge,db:ut,renderer:Lt,styles:pt};export{vt as diagram}; diff --git a/pr-528/assets/chunks/c4Diagram-ZCSEYPFN.BNsm4zSe.js b/pr-528/assets/chunks/c4Diagram-ZCSEYPFN.BNsm4zSe.js new file mode 100644 index 000000000..357a66b2e --- /dev/null +++ b/pr-528/assets/chunks/c4Diagram-ZCSEYPFN.BNsm4zSe.js @@ -0,0 +1,10 @@ +import{d as Se,g as De}from"./chunk-V35ELUW5.C6DQpogG.js";import{_ as g,a as Pe,s as Be,g as Ie,b as Me,c as Le,d as Bt,w as Ne,e as $t,f as de,h as Tt,i as ge,j as jt,l as fe,k as Ye,m as je}from"../app.CKrDwBa1.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.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(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +`+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;hm[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\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,a,r,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]={text:y}}else u.descr={text:a};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]=y}else u.tags=n;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.link=i;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,a,r){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.tags=a;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.link=r;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,a,r,n,i,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.shadowing=a;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.techn=i;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,a,r){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(a);if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const a=Object.values(t)[0];o=parseInt(a)}else o=parseInt(t);if(typeof s=="object"){const a=Object.values(s)[0];l=parseInt(a)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),a0=g(function(){return B},"getCurrentBoundaryParse"),i0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),n0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ie},"getTitle"),c0=g(function(e){ne=e},"setWrap"),mt=g(function(){return ne},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ie=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Be,getAccTitle:Ie,getAccDescription:Me,setAccDescription:Le,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return Se(e,t)},"drawRect"),me=g(function(e,t,s,o,l,a){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let n=a.startsWith("data:image/png;base64")?a:je(a);r.attr("xlink:href",n)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",n=a.lineColor?a.lineColor:"#444444",i=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",a.startPoint.x),y.attr("y1",a.startPoint.y),y.attr("x2",a.endPoint.x),y.attr("y2",a.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",n),y.style("fill","none"),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",n).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(a.label.text,o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:r},f),a.techn&&a.techn.text!==""&&(f=s.messageFont(),Q(s)("["+a.techn.text+"]",o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};re(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=De();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},re(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=a,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).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")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,a,r,n,i,u,d){const f=a.append("text").attr("x",r+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,a,r,n,i,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ae=g(function(e){Pe(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=Ne(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=de(t[e].text,o);else{let a=t[e].text.split($t.lineBreakRegex);t[e].textLines=a.length;let r=0;t[e].height=0,t[e].width=0;for(const n of a)t[e].width=Math.max(Tt(n,o),t[e].width),r=de(n,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let a=Tt(t.label.text,l);j("label",t,o,l,a),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const a of o){l=0;const r=s[a];let n=Pt(_,r.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",n),r.typeC4Shape.height=n.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let i=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,i,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,i,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,i,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,i,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,a=t.y,r=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-a),d=u/i,f=e.height/e.width,y=null;return o==a&&sl?y=new Y(s,n):s==l&&oa&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,n+d*e.width/2):y=new Y(r-i/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,n+d*e.width/2):y=new Y(r+i/u*e.height/2,o+e.height):sa?f>=d?y=new Y(s+e.width,n-d*e.width/2):y=new Y(r+e.height/2*i/u,o):s>l&&o>a&&(f>=d?y=new Y(s,n-e.width/2*d):y=new Y(r-e.height/2*i/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let a of t){l=l+1;let r=a.wrap&&_.wrap,n=T0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=l+": "+a.label.text);let u=Tt(a.label.text,n);j("label",a,r,n,u),a.techn&&a.techn.text!==""&&(u=Tt(a.techn.text,n),j("techn",a,r,n,u)),a.descr&&a.descr.text!==""&&(u=Tt(a.descr.text,n),j("descr",a,r,n,u));let d=s(a.from),f=s(a.to),y=O0(d,f);a.startPoint=y.startPoint,a.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let a=new Ee(l);a.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,a.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,a.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,a.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;a.setData(O,O,S,S)}else{let O=a.data.stopx!==a.data.startx?a.data.stopx+_.diagramMarginX:a.data.startx,S=a.data.starty;a.setData(O,O,S,S)}a.name=n.alias;let f=l.db.getC4ShapeArray(n.alias),y=l.db.getC4ShapeKeys(n.alias);y.length>0&&Ae(a,e,f,y),t=n.alias;let E=l.db.getBoundarys(t);E.length>0&&se(e,t,a,E,l),n.alias!=="global"&&ke(e,n,a),s.data.stopy=Math.max(a.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(a.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let a;l==="sandbox"&&(a=jt("#i"+t));const r=l==="sandbox"?jt(a.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),fe.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i),z.insertDatabaseIcon(i),z.insertClockIcon(i);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundarys("");se(i,"",u,f,o),z.insertArrowHead(i),z.insertArrowEnd(i),z.insertArrowCrossHead(i),z.insertArrowFilledHead(i),R0(i,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Ye(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),fe.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ae,draw:S0},D0=g(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),P0=D0,N0={parser:Ue,db:te,renderer:ye,styles:P0,init:g(({c4:e,wrap:t})=>{ye.setConf(e),te.setWrap(t)},"init")};export{N0 as diagram}; diff --git a/pr-528/assets/chunks/callout.CtmRa3nB.js b/pr-528/assets/chunks/callout.CtmRa3nB.js new file mode 100644 index 000000000..79bdb083a --- /dev/null +++ b/pr-528/assets/chunks/callout.CtmRa3nB.js @@ -0,0 +1 @@ +/* empty css */import{_ as r,o as s,c as a,j as e,a as t}from"./framework.B8-VHxRu.js";const l={name:"Callout"};function n(c,o,i,u,p,f){return s(),a("div",null,o[0]||(o[0]=[e("p",null,[t("This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub "),e("a",{href:"https://github.com/rollkit/docs/issues/new"},"issue ticket"),t(" or reach out in our "),e("a",{href:"https://t.me/rollkit"},"Telegram group"),t(".")],-1)]))}const _=r(l,[["render",n],["__scopeId","data-v-e75f15cf"]]);export{_ as C}; diff --git a/pr-528/assets/chunks/channel.BijykDEK.js b/pr-528/assets/chunks/channel.BijykDEK.js new file mode 100644 index 000000000..8a9b0e031 --- /dev/null +++ b/pr-528/assets/chunks/channel.BijykDEK.js @@ -0,0 +1 @@ +import{U as a,C as n}from"../app.CKrDwBa1.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/pr-528/assets/chunks/chunk-4LC2V6XN.Cfx7Swlc.js b/pr-528/assets/chunks/chunk-4LC2V6XN.Cfx7Swlc.js new file mode 100644 index 000000000..17c1c93cc --- /dev/null +++ b/pr-528/assets/chunks/chunk-4LC2V6XN.Cfx7Swlc.js @@ -0,0 +1 @@ +import{_ as n,j as r,k as g,l as d}from"../app.CKrDwBa1.js";var u=n((t,e)=>{let o;return e==="sandbox"&&(o=r("#i"+t)),(e==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${t}"]`)},"getDiagramElement"),b=n((t,e,o,i)=>{t.attr("class",o);const{width:a,height:s,x:h,y:x}=l(t,e);g(t,s,a,i);const c=w(h,x,a,s,e);t.attr("viewBox",c),d.debug(`viewBox configured: ${c} with padding: ${e}`)},"setupViewPortForSVG"),l=n((t,e)=>{var i;const o=((i=t.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+e*2,height:o.height+e*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=n((t,e,o,i,a)=>`${t-a} ${e-a} ${o} ${i}`,"createViewBox");export{u as g,b as s}; diff --git a/pr-528/assets/chunks/chunk-5RIWM3LS.jgRW-DO2.js b/pr-528/assets/chunks/chunk-5RIWM3LS.jgRW-DO2.js new file mode 100644 index 000000000..c6eb42bb0 --- /dev/null +++ b/pr-528/assets/chunks/chunk-5RIWM3LS.jgRW-DO2.js @@ -0,0 +1,220 @@ +import{g as De,s as Ce}from"./chunk-4LC2V6XN.Cfx7Swlc.js";import{_ as r,e as z,d as x,g as xe,s as Ae,b as Le,c as Ie,q as Re,r as Oe,l as b,z as Ne,u as we,v as $e,ai as Pe}from"../app.CKrDwBa1.js";var Ot=function(){var t=r(function($,o,u,n){for(u=u||{},n=$.length;n--;u[$[n]]=o);return u},"o"),e=[1,2],c=[1,3],a=[1,4],d=[2,4],s=[1,9],p=[1,11],g=[1,16],l=[1,17],_=[1,18],v=[1,19],A=[1,32],B=[1,20],Y=[1,21],I=[1,22],f=[1,23],L=[1,24],R=[1,26],F=[1,27],V=[1,28],N=[1,29],w=[1,30],rt=[1,31],at=[1,34],nt=[1,35],lt=[1,36],ot=[1,37],J=[1,33],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],kt={trace:r(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,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$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:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"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],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:r(function(o,u,n,y,T,i,q){var h=i.length-1;switch(T){case 3:return y.setRootDoc(i[h]),i[h];case 4:this.$=[];break;case 5:i[h]!="nl"&&(i[h-1].push(i[h]),this.$=i[h-1]);break;case 6:case 7:this.$=i[h];break;case 8:this.$="nl";break;case 12:this.$=i[h];break;case 13:const Q=i[h-1];Q.description=y.trimColon(i[h]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[h-2],state2:i[h]};break;case 15:const Dt=y.trimColon(i[h]);this.$={stmt:"relation",state1:i[h-3],state2:i[h-1],description:Dt};break;case 19:this.$={stmt:"state",id:i[h-3],type:"default",description:"",doc:i[h-1]};break;case 20:var M=i[h],W=i[h-2].trim();if(i[h].match(":")){var ht=i[h].split(":");M=ht[0],W=[W,ht[1]]}this.$={stmt:"state",id:M,type:"default",description:W};break;case 21:this.$={stmt:"state",id:i[h-3],type:"default",description:i[h-5],doc:i[h-1]};break;case 22:this.$={stmt:"state",id:i[h],type:"fork"};break;case 23:this.$={stmt:"state",id:i[h],type:"join"};break;case 24:this.$={stmt:"state",id:i[h],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[h-1].trim(),note:{position:i[h-2].trim(),text:i[h].trim()}};break;case 29:this.$=i[h].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[h].trim(),y.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:i[h-1].trim(),classes:i[h].trim()};break;case 34:this.$={stmt:"style",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 35:this.$={stmt:"applyClass",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 36:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:i[h].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:c,6:a},{1:[3]},{3:5,4:e,5:c,6:a},{3:6,4:e,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,39],15:[1,40]}),t(S,[2,16]),{18:[1,41]},t(S,[2,18],{20:[1,42]}),{23:[1,43]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(S,[2,28]),{34:[1,48]},{36:[1,49]},t(S,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(ct,[2,42],{55:[1,54]}),t(ct,[2,43],{55:[1,55]}),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(S,[2,39]),t(S,[2,6]),t(S,[2,13]),{13:56,24:A,54:J},t(S,[2,17]),t(Vt,d,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(S,[2,29]),t(S,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(S,[2,14],{14:[1,67]}),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,68],22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(S,[2,32]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(ct,[2,44]),t(ct,[2,45]),t(S,[2,15]),t(S,[2,19]),t(Vt,d,{7:72}),t(S,[2,26]),t(S,[2,27]),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,73],22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:r(function(o,u){if(u.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=u,n}},"parseError"),parse:r(function(o){var u=this,n=[0],y=[],T=[null],i=[],q=this.table,h="",M=0,W=0,ht=2,Q=1,Dt=i.slice.call(arguments,1),E=Object.create(this.lexer),U={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(U.yy[Ct]=this.yy[Ct]);E.setInput(o,U.yy),U.yy.lexer=E,U.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var xt=E.yylloc;i.push(xt);var me=E.options&&E.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(D){n.length=n.length-2*D,T.length=T.length-D,i.length=i.length-D}r(ke,"popStack");function Mt(){var D;return D=y.pop()||E.lex()||Q,typeof D!="number"&&(D instanceof Array&&(y=D,D=y.pop()),D=u.symbols_[D]||D),D}r(Mt,"lex");for(var m,j,C,At,X={},dt,O,Ut,ft;;){if(j=n[n.length-1],this.defaultActions[j]?C=this.defaultActions[j]:((m===null||typeof m>"u")&&(m=Mt()),C=q[j]&&q[j][m]),typeof C>"u"||!C.length||!C[0]){var Lt="";ft=[];for(dt in q[j])this.terminals_[dt]&&dt>ht&&ft.push("'"+this.terminals_[dt]+"'");E.showPosition?Lt="Parse error on line "+(M+1)+`: +`+E.showPosition()+` +Expecting `+ft.join(", ")+", got '"+(this.terminals_[m]||m)+"'":Lt="Parse error on line "+(M+1)+": Unexpected "+(m==Q?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(Lt,{text:E.match,token:this.terminals_[m]||m,line:E.yylineno,loc:xt,expected:ft})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+m);switch(C[0]){case 1:n.push(m),T.push(E.yytext),i.push(E.yylloc),n.push(C[1]),m=null,W=E.yyleng,h=E.yytext,M=E.yylineno,xt=E.yylloc;break;case 2:if(O=this.productions_[C[1]][1],X.$=T[T.length-O],X._$={first_line:i[i.length-(O||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(O||1)].first_column,last_column:i[i.length-1].last_column},me&&(X._$.range=[i[i.length-(O||1)].range[0],i[i.length-1].range[1]]),At=this.performAction.apply(X,[h,W,M,U.yy,C[1],T,i].concat(Dt)),typeof At<"u")return At;O&&(n=n.slice(0,-1*O*2),T=T.slice(0,-1*O),i=i.slice(0,-1*O)),n.push(this.productions_[C[1]][0]),T.push(X.$),i.push(X._$),Ut=q[n[n.length-2]][n[n.length-1]],n.push(Ut);break;case 3:return!0}}return!0},"parse")},be=function(){var $={EOF:1,parseError:r(function(u,n){if(this.yy.parser)this.yy.parser.parseError(u,n);else throw new Error(u)},"parseError"),setInput:r(function(o,u){return this.yy=u||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:r(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var u=o.match(/(?:\r\n?|\n).*/g);return u?(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:r(function(o){var u=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var y=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 T=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===y.length?this.yylloc.first_column:0)+y[y.length-n.length].length-n[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(o){this.unput(this.match.slice(o))},"less"),pastInput:r(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:r(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:r(function(){var o=this.pastInput(),u=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:r(function(o,u){var n,y,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),y=o[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.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,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in T)this[i]=T[i];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,u,n,y;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),i=0;iu[0].length)){if(u=n,y=i,this.options.backtrack_lexer){if(o=this.test_match(n,T[i]),o!==!1)return o;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(o=this.test_match(u,T[y]),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:r(function(){var u=this.next();return u||this.lex()},"lex"),begin:r(function(u){this.conditionStack.push(u)},"begin"),popState:r(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:r(function(u){this.begin(u)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(u,n,y,T){switch(y){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;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 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?: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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/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,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return $}();kt.lexer=be;function ut(){this.yy={}}return r(ut,"Parser"),ut.prototype=kt,kt.Parser=ut,new ut}();Ot.parser=Ot;var As=Ot,Ge="LR",qt="TB",_t="state",wt="relation",Be="classDef",Ye="style",Fe="applyClass",st="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",se="text",ie="normal",It="rect",Rt="rectWithTitle",Ve="stateStart",Me="stateEnd",jt="divider",zt="roundedWithTitle",Ue="note",je="noteGroup",it="statediagram",ze="state",He=`${it}-${ze}`,re="transition",We="note",Xe="note-edge",Ke=`${re} ${Xe}`,Je=`${it}-${We}`,qe="cluster",Qe=`${it}-${qe}`,Ze="cluster-alt",ts=`${it}-${Ze}`,ae="parent",ne="note",es="state",$t="----",ss=`${$t}${ne}`,Ht=`${$t}${ae}`,le=r((t,e=qt)=>{if(!t.doc)return e;let c=e;for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir"),is=r(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),rs=r(async function(t,e,c,a){b.info("REF0:"),b.info("Drawing state diagram (v2)",e);const{securityLevel:d,state:s,layout:p}=x();a.db.extract(a.db.getRootDocV2());const g=a.db.getData(),l=De(e,d);g.type=a.type,g.layoutAlgorithm=p,g.nodeSpacing=(s==null?void 0:s.nodeSpacing)||50,g.rankSpacing=(s==null?void 0:s.rankSpacing)||50,g.markers=["barb"],g.diagramId=e,await Ne(g,l);const _=8;we.insertTitle(l,"statediagramTitleText",(s==null?void 0:s.titleTopMargin)??25,a.db.getDiagramTitle()),Ce(l,_,it,(s==null?void 0:s.useMaxWidth)??!0)},"draw"),Ls={getClasses:is,draw:rs,getDir:le},St=new Map,P=0;function yt(t="",e=0,c="",a=$t){const d=c!==null&&c.length>0?`${a}${c}`:"";return`${es}-${t}${d}-${e}`}r(yt,"stateDomId");var as=r((t,e,c,a,d,s,p,g)=>{b.trace("items",e),e.forEach(l=>{switch(l.stmt){case _t:tt(t,l,c,a,d,s,p,g);break;case st:tt(t,l,c,a,d,s,p,g);break;case wt:{tt(t,l.state1,c,a,d,s,p,g),tt(t,l.state2,c,a,d,s,p,g);const _={id:"edge"+P,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Zt,labelStyle:"",label:z.sanitizeText(l.description,x()),arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,classes:re,look:p};d.push(_),P++}break}})},"setupDoc"),Wt=r((t,e=qt)=>{let c=e;if(t.doc)for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir");function Z(t,e,c){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(d=>{if(c.get(d)){const s=c.get(d);e.cssCompiledStyles=[...e.cssCompiledStyles,...s.styles]}}));const a=t.find(d=>d.id===e.id);a?Object.assign(a,e):t.push(e)}r(Z,"insertOrUpdateNode");function oe(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}r(oe,"getClassesFromDbInfo");function ce(t){return(t==null?void 0:t.styles)??[]}r(ce,"getStylesFromDbInfo");var tt=r((t,e,c,a,d,s,p,g)=>{var B,Y;const l=e.id,_=c.get(l),v=oe(_),A=ce(_);if(b.info("dataFetcher parsedItem",e,_,A),l!=="root"){let I=It;e.start===!0?I=Ve:e.start===!1&&(I=Me),e.type!==st&&(I=e.type),St.get(l)||St.set(l,{id:l,shape:I,description:z.sanitizeText(l,x()),cssClasses:`${v} ${He}`,cssStyles:A});const f=St.get(l);e.description&&(Array.isArray(f.description)?(f.shape=Rt,f.description.push(e.description)):((B=f.description)==null?void 0:B.length)>0?(f.shape=Rt,f.description===l?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=It,f.description=e.description),f.description=z.sanitizeTextOrArray(f.description,x())),((Y=f.description)==null?void 0:Y.length)===1&&f.shape===Rt&&(f.type==="group"?f.shape=zt:f.shape=It),!f.type&&e.doc&&(b.info("Setting cluster for XCX",l,Wt(e)),f.type="group",f.isGroup=!0,f.dir=Wt(e),f.shape=e.type===Qt?jt:zt,f.cssClasses=`${f.cssClasses} ${Qe} ${s?ts:""}`);const L={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:l,dir:f.dir,domId:yt(l,P),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:p};if(L.shape===jt&&(L.label=""),t&&t.id!=="root"&&(b.trace("Setting node ",l," to be child of its parent ",t.id),L.parentId=t.id),L.centerLabel=!0,e.note){const R={labelStyle:"",shape:Ue,label:e.note.text,cssClasses:Je,cssStyles:[],cssCompilesStyles:[],id:l+ss+"-"+P,domId:yt(l,P,ne),type:f.type,isGroup:f.type==="group",padding:x().flowchart.padding,look:p,position:e.note.position},F=l+Ht,V={labelStyle:"",shape:je,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:l+Ht,domId:yt(l,P,ae),type:"group",isGroup:!0,padding:16,look:p,position:e.note.position};P++,V.id=F,R.parentId=F,Z(a,V,g),Z(a,R,g),Z(a,L,g);let N=l,w=R.id;e.note.position==="left of"&&(N=R.id,w=l),d.push({id:N+"-"+w,start:N,end:w,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Ke,arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,look:p})}else Z(a,L,g)}e.doc&&(b.trace("Adding nodes children "),as(e,e.doc,c,a,d,!s,p,g))},"dataFetcher"),ns=r(()=>{St.clear(),P=0},"reset"),Pt="[*]",ue="start",he=Pt,de="end",Xt="color",Kt="fill",ls="bgFill",os=",";function Gt(){return new Map}r(Gt,"newClassesList");var Tt=[],Bt=[],fe=Ge,Et=[],K=Gt(),pe=r(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),vt={root:pe()},k=vt.root,et=0,Jt=0,cs={LINE:0,DOTTED_LINE:1},us={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},pt=r(t=>JSON.parse(JSON.stringify(t)),"clone"),hs=r(t=>{b.info("Setting root doc",t),Et=t},"setRootDoc"),ds=r(()=>Et,"getRootDoc"),gt=r((t,e,c)=>{if(e.stmt===wt)gt(t,e.state1,!0),gt(t,e.state2,!1);else if(e.stmt===_t&&(e.id==="[*]"?(e.id=c?t.id+"_start":t.id+"_end",e.start=c):e.id=e.id.trim()),e.doc){const a=[];let d=[],s;for(s=0;s0&&d.length>0){const p={stmt:_t,id:Pe(),type:"divider",doc:pt(d)};a.push(pt(p)),e.doc=a}e.doc.forEach(p=>gt(e,p,!0))}},"docTranslator"),Yt=r(()=>(gt({id:"root"},{id:"root",doc:Et},!0),{id:"root",doc:Et}),"getRootDocV2"),fs=r(t=>{let e;t.doc?e=t.doc:e=t,b.info(e),Se(!0),b.info("Extract initial document:",e),e.forEach(s=>{switch(b.warn("Statement",s.stmt),s.stmt){case _t:G(s.id.trim(),s.type,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles);break;case wt:Ee(s.state1,s.state2,s.description);break;case Be:ve(s.id.trim(),s.classes);break;case Ye:{const p=s.id.trim().split(","),g=s.styleClass.split(",");p.forEach(l=>{let _=H(l);if(_===void 0){const v=l.trim();G(v),_=H(v)}_.styles=g.map(v=>{var A;return(A=v.replace(/;/g,""))==null?void 0:A.trim()})})}break;case Fe:Ft(s.id.trim(),s.styleClass);break}});const c=ye(),d=x().look;ns(),tt(void 0,Yt(),c,Tt,Bt,!0,d,K),Tt.forEach(s=>{if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+s.id+"]");s.label=s.label[0]}})},"extract"),G=r(function(t,e=st,c=null,a=null,d=null,s=null,p=null,g=null){const l=t==null?void 0:t.trim();if(k.states.has(l)?(k.states.get(l).doc||(k.states.get(l).doc=c),k.states.get(l).type||(k.states.get(l).type=e)):(b.info("Adding state ",l,a),k.states.set(l,{id:l,descriptions:[],type:e,doc:c,note:d,classes:[],styles:[],textStyles:[]})),a&&(b.info("Setting state description",l,a),typeof a=="string"&&Nt(l,a.trim()),typeof a=="object"&&a.forEach(_=>Nt(l,_.trim()))),d){const _=k.states.get(l);_.note=d,_.note.text=z.sanitizeText(_.note.text,x())}s&&(b.info("Setting state classes",l,s),(typeof s=="string"?[s]:s).forEach(v=>Ft(l,v.trim()))),p&&(b.info("Setting state styles",l,p),(typeof p=="string"?[p]:p).forEach(v=>Ts(l,v.trim()))),g&&(b.info("Setting state styles",l,p),(typeof g=="string"?[g]:g).forEach(v=>Es(l,v.trim())))},"addState"),Se=r(function(t){Tt=[],Bt=[],vt={root:pe()},k=vt.root,et=0,K=Gt(),t||$e()},"clear"),H=r(function(t){return k.states.get(t)},"getState"),ye=r(function(){return k.states},"getStates"),ps=r(function(){b.info("Documents = ",vt)},"logDocuments"),Ss=r(function(){return k.relations},"getRelations");function bt(t=""){let e=t;return t===Pt&&(et++,e=`${ue}${et}`),e}r(bt,"startIdIfNeeded");function mt(t="",e=st){return t===Pt?ue:e}r(mt,"startTypeIfNeeded");function ge(t=""){let e=t;return t===he&&(et++,e=`${de}${et}`),e}r(ge,"endIdIfNeeded");function _e(t="",e=st){return t===he?de:e}r(_e,"endTypeIfNeeded");function Te(t,e,c){let a=bt(t.id.trim()),d=mt(t.id.trim(),t.type),s=bt(e.id.trim()),p=mt(e.id.trim(),e.type);G(a,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),G(s,p,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:a,id2:s,relationTitle:z.sanitizeText(c,x())})}r(Te,"addRelationObjs");var Ee=r(function(t,e,c){if(typeof t=="object")Te(t,e,c);else{const a=bt(t.trim()),d=mt(t),s=ge(e.trim()),p=_e(e);G(a,d),G(s,p),k.relations.push({id1:a,id2:s,title:z.sanitizeText(c,x())})}},"addRelation"),Nt=r(function(t,e){const c=k.states.get(t),a=e.startsWith(":")?e.replace(":","").trim():e;c.descriptions.push(z.sanitizeText(a,x()))},"addDescription"),ys=r(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),gs=r(()=>(Jt++,"divider-id-"+Jt),"getDividerId"),ve=r(function(t,e=""){K.has(t)||K.set(t,{id:t,styles:[],textStyles:[]});const c=K.get(t);e!=null&&e.split(os).forEach(a=>{const d=a.replace(/([^;]*);/,"$1").trim();if(RegExp(Xt).exec(a)){const p=d.replace(Kt,ls).replace(Xt,Kt);c.textStyles.push(p)}c.styles.push(d)})},"addStyleClass"),_s=r(function(){return K},"getClasses"),Ft=r(function(t,e){t.split(",").forEach(function(c){let a=H(c);if(a===void 0){const d=c.trim();G(d),a=H(d)}a.classes.push(e)})},"setCssClass"),Ts=r(function(t,e){const c=H(t);c!==void 0&&c.styles.push(e)},"setStyle"),Es=r(function(t,e){const c=H(t);c!==void 0&&c.textStyles.push(e)},"setTextStyle"),vs=r(()=>fe,"getDirection"),bs=r(t=>{fe=t},"setDirection"),ms=r(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),ks=r(()=>{const t=x();return{nodes:Tt,edges:Bt,other:{},config:t,direction:le(Yt())}},"getData"),Is={getConfig:r(()=>x().state,"getConfig"),getData:ks,addState:G,clear:Se,getState:H,getStates:ye,getRelations:Ss,getClasses:_s,getDirection:vs,addRelation:Ee,getDividerId:gs,setDirection:bs,cleanupLabel:ys,lineType:cs,relationType:us,logDocuments:ps,getRootDoc:ds,setRootDoc:hs,getRootDocV2:Yt,extract:fs,trimColon:ms,getAccTitle:xe,setAccTitle:Ae,getAccDescription:Le,setAccDescription:Ie,addStyleClass:ve,setCssClass:Ft,addDescription:Nt,setDiagramTitle:Re,getDiagramTitle:Oe},Ds=r(t=>` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground?t.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: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),Rs=Ds;export{Is as a,Rs as b,Ls as c,As as s}; diff --git a/pr-528/assets/chunks/chunk-6JKP7OK7.CM73knb6.js b/pr-528/assets/chunks/chunk-6JKP7OK7.CM73knb6.js new file mode 100644 index 000000000..88b04aa95 --- /dev/null +++ b/pr-528/assets/chunks/chunk-6JKP7OK7.CM73knb6.js @@ -0,0 +1 @@ +import{_ as s}from"../app.CKrDwBa1.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}; diff --git a/pr-528/assets/chunks/chunk-NGC4727B.Dvf-dRgF.js b/pr-528/assets/chunks/chunk-NGC4727B.Dvf-dRgF.js new file mode 100644 index 000000000..bb048a8f9 --- /dev/null +++ b/pr-528/assets/chunks/chunk-NGC4727B.Dvf-dRgF.js @@ -0,0 +1,160 @@ +import{_ as n,i as lt,d as D,a7 as Ve,s as ct,g as ot,b as ht,c as At,q as pt,r as ft,e as x,v as dt,l as Ct,u as $e,j as Y}from"../app.CKrDwBa1.js";var Pe=function(){var e=n(function(O,a,l,A){for(l=l||{},A=O.length;A--;l[O[A]]=a);return l},"o"),i=[1,17],r=[1,18],h=[1,19],c=[1,39],f=[1,40],d=[1,25],B=[1,23],S=[1,24],N=[1,31],Ee=[1,32],ge=[1,33],me=[1,34],be=[1,35],ke=[1,36],Te=[1,26],ye=[1,27],Fe=[1,28],De=[1,29],C=[1,43],_e=[1,30],E=[1,42],g=[1,44],m=[1,41],T=[1,45],Be=[1,9],o=[1,8,9],Q=[1,56],X=[1,57],W=[1,58],q=[1,59],H=[1,60],Se=[1,61],ve=[1,62],J=[1,8,9,40],Ke=[1,74],M=[1,8,9,12,13,22,38,40,43,60,61,62,63,64,65,66,71,73],Z=[1,8,9,12,13,17,20,22,38,40,43,47,60,61,62,63,64,65,66,71,73,75,81,96,98,99],$=[13,75,81,96,98,99],z=[13,65,66,75,81,96,98,99],Ye=[13,60,61,62,63,64,75,81,96,98,99],Ne=[1,94],ee=[1,111],te=[1,109],se=[1,103],ie=[1,104],ue=[1,105],ne=[1,106],ae=[1,107],re=[1,108],le=[1,110],Le=[1,8,9,38,40,43],ce=[1,8,9,22],je=[1,8,9,79],v=[1,8,9,22,74,75,79,81,82,83,84,85,86],xe={trace:n(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,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,namespaceIdentifier:37,STRUCT_START:38,classStatements:39,STRUCT_STOP:40,NAMESPACE:41,classIdentifier:42,STYLE_SEPARATOR:43,members:44,CLASS:45,ANNOTATION_START:46,ANNOTATION_END:47,MEMBER:48,SEPARATOR:49,relation:50,NOTE_FOR:51,noteText:52,NOTE:53,direction_tb:54,direction_bt:55,direction_rl:56,direction_lr:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,STYLE:74,ALPHA:75,stylesOpt:76,CSSCLASS:77,style:78,COMMA:79,styleComponent:80,NUM:81,COLON:82,UNIT:83,SPACE:84,BRKT:85,PCT:86,commentToken:87,textToken:88,graphCodeTokens:89,textNoTagsToken:90,TAGSTART:91,TAGEND:92,"==":93,"--":94,DEFAULT:95,MINUS:96,keywords:97,UNICODE_TEXT:98,BQUOTE_STR:99,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",38:"STRUCT_START",40:"STRUCT_STOP",41:"NAMESPACE",43:"STYLE_SEPARATOR",45:"CLASS",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"MEMBER",49:"SEPARATOR",51:"NOTE_FOR",53:"NOTE",54:"direction_tb",55:"direction_bt",56:"direction_rl",57:"direction_lr",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"STYLE",75:"ALPHA",77:"CSSCLASS",79:"COMMA",81:"NUM",82:"COLON",83:"UNIT",84:"SPACE",85:"BRKT",86:"PCT",89:"graphCodeTokens",91:"TAGSTART",92:"TAGEND",93:"==",94:"--",95:"DEFAULT",96:"MINUS",97:"keywords",98:"UNICODE_TEXT",99:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[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],[37,2],[39,1],[39,2],[39,3],[24,1],[24,3],[24,4],[24,6],[42,2],[42,3],[26,4],[44,1],[44,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,1],[31,1],[31,1],[31,1],[50,3],[50,2],[50,2],[50,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,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],[76,1],[76,3],[78,1],[78,2],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[87,1],[87,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[90,1],[90,1],[90,1],[90,1],[16,1],[16,1],[16,1],[16,1],[19,1],[52,1]],performAction:n(function(a,l,A,u,p,t,K){var s=t.length-1;switch(p){case 8:this.$=t[s-1];break;case 9:case 12:case 14:this.$=t[s];break;case 10:case 13:this.$=t[s-2]+"."+t[s];break;case 11:case 15:this.$=t[s-1]+t[s];break;case 16:case 17:this.$=t[s-1]+"~"+t[s]+"~";break;case 18:u.addRelation(t[s]);break;case 19:t[s-1].title=u.cleanupLabel(t[s]),u.addRelation(t[s-1]);break;case 29:this.$=t[s].trim(),u.setAccTitle(this.$);break;case 30:case 31:this.$=t[s].trim(),u.setAccDescription(this.$);break;case 32:u.addClassesToNamespace(t[s-3],t[s-1]);break;case 33:u.addClassesToNamespace(t[s-4],t[s-1]);break;case 34:this.$=t[s],u.addNamespace(t[s]);break;case 35:this.$=[t[s]];break;case 36:this.$=[t[s-1]];break;case 37:t[s].unshift(t[s-2]),this.$=t[s];break;case 39:u.setCssClass(t[s-2],t[s]);break;case 40:u.addMembers(t[s-3],t[s-1]);break;case 41:u.setCssClass(t[s-5],t[s-3]),u.addMembers(t[s-5],t[s-1]);break;case 42:this.$=t[s],u.addClass(t[s]);break;case 43:this.$=t[s-1],u.addClass(t[s-1]),u.setClassLabel(t[s-1],t[s]);break;case 44:u.addAnnotation(t[s],t[s-2]);break;case 45:this.$=[t[s]];break;case 46:t[s].push(t[s-1]),this.$=t[s];break;case 47:break;case 48:u.addMember(t[s-1],u.cleanupLabel(t[s]));break;case 49:break;case 50:break;case 51:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 52:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 53:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 54:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 55:u.addNote(t[s],t[s-1]);break;case 56:u.addNote(t[s]);break;case 57:u.setDirection("TB");break;case 58:u.setDirection("BT");break;case 59:u.setDirection("RL");break;case 60:u.setDirection("LR");break;case 61:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 62:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 63:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 64:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 65:this.$=u.relationType.AGGREGATION;break;case 66:this.$=u.relationType.EXTENSION;break;case 67:this.$=u.relationType.COMPOSITION;break;case 68:this.$=u.relationType.DEPENDENCY;break;case 69:this.$=u.relationType.LOLLIPOP;break;case 70:this.$=u.lineType.LINE;break;case 71:this.$=u.lineType.DOTTED_LINE;break;case 72:case 78:this.$=t[s-2],u.setClickEvent(t[s-1],t[s]);break;case 73:case 79:this.$=t[s-3],u.setClickEvent(t[s-2],t[s-1]),u.setTooltip(t[s-2],t[s]);break;case 74:this.$=t[s-2],u.setLink(t[s-1],t[s]);break;case 75:this.$=t[s-3],u.setLink(t[s-2],t[s-1],t[s]);break;case 76:this.$=t[s-3],u.setLink(t[s-2],t[s-1]),u.setTooltip(t[s-2],t[s]);break;case 77:this.$=t[s-4],u.setLink(t[s-3],t[s-2],t[s]),u.setTooltip(t[s-3],t[s-1]);break;case 80:this.$=t[s-3],u.setClickEvent(t[s-2],t[s-1],t[s]);break;case 81:this.$=t[s-4],u.setClickEvent(t[s-3],t[s-2],t[s-1]),u.setTooltip(t[s-3],t[s]);break;case 82:this.$=t[s-3],u.setLink(t[s-2],t[s]);break;case 83:this.$=t[s-4],u.setLink(t[s-3],t[s-1],t[s]);break;case 84:this.$=t[s-4],u.setLink(t[s-3],t[s-1]),u.setTooltip(t[s-3],t[s]);break;case 85:this.$=t[s-5],u.setLink(t[s-4],t[s-2],t[s]),u.setTooltip(t[s-4],t[s-1]);break;case 86:this.$=t[s-2],u.setCssStyle(t[s-1],t[s]);break;case 87:u.setCssClass(t[s-1],t[s]);break;case 88:this.$=[t[s]];break;case 89:t[s-2].push(t[s]),this.$=t[s-2];break;case 91:this.$=t[s-1]+t[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,18:20,19:38,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:i,34:r,36:h,37:21,41:c,42:22,45:f,46:d,48:B,49:S,51:N,53:Ee,54:ge,55:me,56:be,57:ke,67:Te,68:ye,70:Fe,74:De,75:C,77:_e,81:E,96:g,98:m,99:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(Be,[2,5],{8:[1,46]}),{8:[1,47]},e(o,[2,18],{22:[1,48]}),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(o,[2,23]),e(o,[2,24]),e(o,[2,25]),e(o,[2,26]),e(o,[2,27]),e(o,[2,28]),{33:[1,49]},{35:[1,50]},e(o,[2,31]),e(o,[2,47],{50:51,58:54,59:55,13:[1,52],22:[1,53],60:Q,61:X,62:W,63:q,64:H,65:Se,66:ve}),{38:[1,63]},e(J,[2,38],{38:[1,65],43:[1,64]}),e(o,[2,49]),e(o,[2,50]),{16:66,75:C,81:E,96:g,98:m},{16:37,18:67,19:38,75:C,81:E,96:g,98:m,99:T},{16:37,18:68,19:38,75:C,81:E,96:g,98:m,99:T},{16:37,18:69,19:38,75:C,81:E,96:g,98:m,99:T},{75:[1,70]},{13:[1,71]},{16:37,18:72,19:38,75:C,81:E,96:g,98:m,99:T},{13:Ke,52:73},e(o,[2,57]),e(o,[2,58]),e(o,[2,59]),e(o,[2,60]),e(M,[2,12],{16:37,19:38,18:76,17:[1,75],20:[1,77],75:C,81:E,96:g,98:m,99:T}),e(M,[2,14],{20:[1,78]}),{15:79,16:80,75:C,81:E,96:g,98:m},{16:37,18:81,19:38,75:C,81:E,96:g,98:m,99:T},e(Z,[2,114]),e(Z,[2,115]),e(Z,[2,116]),e(Z,[2,117]),e([1,8,9,12,13,20,22,38,40,43,60,61,62,63,64,65,66,71,73],[2,118]),e(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,18:20,37:21,42:22,16:37,19:38,5:82,32:i,34:r,36:h,41:c,45:f,46:d,48:B,49:S,51:N,53:Ee,54:ge,55:me,56:be,57:ke,67:Te,68:ye,70:Fe,74:De,75:C,77:_e,81:E,96:g,98:m,99:T}),{5:83,10:5,16:37,18:20,19:38,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:i,34:r,36:h,37:21,41:c,42:22,45:f,46:d,48:B,49:S,51:N,53:Ee,54:ge,55:me,56:be,57:ke,67:Te,68:ye,70:Fe,74:De,75:C,77:_e,81:E,96:g,98:m,99:T},e(o,[2,19]),e(o,[2,29]),e(o,[2,30]),{13:[1,85],16:37,18:84,19:38,75:C,81:E,96:g,98:m,99:T},{50:86,58:54,59:55,60:Q,61:X,62:W,63:q,64:H,65:Se,66:ve},e(o,[2,48]),{59:87,65:Se,66:ve},e($,[2,64],{58:88,60:Q,61:X,62:W,63:q,64:H}),e(z,[2,65]),e(z,[2,66]),e(z,[2,67]),e(z,[2,68]),e(z,[2,69]),e(Ye,[2,70]),e(Ye,[2,71]),{8:[1,90],24:91,39:89,42:22,45:f},{16:92,75:C,81:E,96:g,98:m},{44:93,48:Ne},{47:[1,95]},{13:[1,96]},{13:[1,97]},{71:[1,98],73:[1,99]},{22:ee,74:te,75:se,76:100,78:101,80:102,81:ie,82:ue,83:ne,84:ae,85:re,86:le},{75:[1,112]},{13:Ke,52:113},e(o,[2,56]),e(o,[2,119]),{16:37,18:114,19:38,75:C,81:E,96:g,98:m,99:T},e(M,[2,15]),e(M,[2,16]),e(M,[2,17]),{38:[2,34]},{15:116,16:80,17:[1,115],38:[2,9],75:C,81:E,96:g,98:m},e(Le,[2,42],{11:117,12:[1,118]}),e(Be,[2,7]),{9:[1,119]},e(ce,[2,51]),{16:37,18:120,19:38,75:C,81:E,96:g,98:m,99:T},{13:[1,122],16:37,18:121,19:38,75:C,81:E,96:g,98:m,99:T},e($,[2,63],{58:123,60:Q,61:X,62:W,63:q,64:H}),e($,[2,62]),{40:[1,124]},{24:91,39:125,42:22,45:f},{8:[1,126],40:[2,35]},e(J,[2,39],{38:[1,127]}),{40:[1,128]},{40:[2,45],44:129,48:Ne},{16:37,18:130,19:38,75:C,81:E,96:g,98:m,99:T},e(o,[2,72],{13:[1,131]}),e(o,[2,74],{13:[1,133],69:[1,132]}),e(o,[2,78],{13:[1,134],72:[1,135]}),{13:[1,136]},e(o,[2,86],{79:[1,137]}),e(je,[2,88],{80:138,22:ee,74:te,75:se,81:ie,82:ue,83:ne,84:ae,85:re,86:le}),e(v,[2,90]),e(v,[2,92]),e(v,[2,93]),e(v,[2,94]),e(v,[2,95]),e(v,[2,96]),e(v,[2,97]),e(v,[2,98]),e(v,[2,99]),e(v,[2,100]),e(o,[2,87]),e(o,[2,55]),e(M,[2,13]),{15:139,16:80,75:C,81:E,96:g,98:m},{38:[2,11]},e(Le,[2,43]),{13:[1,140]},{1:[2,4]},e(ce,[2,53]),e(ce,[2,52]),{16:37,18:141,19:38,75:C,81:E,96:g,98:m,99:T},e($,[2,61]),e(o,[2,32]),{40:[1,142]},{24:91,39:143,40:[2,36],42:22,45:f},{44:144,48:Ne},e(J,[2,40]),{40:[2,46]},e(o,[2,44]),e(o,[2,73]),e(o,[2,75]),e(o,[2,76],{69:[1,145]}),e(o,[2,79]),e(o,[2,80],{13:[1,146]}),e(o,[2,82],{13:[1,148],69:[1,147]}),{22:ee,74:te,75:se,78:149,80:102,81:ie,82:ue,83:ne,84:ae,85:re,86:le},e(v,[2,91]),{38:[2,10]},{14:[1,150]},e(ce,[2,54]),e(o,[2,33]),{40:[2,37]},{40:[1,151]},e(o,[2,77]),e(o,[2,81]),e(o,[2,83]),e(o,[2,84],{69:[1,152]}),e(je,[2,89],{80:138,22:ee,74:te,75:se,81:ie,82:ue,83:ne,84:ae,85:re,86:le}),e(Le,[2,8]),e(J,[2,41]),e(o,[2,85])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],79:[2,34],116:[2,11],119:[2,4],129:[2,46],139:[2,10],143:[2,37]},parseError:n(function(a,l){if(l.recoverable)this.trace(a);else{var A=new Error(a);throw A.hash=l,A}},"parseError"),parse:n(function(a){var l=this,A=[0],u=[],p=[null],t=[],K=this.table,s="",he=0,Qe=0,ut=2,Xe=1,nt=t.slice.call(arguments,1),k=Object.create(this.lexer),R={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(R.yy[Ie]=this.yy[Ie]);k.setInput(a,R.yy),R.yy.lexer=k,R.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Oe=k.yylloc;t.push(Oe);var at=k.options&&k.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function rt(F){A.length=A.length-2*F,p.length=p.length-F,t.length=t.length-F}n(rt,"popStack");function We(){var F;return F=u.pop()||k.lex()||Xe,typeof F!="number"&&(F instanceof Array&&(u=F,F=u.pop()),F=l.symbols_[F]||F),F}n(We,"lex");for(var y,w,_,Re,G={},Ae,L,qe,pe;;){if(w=A[A.length-1],this.defaultActions[w]?_=this.defaultActions[w]:((y===null||typeof y>"u")&&(y=We()),_=K[w]&&K[w][y]),typeof _>"u"||!_.length||!_[0]){var we="";pe=[];for(Ae in K[w])this.terminals_[Ae]&&Ae>ut&&pe.push("'"+this.terminals_[Ae]+"'");k.showPosition?we="Parse error on line "+(he+1)+`: +`+k.showPosition()+` +Expecting `+pe.join(", ")+", got '"+(this.terminals_[y]||y)+"'":we="Parse error on line "+(he+1)+": Unexpected "+(y==Xe?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(we,{text:k.match,token:this.terminals_[y]||y,line:k.yylineno,loc:Oe,expected:pe})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+y);switch(_[0]){case 1:A.push(y),p.push(k.yytext),t.push(k.yylloc),A.push(_[1]),y=null,Qe=k.yyleng,s=k.yytext,he=k.yylineno,Oe=k.yylloc;break;case 2:if(L=this.productions_[_[1]][1],G.$=p[p.length-L],G._$={first_line:t[t.length-(L||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(L||1)].first_column,last_column:t[t.length-1].last_column},at&&(G._$.range=[t[t.length-(L||1)].range[0],t[t.length-1].range[1]]),Re=this.performAction.apply(G,[s,Qe,he,R.yy,_[1],p,t].concat(nt)),typeof Re<"u")return Re;L&&(A=A.slice(0,-1*L*2),p=p.slice(0,-1*L),t=t.slice(0,-1*L)),A.push(this.productions_[_[1]][0]),p.push(G.$),t.push(G._$),qe=K[A[A.length-2]][A[A.length-1]],A.push(qe);break;case 3:return!0}}return!0},"parse")},it=function(){var O={EOF:1,parseError:n(function(l,A){if(this.yy.parser)this.yy.parser.parseError(l,A);else throw new Error(l)},"parseError"),setInput:n(function(a,l){return this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:n(function(a){var l=a.length,A=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var p=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:A?(A.length===u.length?this.yylloc.first_column:0)+u[u.length-A.length].length-A[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(a){this.unput(this.match.slice(a))},"less"),pastInput:n(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var a=this.pastInput(),l=new Array(a.length+1).join("-");return a+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:n(function(a,l){var A,u,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),u=a[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],A=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,l,A,u;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;tl[0].length)){if(l=A,u=t,this.options.backtrack_lexer){if(a=this.test_match(A,p[t]),a!==!1)return a;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(a=this.test_match(l,p[u]),a!==!1?a:!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:n(function(){var l=this.next();return l||this.lex()},"lex"),begin:n(function(l){this.conditionStack.push(l)},"begin"),popState:n(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(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:n(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:n(function(l){this.begin(l)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:n(function(l,A,u,p){switch(u){case 0:return 54;case 1:return 55;case 2:return 56;case 3:return 57;case 4:break;case 5:break;case 6:return this.begin("acc_title"),32;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),34;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 71;case 22:this.popState();break;case 23:return 72;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 74;case 28:return this.begin("namespace"),41;case 29:return this.popState(),8;case 30:break;case 31:return this.begin("namespace-body"),38;case 32:return this.popState(),40;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),45;case 38:return this.popState(),8;case 39:break;case 40:return this.popState(),this.popState(),40;case 41:return this.begin("class-body"),38;case 42:return this.popState(),40;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 77;case 49:return 67;case 50:return 68;case 51:return 70;case 52:return 51;case 53:return 53;case 54:return 46;case 55:return 47;case 56:return 73;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:return 69;case 64:return 69;case 65:return 69;case 66:return 69;case 67:return 61;case 68:return 61;case 69:return 63;case 70:return 63;case 71:return 62;case 72:return 60;case 73:return 64;case 74:return 65;case 75:return 66;case 76:return 22;case 77:return 43;case 78:return 96;case 79:return 17;case 80:return"PLUS";case 81:return 82;case 82:return 79;case 83:return 85;case 84:return 85;case 85:return 86;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 75;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 81;case 93:return 98;case 94:return 84;case 95:return 84;case 96: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)/,/^(?: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\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};return O}();xe.lexer=it;function oe(){this.yy={}}return n(oe,"Parser"),oe.prototype=xe,xe.Parser=oe,new oe}();Pe.parser=Pe;var jt=Pe,He=["#","+","~","-",""],U,Je=(U=class{constructor(i,r){this.memberType=r,this.visibility="",this.classifier="";const h=lt(i,D());this.parseMember(h)}getDisplayDetails(){let i=this.visibility+Ve(this.id);this.memberType==="method"&&(i+=`(${Ve(this.parameters.trim())})`,this.returnType&&(i+=" : "+Ve(this.returnType))),i=i.trim();const r=this.parseClassifier();return{displayText:i,cssStyle:r}}parseMember(i){let r="";if(this.memberType==="method"){const c=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(c){const f=c[1]?c[1].trim():"";if(He.includes(f)&&(this.visibility=f),this.id=c[2].trim(),this.parameters=c[3]?c[3].trim():"",r=c[4]?c[4].trim():"",this.returnType=c[5]?c[5].trim():"",r===""){const d=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(d)&&(r=d,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const h=i.length,c=i.substring(0,1),f=i.substring(h-1);He.includes(c)&&(this.visibility=c),/[$*]/.exec(f)&&(r=f),this.id=i.substring(this.visibility===""?0:1,r===""?h:h-1)}this.classifier=r}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},n(U,"ClassMember"),U),Ce="classId-",Ge=[],b=new Map,fe=[],Ze=0,I=new Map,Me=0,j=[],V=n(e=>x.sanitizeText(e,D()),"sanitizeText"),P=n(function(e){const i=x.sanitizeText(e,D());let r="",h=i;if(i.indexOf("~")>0){const c=i.split("~");h=V(c[0]),r=V(c[1])}return{className:h,type:r}},"splitClassNameAndType"),Et=n(function(e,i){const r=x.sanitizeText(e,D());i&&(i=V(i));const{className:h}=P(r);b.get(h).label=i},"setClassLabel"),de=n(function(e){const i=x.sanitizeText(e,D()),{className:r,type:h}=P(i);if(b.has(r))return;const c=x.sanitizeText(r,D());b.set(c,{id:c,type:h,label:c,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:Ce+c+"-"+Ze}),Ze++},"addClass"),et=n(function(e){const i=x.sanitizeText(e,D());if(b.has(i))return b.get(i).domId;throw new Error("Class not found: "+i)},"lookUpDomId"),gt=n(function(){Ge=[],b=new Map,fe=[],j=[],j.push(st),I=new Map,Me=0,ze="TB",dt()},"clear"),mt=n(function(e){return b.get(e)},"getClass"),bt=n(function(){return b},"getClasses"),kt=n(function(){return Ge},"getRelations"),Tt=n(function(){return fe},"getNotes"),yt=n(function(e){Ct.debug("Adding relation: "+JSON.stringify(e)),de(e.id1),de(e.id2),e.id1=P(e.id1).className,e.id2=P(e.id2).className,e.relationTitle1=x.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=x.sanitizeText(e.relationTitle2.trim(),D()),Ge.push(e)},"addRelation"),Ft=n(function(e,i){const r=P(e).className;b.get(r).annotations.push(i)},"addAnnotation"),tt=n(function(e,i){de(e);const r=P(e).className,h=b.get(r);if(typeof i=="string"){const c=i.trim();c.startsWith("<<")&&c.endsWith(">>")?h.annotations.push(V(c.substring(2,c.length-2))):c.indexOf(")")>0?h.methods.push(new Je(c,"method")):c&&h.members.push(new Je(c,"attribute"))}},"addMember"),Dt=n(function(e,i){Array.isArray(i)&&(i.reverse(),i.forEach(r=>tt(e,r)))},"addMembers"),_t=n(function(e,i){const r={id:`note${fe.length}`,class:i,text:e};fe.push(r)},"addNote"),Bt=n(function(e){return e.startsWith(":")&&(e=e.substring(1)),V(e.trim())},"cleanupLabel"),Ue=n(function(e,i){e.split(",").forEach(function(r){let h=r;/\d/.exec(r[0])&&(h=Ce+h);const c=b.get(h);c&&c.cssClasses.push(i)})},"setCssClass"),St=n(function(e,i){e.split(",").forEach(function(r){i!==void 0&&(b.get(r).tooltip=V(i))})},"setTooltip"),vt=n(function(e,i){return i&&I.has(i)?I.get(i).classes.get(e).tooltip:b.get(e).tooltip},"getTooltip"),Nt=n(function(e,i,r){const h=D();e.split(",").forEach(function(c){let f=c;/\d/.exec(c[0])&&(f=Ce+f);const d=b.get(f);d&&(d.link=$e.formatUrl(i,h),h.securityLevel==="sandbox"?d.linkTarget="_top":typeof r=="string"?d.linkTarget=V(r):d.linkTarget="_blank")}),Ue(e,"clickable")},"setLink"),Lt=n(function(e,i,r){e.split(",").forEach(function(h){xt(h,i,r),b.get(h).haveCallback=!0}),Ue(e,"clickable")},"setClickEvent"),xt=n(function(e,i,r){const h=x.sanitizeText(e,D());if(D().securityLevel!=="loose"||i===void 0)return;const f=h;if(b.has(f)){const d=et(f);let B=[];if(typeof r=="string"){B=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let S=0;S")),c.classed("hover",!0)}).on("mouseout",function(){i.transition().duration(500).style("opacity",0),Y(this).classed("hover",!1)})},"setupToolTips");j.push(st);var ze="TB",wt=n(()=>ze,"getDirection"),Vt=n(e=>{ze=e},"setDirection"),Pt=n(function(e){I.has(e)||(I.set(e,{id:e,classes:new Map,children:{},domId:Ce+e+"-"+Me}),Me++)},"addNamespace"),Mt=n(function(e){return I.get(e)},"getNamespace"),Gt=n(function(){return I},"getNamespaces"),Ut=n(function(e,i){if(I.has(e))for(const r of i){const{className:h}=P(r);b.get(h).parent=e,I.get(e).classes.set(h,b.get(h))}},"addClassesToNamespace"),zt=n(function(e,i){const r=b.get(e);if(!(!i||!r))for(const h of i)h.includes(",")?r.styles.push(...h.split(",")):r.styles.push(h)},"setCssStyle"),Qt={setAccTitle:ct,getAccTitle:ot,getAccDescription:ht,setAccDescription:At,getConfig:n(()=>D().class,"getConfig"),addClass:de,bindFunctions:It,clear:gt,getClass:mt,getClasses:bt,getNotes:Tt,addAnnotation:Ft,addNote:_t,getRelations:kt,addRelation:yt,getDirection:wt,setDirection:Vt,addMember:tt,addMembers:Dt,cleanupLabel:Bt,lineType:Ot,relationType:Rt,setClickEvent:Lt,setCssClass:Ue,setLink:Nt,getTooltip:vt,setTooltip:St,lookUpDomId:et,setDiagramTitle:pt,getDiagramTitle:ft,setClassLabel:Et,addNamespace:Pt,addClassesToNamespace:Ut,getNamespace:Mt,getNamespaces:Gt,setCssStyle:zt},Kt=n(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`,"getStyles"),Xt=Kt;export{Qt as a,jt as c,Xt as s}; diff --git a/pr-528/assets/chunks/chunk-REEJFE46.DZZ_04II.js b/pr-528/assets/chunks/chunk-REEJFE46.DZZ_04II.js new file mode 100644 index 000000000..f906613d5 --- /dev/null +++ b/pr-528/assets/chunks/chunk-REEJFE46.DZZ_04II.js @@ -0,0 +1,4 @@ +import{_ as d,j as T,l as u,d as _,ad as H,ae as it,ac as yt,u as U,af as ft,a0 as xt,a6 as gt,ag as ut,ah as J,i as K}from"../app.CKrDwBa1.js";var bt=d((s,t,a,l)=>{t.forEach(n=>{Mt[n](s,a,l)})},"insertMarkers"),wt=d((s,t,a)=>{u.trace("Making markers for ",a),s.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"),s.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"),mt=d((s,t,a)=>{s.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"),s.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"),vt=d((s,t,a)=>{s.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"),s.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"),kt=d((s,t,a)=>{s.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"),s.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"),Lt=d((s,t,a)=>{s.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),s.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"),St=d((s,t,a)=>{s.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"),s.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"),_t=d((s,t,a)=>{s.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"),s.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"),Bt=d((s,t,a)=>{s.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"),s.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).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")},"cross"),Et=d((s,t,a)=>{s.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Mt={extension:wt,composition:mt,aggregation:vt,dependency:kt,lollipop:Lt,point:St,circle:_t,cross:Bt,barb:Et},pr=bt;function Q(s,t){t&&s.attr("style",t)}d(Q,"applyStyle");function lt(s){const t=T(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=t.append("xhtml:div"),l=s.label,n=s.isNode?"nodeLabel":"edgeLabel",r=a.append("span");return r.html(l),Q(r,s.labelStyle),r.attr("class",n),Q(a,s.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(lt,"addHtmlLabel");var Tt=d((s,t,a,l)=>{let n=s||"";if(typeof n=="object"&&(n=n[0]),H(_().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),u.debug("vertexText"+n);const r={isNode:l,label:ut(J(n)),labelStyle:t.replace("fill:","color:")};return lt(r)}else{const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",t.replace("color:","fill:"));let e=[];typeof n=="string"?e=n.split(/\\n|\n|/gi):Array.isArray(n)?e=n:e=[];for(const i of e){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),a?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=i.trim(),r.appendChild(c)}return r}},"createLabel"),I=Tt,B=d(async(s,t,a,l)=>{const n=_();let r;const e=t.useHtmlLabels||H(n.flowchart.htmlLabels);a?r=a:r="node default";const i=s.insert("g").attr("class",r).attr("id",t.domId||t.id),c=i.insert("g").attr("class","label").attr("style",t.labelStyle);let o;t.labelText===void 0?o="":o=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=c.node();let p;t.labelType==="markdown"?p=it(c,K(J(o),n),{useHtmlLabels:e,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):p=h.appendChild(I(K(J(o),n),t.labelStyle,!1,l));let y=p.getBBox();const f=t.padding/2;if(H(n.flowchart.htmlLabels)){const g=p.children[0],v=T(p),x=g.getElementsByTagName("img");if(x){const E=o.replace(/]*>/g,"").trim()==="";await Promise.all([...x].map(b=>new Promise(C=>{function S(){if(b.style.display="flex",b.style.flexDirection="column",E){const D=n.fontSize?n.fontSize:window.getComputedStyle(document.body).fontSize,O=parseInt(D,10)*5+"px";b.style.minWidth=O,b.style.maxWidth=O}else b.style.width="100%";C(b)}d(S,"setupImage"),setTimeout(()=>{b.complete&&S()}),b.addEventListener("error",S),b.addEventListener("load",S)})))}y=g.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}return e?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:i,bbox:y,halfPadding:f,label:c}},"labelHelper"),m=d((s,t)=>{const a=t.node().getBBox();s.width=a.width,s.height=a.height},"updateNodeBounds");function R(s,t,a,l){return s.insert("polygon",":first-child").attr("points",l.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}d(R,"insertPolygonShape");var Ct=d(s=>{const t=new Set;for(const a of s)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"),$t=d((s,t,a)=>{const l=Ct(s),n=2,r=t.height+2*a.padding,e=r/n,i=t.width+2*e+a.padding,c=a.padding/2;return l.has("right")&&l.has("left")&&l.has("up")&&l.has("down")?[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*c},{x:i-e,y:0},{x:i,y:0},{x:i,y:-r/3},{x:i+2*c,y:-r/2},{x:i,y:-2*r/3},{x:i,y:-r},{x:i-e,y:-r},{x:i/2,y:-r-2*c},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*c,y:-r/2},{x:0,y:-r/3}]:l.has("right")&&l.has("left")&&l.has("up")?[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}]:l.has("right")&&l.has("left")&&l.has("down")?[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}]:l.has("right")&&l.has("up")&&l.has("down")?[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}]:l.has("left")&&l.has("up")&&l.has("down")?[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}]:l.has("right")&&l.has("left")?[{x:e,y:0},{x:e,y:-c},{x:i-e,y:-c},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:i-e,y:-r+c},{x:e,y:-r+c},{x:e,y:-r},{x:0,y:-r/2}]:l.has("up")&&l.has("down")?[{x:i/2,y:0},{x:0,y:-c},{x:e,y:-c},{x:e,y:-r+c},{x:0,y:-r+c},{x:i/2,y:-r},{x:i,y:-r+c},{x:i-e,y:-r+c},{x:i-e,y:-c},{x:i,y:-c}]:l.has("right")&&l.has("up")?[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}]:l.has("right")&&l.has("down")?[{x:0,y:0},{x:i,y:0},{x:0,y:-r}]:l.has("left")&&l.has("up")?[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}]:l.has("left")&&l.has("down")?[{x:i,y:0},{x:0,y:0},{x:i,y:-r}]:l.has("right")?[{x:e,y:-c},{x:e,y:-c},{x:i-e,y:-c},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:i-e,y:-r+c},{x:e,y:-r+c},{x:e,y:-r+c}]:l.has("left")?[{x:e,y:0},{x:e,y:-c},{x:i-e,y:-c},{x:i-e,y:-r+c},{x:e,y:-r+c},{x:e,y:-r},{x:0,y:-r/2}]:l.has("up")?[{x:e,y:-c},{x:e,y:-r+c},{x:0,y:-r+c},{x:i/2,y:-r},{x:i,y:-r+c},{x:i-e,y:-r+c},{x:i-e,y:-c}]:l.has("down")?[{x:i/2,y:0},{x:0,y:-c},{x:e,y:-c},{x:e,y:-r+c},{x:i-e,y:-r+c},{x:i-e,y:-c},{x:i,y:-c}]:[{x:0,y:0}]},"getArrowPoints");function nt(s,t){return s.intersect(t)}d(nt,"intersectNode");var Nt=nt;function ct(s,t,a,l){var n=s.x,r=s.y,e=n-l.x,i=r-l.y,c=Math.sqrt(t*t*i*i+a*a*e*e),o=Math.abs(t*a*e/c);l.x0}d(V,"sameSign");var Rt=dt,Ht=pt;function pt(s,t,a){var l=s.x,n=s.y,r=[],e=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(g){e=Math.min(e,g.x),i=Math.min(i,g.y)}):(e=Math.min(e,t.x),i=Math.min(i,t.y));for(var c=l-s.width/2-e,o=n-s.height/2-i,h=0;h1&&r.sort(function(g,v){var x=g.x-a.x,E=g.y-a.y,b=Math.sqrt(x*x+E*E),C=v.x-a.x,S=v.y-a.y,D=Math.sqrt(C*C+S*S);return b{var a=s.x,l=s.y,n=t.x-a,r=t.y-l,e=s.width/2,i=s.height/2,c,o;return Math.abs(r)*e>Math.abs(n)*i?(r<0&&(i=-i),c=r===0?0:i*n/r,o=i):(n<0&&(e=-e),c=e,o=n===0?0:e*r/n),{x:a+c,y:l+o}},"intersectRect"),Dt=Wt,w={node:Nt,circle:It,ellipse:ht,polygon:Ht,rect:Dt},At=d(async(s,t)=>{t.useHtmlLabels||_().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:l,bbox:n,halfPadding:r}=await B(s,t,"node "+t.classes,!0);u.info("Classes = ",t.classes);const e=l.insert("rect",":first-child");return e.attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-r).attr("y",-n.height/2-r).attr("width",n.width+t.padding).attr("height",n.height+t.padding),m(t,e),t.intersect=function(i){return w.rect(t,i)},l},"note"),Xt=At,P=d(s=>s?" "+s:"","formatClass"),N=d((s,t)=>`${t||"node default"}${P(s.classes)} ${P(s.class)}`,"getClassesFromNode"),tt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=n+r,i=[{x:e/2,y:0},{x:e,y:-e/2},{x:e/2,y:-e},{x:0,y:-e/2}];u.info("Question main (Circle)");const c=R(a,e,e,i);return c.attr("style",t.style),m(t,c),t.intersect=function(o){return u.warn("Intersect called"),w.polygon(t,i,o)},a},"question"),Yt=d((s,t)=>{const a=s.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=28,n=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}];return a.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(e){return w.circle(t,14,e)},a},"choice"),Ut=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=4,r=l.height+t.padding,e=r/n,i=l.width+2*e+t.padding,c=[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],o=R(a,i,r,c);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return w.polygon(t,c,h)},a},"hexagon"),jt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,void 0,!0),n=2,r=l.height+2*t.padding,e=r/n,i=l.width+2*e+t.padding,c=$t(t.directions,l,t),o=R(a,i,r,c);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return w.polygon(t,c,h)},a},"block_arrow"),Ot=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:-r/2,y:0},{x:n,y:0},{x:n,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return R(a,n,r,e).attr("style",t.style),t.width=n+r,t.height=r,t.intersect=function(c){return w.polygon(t,e,c)},a},"rect_left_inv_arrow"),zt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:-2*r/6,y:0},{x:n-r/6,y:0},{x:n+2*r/6,y:-r},{x:r/6,y:-r}],i=R(a,n,r,e);return i.attr("style",t.style),m(t,i),t.intersect=function(c){return w.polygon(t,e,c)},a},"lean_right"),Zt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:2*r/6,y:0},{x:n+r/6,y:0},{x:n-2*r/6,y:-r},{x:-r/6,y:-r}],i=R(a,n,r,e);return i.attr("style",t.style),m(t,i),t.intersect=function(c){return w.polygon(t,e,c)},a},"lean_left"),Ft=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:-2*r/6,y:0},{x:n+2*r/6,y:0},{x:n-r/6,y:-r},{x:r/6,y:-r}],i=R(a,n,r,e);return i.attr("style",t.style),m(t,i),t.intersect=function(c){return w.polygon(t,e,c)},a},"trapezoid"),qt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:r/6,y:0},{x:n-r/6,y:0},{x:n+2*r/6,y:-r},{x:-2*r/6,y:-r}],i=R(a,n,r,e);return i.attr("style",t.style),m(t,i),t.intersect=function(c){return w.polygon(t,e,c)},a},"inv_trapezoid"),Jt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:0,y:0},{x:n+r/2,y:0},{x:n,y:-r/2},{x:n+r/2,y:-r},{x:0,y:-r}],i=R(a,n,r,e);return i.attr("style",t.style),m(t,i),t.intersect=function(c){return w.polygon(t,e,c)},a},"rect_right_inv_arrow"),Qt=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=n/2,e=r/(2.5+n/50),i=l.height+e+t.padding,c="M 0,"+e+" a "+r+","+e+" 0,0,0 "+n+" 0 a "+r+","+e+" 0,0,0 "+-n+" 0 l 0,"+i+" a "+r+","+e+" 0,0,0 "+n+" 0 l 0,"+-i,o=a.attr("label-offset-y",e).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-n/2+","+-(i/2+e)+")");return m(t,o),t.intersect=function(h){const p=w.rect(t,h),y=p.x-t.x;if(r!=0&&(Math.abs(y)t.height/2-e)){let f=e*e*(1-y*y/(r*r));f!=0&&(f=Math.sqrt(f)),f=e-f,h.y-t.y>0&&(f=-f),p.y+=f}return p},a},"cylinder"),Vt=d(async(s,t)=>{const{shapeSvg:a,bbox:l,halfPadding:n}=await B(s,t,"node "+t.classes+" "+t.class,!0),r=a.insert("rect",":first-child"),e=t.positioned?t.width:l.width+t.padding,i=t.positioned?t.height:l.height+t.padding,c=t.positioned?-e/2:-l.width/2-n,o=t.positioned?-i/2:-l.height/2-n;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",o).attr("width",e).attr("height",i),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(Z(r,t.props.borders,e,i),h.delete("borders")),h.forEach(p=>{u.warn(`Unknown node property ${p}`)})}return m(t,r),t.intersect=function(h){return w.rect(t,h)},a},"rect"),Gt=d(async(s,t)=>{const{shapeSvg:a,bbox:l,halfPadding:n}=await B(s,t,"node "+t.classes,!0),r=a.insert("rect",":first-child"),e=t.positioned?t.width:l.width+t.padding,i=t.positioned?t.height:l.height+t.padding,c=t.positioned?-e/2:-l.width/2-n,o=t.positioned?-i/2:-l.height/2-n;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",o).attr("width",e).attr("height",i),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(Z(r,t.props.borders,e,i),h.delete("borders")),h.forEach(p=>{u.warn(`Unknown node property ${p}`)})}return m(t,r),t.intersect=function(h){return w.rect(t,h)},a},"composite"),Kt=d(async(s,t)=>{const{shapeSvg:a}=await B(s,t,"label",!0);u.trace("Classes = ",t.class);const l=a.insert("rect",":first-child"),n=0,r=0;if(l.attr("width",n).attr("height",r),a.attr("class","label edgeLabel"),t.props){const e=new Set(Object.keys(t.props));t.props.borders&&(Z(l,t.props.borders,n,r),e.delete("borders")),e.forEach(i=>{u.warn(`Unknown node property ${i}`)})}return m(t,l),t.intersect=function(e){return w.rect(t,e)},a},"labelRect");function Z(s,t,a,l){const n=[],r=d(i=>{n.push(i,0)},"addBorder"),e=d(i=>{n.push(0,i)},"skipBorder");t.includes("t")?(u.debug("add top border"),r(a)):e(a),t.includes("r")?(u.debug("add right border"),r(l)):e(l),t.includes("b")?(u.debug("add bottom border"),r(a)):e(a),t.includes("l")?(u.debug("add left border"),r(l)):e(l),s.attr("stroke-dasharray",n.join(" "))}d(Z,"applyNodePropertyBorders");var Pt=d((s,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const l=s.insert("g").attr("class",a).attr("id",t.domId||t.id),n=l.insert("rect",":first-child"),r=l.insert("line"),e=l.insert("g").attr("class","label"),i=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof i=="object"?c=i[0]:c=i,u.info("Label text abc79",c,i,typeof i=="object");const o=e.node().appendChild(I(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(_().flowchart.htmlLabels)){const v=o.children[0],x=T(o);h=v.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}u.info("Text 2",i);const p=i.slice(1,i.length);let y=o.getBBox();const f=e.node().appendChild(I(p.join?p.join("
    "):p,t.labelStyle,!0,!0));if(H(_().flowchart.htmlLabels)){const v=f.children[0],x=T(f);h=v.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}const g=t.padding/2;return T(f).attr("transform","translate( "+(h.width>y.width?0:(y.width-h.width)/2)+", "+(y.height+g+5)+")"),T(o).attr("transform","translate( "+(h.width{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.height+t.padding,r=l.width+n/4+t.padding,e=a.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return m(t,e),t.intersect=function(i){return w.rect(t,i)},a},"stadium"),rr=d(async(s,t)=>{const{shapeSvg:a,bbox:l,halfPadding:n}=await B(s,t,N(t,void 0),!0),r=a.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",l.width/2+n).attr("width",l.width+t.padding).attr("height",l.height+t.padding),u.info("Circle main"),m(t,r),t.intersect=function(e){return u.info("Circle intersect",t,l.width/2+n,e),w.circle(t,l.width/2+n,e)},a},"circle"),ar=d(async(s,t)=>{const{shapeSvg:a,bbox:l,halfPadding:n}=await B(s,t,N(t,void 0),!0),r=5,e=a.insert("g",":first-child"),i=e.insert("circle"),c=e.insert("circle");return e.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",l.width/2+n+r).attr("width",l.width+t.padding+r*2).attr("height",l.height+t.padding+r*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",l.width/2+n).attr("width",l.width+t.padding).attr("height",l.height+t.padding),u.info("DoubleCircle main"),m(t,i),t.intersect=function(o){return u.info("DoubleCircle intersect",t,l.width/2+n+r,o),w.circle(t,l.width/2+n+r,o)},a},"doublecircle"),er=d(async(s,t)=>{const{shapeSvg:a,bbox:l}=await B(s,t,N(t,void 0),!0),n=l.width+t.padding,r=l.height+t.padding,e=[{x:0,y:0},{x:n,y:0},{x:n,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],i=R(a,n,r,e);return i.attr("style",t.style),m(t,i),t.intersect=function(c){return w.polygon(t,e,c)},a},"subroutine"),sr=d((s,t)=>{const a=s.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=a.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),m(t,l),t.intersect=function(n){return w.circle(t,7,n)},a},"start"),rt=d((s,t,a)=>{const l=s.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n=70,r=10;a==="LR"&&(n=10,r=70);const e=l.append("rect").attr("x",-1*n/2).attr("y",-1*r/2).attr("width",n).attr("height",r).attr("class","fork-join");return m(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(i){return w.rect(t,i)},l},"forkJoin"),ir=d((s,t)=>{const a=s.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=a.insert("circle",":first-child"),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),l.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),m(t,n),t.intersect=function(r){return w.circle(t,7,r)},a},"end"),lr=d((s,t)=>{var G;const a=t.padding/2,l=4,n=8;let r;t.classes?r="node "+t.classes:r="node default";const e=s.insert("g").attr("class",r).attr("id",t.domId||t.id),i=e.insert("rect",":first-child"),c=e.insert("line"),o=e.insert("line");let h=0,p=l;const y=e.insert("g").attr("class","label");let f=0;const g=(G=t.classData.annotations)==null?void 0:G[0],v=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",x=y.node().appendChild(I(v,t.labelStyle,!0,!0));let E=x.getBBox();if(H(_().flowchart.htmlLabels)){const k=x.children[0],L=T(x);E=k.getBoundingClientRect(),L.attr("width",E.width),L.attr("height",E.height)}t.classData.annotations[0]&&(p+=E.height+l,h+=E.width);let b=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(_().flowchart.htmlLabels?b+="<"+t.classData.type+">":b+="<"+t.classData.type+">");const C=y.node().appendChild(I(b,t.labelStyle,!0,!0));T(C).attr("class","classTitle");let S=C.getBBox();if(H(_().flowchart.htmlLabels)){const k=C.children[0],L=T(C);S=k.getBoundingClientRect(),L.attr("width",S.width),L.attr("height",S.height)}p+=S.height+l,S.width>h&&(h=S.width);const D=[];t.classData.members.forEach(k=>{const L=k.getDisplayDetails();let A=L.displayText;_().flowchart.htmlLabels&&(A=A.replace(//g,">"));const W=y.node().appendChild(I(A,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let $=W.getBBox();if(H(_().flowchart.htmlLabels)){const q=W.children[0],Y=T(W);$=q.getBoundingClientRect(),Y.attr("width",$.width),Y.attr("height",$.height)}$.width>h&&(h=$.width),p+=$.height+l,D.push(W)}),p+=n;const F=[];if(t.classData.methods.forEach(k=>{const L=k.getDisplayDetails();let A=L.displayText;_().flowchart.htmlLabels&&(A=A.replace(//g,">"));const W=y.node().appendChild(I(A,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let $=W.getBBox();if(H(_().flowchart.htmlLabels)){const q=W.children[0],Y=T(W);$=q.getBoundingClientRect(),Y.attr("width",$.width),Y.attr("height",$.height)}$.width>h&&(h=$.width),p+=$.height+l,F.push(W)}),p+=n,g){let k=(h-E.width)/2;T(x).attr("transform","translate( "+(-1*h/2+k)+", "+-1*p/2+")"),f=E.height+l}let O=(h-S.width)/2;return T(C).attr("transform","translate( "+(-1*h/2+O)+", "+(-1*p/2+f)+")"),f+=S.height+l,c.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-p/2-a+n+f).attr("y2",-p/2-a+n+f),f+=n,D.forEach(k=>{T(k).attr("transform","translate( "+-h/2+", "+(-1*p/2+f+n/2)+")");const L=k==null?void 0:k.getBBox();f+=((L==null?void 0:L.height)??0)+l}),f+=n,o.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-p/2-a+n+f).attr("y2",-p/2-a+n+f),f+=n,F.forEach(k=>{T(k).attr("transform","translate( "+-h/2+", "+(-1*p/2+f)+")");const L=k==null?void 0:k.getBBox();f+=((L==null?void 0:L.height)??0)+l}),i.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-a).attr("y",-(p/2)-a).attr("width",h+t.padding).attr("height",p+t.padding),m(t,i),t.intersect=function(k){return w.rect(t,k)},e},"class_box"),at={rhombus:tt,composite:Gt,question:tt,rect:Vt,labelRect:Kt,rectWithTitle:Pt,choice:Yt,circle:rr,doublecircle:ar,stadium:tr,hexagon:Ut,block_arrow:jt,rect_left_inv_arrow:Ot,lean_right:zt,lean_left:Zt,trapezoid:Ft,inv_trapezoid:qt,rect_right_inv_arrow:Jt,cylinder:Qt,start:sr,end:ir,note:Xt,subroutine:er,fork:rt,join:rt,class_box:lr},X={},yr=d(async(s,t,a)=>{let l,n;if(t.link){let r;_().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),l=s.insert("svg:a").attr("xlink:href",t.link).attr("target",r),n=await at[t.shape](l,t,a)}else n=await at[t.shape](s,t,a),l=n;return t.tooltip&&n.attr("title",t.tooltip),t.class&&n.attr("class","node default "+t.class),X[t.id]=l,t.haveCallback&&X[t.id].attr("class",X[t.id].attr("class")+" clickable"),l},"insertNode"),fr=d((s,t)=>{X[t.id]=s},"setNodeElem"),xr=d(()=>{X={}},"clear"),gr=d(s=>{const t=X[s.id];u.trace("Transforming node",s.diff,s,"translate("+(s.x-s.width/2-5)+", "+s.width/2+")");const a=8,l=s.diff||0;return s.clusterNode?t.attr("transform","translate("+(s.x+l-s.width/2)+", "+(s.y-s.height/2-a)+")"):t.attr("transform","translate("+s.x+", "+s.y+")"),l},"positionNode"),nr=d((s,t,a,l,n)=>{t.arrowTypeStart&&et(s,"start",t.arrowTypeStart,a,l,n),t.arrowTypeEnd&&et(s,"end",t.arrowTypeEnd,a,l,n)},"addEdgeMarkers"),cr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},et=d((s,t,a,l,n,r)=>{const e=cr[a];if(!e){u.warn(`Unknown arrow type: ${a}`);return}const i=t==="start"?"Start":"End";s.attr(`marker-${t}`,`url(${l}#${n}_${r}-${e}${i})`)},"addEdgeMarker"),z={},M={},ur=d(()=>{z={},M={}},"clear"),br=d((s,t)=>{const a=_(),l=H(a.flowchart.htmlLabels),n=t.labelType==="markdown"?it(s,t.label,{style:t.labelStyle,useHtmlLabels:l,addSvgBackground:!0},a):I(t.label,t.labelStyle),r=s.insert("g").attr("class","edgeLabel"),e=r.insert("g").attr("class","label");e.node().appendChild(n);let i=n.getBBox();if(l){const o=n.children[0],h=T(n);i=o.getBoundingClientRect(),h.attr("width",i.width),h.attr("height",i.height)}e.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),z[t.id]=r,t.width=i.width,t.height=i.height;let c;if(t.startLabelLeft){const o=I(t.startLabelLeft,t.labelStyle),h=s.insert("g").attr("class","edgeTerminals"),p=h.insert("g").attr("class","inner");c=p.node().appendChild(o);const y=o.getBBox();p.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startLeft=h,j(c,t.startLabelLeft)}if(t.startLabelRight){const o=I(t.startLabelRight,t.labelStyle),h=s.insert("g").attr("class","edgeTerminals"),p=h.insert("g").attr("class","inner");c=h.node().appendChild(o),p.node().appendChild(o);const y=o.getBBox();p.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startRight=h,j(c,t.startLabelRight)}if(t.endLabelLeft){const o=I(t.endLabelLeft,t.labelStyle),h=s.insert("g").attr("class","edgeTerminals"),p=h.insert("g").attr("class","inner");c=p.node().appendChild(o);const y=o.getBBox();p.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),h.node().appendChild(o),M[t.id]||(M[t.id]={}),M[t.id].endLeft=h,j(c,t.endLabelLeft)}if(t.endLabelRight){const o=I(t.endLabelRight,t.labelStyle),h=s.insert("g").attr("class","edgeTerminals"),p=h.insert("g").attr("class","inner");c=p.node().appendChild(o);const y=o.getBBox();p.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),h.node().appendChild(o),M[t.id]||(M[t.id]={}),M[t.id].endRight=h,j(c,t.endLabelRight)}return n},"insertEdgeLabel");function j(s,t){_().flowchart.htmlLabels&&s&&(s.style.width=t.length*9+"px",s.style.height="12px")}d(j,"setTerminalWidth");var wr=d((s,t)=>{u.debug("Moving label abc88 ",s.id,s.label,z[s.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const l=_(),{subGraphTitleTotalMargin:n}=yt(l);if(s.label){const r=z[s.id];let e=s.x,i=s.y;if(a){const c=U.calcLabelPosition(a);u.debug("Moving label "+s.label+" from (",e,",",i,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(e=c.x,i=c.y)}r.attr("transform",`translate(${e}, ${i+n/2})`)}if(s.startLabelLeft){const r=M[s.id].startLeft;let e=s.x,i=s.y;if(a){const c=U.calcTerminalLabelPosition(s.arrowTypeStart?10:0,"start_left",a);e=c.x,i=c.y}r.attr("transform",`translate(${e}, ${i})`)}if(s.startLabelRight){const r=M[s.id].startRight;let e=s.x,i=s.y;if(a){const c=U.calcTerminalLabelPosition(s.arrowTypeStart?10:0,"start_right",a);e=c.x,i=c.y}r.attr("transform",`translate(${e}, ${i})`)}if(s.endLabelLeft){const r=M[s.id].endLeft;let e=s.x,i=s.y;if(a){const c=U.calcTerminalLabelPosition(s.arrowTypeEnd?10:0,"end_left",a);e=c.x,i=c.y}r.attr("transform",`translate(${e}, ${i})`)}if(s.endLabelRight){const r=M[s.id].endRight;let e=s.x,i=s.y;if(a){const c=U.calcTerminalLabelPosition(s.arrowTypeEnd?10:0,"end_right",a);e=c.x,i=c.y}r.attr("transform",`translate(${e}, ${i})`)}},"positionEdgeLabel"),hr=d((s,t)=>{const a=s.x,l=s.y,n=Math.abs(t.x-a),r=Math.abs(t.y-l),e=s.width/2,i=s.height/2;return n>=e||r>=i},"outsideNode"),or=d((s,t,a)=>{u.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(a)} + node : x:${s.x} y:${s.y} w:${s.width} h:${s.height}`);const l=s.x,n=s.y,r=Math.abs(l-a.x),e=s.width/2;let i=a.xMath.abs(l-t.x)*c){let p=a.y{u.debug("abc88 cutPathAtIntersect",s,t);let a=[],l=s[0],n=!1;return s.forEach(r=>{if(!hr(t,r)&&!n){const e=or(t,l,r);let i=!1;a.forEach(c=>{i=i||c.x===e.x&&c.y===e.y}),a.some(c=>c.x===e.x&&c.y===e.y)||a.push(e),n=!0}else l=r,n||a.push(r)}),a},"cutPathAtIntersect"),mr=d(function(s,t,a,l,n,r,e){let i=a.points;u.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1;const o=r.node(t.v);var h=r.node(t.w);h!=null&&h.intersect&&(o!=null&&o.intersect)&&(i=i.slice(1,a.points.length-1),i.unshift(o.intersect(i[0])),i.push(h.intersect(i[i.length-1]))),a.toCluster&&(u.debug("to cluster abc88",l[a.toCluster]),i=st(a.points,l[a.toCluster].node),c=!0),a.fromCluster&&(u.debug("from cluster abc88",l[a.fromCluster]),i=st(i.reverse(),l[a.fromCluster].node).reverse(),c=!0);const p=i.filter(S=>!Number.isNaN(S.y));let y=gt;a.curve&&(n==="graph"||n==="flowchart")&&(y=a.curve);const{x:f,y:g}=ft(a),v=xt().x(f).y(g).curve(y);let x;switch(a.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-thick";break;default:x=""}switch(a.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break}const E=s.append("path").attr("d",v(p)).attr("id",a.id).attr("class"," "+x+(a.classes?" "+a.classes:"")).attr("style",a.style);let b="";(_().flowchart.arrowMarkerAbsolute||_().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),nr(E,a,b,e,n);let C={};return c&&(C.updatedPath=i),C.originalPath=a.points,C},"insertEdge");export{ur as a,br as b,xr as c,mr as d,wr as e,I as f,Dt as g,yr as i,pr as m,gr as p,fr as s,m as u}; diff --git a/pr-528/assets/chunks/chunk-RYO7GUH3.D7U7-9br.js b/pr-528/assets/chunks/chunk-RYO7GUH3.D7U7-9br.js new file mode 100644 index 000000000..ccfe990f2 --- /dev/null +++ b/pr-528/assets/chunks/chunk-RYO7GUH3.D7U7-9br.js @@ -0,0 +1 @@ +import{_ as l}from"../app.CKrDwBa1.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}; diff --git a/pr-528/assets/chunks/chunk-V35ELUW5.C6DQpogG.js b/pr-528/assets/chunks/chunk-V35ELUW5.C6DQpogG.js new file mode 100644 index 000000000..e5f27688d --- /dev/null +++ b/pr-528/assets/chunks/chunk-V35ELUW5.C6DQpogG.js @@ -0,0 +1 @@ +import{_ as n,n as c,m as l}from"../app.CKrDwBa1.js";var o=n((a,t)=>{const e=a.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((a,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"};o(a,e).lower()},"drawBackgroundRect"),g=n((a,t)=>{const e=t.text.replace(c," "),r=a.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 s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),m=n((a,t,e,r)=>{const s=a.append("image");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",i)},"drawImage"),h=n((a,t,e,r)=>{const s=a.append("use");s.attr("x",t),s.attr("y",e);const i=l(r);s.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{p as a,d as b,h as c,o as d,m as e,g as f,y as g}; diff --git a/pr-528/assets/chunks/classDiagram-Q73GJZWF.U-6cgaiz.js b/pr-528/assets/chunks/classDiagram-Q73GJZWF.U-6cgaiz.js new file mode 100644 index 000000000..a45f5bf09 --- /dev/null +++ b/pr-528/assets/chunks/classDiagram-Q73GJZWF.U-6cgaiz.js @@ -0,0 +1,2 @@ +import{c as G,a as N,s as I}from"./chunk-NGC4727B.Dvf-dRgF.js";import{_ as f,d as S,l as u,j as B,k as W,a0 as P,a6 as R,u as _,a7 as X}from"../app.CKrDwBa1.js";import{G as Y}from"./graph.DDKaZ6Ct.js";import{l as $}from"./layout.PWtEKM9a.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";var H=0,J=f(function(i,a,t,o,p){const g=f(function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");a.points=a.points.filter(e=>!Number.isNaN(e.y));const s=a.points,c=P().x(function(e){return e.x}).y(function(e){return e.y}).curve(R),n=i.append("path").attr("d",c(s)).attr("id","edge"+H).attr("class","relation");let r="";o.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+r+"#"+g(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+r+"#"+g(t.relation.type2)+"End)");let m,h;const x=a.points.length;let b=_.calcLabelPosition(a.points);m=b.x,h=b.y;let y,w,k,v;if(x%2!==0&&x>1){let e=_.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),d=_.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);u.debug("cardinality_1_point "+JSON.stringify(e)),u.debug("cardinality_2_point "+JSON.stringify(d)),y=e.x,w=e.y,k=d.x,v=d.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),d=e.append("text").attr("class","label").attr("x",m).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=d;const l=d.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",l.x-o.padding/2).attr("y",l.y-o.padding/2).attr("width",l.width+o.padding).attr("height",l.height+o.padding)}u.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",y).attr("y",w).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",k).attr("y",v).attr("fill","black").attr("font-size","6").text(t.relationTitle2),H++},"drawEdge"),O=f(function(i,a,t,o){u.debug("Rendering class ",a,t);const p=a.id,g={id:p,label:a.id,width:0,height:0},s=i.append("g").attr("id",o.db.lookUpDomId(p)).attr("class","classGroup");let c;a.link?c=s.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;a.annotations.forEach(function(d){const l=c.append("tspan").text("«"+d+"»");n||l.attr("dy",t.textHeight),n=!1});let r=A(a);const m=c.append("tspan").text(r).attr("class","title");n||m.attr("dy",t.textHeight);const h=c.node().getBBox().height;let x,b,y;if(a.members.length>0){x=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin/2).attr("y2",t.padding+h+t.dividerMargin/2);const d=s.append("text").attr("x",t.padding).attr("y",h+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.members.forEach(function(l){C(d,l,n,t),n=!1}),b=d.node().getBBox()}if(a.methods.length>0){y=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin+b.height).attr("y2",t.padding+h+t.dividerMargin+b.height);const d=s.append("text").attr("x",t.padding).attr("y",h+2*t.dividerMargin+b.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.methods.forEach(function(l){C(d,l,n,t),n=!1})}const w=s.node().getBBox();var k=" ";a.cssClasses.length>0&&(k=k+a.cssClasses.join(" "));const e=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",w.width+2*t.padding).attr("height",w.height+t.padding+.5*t.dividerMargin).attr("class",k).node().getBBox().width;return c.node().childNodes.forEach(function(d){d.setAttribute("x",(e-d.getBBox().width)/2)}),a.tooltip&&c.insert("title").text(a.tooltip),x&&x.attr("x2",e),y&&y.attr("x2",e),g.width=e,g.height=w.height+t.padding+.5*t.dividerMargin,g},"drawClass"),A=f(function(i){let a=i.id;return i.type&&(a+="<"+X(i.type)+">"),a},"getClassTitleString"),Z=f(function(i,a,t,o){u.debug("Rendering note ",a,t);const p=a.id,g={id:p,text:a.text,width:0,height:0},s=i.append("g").attr("id",p).attr("class","classGroup");let c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${a.text}"`).split(` +`);n.forEach(function(x){u.debug(`Adding line: ${x}`),c.append("tspan").text(x).attr("class","title").attr("dy",t.textHeight)});const r=s.node().getBBox(),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",r.width+2*t.padding).attr("height",r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return c.node().childNodes.forEach(function(x){x.setAttribute("x",(h-x.getBBox().width)/2)}),g.width=h,g.height=r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin,g},"drawNote"),C=f(function(i,a,t,o){const{displayText:p,cssStyle:g}=a.getDisplayDetails(),s=i.append("tspan").attr("x",o.padding).text(p);g!==""&&s.attr("style",a.cssStyle),t||s.attr("dy",o.textHeight)},"addTspan"),M={getClassTitleString:A,drawClass:O,drawEdge:J,drawNote:Z},L={},E=20,T=f(function(i){const a=Object.entries(L).find(t=>t[1].label===i);if(a)return a[0]},"getGraphId"),F=f(function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).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"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).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"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).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")},"insertMarkers"),U=f(function(i,a,t,o){const p=S().class;L={},u.info("Rendering diagram "+i);const g=S().securityLevel;let s;g==="sandbox"&&(s=B("#i"+a));const c=g==="sandbox"?B(s.nodes()[0].contentDocument.body):B("body"),n=c.select(`[id='${a}']`);F(n);const r=new Y({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=o.db.getClasses(),h=[...m.keys()];for(const e of h){const d=m.get(e),l=M.drawClass(n,d,p,o);L[l.id]=l,r.setNode(l.id,l),u.info("Org height: "+l.height)}o.db.getRelations().forEach(function(e){u.info("tjoho"+T(e.id1)+T(e.id2)+JSON.stringify(e)),r.setEdge(T(e.id1),T(e.id2),{relation:e},e.title||"DEFAULT")}),o.db.getNotes().forEach(function(e){u.debug(`Adding note: ${JSON.stringify(e)}`);const d=M.drawNote(n,e,p,o);L[d.id]=d,r.setNode(d.id,d),e.class&&m.has(e.class)&&r.setEdge(e.id,T(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),$(r),r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&(u.debug("Node "+e+": "+JSON.stringify(r.node(e))),c.select("#"+(o.db.lookUpDomId(e)||e)).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )"))}),r.edges().forEach(function(e){e!==void 0&&r.edge(e)!==void 0&&(u.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r.edge(e))),M.drawEdge(n,r.edge(e),r.edge(e).relation,p,o))});const y=n.node().getBBox(),w=y.width+E*2,k=y.height+E*2;W(n,k,w,p.useMaxWidth);const v=`${y.x-E} ${y.y-E} ${w} ${k}`;u.debug(`viewBox ${v}`),n.attr("viewBox",v)},"draw"),z={draw:U},at={parser:G,db:N,renderer:z,styles:I,init:f(i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,N.clear()},"init")};export{at as diagram}; diff --git a/pr-528/assets/chunks/classDiagram-v2-C6QPLPW4.4RHychDB.js b/pr-528/assets/chunks/classDiagram-v2-C6QPLPW4.4RHychDB.js new file mode 100644 index 000000000..cb30e461e --- /dev/null +++ b/pr-528/assets/chunks/classDiagram-v2-C6QPLPW4.4RHychDB.js @@ -0,0 +1,2 @@ +import{m as tt,c as et,a as nt,u as it,s as st,i as at,b as rt,p as G,d as lt,e as ot,f as F,g as R}from"./chunk-REEJFE46.DZZ_04II.js";import{c as ct,a as M,s as dt}from"./chunk-NGC4727B.Dvf-dRgF.js";import{_ as g,l as s,d as m,j as T,u as ft,a8 as ut,a9 as $,aa as H,ab as z,x as ht,e as W,ac as J,ad as B,ae as gt}from"../app.CKrDwBa1.js";import{G as q}from"./graph.DDKaZ6Ct.js";import{l as wt}from"./layout.PWtEKM9a.js";import{w as S}from"./json.WLb0uRtH.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";import"./clone.BlcZCRmq.js";var u={},x={},V={},yt=g(()=>{x={},V={},u={}},"clear"),L=g((e,t)=>(s.trace("In isDescendant",t," ",e," = ",x[t].includes(e)),!!x[t].includes(e)),"isDescendant"),bt=g((e,t)=>(s.info("Descendants of ",t," is ",x[t]),s.info("Edge is ",e),e.v===t||e.w===t?!1:x[t]?x[t].includes(e.v)||L(e.v,t)||L(e.w,t)||x[t].includes(e.w):(s.debug("Tilt, ",t,",not in descendants"),!1)),"edgeInCluster"),j=g((e,t,n,l)=>{s.warn("Copying children of ",e,"root",l,"data",t.node(e),l);const i=t.children(e)||[];e!==l&&i.push(e),s.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(a=>{if(t.children(a).length>0)j(a,t,n,l);else{const r=t.node(a);s.info("cp ",a," to ",l," with parent ",e),n.setNode(a,r),l!==t.parent(a)&&(s.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==l&&a!==e?(s.debug("Setting parent",a,e),n.setParent(a,e)):(s.info("In copy ",e,"root",l,"data",t.node(e),l),s.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==l,"node!==clusterId",a!==e));const f=t.edges(a);s.debug("Copying Edges",f),f.forEach(d=>{s.info("Edge",d);const h=t.edge(d.v,d.w,d.name);s.info("Edge data",h,l);try{bt(d,l)?(s.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),s.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):s.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",l," clusterId:",e)}catch(b){s.error(b)}})}s.debug("Removing node",a),t.removeNode(a)})},"copy"),K=g((e,t)=>{const n=t.children(e);let l=[...n];for(const i of n)V[i]=e,l=[...l,...K(i,t)];return l},"extractDescendants"),k=g((e,t)=>{s.trace("Searching",e);const n=t.children(e);if(s.trace("Searching children of id ",e,n),n.length<1)return s.trace("This is a valid node",e),e;for(const l of n){const i=k(l,t);if(i)return s.trace("Found replacement for",e," => ",i),i}},"findNonClusterChild"),X=g(e=>!u[e]||!u[e].externalConnections?e:u[e]?u[e].id:e,"getAnchorId"),mt=g((e,t)=>{if(!e||t>10){s.debug("Opting out, no graph ");return}else s.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(s.warn("Cluster identified",n," Replacement id in edges: ",k(n,e)),x[n]=K(n,e),u[n]={id:k(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const l=e.children(n),i=e.edges();l.length>0?(s.debug("Cluster identified",n,x),i.forEach(a=>{if(a.v!==n&&a.w!==n){const r=L(a.v,n),f=L(a.w,n);r^f&&(s.warn("Edge: ",a," leaves cluster ",n),s.warn("Descendants of XXX ",n,": ",x[n]),u[n].externalConnections=!0)}})):s.debug("Not a cluster ",n,x)});for(let n of Object.keys(u)){const l=u[n].id,i=e.parent(l);i!==n&&u[i]&&!u[i].externalConnections&&(u[n].id=i)}e.edges().forEach(function(n){const l=e.edge(n);s.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),s.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let i=n.v,a=n.w;if(s.warn("Fix XXX",u,"ids:",n.v,n.w,"Translating: ",u[n.v]," --- ",u[n.w]),u[n.v]&&u[n.w]&&u[n.v]===u[n.w]){s.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),s.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),i=X(n.v),a=X(n.w),e.removeEdge(n.v,n.w,n.name);const r=n.w+"---"+n.v;e.setNode(r,{domId:r,id:r,labelStyle:"",labelText:l.label,padding:0,shape:"labelRect",style:""});const f=structuredClone(l),d=structuredClone(l);f.label="",f.arrowTypeEnd="none",d.label="",f.fromCluster=n.v,d.toCluster=n.v,e.setEdge(i,r,f,n.name+"-cyclic-special"),e.setEdge(r,a,d,n.name+"-cyclic-special")}else if(u[n.v]||u[n.w]){if(s.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),i=X(n.v),a=X(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){const r=e.parent(i);u[r].externalConnections=!0,l.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);u[r].externalConnections=!0,l.toCluster=n.w}s.warn("Fix Replacing with XXX",i,a,n.name),e.setEdge(i,a,l,n.name)}}),s.warn("Adjusted Graph",S(e)),Q(e,0),s.trace(u)},"adjustClustersAndEdges"),Q=g((e,t)=>{var i,a;if(s.warn("extractor - ",t,S(e),e.children("D")),t>10){s.error("Bailing out");return}let n=e.nodes(),l=!1;for(const r of n){const f=e.children(r);l=l||f.length>0}if(!l){s.debug("Done, no node has children",e.nodes());return}s.debug("Nodes = ",n,t);for(const r of n)if(s.debug("Extracting node",r,u,u[r]&&!u[r].externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!u[r])s.debug("Not a cluster",r,t);else if(!u[r].externalConnections&&e.children(r)&&e.children(r).length>0){s.warn("Cluster without external connections, without a parent and with children",r,t);let d=e.graph().rankdir==="TB"?"LR":"TB";(a=(i=u[r])==null?void 0:i.clusterData)!=null&&a.dir&&(d=u[r].clusterData.dir,s.warn("Fixing dir",u[r].clusterData.dir,d));const h=new q({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});s.warn("Old graph before copy",S(e)),j(r,e,h,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:u[r].clusterData,labelText:u[r].labelText,graph:h}),s.warn("New graph after copy node: (",r,")",S(h)),s.debug("Old graph after copy",S(e))}else s.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!u[r].externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),s.debug(u);n=e.nodes(),s.warn("New list of nodes",n);for(const r of n){const f=e.node(r);s.warn(" Now next level",r,f),f.clusterNode&&Q(f.graph,t+1)}},"extractor"),U=g((e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(l=>{const i=e.children(l),a=U(e,i);n=[...n,...a]}),n},"sorter"),vt=g(e=>U(e,e.children()),"sortNodesByHierarchy"),pt=g((e,t)=>{s.info("Creating subgraph rect for ",t.id,t);const n=m(),l=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),i=l.insert("rect",":first-child"),a=B(n.flowchart.htmlLabels),r=l.insert("g").attr("class","cluster-label"),f=t.labelType==="markdown"?gt(r,t.labelText,{style:t.labelStyle,useHtmlLabels:a},n):r.node().appendChild(F(t.labelText,t.labelStyle,void 0,!0));let d=f.getBBox();if(B(n.flowchart.htmlLabels)){const c=f.children[0],o=T(f);d=c.getBoundingClientRect(),o.attr("width",d.width),o.attr("height",d.height)}const h=0*t.padding,b=h/2,y=t.width<=d.width+h?d.width+h:t.width;t.width<=d.width+h?t.diff=(d.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,s.trace("Data ",t,JSON.stringify(t)),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-y/2).attr("y",t.y-t.height/2-b).attr("width",y).attr("height",t.height+h);const{subGraphTitleTopMargin:v}=J(n);a?r.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+v})`):r.attr("transform",`translate(${t.x}, ${t.y-t.height/2+v})`);const w=i.node().getBBox();return t.width=w.width,t.height=w.height,t.intersect=function(c){return R(t,c)},l},"rect"),xt=g((e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),l=n.insert("rect",":first-child"),i=0*t.padding,a=i/2;l.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const r=l.node().getBBox();return t.width=r.width,t.height=r.height,t.intersect=function(f){return R(t,f)},n},"noteGroup"),St=g((e,t)=>{const n=m(),l=e.insert("g").attr("class",t.classes).attr("id",t.id),i=l.insert("rect",":first-child"),a=l.insert("g").attr("class","cluster-label"),r=l.append("rect"),f=a.node().appendChild(F(t.labelText,t.labelStyle,void 0,!0));let d=f.getBBox();if(B(n.flowchart.htmlLabels)){const c=f.children[0],o=T(f);d=c.getBoundingClientRect(),o.attr("width",d.width),o.attr("height",d.height)}d=f.getBBox();const h=0*t.padding,b=h/2,y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(d.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,i.attr("class","outer").attr("x",t.x-y/2-b).attr("y",t.y-t.height/2-b).attr("width",y+h).attr("height",t.height+h),r.attr("class","inner").attr("x",t.x-y/2-b).attr("y",t.y-t.height/2-b+d.height-1).attr("width",y+h).attr("height",t.height+h-d.height-3);const{subGraphTitleTopMargin:v}=J(n);a.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2-t.padding/3+(B(n.flowchart.htmlLabels)?5:3)+v})`);const w=i.node().getBBox();return t.height=w.height,t.intersect=function(c){return R(t,c)},l},"roundedWithTitle"),Nt=g((e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),l=n.insert("rect",":first-child"),i=0*t.padding,a=i/2;l.attr("class","divider").attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const r=l.node().getBBox();return t.width=r.width,t.height=r.height,t.diff=-t.padding/2,t.intersect=function(f){return R(t,f)},n},"divider"),Et={rect:pt,roundedWithTitle:St,noteGroup:xt,divider:Nt},Y={},Ct=g((e,t)=>{s.trace("Inserting cluster");const n=t.shape||"rect";Y[t.id]=Et[n](e,t)},"insertCluster"),Tt=g(()=>{Y={}},"clear"),Z=g(async(e,t,n,l,i,a)=>{s.info("Graph in recursive render: XXX",S(t),i);const r=t.graph().rankdir;s.trace("Dir in recursive render - dir:",r);const f=e.insert("g").attr("class","root");t.nodes()?s.info("Recursive render XXX",t.nodes()):s.info("No nodes found for",t),t.edges().length>0&&s.trace("Recursive edges",t.edge(t.edges()[0]));const d=f.insert("g").attr("class","clusters"),h=f.insert("g").attr("class","edgePaths"),b=f.insert("g").attr("class","edgeLabels"),y=f.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(c){const o=t.node(c);if(i!==void 0){const p=JSON.parse(JSON.stringify(i.clusterData));s.info("Setting data for cluster XXX (",c,") ",p,i),t.setNode(i.id,p),t.parent(c)||(s.trace("Setting parent",c,i.id),t.setParent(c,i.id,p))}if(s.info("(Insert) Node XXX"+c+": "+JSON.stringify(t.node(c))),o!=null&&o.clusterNode){s.info("Cluster identified",c,o.width,t.node(c));const{ranksep:p,nodesep:E}=t.graph();o.graph.setGraph({...o.graph.graph(),ranksep:p,nodesep:E});const D=await Z(y,o.graph,n,l,t.node(c),a),N=D.elem;it(o,N),o.diff=D.diff||0,s.info("Node bounds (abc123)",c,o,o.width,o.x,o.y),st(N,o),s.warn("Recursive render complete ",N,o)}else t.children(c).length>0?(s.info("Cluster - the non recursive path XXX",c,o.id,o,t),s.info(k(o.id,t)),u[o.id]={id:k(o.id,t),node:o}):(s.info("Node - the non recursive path",c,o.id,o),await at(y,t.node(c),{config:a,dir:r}))})),t.edges().forEach(async function(c){const o=t.edge(c.v,c.w,c.name);s.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c)),s.info("Edge "+c.v+" -> "+c.w+": ",c," ",JSON.stringify(t.edge(c))),s.info("Fix",u,"ids:",c.v,c.w,"Translating: ",u[c.v],u[c.w]),await rt(b,o)}),t.edges().forEach(function(c){s.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c))}),s.info("Graph before layout:",JSON.stringify(S(t))),s.info("#############################################"),s.info("### Layout ###"),s.info("#############################################"),s.info(t),wt(t),s.info("Graph after layout:",JSON.stringify(S(t)));let v=0;const{subGraphTitleTotalMargin:w}=J(a);return vt(t).forEach(function(c){const o=t.node(c);s.info("Position "+c+": "+JSON.stringify(t.node(c))),s.info("Position "+c+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o!=null&&o.clusterNode?(o.y+=w,G(o)):t.children(c).length>0?(o.height+=w,Ct(d,o),u[o.id].node=o):(o.y+=w/2,G(o))}),t.edges().forEach(function(c){const o=t.edge(c);s.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(o),o),o.points.forEach(E=>E.y+=w/2);const p=lt(h,c,o,u,n,t,l);ot(o,p)}),t.nodes().forEach(function(c){const o=t.node(c);s.info(c,o.type,o.diff),o.type==="group"&&(v=o.diff)}),{elem:f,diff:v}},"recursiveRender"),kt=g(async(e,t,n,l,i)=>{tt(e,n,l,i),et(),nt(),Tt(),yt(),s.warn("Graph at first:",JSON.stringify(S(t))),mt(t),s.warn("Graph after:",JSON.stringify(S(t)));const a=m();await Z(e,t,l,i,void 0,a)},"render"),O=g(e=>W.sanitizeText(e,m()),"sanitizeText"),_={dividerMargin:10,padding:5,textHeight:10,curve:void 0},Dt=g(function(e,t,n,l){s.info("keys:",[...e.keys()]),s.info(e),e.forEach(function(i){var f,d;const r={shape:"rect",id:i.id,domId:i.domId,labelText:O(i.id),labelStyle:"",style:"fill: none; stroke: black",padding:((f=m().flowchart)==null?void 0:f.padding)??((d=m().class)==null?void 0:d.padding)};t.setNode(i.id,r),I(i.classes,t,n,l,i.id),s.info("setNode",r)})},"addNamespaces"),I=g(function(e,t,n,l,i){s.info("keys:",[...e.keys()]),s.info(e),[...e.values()].filter(a=>a.parent===i).forEach(function(a){var v,w;const r=a.cssClasses.join(" "),f=$(a.styles),d=a.label??a.id,h=0,y={labelStyle:f.labelStyle,shape:"class_box",labelText:O(d),classData:a,rx:h,ry:h,class:r,style:f.style,id:a.id,domId:a.domId,tooltip:l.db.getTooltip(a.id,i)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((v=m().flowchart)==null?void 0:v.padding)??((w=m().class)==null?void 0:w.padding)};t.setNode(a.id,y),i&&t.setParent(a.id,i),s.info("setNode",y)})},"addClasses"),Xt=g(function(e,t,n,l){s.info(e),e.forEach(function(i,a){var o,p;const r=i,f="",d={labelStyle:"",style:""},h=r.text,b=0,v={labelStyle:d.labelStyle,shape:"note",labelText:O(h),noteData:r,rx:b,ry:b,class:f,style:d.style,id:r.id,domId:r.id,tooltip:"",type:"note",padding:((o=m().flowchart)==null?void 0:o.padding)??((p=m().class)==null?void 0:p.padding)};if(t.setNode(r.id,v),s.info("setNode",v),!r.class||!l.has(r.class))return;const w=n+a,c={id:`edgeNote${w}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:H(_.curve,z)};t.setEdge(r.id,r.class,c,w)})},"addNotes"),Bt=g(function(e,t){const n=m().flowchart;let l=0;e.forEach(function(i){var r;l++;const a={classes:"relation",pattern:i.relation.lineType==1?"dashed":"solid",id:ht(i.id1,i.id2,{prefix:"id",counter:l}),arrowhead:i.type==="arrow_open"?"none":"normal",startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowTypeStart:A(i.relation.type1),arrowTypeEnd:A(i.relation.type2),style:"fill:none",labelStyle:"",curve:H(n==null?void 0:n.curve,z)};if(s.info(a,i),i.style!==void 0){const f=$(i.style);a.style=f.style,a.labelStyle=f.labelStyle}i.text=i.title,i.text===void 0?i.style!==void 0&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",((r=m().flowchart)==null?void 0:r.htmlLabels)??m().htmlLabels?(a.labelType="html",a.label=''+i.text+""):(a.labelType="text",a.label=i.text.replace(W.lineBreakRegex,` +`),i.style===void 0&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),t.setEdge(i.id1,i.id2,a,l)})},"addRelations"),Lt=g(function(e){_={..._,...e}},"setConf"),Rt=g(async function(e,t,n,l){s.info("Drawing class - ",t);const i=m().flowchart??m().class,a=m().securityLevel;s.info("config:",i);const r=(i==null?void 0:i.nodeSpacing)??50,f=(i==null?void 0:i.rankSpacing)??50,d=new q({multigraph:!0,compound:!0}).setGraph({rankdir:l.db.getDirection(),nodesep:r,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=l.db.getNamespaces(),b=l.db.getClasses(),y=l.db.getRelations(),v=l.db.getNotes();s.info(y),Dt(h,d,t,l),I(b,d,t,l),Bt(y,d),Xt(v,d,y.length+1,b);let w;a==="sandbox"&&(w=T("#i"+t));const c=a==="sandbox"?T(w.nodes()[0].contentDocument.body):T("body"),o=c.select(`[id="${t}"]`),p=c.select("#"+t+" g");if(await kt(p,d,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),ft.insertTitle(o,"classTitleText",(i==null?void 0:i.titleTopMargin)??5,l.db.getDiagramTitle()),ut(d,o,i==null?void 0:i.diagramPadding,i==null?void 0:i.useMaxWidth),!(i!=null&&i.htmlLabels)){const E=a==="sandbox"?w.nodes()[0].contentDocument:document,D=E.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const N of D){const P=N.getBBox(),C=E.createElementNS("http://www.w3.org/2000/svg","rect");C.setAttribute("rx",0),C.setAttribute("ry",0),C.setAttribute("width",P.width),C.setAttribute("height",P.height),N.insertBefore(C,N.firstChild)}}},"draw");function A(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}g(A,"getArrowMarker");var _t={setConf:Lt,draw:Rt},qt={parser:ct,db:M,renderer:_t,styles:dt,init:g(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()},"init")};export{qt as diagram}; diff --git a/pr-528/assets/chunks/clone.BlcZCRmq.js b/pr-528/assets/chunks/clone.BlcZCRmq.js new file mode 100644 index 000000000..4168f6375 --- /dev/null +++ b/pr-528/assets/chunks/clone.BlcZCRmq.js @@ -0,0 +1 @@ +import{b as r}from"./baseUniq.HRNeWzar.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/pr-528/assets/chunks/constants.C1G_zmdY.js b/pr-528/assets/chunks/constants.C1G_zmdY.js new file mode 100644 index 000000000..97355b4df --- /dev/null +++ b/pr-528/assets/chunks/constants.C1G_zmdY.js @@ -0,0 +1 @@ +const e=Object.freeze({golangVersion:"go1.22.3",nodeVersion:"21.7.2",yarnVersion:"1.22.19",rollkitLatestTag:"v0.14.1",rollkitLatestSha:"5a8693e",rollkitCosmosSDKVersion:"v0.50.6-rollkit-v0.13.3-no-fraud-proofs",rollkitIgniteAppVersion:"rollkit/v0.2.1",localDALatestTag:"v0.3.1",goSequencingLatestTag:"v0.4.1",centralizedSequencerLatestTag:"v0.4.0",igniteVersionTag:"v28.5.3",celestiaNodeArabicaTag:"v0.20.2-arabica",celestiaNodeArabicaRollkitTag:"v0.14.1",celestiaNodeMochaTag:"v0.20.2-mocha",celestiaNodeMochaRollkitTag:"v0.14.1",celestiaNodeMainnetTag:"v0.17.2",celestiaNodeMainnetRollkitTag:"v0.13.7"});export{e as c}; diff --git a/pr-528/assets/chunks/cytoscape.esm.otp_DSkq.js b/pr-528/assets/chunks/cytoscape.esm.otp_DSkq.js new file mode 100644 index 000000000..6831c3ae2 --- /dev/null +++ b/pr-528/assets/chunks/cytoscape.esm.otp_DSkq.js @@ -0,0 +1,16 @@ +function We(r){"@babel/helpers - typeof";return We=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},We(r)}function ai(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Vu(r,e){for(var t=0;tr.length)&&(e=r.length);for(var t=0,a=new Array(e);t=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=!0,s=!1,o;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return i=l.done,l},e:function(l){s=!0,o=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(s)throw o}}}}var Ge=typeof window>"u"?null:window,Ai=Ge?Ge.navigator:null;Ge&&Ge.document;var Gu=We(""),Ys=We({}),Ku=We(function(){}),Wu=typeof HTMLElement>"u"?"undefined":We(HTMLElement),ba=function(e){return e&&e.instanceString&&Fe(e.instanceString)?e.instanceString():null},de=function(e){return e!=null&&We(e)==Gu},Fe=function(e){return e!=null&&We(e)===Ku},Re=function(e){return!gr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Se=function(e){return e!=null&&We(e)===Ys&&!Re(e)&&e.constructor===Object},Uu=function(e){return e!=null&&We(e)===Ys},ne=function(e){return e!=null&&We(e)===We(1)&&!isNaN(e)},Yu=function(e){return ne(e)&&Math.floor(e)===e},Qa=function(e){if(Wu!=="undefined")return e!=null&&e instanceof HTMLElement},gr=function(e){return wa(e)||Xs(e)},wa=function(e){return ba(e)==="collection"&&e._private.single},Xs=function(e){return ba(e)==="collection"&&!e._private.single},ii=function(e){return ba(e)==="core"},Zs=function(e){return ba(e)==="stylesheet"},Xu=function(e){return ba(e)==="event"},Jr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Zu=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Qu=function(e){return Se(e)&&ne(e.x1)&&ne(e.x2)&&ne(e.y1)&&ne(e.y2)},Ju=function(e){return Uu(e)&&Fe(e.then)},_u=function(){return Ai&&Ai.userAgent.match(/msie|trident|edge/i)},ua=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;st?1:0},il=function(e,t){return-1*Js(e,t)},be=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(p-=1),p<1/6?d+(y-d)*6*p:p<1/2?y:p<2/3?d+(y-d)*(2/3-p)*6:d}var f=new RegExp("^"+rl+"$").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},ul=function(e){var t,a=new RegExp("^"+ju+"$").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)return;t.push(u)}}return t},ll=function(e){return fl[e.toLowerCase()]},vl=function(e){return(Re(e)?e:null)||ll(e)||sl(e)||ul(e)||ol(e)},fl={transparent:[0,0,0,0],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],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],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],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]},_s=function(e){for(var t=e.map,a=e.keys,n=a.length,i=0;i=e||x<0||f&&D>=i}function g(){var E=Pn();if(p(E))return m(E);o=setTimeout(g,y(E))}function m(E){return o=void 0,c&&a?h(E):(a=n=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function w(){return o===void 0?s:m(Pn())}function S(){var E=Pn(),x=p(E);if(a=arguments,n=this,l=E,x){if(o===void 0)return d(l);if(f)return clearTimeout(o),o=setTimeout(g,e),h(l)}return o===void 0&&(o=setTimeout(g,e)),s}return S.cancel=b,S.flush=w,S}var vn=Zl,Bn=Ge?Ge.performance:null,to=Bn&&Bn.now?function(){return Bn.now()}:function(){return Date.now()},Ql=function(){if(Ge){if(Ge.requestAnimationFrame)return function(r){Ge.requestAnimationFrame(r)};if(Ge.mozRequestAnimationFrame)return function(r){Ge.mozRequestAnimationFrame(r)};if(Ge.webkitRequestAnimationFrame)return function(r){Ge.webkitRequestAnimationFrame(r)};if(Ge.msRequestAnimationFrame)return function(r){Ge.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(to())},1e3/60)}}(),Ja=function(e){return Ql(e)},qr=to,Dt=9261,ao=65599,ta=5381,no=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dt,a=t,n;n=e.next(),!n.done;)a=a*ao+n.value|0;return a},la=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dt;return t*ao+e|0},va=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ta;return(t<<5)+t+e|0},Jl=function(e,t){return e*2097152+t},Wr=function(e){return e[0]*2097152+e[1]},Ba=function(e,t){return[la(e[0],t[0]),va(e[1],t[1])]},_l=function(e,t){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===t&&e.splice(n,1)},li=function(e){e.splice(0,e.length)},iv=function(e,t){for(var a=0;a"u"?"undefined":We(Set))!==ov?Set:uv,fn=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!ii(e)){Ve("An element must have a core reference and parameters set");return}var n=t.group;if(n==null&&(t.data&&t.data.source!=null&&t.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Ve("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?n==="edges":!!t.pannable,active:!1,classes:new Ft,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),t.renderedPosition){var s=t.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Re(t.classes)?u=t.classes:de(t.classes)&&(u=t.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(g,m,b,w,S){var E;if(b==null&&(b=0),S==null&&(S=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=g.length);bM;0<=M?C++:C--)D.push(C);return D}).apply(this).reverse(),x=[],w=0,S=E.length;wP;0<=P?++D:--D)B.push(s(g,b));return B},y=function(g,m,b,w){var S,E,x;for(w==null&&(w=a),S=g[b];b>m;){if(x=b-1>>1,E=g[x],w(S,E)<0){g[b]=E,b=x;continue}break}return g[b]=S},p=function(g,m,b){var w,S,E,x,D;for(b==null&&(b=a),S=g.length,D=m,E=g[m],w=2*m+1;w0;){var E=m.pop(),x=p(E),D=E.id();if(c[D]=x,x!==1/0)for(var C=E.neighborhood().intersect(d),M=0;M0)for(I.unshift(R);f[$];){var F=f[$];I.unshift(F.edge),I.unshift(F.node),q=F.node,$=q.id()}return o.spawn(I)}}}},cv={kruskal:function(e){e=e||function(b){return 1};for(var t=this.byGroup(),a=t.nodes,n=t.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var S=0;S0;){if(S(),x++,w===v){for(var D=[],C=i,M=v,P=g[M];D.unshift(C),P!=null&&D.unshift(P),C=p[M],C!=null;)M=C.id(),P=g[M];return{found:!0,distance:f[w],path:this.spawn(D),steps:x}}h[w]=!0;for(var B=b._private.edges,L=0;LP&&(d[M]=P,m[M]=C,b[M]=S),!i){var B=C*v+D;!i&&d[B]>P&&(d[B]=P,m[B]=D,b[B]=S)}}}for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:s,Pe=b(ve),Ee=[],xe=Pe;;){if(xe==null)return t.spawn();var Te=m(xe),J=Te.edge,T=Te.pred;if(Ee.unshift(xe[0]),xe.same(pe)&&Ee.length>0)break;J!=null&&Ee.unshift(J),xe=T}return l.spawn(Ee)},E=0;E=0;v--){var f=u[v],c=f[1],h=f[2];(t[c]===o&&t[h]===l||t[c]===l&&t[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*t.length);t=wv(i,e,t),a--}return t},xv={kargerStein:function(){var e=this,t=this.byGroup(),a=t.nodes,n=t.edges;n.unmergeBy(function(I){return I.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/bv);if(i<2){Ve("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=t;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(t,a):(a0&&e.splice(0,t));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},kv=function(e){return Math.PI*e/180},Ma=function(e,t){return Math.atan2(t,e)-Math.PI/2},vi=Math.log2||function(r){return Math.log(r)/Math.log(2)},fo=function(e){return e>0?1:e<0?-1:0},ct=function(e,t){return Math.sqrt(it(e,t))},it=function(e,t){var a=t.x-e.x,n=t.y-e.y;return a*a+n*n},Pv=function(e){for(var t=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Mv=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Lv=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Av=function(e,t,a){return{x1:e.x1+t,x2:e.x2+t,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},co=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Rv=function(e,t,a){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},$a=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Ha=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(t.length===1)a=n=i=s=t[0];else if(t.length===2)a=i=t[0],s=n=t[1];else if(t.length===4){var o=Tr(t,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},qi=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},fi=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},Ot=function(e,t,a){return e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2},Ov=function(e,t){return Ot(e,t.x,t.y)},ho=function(e,t){return Ot(e,t.x1,t.y1)&&Ot(e,t.x2,t.y2)},go=function(e,t,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?dt(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var y=a-v+u-o,p=n-f-o,g=a+v-u+o,m=p;if(d=Xr(e,t,a,n,y,p,g,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,S=b,E=n+f-u+o;if(d=Xr(e,t,a,n,b,w,S,E,!1),d.length>0)return d}if(c){var x=a-v+u-o,D=n+f+o,C=a+v-u+o,M=D;if(d=Xr(e,t,a,n,x,D,C,M,!1),d.length>0)return d}if(h){var P=a-v-o,B=n-f+u-o,L=P,k=n+f-u+o;if(d=Xr(e,t,a,n,P,B,L,k,!1),d.length>0)return d}var O;{var A=a-v+u,R=n-f+u;if(O=aa(e,t,a,n,A,R,u+o),O.length>0&&O[0]<=A&&O[1]<=R)return[O[0],O[1]]}{var I=a+v-u,q=n-f+u;if(O=aa(e,t,a,n,I,q,u+o),O.length>0&&O[0]>=I&&O[1]<=q)return[O[0],O[1]]}{var $=a+v-u,F=n+f-u;if(O=aa(e,t,a,n,$,F,u+o),O.length>0&&O[0]>=$&&O[1]>=F)return[O[0],O[1]]}{var N=a-v+u,W=n+f-u;if(O=aa(e,t,a,n,N,W,u+o),O.length>0&&O[0]<=N&&O[1]>=W)return[O[0],O[1]]}return[]},Iv=function(e,t,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=t&&t<=c+l},zv=function(e,t,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||tv.y2)},Nv=function(e,t,a,n){a-=n;var i=t*t-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-t+s)/o,u=(-t-s)/o;return[l,u]},Fv=function(e,t,a,n,i){var s=1e-5;e===0&&(e=s),t/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-t*t)/9,u=-(27*n)+t*(9*a-2*(t*t)),u/=54,o=l*l*l+u*u,i[1]=0,h=t/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},Vv=function(e,t,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*t+2*s*s+2*s*t-l*t,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*t-s*t,h=[];Fv(u,v,f,c,h);for(var d=1e-7,y=[],p=0;p<6;p+=2)Math.abs(h[p+1])=0&&h[p]<=1&&y.push(h[p]);y.push(1),y.push(0);for(var g=-1,m,b,w,S=0;S=0?wu?(e-i)*(e-i)+(t-s)*(t-s):v-c},dr=function(e,t,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>t&&u++;else continue;return u%2!==0},$r=function(e,t,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var p=en(v,-u);y=ja(p)}else y=v;return dr(e,t,y)},$v=function(e,t,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&p<=1&&m.push(p),g>=0&&g<=1&&m.push(g),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+t;if(m.length>1){if(m[0]==m[1])return[b,w];var S=m[1]*l[0]+e,E=m[1]*l[1]+t;return[b,w,S,E]}else return[b,w]},Ln=function(e,t,a){return t<=e&&e<=a||a<=e&&e<=t?e:e<=t&&t<=a||a<=t&&t<=e?t:a},Xr=function(e,t,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=t-s,d=n-t,y=l-s,p=c*h-y*v,g=f*h-d*v,m=y*f-c*d;if(m!==0){var b=p/m,w=g/m,S=.001,E=0-S,x=1+S;return E<=b&&b<=x&&E<=w&&w<=x?[e+b*f,t+b*d]:u?[e+b*f,t+b*d]:[]}else return p===0||g===0?Ln(e,a,o)===o?[o,l]:Ln(e,a,i)===i?[i,s]:Ln(i,o,a)===a?[a,n]:[]:[]},da=function(e,t,a,n,i,s,o,l){var u=[],v,f=new Array(a.length),c=!0;s==null&&(c=!1);var h;if(c){for(var d=0;d0){var y=en(f,-l);h=ja(y)}else h=f}else h=a;for(var p,g,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),p=1;pv&&(v=w)},get:function(b){return u[b]}},c=0;c0?A=O.edgesTo(k)[0]:A=k.edgesTo(O)[0];var R=n(A);k=k.id(),D[k]>D[B]+R&&(D[k]=D[B]+R,C.nodes.indexOf(k)<0?C.push(k):C.updateItem(k),x[k]=0,E[k]=[]),D[k]==D[B]+R&&(x[k]=x[k]+x[B],E[k].push(B))}else for(var I=0;I0;){for(var N=S.pop(),W=0;W0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},af=function(e,t){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:of,o=n,l,u,v=0;v=2?Jt(e,t,a,0,Wi,uf):Jt(e,t,a,0,Ki)},squaredEuclidean:function(e,t,a){return Jt(e,t,a,0,Wi)},manhattan:function(e,t,a){return Jt(e,t,a,0,Ki)},max:function(e,t,a){return Jt(e,t,a,-1/0,lf)}};It["squared-euclidean"]=It.squaredEuclidean;It.squaredeuclidean=It.squaredEuclidean;function dn(r,e,t,a,n,i){var s;return Fe(r)?s=r:s=It[r]||It.euclidean,e===0&&Fe(r)?s(n,i):s(e,t,a,n,i)}var vf=er({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),di=function(e){return vf(e)},rn=function(e,t,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](t)},u=a,v=t;return dn(e,n.length,o,l,u,v)},An=function(e,t,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(t),l=null,u=0;ua)return!1}return!0},df=function(e,t,a){for(var n=0;no&&(o=t[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=t[s],y=t[n[s]],p;i.mode==="dendrogram"?p={left:d,right:y,key:d.key}:p={value:d.value.concat(y.value),key:d.key},e[d.index]=p,e.splice(y.index,1),t[d.key]=p;for(var g=0;ga[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},Ji=function(e,t,a){for(var n=[],i=0;io&&(s=u,o=t[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=Ji(e,t,a),n},_i=function(e){for(var t=this.cy(),a=this.nodes(),n=kf(e),i={},s=0;s=P?(B=P,P=k,L=O):k>B&&(B=k);for(var A=0;A0?1:0;x[C%n.minIterations*o+N]=W,F+=W}if(F>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var Q=0,_=0;_1||E>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(D){D.isEdge()&&f[b].push(D.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(S){return f[b].push(S.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,S=[b],E,x,D;f[w].length;)E=f[w].shift(),x=c[E][0],D=c[E][1],w!=D?(f[D]=f[D].filter(function(C){return C!=E}),w=D):!i&&w!=x&&(f[x]=f[x].filter(function(C){return C!=E}),w=x),S.unshift(E),S.unshift(w);return S},y=[],p=[];for(p=d(v);p.length!=1;)f[p[0]].length==0?(y.unshift(s.getElementById(p.shift())),y.unshift(s.getElementById(p.shift()))):p=d(p.shift()).concat(p);y.unshift(s.getElementById(p.shift()));for(var g in f)if(f[g].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},Ra=function(){var e=this,t={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,y=[],p=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(g){var m=g.connectedNodes().intersection(e);p.merge(g),m.forEach(function(b){var w=b.id(),S=b.connectedEdges().intersection(e);p.merge(b),t[w].cutVertex?p.merge(S.filter(function(E){return E.isLoop()})):p.merge(S)})}),i.push(p)},u=function f(c,h,d){c===d&&(n+=1),t[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var p,g,m,b;y.forEach(function(w){p=w.source().id(),g=w.target().id(),m=p===h?g:p,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in t?t[h].low=Math.min(t[h].low,t[m].id):(f(c,m,h),t[h].low=Math.min(t[h].low,t[m].low),t[h].id<=t[m].low&&(t[h].cutVertex=!0,l(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in t||(n=0,u(c,c),t[c].cutVertex=n>1)}});var v=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},If={hopcroftTarjanBiconnected:Ra,htbc:Ra,htb:Ra,hopcroftTarjanBiconnectedComponents:Ra},Oa=function(){var e=this,t={},a=0,n=[],i=[],s=e.spawn(e),o=function l(u){i.push(u),t[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var p=y.target().id();p!==u&&(p in t||l(p),t[p].explored||(t[u].low=Math.min(t[u].low,t[p].low)))}),t[u].index===t[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),t[c].low=t[u].index,t[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in t||o(u)}}),{cut:s,components:n}},zf={tarjanStronglyConnected:Oa,tsc:Oa,tscc:Oa,tarjanStronglyConnectedComponents:Oa},Eo={};[fa,fv,cv,hv,pv,mv,xv,Uv,Mt,Lt,Gn,sf,bf,Tf,Af,Of,If,zf].forEach(function(r){be(Eo,r)});/*! +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 Co=0,So=1,To=2,Hr=function r(e){if(!(this instanceof r))return new r(e);this.id="Thenable/1.0.7",this.state=Co,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))};Hr.prototype={fulfill:function(e){return ji(this,So,"fulfillValue",e)},reject:function(e){return ji(this,To,"rejectReason",e)},then:function(e,t){var a=this,n=new Hr;return a.onFulfilled.push(rs(e,n,"fulfill")),a.onRejected.push(rs(t,n,"reject")),Do(a),n.proxy}};var ji=function(e,t,a,n){return e.state===Co&&(e.state=t,e[a]=n,Do(e)),e},Do=function(e){e.state===So?es(e,"onFulfilled",e.fulfillValue):e.state===To&&es(e,"onRejected",e.rejectReason)},es=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o0}},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-1}var Gc=Hc;function Kc(r,e){var t=this.__data__,a=gn(t,r);return a<0?(++this.size,t.push([r,e])):t[a][1]=e,this}var Wc=Kc;function $t(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e-1&&r%1==0&&r0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){Re(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=t===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var a=this;if(t==null)t=250;else if(t===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},t),a}};Ga.className=Ga.classNames=Ga.classes;var Ce={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ke,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Ce.variable="(?:[\\w-.]|(?:\\\\"+Ce.metaChar+"))+";Ce.className="(?:[\\w-]|(?:\\\\"+Ce.metaChar+"))+";Ce.value=Ce.string+"|"+Ce.number;Ce.id=Ce.variable;(function(){var r,e,t;for(r=Ce.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(Ce.comparatorOp+="|\\!"+e)})();var Le=function(){return{checks:[]}},oe={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Wn=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return il(r.selector,e.selector)}),Zd=function(){for(var r={},e,t=0;t0&&v.edgeCount>0)return Me("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Me("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Me("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},rh=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},t=function(v){return de(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case oe.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case oe.DATA_COMPARE:{var y=v.field,p=v.operator;return"["+y+a(e(p))+t(h)+"]"}case oe.DATA_BOOL:{var g=v.operator,m=v.field;return"["+e(g)+m+"]"}case oe.DATA_EXIST:{var b=v.field;return"["+b+"]"}case oe.META_COMPARE:{var w=v.operator,S=v.field;return"[["+S+a(e(w))+t(h)+"]]"}case oe.STATE:return h;case oe.ID:return"#"+h;case oe.CLASS:return"."+h;case oe.PARENT:case oe.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case oe.ANCESTOR:case oe.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case oe.COMPOUND_SPLIT:{var E=i(v.left,f),x=i(v.subject,f),D=i(v.right,f);return E+(E.length>0?" ":"")+x+D}case oe.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),t){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return r}function Io(r,e,t){if(t.isParent())for(var a=t._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return mi(this,r,e,Io)};function zo(r,e,t){if(t.isChild()){var a=t._private.parent;e.has(a.id())||r.push(a)}}zt.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return mi(this,r,e,zo)};function lh(r,e,t){zo(r,e,t),Io(r,e,t)}zt.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return mi(this,r,e,lh)};zt.ancestors=zt.parents;var ga,No;ga=No={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Be.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Be.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};ga.attr=ga.data;ga.removeAttr=ga.removeData;var vh=No,yn={};function On(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var a=0,n=t[0],i=n._private.edges,s=0;se}),minIndegree:xt("indegree",function(r,e){return re}),minOutdegree:xt("outdegree",function(r,e){return re})});be(yn,{totalDegree:function(e){for(var t=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};t!==void 0?u.position(e,t+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,p=y&&y.length>0,g=p;p&&(y=y[0]);var m=g?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};Pr.modelPosition=Pr.point=Pr.position;Pr.modelPositions=Pr.points=Pr.positions;Pr.renderedPoint=Pr.renderedPosition;Pr.relativePoint=Pr.relativePosition;var fh=Fo,At,tt;At=tt={};tt.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),a=t.zoom(),n=t.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};tt.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var a=t._private;a.compoundBoundsClean=!1,a.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};tt.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(C,M,P){var B=0,L=0,k=M+P;return C>0&&k>0&&(B=M/k*C,L=P/k*C),{biasDiff:B,biasComplementDiff:L}}function d(C,M,P,B){if(P.units==="%")switch(B){case"width":return C>0?P.pfValue*C:0;case"height":return M>0?P.pfValue*M:0;case"average":return C>0&&M>0?P.pfValue*(C+M)/2:0;case"min":return C>0&&M>0?C>M?P.pfValue*M:P.pfValue*C:0;case"max":return C>0&&M>0?C>M?P.pfValue*C:P.pfValue*M:0;default:return 0}else return P.units==="px"?P.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var p=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(p=p*100/v.width.val);var g=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(g=g*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,p),w=b.biasDiff,S=b.biasComplementDiff,E=h(v.height.val-f.h,g,m),x=E.biasDiff,D=E.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+S)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+D)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},st=function(e,t){return t==null?e:Dr(e,t.x1,t.y1,t.x2,t.y2)},_t=function(e,t,a){return kr(e,t,a)},Ia=function(e,t,a){if(!t.cy().headless()){var n=t._private,i=n.rstyle,s=i.arrowWidth/2,o=t.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,$a(f,1),Dr(e,f.x1,f.y1,f.x2,f.y2)}}},In=function(e,t,a){if(!t.cy().headless()){var n;a?n=a+"-":n="";var i=t._private,s=i.rstyle,o=t.pstyle(n+"label").strValue;if(o){var l=t.pstyle("text-halign"),u=t.pstyle("text-valign"),v=_t(s,"labelWidth",a),f=_t(s,"labelHeight",a),c=_t(s,"labelX",a),h=_t(s,"labelY",a),d=t.pstyle(n+"text-margin-x").pfValue,y=t.pstyle(n+"text-margin-y").pfValue,p=t.isEdge(),g=t.pstyle(n+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,b=t.pstyle("text-border-width").pfValue,w=b/2,S=t.pstyle("text-background-padding").pfValue,E=2,x=f,D=v,C=D/2,M=x/2,P,B,L,k;if(p)P=c-C,B=c+C,L=h-M,k=h+M;else{switch(l.value){case"left":P=c-D,B=c;break;case"center":P=c-C,B=c+C;break;case"right":P=c,B=c+D;break}switch(u.value){case"top":L=h-x,k=h;break;case"center":L=h-M,k=h+M;break;case"bottom":L=h,k=h+x;break}}P+=d-Math.max(m,w)-S-E,B+=d+Math.max(m,w)+S+E,L+=y-Math.max(m,w)-S-E,k+=y+Math.max(m,w)+S+E;var O=a||"main",A=i.labelBounds,R=A[O]=A[O]||{};R.x1=P,R.y1=L,R.x2=B,R.y2=k,R.w=B-P,R.h=k-L;var I=p&&g.strValue==="autorotate",q=g.pfValue!=null&&g.pfValue!==0;if(I||q){var $=I?_t(i.rstyle,"labelAngle",a):g.pfValue,F=Math.cos($),N=Math.sin($),W=(P+B)/2,Q=(L+k)/2;if(!p){switch(l.value){case"left":W=B;break;case"right":W=P;break}switch(u.value){case"top":Q=k;break;case"bottom":Q=L;break}}var _=function(he,ae){return he=he-W,ae=ae-Q,{x:he*F-ae*N+W,y:he*N+ae*F+Q}},j=_(P,L),ee=_(P,k),U=_(B,L),z=_(B,k);P=Math.min(j.x,ee.x,U.x,z.x),B=Math.max(j.x,ee.x,U.x,z.x),L=Math.min(j.y,ee.y,U.y,z.y),k=Math.max(j.y,ee.y,U.y,z.y)}var Y=O+"Rot",X=A[Y]=A[Y]||{};X.x1=P,X.y1=L,X.x2=B,X.y2=k,X.w=B-P,X.h=k-L,Dr(e,P,L,B,k),Dr(i.labelBounds.all,P,L,B,k)}return e}},ch=function(e,t){if(!t.cy().headless()){var a=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value;if(a>0&&n>0){var i=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,o=n+i,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,v=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var c=e.h*u-e.h,h=e.w*l-e.w;if(Ha(e,[Math.ceil(c/2),Math.ceil(h/2)]),v!=0||f!==0){var d=Av(e,v,f);co(e,d)}}}},dh=function(e,t){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=hr(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,y,p=o.rstyle,g=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(ue){return ue.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,S=0;n&&t.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(S=e.pstyle("overlay-padding").value));var E=0,x=0;n&&t.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(x=e.pstyle("underlay-padding").value));var D=Math.max(S,x),C=0,M=0;if(n&&(C=e.pstyle("width").pfValue,M=C/2),l&&t.includeNodes){var P=e.position();d=P.x,y=P.y;var B=e.outerWidth(),L=B/2,k=e.outerHeight(),O=k/2;v=d-L,f=d+L,c=y-O,h=y+O,Dr(s,v,c,f,h),n&&t.includeOutlines&&ch(s,e)}else if(u&&t.includeEdges)if(n&&!i){var A=e.pstyle("curve-style").strValue;if(v=Math.min(p.srcX,p.midX,p.tgtX),f=Math.max(p.srcX,p.midX,p.tgtX),c=Math.min(p.srcY,p.midY,p.tgtY),h=Math.max(p.srcY,p.midY,p.tgtY),v-=M,f+=M,c-=M,h+=M,Dr(s,v,c,f,h),A==="haystack"){var R=p.haystackPts;if(R&&R.length===2){if(v=R[0].x,c=R[0].y,f=R[1].x,h=R[1].y,v>f){var I=v;v=f,f=I}if(c>h){var q=c;c=h,h=q}Dr(s,v-M,c-M,f+M,h+M)}}else if(A==="bezier"||A==="unbundled-bezier"||A.endsWith("segments")||A.endsWith("taxi")){var $;switch(A){case"bezier":case"unbundled-bezier":$=p.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":$=p.linePts;break}if($!=null)for(var F=0;F<$.length;F++){var N=$[F];v=N.x-M,f=N.x+M,c=N.y-M,h=N.y+M,Dr(s,v,c,f,h)}}}else{var W=e.source(),Q=W.position(),_=e.target(),j=_.position();if(v=Q.x,f=j.x,c=Q.y,h=j.y,v>f){var ee=v;v=f,f=ee}if(c>h){var U=c;c=h,h=U}v-=M,f+=M,c-=M,h+=M,Dr(s,v,c,f,h)}if(n&&t.includeEdges&&u&&(Ia(s,e,"mid-source"),Ia(s,e,"mid-target"),Ia(s,e,"source"),Ia(s,e,"target")),n){var z=e.pstyle("ghost").value==="yes";if(z){var Y=e.pstyle("ghost-offset-x").pfValue,X=e.pstyle("ghost-offset-y").pfValue;Dr(s,s.x1+Y,s.y1+X,s.x2+Y,s.y2+X)}}var se=o.bodyBounds=o.bodyBounds||{};qi(se,s),Ha(se,g),$a(se,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,Dr(s,v-D,c-D,f+D,h+D));var he=o.overlayBounds=o.overlayBounds||{};qi(he,s),Ha(he,g),$a(he,1);var ae=o.labelBounds=o.labelBounds||{};ae.all!=null?Lv(ae.all):ae.all=hr(),n&&t.includeLabels&&(t.includeMainLabels&&In(s,e,null),u&&(t.includeSourceLabels&&In(s,e,"source"),t.includeTargetLabels&&In(s,e,"target")))}return s.x1=br(s.x1),s.y1=br(s.y1),s.x2=br(s.x2),s.y2=br(s.y2),s.w=br(s.x2-s.x1),s.h=br(s.y2-s.y1),s.w>0&&s.h>0&&b&&(Ha(s,g),$a(s,1)),s},qo=function(e){var t=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:Ph,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;o--)s(o);return this};rt.removeAllListeners=function(){return this.removeListener("*")};rt.emit=rt.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,Re(e)||(e=[e]),Bh(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(v){var f=a[v];if(f.type===s.type&&(!f.namespace||f.namespace===s.namespace||f.namespace===kh)&&i.eventMatches(i.context,f,s)){var c=[s];e!=null&&iv(c,e),i.beforeEmit(i.context,f,s),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(y){return y!==f}));var h=i.callbackContext(i.context,f,s),d=f.callback.apply(h,c);i.afterEmit(i.context,f,s),d===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,a=e._private.data.id,n=t.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&de(e)){var a=e;e=t.mutableElements().filter(a)}for(var n=0;n=0;t--){var a=this[t];e(a)&&this.unmergeAt(t)}return this},map:function(e,t){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,t){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":We(Symbol))!=e&&We(Symbol.iterator)!=e;t&&(tn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Ks({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){this.cleanStyle();var i=a._private.style[e];return i??(t?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var a=t.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=this[0];if(a)return t.style().getRenderedStyle(a,e)},style:function(e,t){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(Se(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(de(e))if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,t,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=!1,n=t.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});nr.neighbourhood=nr.neighborhood;nr.closedNeighbourhood=nr.closedNeighborhood;nr.openNeighbourhood=nr.openNeighborhood;be(nr,{source:wr(function(e){var t=this[0],a;return t&&(a=t._private.source||t.cy().collection()),a&&e?a.filter(e):a},"source"),target:wr(function(e){var t=this[0],a;return t&&(a=t._private.target||t.cy().collection()),a&&e?a.filter(e):a},"target"),sources:ms({attr:"source"}),targets:ms({attr:"target"})});function ms(r){return function(t){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});nr.componentsOf=nr.components;var je=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ve("A collection must have a reference to the core");return}var i=new Or,s=!1;if(!t)t=[];else if(t.length>0&&Se(t[0])&&!wa(t[0])){s=!0;for(var o=[],l=new Ft,u=0,v=t.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=t.cy(),n=a._private,i=[],s=[],o,l=0,u=t.length;l0){for(var q=o.length===t.length?t:new je(a,o),$=0;$0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=[],n={},i=t._private.cy;function s(k){for(var O=k._private.edges,A=0;A0&&(r?P.emitAndNotify("remove"):e&&P.emit("remove"));for(var B=0;B0?B=k:P=k;while(Math.abs(L)>s&&++O=i?m(M,O):A===0?O:w(M,P,P+u)}var E=!1;function x(){E=!0,(r!==e||t!==a)&&b()}var D=function(P){return E||x(),r===e&&t===a?P:P===0?0:P===1?1:p(S(P),e,a)};D.getControlPoints=function(){return[{x:r,y:e},{x:t,y:a}]};var C="generateBezier("+[r,e,t,a]+")";return D.toString=function(){return C},D}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var qh=function(){function r(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:r(s)}}function t(a,n){var i={dx:a.v,dv:r(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=t(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}}(),Oe=function(e,t,a,n){var i=Vh(e,t,a,n);return function(s,o,l){return s+(o-s)*i(l)}},Wa={linear:function(e,t,a){return e+(t-e)*a},ease:Oe(.25,.1,.25,1),"ease-in":Oe(.42,0,1,1),"ease-out":Oe(0,0,.58,1),"ease-in-out":Oe(.42,0,.58,1),"ease-in-sine":Oe(.47,0,.745,.715),"ease-out-sine":Oe(.39,.575,.565,1),"ease-in-out-sine":Oe(.445,.05,.55,.95),"ease-in-quad":Oe(.55,.085,.68,.53),"ease-out-quad":Oe(.25,.46,.45,.94),"ease-in-out-quad":Oe(.455,.03,.515,.955),"ease-in-cubic":Oe(.55,.055,.675,.19),"ease-out-cubic":Oe(.215,.61,.355,1),"ease-in-out-cubic":Oe(.645,.045,.355,1),"ease-in-quart":Oe(.895,.03,.685,.22),"ease-out-quart":Oe(.165,.84,.44,1),"ease-in-out-quart":Oe(.77,0,.175,1),"ease-in-quint":Oe(.755,.05,.855,.06),"ease-out-quint":Oe(.23,1,.32,1),"ease-in-out-quint":Oe(.86,0,.07,1),"ease-in-expo":Oe(.95,.05,.795,.035),"ease-out-expo":Oe(.19,1,.22,1),"ease-in-out-expo":Oe(1,0,0,1),"ease-in-circ":Oe(.6,.04,.98,.335),"ease-out-circ":Oe(.075,.82,.165,1),"ease-in-out-circ":Oe(.785,.135,.15,.86),spring:function(e,t,a){if(a===0)return Wa.linear;var n=qh(e,t,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":Oe};function xs(r,e,t,a,n){if(a===1||e===t)return t;var i=n(e,t,a);return r==null||((r.roundValue||r.color)&&(i=Math.round(i)),r.min!==void 0&&(i=Math.max(i,r.min)),r.max!==void 0&&(i=Math.min(i,r.max))),i}function Es(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Et(r,e,t,a,n){var i=n!=null?n.type:null;t<0?t=0:t>1&&(t=1);var s=Es(r,n),o=Es(e,n);if(ne(s)&&ne(o))return xs(i,s,o,t,a);if(Re(s)&&Re(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=Wa[h].apply(null,d)):s.easingImpl=Wa[h]}var y=s.easingImpl,p;if(s.duration===0?p=1:p=(t-l)/s.duration,s.applying&&(p=s.progress),p<0?p=0:p>1&&(p=1),s.delay==null){var g=s.startPosition,m=s.position;if(m&&n&&!r.locked()){var b={};ea(g.x,m.x)&&(b.x=Et(g.x,m.x,p,y)),ea(g.y,m.y)&&(b.y=Et(g.y,m.y,p,y)),r.position(b)}var w=s.startPan,S=s.pan,E=i.pan,x=S!=null&&a;x&&(ea(w.x,S.x)&&(E.x=Et(w.x,S.x,p,y)),ea(w.y,S.y)&&(E.y=Et(w.y,S.y,p,y)),r.emit("pan"));var D=s.startZoom,C=s.zoom,M=C!=null&&a;M&&(ea(D,C)&&(i.zoom=ca(i.minZoom,Et(D,C,p,y),i.maxZoom)),r.emit("zoom")),(x||M)&&r.emit("viewport");var P=s.style;if(P&&P.length>0&&n){for(var B=0;B=0;x--){var D=E[x];D()}E.splice(0,E.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,g(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||Hh(v,b,r),$h(v,b,r,f),w.applying&&(w.applying=!1),g(w.frames),w.step!=null&&w.step(r),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,g(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",t):e.notify("draw")),t.unmerge(a),e.emit("step")}var Gh={animate:Be.animate(),animation:Be.animation(),animated:Be.animated(),clearQueue:Be.clearQueue(),delay:Be.delay(),delayAnimation:Be.delayAnimation(),stop:Be.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&Ja(function(i){Cs(i,e),t()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){Cs(s,e)},a.beforeRenderPriorities.animations):t()}},Kh={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&&wa(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e}},Fa=function(e){return de(e)?new jr(e):e},Jo={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new mn(Kh,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,a){return this.emitter().on(e,Fa(t),a),this},removeListener:function(e,t,a){return this.emitter().removeListener(e,Fa(t),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,a){return this.emitter().one(e,Fa(t),a),this},once:function(e,t,a){return this.emitter().one(e,Fa(t),a),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Be.eventAliasesOn(Jo);var Yn={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};Yn.jpeg=Yn.jpg;var Ua={layout:function(e){var t=this;if(e==null){Ve("Layout options must be specified to make a layout");return}if(e.name==null){Ve("A `name` must be specified to make a layout");return}var a=e.name,n=t.extension("layout",a);if(n==null){Ve("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;de(e.eles)?i=t.$(e.eles):i=e.eles!=null?e.eles:t.$();var s=new n(be({},e,{cy:t,eles:i}));return s}};Ua.createLayout=Ua.makeLayout=Ua.layout;var Wh={notify:function(e,t){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();t!=null&&n.merge(t);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?t.notify(a):t.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Xn.invalidateDimensions=Xn.resize;var Ya={collection:function(e,t){return de(e)?this.$(e):gr(e)?e.collection():Re(e)?(t||(t={}),new je(this,e,t.unique,t.removed)):new je(this)},nodes:function(e){var t=this.$(function(a){return a.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(a){return a.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Ya.elements=Ya.filter=Ya.$;var sr={},sa="t",Yh="f";sr.apply=function(r){for(var e=this,t=e._private,a=t.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var y=0;y1&&(w=1),o.color){var E=a.valueMin[0],x=a.valueMax[0],D=a.valueMin[1],C=a.valueMax[1],M=a.valueMin[2],P=a.valueMax[2],B=a.valueMin[3]==null?1:a.valueMin[3],L=a.valueMax[3]==null?1:a.valueMax[3],k=[Math.round(E+(x-E)*w),Math.round(D+(C-D)*w),Math.round(M+(P-M)*w),Math.round(B+(L-B)*w)];i={bypass:a.bypass,name:a.name,value:k,strValue:"rgb("+k[0]+", "+k[1]+", "+k[2]+")"}}else if(o.number){var O=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,O,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var A=a.field.split("."),R=f.data,I=0;I0&&i>0){for(var o={},l=!1,u=0;u0?r.delayAnimation(s).play().promise().then(b):b()}).then(function(){return r.animation({style:o,duration:i,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1)};sr.checkTrigger=function(r,e,t,a,n,i){var s=this.properties[e],o=n(s);o!=null&&o(t,a)&&i(s)};sr.checkZOrderTrigger=function(r,e,t,a){var n=this;this.checkTrigger(r,e,t,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",r)})};sr.checkBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBounds},function(n){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),n.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(t==="bezier"||a==="bezier")&&r.parallelEdges().forEach(function(i){i.isBundledBezier()&&i.dirtyBoundingBoxCache()}),n.triggersBoundsOfConnectedEdges&&e==="display"&&(t==="none"||a==="none")&&r.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};sr.checkTriggers=function(r,e,t,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,a),this.checkBoundsTrigger(r,e,t,a)};var Sa={};Sa.applyBypass=function(r,e,t,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Me("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new jr(f);if(c.invalid){Me("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var p=i.match(/^\s*$/);if(p)break;var g=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!g){Me("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=g[0];var m=g[1],b=g[2],w=e.properties[m];if(!w){Me("Skipping property: Invalid property name in: "+s),l();continue}var S=t.parse(m,b);if(!S){Me("Skipping property: Invalid property definition in: "+s),l();continue}y.push({name:m,val:b}),l()}if(d){o();break}t.selector(f);for(var E=0;E=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(t)return!1;var c=o.data;return{name:r,value:v,strValue:""+e,mapped:c,field:v[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(t||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(r,f[4]);if(!d||d.mapped)return!1;var y=this.parse(r,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return Me("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+d.strValue+"`"),this.parse(r,d.strValue);if(u.color){var p=d.value,g=y.value,m=p[0]===g[0]&&p[1]===g[1]&&p[2]===g[2]&&(p[3]===g[3]||(p[3]==null||p[3]===1)&&(g[3]==null||g[3]===1));if(m)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:t}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):Re(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],S=[],E=[],x="",D=!1,C=0;C0?" ":"")+M.strValue}return u.validate&&!u.validate(w,S)?null:u.singleEnum&&D?w.length===1&&de(w[0])?{name:r,value:w[0],strValue:w[0],bypass:t}:null:{name:r,value:w,pfValue:E,strValue:x,bypass:t,units:S}}var P=function(){for(var z=0;zu.max||u.strictMax&&e===u.max))return null;var A={name:r,value:e,strValue:""+e+(B||""),units:B,bypass:t};return u.unitless||B!=="px"&&B!=="em"?A.pfValue=e:A.pfValue=B==="px"||!B?e:this.getEmSizeInPixels()*e,(B==="ms"||B==="s")&&(A.pfValue=B==="ms"?e:1e3*e),(B==="deg"||B==="rad")&&(A.pfValue=B==="rad"?e:kv(e)),B==="%"&&(A.pfValue=e/100),A}else if(u.propList){var R=[],I=""+e;if(I!=="none"){for(var q=I.split(/\s*,\s*|\s+/),$=0;$0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*t)/a.w,(o-2*t)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,a=t.pan,n=t.zoom,i,s,o=!1;if(t.zoomingEnabled||(o=!0),ne(e)?s=e:Se(e)&&(s=e.level,e.position!=null?i=cn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!t.panningEnabled&&(o=!0)),s=s>t.maxZoom?t.maxZoom:s,s=st.maxZoom||!t.zoomingEnabled?s=!0:(t.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;ne(u.x)&&(t.pan.x=u.x,o=!1),ne(u.y)&&(t.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(de(e)){var a=e;e=this.mutableElements().filter(a)}else gr(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();t=t===void 0?this._private.zoom:t;var o={x:(i-t*(n.x1+n.x2))/2,y:(s-t*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,a=this;return e.sizeCache=e.sizeCache||(t?function(){var n=a.window().getComputedStyle(t),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:t.clientWidth-i("padding-left")-i("padding-right"),height:t.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/t,x2:(a.x2-e.x)/t,y1:(a.y1-e.y)/t,y2:(a.y2-e.y)/t};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};gt.centre=gt.center;gt.autolockNodes=gt.autolock;gt.autoungrabifyNodes=gt.autoungrabify;var ya={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ya.attr=ya.data;ya.removeAttr=ya.removeData;var ma=function(e){var t=this;e=be({},e);var a=e.container;a&&!Qa(a)&&Qa(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=t;var s=Ge!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=be({name:s?"grid":"null"},o.layout),o.renderer=be({name:s?"canvas":"null"},o.renderer);var l=function(d,y,p){return y!==void 0?y:p!==void 0?p:d},u=this._private={container:a,ready:!1,options:o,elements:new je(this),listeners:[],aniEles:new je(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:ne(o.zoom)?o.zoom:1,pan:{x:Se(o.pan)&&ne(o.pan.x)?o.pan.x:0,y:Se(o.pan)&&ne(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var p=d.some(Ju);if(p)return Vt.all(d).then(y);y(d)};u.styleEnabled&&t.setStyle([]);var f=be({},o,o.renderer);t.initRenderer(f);var c=function(d,y,p){t.notifications(!1);var g=t.mutableElements();g.length>0&&g.remove(),d!=null&&(Se(d)||Re(d))&&t.add(d),t.one("layoutready",function(b){t.notifications(!0),t.emit(b),t.one("load",y),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",p),t.emit("done")});var m=be({},t._private.options.layout);m.eles=t.elements(),t.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];u.styleEnabled&&t.style().append(d),c(y,function(){t.startAnimationLoop(),u.ready=!0,Fe(o.ready)&&t.on("ready",o.ready);for(var p=0;p0,l=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),u;if(gr(e.roots))u=e.roots;else if(Re(e.roots)){for(var v=[],f=0;f0;){var O=k(),A=M(O,B);if(A)O.outgoers().filter(function(ae){return ae.isNode()&&a.has(ae)}).forEach(L);else if(A===null){Me("Detected double maximal shift for node `"+O.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}C();var R=0;if(e.avoidOverlap)for(var I=0;I0&&g[0].length<=3?xe/2:0),T=2*Math.PI/g[ce].length*ve;return ce===0&&g[0].length===1&&(J=1),{x:X.x+J*Math.cos(T),y:X.y+J*Math.sin(T)}}else{var Te={x:X.x+(ve+1-(pe+1)/2)*Pe,y:(ce+1)*Ee};return Te}};return a.nodes().layoutPositions(this,e,he),this};var _h={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function jo(r){this.options=be({},_h,r)}jo.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var g=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(g*g+m*m));v=Math.max(b,v)}var w=function(E,x){var D=e.startAngle+x*u*(n?1:-1),C=v*Math.cos(D),M=v*Math.sin(D),P={x:o.x+C,y:o.y+M};return P};return a.nodes().layoutPositions(this,e,w),this};var jh={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function eu(r){this.options=be({},jh,r)}eu.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=r.cy,n=e.eles,i=n.nodes().not(":parent"),s=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var S=Math.abs(m[0].value-w.value);S>=p&&(m=[],g.push(m))}m.push(w)}var E=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=g.length>0&&g[0].length>1,D=Math.min(s.w,s.h)/2-E,C=D/(g.length+x?1:0);E=Math.min(E,C)}for(var M=0,P=0;P1&&e.avoidOverlap){var O=Math.cos(k)-Math.cos(0),A=Math.sin(k)-Math.sin(0),R=Math.sqrt(E*E/(O*O+A*A));M=Math.max(R,M)}B.r=M,M+=E}if(e.equidistant){for(var I=0,q=0,$=0;$=r.numIter||(og(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature=r.animationThreshold&&i(),Ja(f)}};v()}else{for(;u;)u=s(l),l++;Ds(a,r),o()}return this};Cn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Cn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var rg=function(e,t,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=hr(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(D);for(var v=0;vn.count?0:n.graph},ag=function r(e,t,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var y=nn(e,o,l),p=nn(t,-1*o,-1*l),g=p.x-y.x,m=p.y-y.y,b=g*g+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+t.nodeRepulsion)/b,h=f*g/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),t.isLocked||(t.offsetX+=h,t.offsetY+=d)}},vg=function(e,t,a,n){if(a>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(n>0)var s=e.maxY-t.minY;else var s=t.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},nn=function(e,t,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/t,u=s/o,v={};return t===0&&0a?(v.x=n,v.y=i+s/2,v):0t&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/t,v):0=u)?(v.x=n+s*t/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*t/2/a,v.y=i-s/2),v)},fg=function(e,t){for(var a=0;aa){var p=t.gravity*h/y,g=t.gravity*d/y;c.offsetX+=p,c.offsetY+=g}}}}},dg=function(e,t){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*t/n};else var i={x:e,y:t};return i},pg=function r(e,t){var a=e.parentId;if(a!=null){var n=t.layoutNodes[t.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopg&&(d+=p+t.componentSpacing,h=0,y=0,p=0)}}},yg={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function tu(r){this.options=be({},yg,r)}tu.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(W){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(Q){if(Q==null)return Math.min(l,u);var _=Math.min(l,u);_==l?l=Q:u=Q},f=function(Q){if(Q==null)return Math.max(l,u);var _=Math.max(l,u);_==l?l=Q:u=Q},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;u*l=s?f(g+1):v(p+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(O=0,k++)},R={},I=0;I(O=qv(r,e,A[R],A[R+1],A[R+2],A[R+3])))return p(x,O),!0}else if(C.edgeType==="bezier"||C.edgeType==="multibezier"||C.edgeType==="self"||C.edgeType==="compound"){for(var A=C.allpts,R=0;R+5(O=Vv(r,e,A[R],A[R+1],A[R+2],A[R+3],A[R+4],A[R+5])))return p(x,O),!0}for(var I=I||D.source,q=q||D.target,$=n.getArrowWidth(M,P),F=[{name:"source",x:C.arrowStartX,y:C.arrowStartY,angle:C.srcArrowAngle},{name:"target",x:C.arrowEndX,y:C.arrowEndY,angle:C.tgtArrowAngle},{name:"mid-source",x:C.midX,y:C.midY,angle:C.midsrcArrowAngle},{name:"mid-target",x:C.midX,y:C.midY,angle:C.midtgtArrowAngle}],R=0;R0&&(g(I),g(q))}function b(x,D,C){return kr(x,D,C)}function w(x,D){var C=x._private,M=c,P;D?P=D+"-":P="",x.boundingBox();var B=C.labelBounds[D||"main"],L=x.pstyle(P+"label").value,k=x.pstyle("text-events").strValue==="yes";if(!(!k||!L)){var O=b(C.rscratch,"labelX",D),A=b(C.rscratch,"labelY",D),R=b(C.rscratch,"labelAngle",D),I=x.pstyle(P+"text-margin-x").pfValue,q=x.pstyle(P+"text-margin-y").pfValue,$=B.x1-M-I,F=B.x2+M-I,N=B.y1-M-q,W=B.y2+M-q;if(R){var Q=Math.cos(R),_=Math.sin(R),j=function(he,ae){return he=he-O,ae=ae-A,{x:he*Q-ae*_+O,y:he*_+ae*Q+A}},ee=j($,N),U=j($,W),z=j(F,N),Y=j(F,W),X=[ee.x+I,ee.y+q,z.x+I,z.y+q,Y.x+I,Y.y+q,U.x+I,U.y+q];if(dr(r,e,X))return p(x),!0}else if(Ot(B,r,e))return p(x),!0}}for(var S=s.length-1;S>=0;S--){var E=s[S];E.isNode()?g(E)||w(E):m(E)||w(E)||w(E,"source")||w(E,"target")}return o};yt.getAllInBox=function(r,e,t,a){var n=this.getCachedZSortedEles().interactive,i=[],s=Math.min(r,t),o=Math.max(r,t),l=Math.min(e,a),u=Math.max(e,a);r=s,t=o,e=l,a=u;for(var v=hr({x1:r,y1:e,x2:t,y2:a}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},Cg=function(e,t,a,n,i){if(e!==Ls?As(t,e,Ar):Eg(mr,Ar),As(t,a,mr),Bs=Ar.nx*mr.ny-Ar.ny*mr.nx,Ms=Ar.nx*mr.nx-Ar.ny*-mr.ny,Vr=Math.asin(Math.max(-1,Math.min(1,Bs))),Math.abs(Vr)<1e-6){Zn=t.x,Qn=t.y,ot=St=0;return}ut=1,Xa=!1,Ms<0?Vr<0?Vr=Math.PI+Vr:(Vr=Math.PI-Vr,ut=-1,Xa=!0):Vr>0&&(ut=-1,Xa=!0),t.radius!==void 0?St=t.radius:St=n,nt=Vr/2,Va=Math.min(Ar.len/2,mr.len/2),i?(Lr=Math.abs(Math.cos(nt)*St/Math.sin(nt)),Lr>Va?(Lr=Va,ot=Math.abs(Lr*Math.sin(nt)/Math.cos(nt))):ot=St):(Lr=Math.min(Va,St),ot=Math.abs(Lr*Math.sin(nt)/Math.cos(nt))),Jn=t.x+mr.nx*Lr,_n=t.y+mr.ny*Lr,Zn=Jn-mr.ny*ot*ut,Qn=_n+mr.nx*ot*ut,su=t.x+Ar.nx*Lr,ou=t.y+Ar.ny*Lr,Ls=t};function uu(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Si(r,e,t,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Cg(r,e,t,a,n),{cx:Zn,cy:Qn,radius:ot,startX:su,startY:ou,stopX:Jn,stopY:_n,startAngle:Ar.ang+Math.PI/2*ut,endAngle:mr.ang-Math.PI/2*ut,counterClockwise:Xa})}var or={};or.findMidptPtsEtc=function(r,e){var t=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=r.pstyle("source-endpoint"),o=r.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(S,E,x,D){var C=D-E,M=x-S,P=Math.sqrt(M*M+C*C);return{x:-C/P,y:M/P}},v=r.pstyle("edge-distances").value;switch(v){case"node-position":i=t;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(r.source()[0],s),c=Tr(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(r.target()[0],o),p=Tr(y,2),g=p[0],m=p[1],b={x1:h,y1:d,x2:g,y2:m};n=u(h,d,g,m),i=b}else Me("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};or.findHaystackPoints=function(r){for(var e=0;e0?Math.max(ye-me,0):Math.min(ye+me,0)},L=B(M,D),k=B(P,C),O=!1;m===u?g=Math.abs(L)>Math.abs(k)?n:a:m===l||m===o?(g=a,O=!0):(m===i||m===s)&&(g=n,O=!0);var A=g===a,R=A?k:L,I=A?P:M,q=fo(I),$=!1;!(O&&(w||E))&&(m===o&&I<0||m===l&&I>0||m===i&&I>0||m===s&&I<0)&&(q*=-1,R=q*Math.abs(R),$=!0);var F;if(w){var N=S<0?1+S:S;F=N*R}else{var W=S<0?R:0;F=W+S*q}var Q=function(ye){return Math.abs(ye)=Math.abs(R)},_=Q(F),j=Q(Math.abs(R)-Math.abs(F)),ee=_||j;if(ee&&!$)if(A){var U=Math.abs(I)<=c/2,z=Math.abs(M)<=h/2;if(U){var Y=(v.x1+v.x2)/2,X=v.y1,se=v.y2;t.segpts=[Y,X,Y,se]}else if(z){var he=(v.y1+v.y2)/2,ae=v.x1,ie=v.x2;t.segpts=[ae,he,ie,he]}else t.segpts=[v.x1,v.y2]}else{var ue=Math.abs(I)<=f/2,ce=Math.abs(P)<=d/2;if(ue){var ve=(v.y1+v.y2)/2,pe=v.x1,Pe=v.x2;t.segpts=[pe,ve,Pe,ve]}else if(ce){var Ee=(v.x1+v.x2)/2,xe=v.y1,Te=v.y2;t.segpts=[Ee,xe,Ee,Te]}else t.segpts=[v.x2,v.y1]}else if(A){var J=v.y1+F+(p?c/2*q:0),T=v.x1,V=v.x2;t.segpts=[T,J,V,J]}else{var Z=v.x1+F+(p?f/2*q:0),G=v.y1,H=v.y2;t.segpts=[Z,G,Z,H]}if(t.isRound){var te=r.pstyle("taxi-radius").value,K=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(te),t.isArcRadius=new Array(t.segpts.length/2).fill(K)}};or.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!ne(t.startX)||!ne(t.startY),p=!ne(t.arrowStartX)||!ne(t.arrowStartY),g=!ne(t.endX)||!ne(t.endY),m=!ne(t.arrowEndX)||!ne(t.arrowEndY),b=3,w=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,S=b*w,E=ct({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),x=Ek.poolIndex()){var O=L;L=k,k=O}var A=C.srcPos=L.position(),R=C.tgtPos=k.position(),I=C.srcW=L.outerWidth(),q=C.srcH=L.outerHeight(),$=C.tgtW=k.outerWidth(),F=C.tgtH=k.outerHeight(),N=C.srcShape=t.nodeShapes[e.getNodeShape(L)],W=C.tgtShape=t.nodeShapes[e.getNodeShape(k)],Q=C.srcCornerRadius=L.pstyle("corner-radius").value==="auto"?"auto":L.pstyle("corner-radius").pfValue,_=C.tgtCornerRadius=k.pstyle("corner-radius").value==="auto"?"auto":k.pstyle("corner-radius").pfValue,j=C.tgtRs=k._private.rscratch,ee=C.srcRs=L._private.rscratch;C.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var U=0;U0){var se=i,he=it(se,kt(t)),ae=it(se,kt(X)),ie=he;if(ae2){var ue=it(se,{x:X[2],y:X[3]});ue0){var H=s,te=it(H,kt(t)),K=it(H,kt(G)),re=te;if(K2){var ye=it(H,{x:G[2],y:G[3]});ye=d||x){p={cp:w,segment:E};break}}if(p)break}var D=p.cp,C=p.segment,M=(d-g)/C.length,P=C.t1-C.t0,B=h?C.t0+P*M:C.t1-P*M;B=ca(0,B,1),e=Bt(D.p0,D.p1,D.p2,B),c=Tg(D.p0,D.p1,D.p2,B);break}case"straight":case"segments":case"haystack":{for(var L=0,k,O,A,R,I=a.allpts.length,q=0;q+3=d));q+=2);var $=d-O,F=$/k;F=ca(0,F,1),e=Bv(A,R,F),c=fu(A,R);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(r)}};zr.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};zr.applyPrefixedLabelDimensions=function(r,e){var t=r._private,a=this.getLabelText(r,e),n=this.calculateLabelDimensions(r,a),i=r.pstyle("line-height").pfValue,s=r.pstyle("text-wrap").strValue,o=kr(t.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(o.length,1),u=n.height/l,v=u*i,f=n.width,c=n.height+(l-1)*(i-1)*u;Yr(t.rstyle,"labelWidth",e,f),Yr(t.rscratch,"labelWidth",e,f),Yr(t.rstyle,"labelHeight",e,c),Yr(t.rscratch,"labelHeight",e,c),Yr(t.rscratch,"labelLineHeight",e,v)};zr.getLabelText=function(r,e){var t=r._private,a=e?e+"-":"",n=r.pstyle(a+"label").strValue,i=r.pstyle("text-transform").value,s=function(W,Q){return Q?(Yr(t.rscratch,W,e,Q),Q):kr(t.rscratch,W,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=r.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` +`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,p=0;pf){var S=g.matchAll(y),E="",x=0,D=Us(S),C;try{for(D.s();!(C=D.n()).done;){var M=C.value,P=M[0],B=g.substring(x,M.index);x=M.index+P.length;var L=E.length===0?B:E+B+P,k=this.calculateLabelDimensions(r,L),O=k.width;O<=f?E+=B+P:(E&&d.push(E),E=B+P)}}catch(N){D.e(N)}finally{D.f()}E.match(/^[\s\u200b]+$/)||d.push(E)}else d.push(g)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` +`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var A=r.pstyle("text-max-width").pfValue,R="",I="…",q=!1;if(this.calculateLabelDimensions(r,n).widthA)break;R+=n[$],$===n.length-1&&(q=!0)}return q||(R+=I),R}return n};zr.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};zr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=ft(e,r._private.labelDimsKey),s=t.labelDimCache||(t.labelDimCache=[]),o=s[i];if(o!=null)return o;var l=0,u=r.pstyle("font-style").strValue,v=r.pstyle("font-size").pfValue,f=r.pstyle("font-family").strValue,c=r.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=n.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var y=h.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}d.font="".concat(u," ").concat(c," ").concat(v,"px ").concat(f);for(var p=0,g=0,m=e.split(` +`),b=0;b1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=r.desktopTapThreshold2}var lr=n(T);Ae&&(r.hoverData.tapholdCancelled=!0);var xr=function(){var Mr=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Mr.length===0?(Mr.push(ge[0]),Mr.push(ge[1])):(Mr[0]+=ge[0],Mr[1]+=ge[1])};Z=!0,a(fe,["mousemove","vmousemove","tapdrag"],T,{x:K[0],y:K[1]});var yr=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:K[0],y:K[1]}}),me[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(Ae){var cr={originalEvent:T,type:"cxtdrag",position:{x:K[0],y:K[1]}};le?le.emit(cr):G.emit(cr),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||fe!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:K[0],y:K[1]}}),r.hoverData.cxtOver=fe,fe&&fe.emit({originalEvent:T,type:"cxtdragover",position:{x:K[0],y:K[1]}}))}}else if(r.hoverData.dragging){if(Z=!0,G.panningEnabled()&&G.userPanningEnabled()){var Br;if(r.hoverData.justStartedPan){var Fr=r.hoverData.mdownPos;Br={x:(K[0]-Fr[0])*H,y:(K[1]-Fr[1])*H},r.hoverData.justStartedPan=!1}else Br={x:ge[0]*H,y:ge[1]*H};G.panBy(Br),G.emit("dragpan"),r.hoverData.dragged=!0}K=r.projectIntoViewport(T.clientX,T.clientY)}else if(me[4]==1&&(le==null||le.pannable())){if(Ae){if(!r.hoverData.dragging&&G.boxSelectionEnabled()&&(lr||!G.panningEnabled()||!G.userPanningEnabled()))yr();else if(!r.hoverData.selecting&&G.panningEnabled()&&G.userPanningEnabled()){var Er=i(le,r.hoverData.downs);Er&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,me[4]=0,r.data.bgActivePosistion=kt(re),r.redrawHint("select",!0),r.redraw())}le&&le.pannable()&&le.active()&&le.unactivate()}}else{if(le&&le.pannable()&&le.active()&&le.unactivate(),(!le||!le.grabbed())&&fe!=we&&(we&&a(we,["mouseout","tapdragout"],T,{x:K[0],y:K[1]}),fe&&a(fe,["mouseover","tapdragover"],T,{x:K[0],y:K[1]}),r.hoverData.last=fe),le)if(Ae){if(G.boxSelectionEnabled()&&lr)le&&le.grabbed()&&(p(Ne),le.emit("freeon"),Ne.emit("free"),r.dragData.didDrag&&(le.emit("dragfreeon"),Ne.emit("dragfree"))),yr();else if(le&&le.grabbed()&&r.nodeIsDraggable(le)){var He=!r.dragData.didDrag;He&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||d(Ne,{inDragLayer:!0});var Ye={x:0,y:0};if(ne(ge[0])&&ne(ge[1])&&(Ye.x+=ge[0],Ye.y+=ge[1],He)){var tr=r.hoverData.dragDelta;tr&&ne(tr[0])&&ne(tr[1])&&(Ye.x+=tr[0],Ye.y+=tr[1])}r.hoverData.draggingEles=!0,Ne.silentShift(Ye).emit("position drag"),r.redrawHint("drag",!0),r.redraw()}}else xr();Z=!0}if(me[2]=K[0],me[3]=K[1],Z)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var M,P,B;r.registerBinding(e,"mouseup",function(T){if(!(r.hoverData.which===1&&T.which!==1&&r.hoverData.capture)){var V=r.hoverData.capture;if(V){r.hoverData.capture=!1;var Z=r.cy,G=r.projectIntoViewport(T.clientX,T.clientY),H=r.selection,te=r.findNearestElement(G[0],G[1],!0,!1),K=r.dragData.possibleDragElements,re=r.hoverData.down,ye=n(T);if(r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,re&&re.unactivate(),r.hoverData.which===3){var me={originalEvent:T,type:"cxttapend",position:{x:G[0],y:G[1]}};if(re?re.emit(me):Z.emit(me),!r.hoverData.cxtDragged){var fe={originalEvent:T,type:"cxttap",position:{x:G[0],y:G[1]}};re?re.emit(fe):Z.emit(fe)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(a(te,["mouseup","tapend","vmouseup"],T,{x:G[0],y:G[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(a(re,["click","tap","vclick"],T,{x:G[0],y:G[1]}),P=!1,T.timeStamp-B<=Z.multiClickDebounceTime()?(M&&clearTimeout(M),P=!0,B=null,a(re,["dblclick","dbltap","vdblclick"],T,{x:G[0],y:G[1]})):(M=setTimeout(function(){P||a(re,["oneclick","onetap","voneclick"],T,{x:G[0],y:G[1]})},Z.multiClickDebounceTime()),B=T.timeStamp)),re==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!n(T)&&(Z.$(t).unselect(["tapunselect"]),K.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=K=Z.collection()),te==re&&!r.dragData.didDrag&&!r.hoverData.selecting&&te!=null&&te._private.selectable&&(r.hoverData.dragging||(Z.selectionType()==="additive"||ye?te.selected()?te.unselect(["tapunselect"]):te.select(["tapselect"]):ye||(Z.$(t).unmerge(te).unselect(["tapunselect"]),te.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var we=Z.collection(r.getAllInBox(H[0],H[1],H[2],H[3]));r.redrawHint("select",!0),we.length>0&&r.redrawHint("eles",!0),Z.emit({type:"boxend",originalEvent:T,position:{x:G[0],y:G[1]}});var le=function(Ae){return Ae.selectable()&&!Ae.selected()};Z.selectionType()==="additive"||ye||Z.$(t).unmerge(we).unselect(),we.emit("box").stdFilter(le).select().emit("boxselect"),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!H[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var ge=re&&re.grabbed();p(K),ge&&(re.emit("freeon"),K.emit("free"),r.dragData.didDrag&&(re.emit("dragfreeon"),K.emit("dragfree")))}}H[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var L=function(T){if(!r.scrollingPage){var V=r.cy,Z=V.zoom(),G=V.pan(),H=r.projectIntoViewport(T.clientX,T.clientY),te=[H[0]*Z+G.x,H[1]*Z+G.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||D()){T.preventDefault();return}if(V.panningEnabled()&&V.userPanningEnabled()&&V.zoomingEnabled()&&V.userZoomingEnabled()){T.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var K;T.deltaY!=null?K=T.deltaY/-250:T.wheelDeltaY!=null?K=T.wheelDeltaY/1e3:K=T.wheelDelta/1e3,K=K*r.wheelSensitivity;var re=T.deltaMode===1;re&&(K*=33);var ye=V.zoom()*Math.pow(10,K);T.type==="gesturechange"&&(ye=r.gestureStartZoom*T.scale),V.zoom({level:ye,renderedPosition:{x:te[0],y:te[1]}}),V.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};r.registerBinding(r.container,"wheel",L,!0),r.registerBinding(e,"scroll",function(T){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(T){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||T.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(J){r.hasTouchStarted||L(J)},!0),r.registerBinding(r.container,"mouseout",function(T){var V=r.projectIntoViewport(T.clientX,T.clientY);r.cy.emit({originalEvent:T,type:"mouseout",position:{x:V[0],y:V[1]}})},!1),r.registerBinding(r.container,"mouseover",function(T){var V=r.projectIntoViewport(T.clientX,T.clientY);r.cy.emit({originalEvent:T,type:"mouseover",position:{x:V[0],y:V[1]}})},!1);var k,O,A,R,I,q,$,F,N,W,Q,_,j,ee=function(T,V,Z,G){return Math.sqrt((Z-T)*(Z-T)+(G-V)*(G-V))},U=function(T,V,Z,G){return(Z-T)*(Z-T)+(G-V)*(G-V)},z;r.registerBinding(r.container,"touchstart",z=function(T){if(r.hasTouchStarted=!0,!!C(T)){m(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var V=r.cy,Z=r.touchData.now,G=r.touchData.earlier;if(T.touches[0]){var H=r.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Z[0]=H[0],Z[1]=H[1]}if(T.touches[1]){var H=r.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Z[2]=H[0],Z[3]=H[1]}if(T.touches[2]){var H=r.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Z[4]=H[0],Z[5]=H[1]}if(T.touches[1]){r.touchData.singleTouchMoved=!0,p(r.dragData.touchDragEles);var te=r.findContainerClientCoords();N=te[0],W=te[1],Q=te[2],_=te[3],k=T.touches[0].clientX-N,O=T.touches[0].clientY-W,A=T.touches[1].clientX-N,R=T.touches[1].clientY-W,j=0<=k&&k<=Q&&0<=A&&A<=Q&&0<=O&&O<=_&&0<=R&&R<=_;var K=V.pan(),re=V.zoom();I=ee(k,O,A,R),q=U(k,O,A,R),$=[(k+A)/2,(O+R)/2],F=[($[0]-K.x)/re,($[1]-K.y)/re];var ye=200,me=ye*ye;if(q=1){for(var Ze=r.touchData.startPosition=[null,null,null,null,null,null],$e=0;$e=r.touchTapThreshold2}if(V&&r.touchData.cxt){T.preventDefault();var Ze=T.touches[0].clientX-N,$e=T.touches[0].clientY-W,fr=T.touches[1].clientX-N,Qe=T.touches[1].clientY-W,lr=U(Ze,$e,fr,Qe),xr=lr/q,yr=150,cr=yr*yr,Br=1.5,Fr=Br*Br;if(xr>=Fr||lr>=cr){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Er={originalEvent:T,type:"cxttapend",position:{x:H[0],y:H[1]}};r.touchData.start?(r.touchData.start.unactivate().emit(Er),r.touchData.start=null):G.emit(Er)}}if(V&&r.touchData.cxt){var Er={originalEvent:T,type:"cxtdrag",position:{x:H[0],y:H[1]}};r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(Er):G.emit(Er),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var He=r.findNearestElement(H[0],H[1],!0,!0);(!r.touchData.cxtOver||He!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:H[0],y:H[1]}}),r.touchData.cxtOver=He,He&&He.emit({originalEvent:T,type:"cxtdragover",position:{x:H[0],y:H[1]}}))}else if(V&&T.touches[2]&&G.boxSelectionEnabled())T.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:H[0],y:H[1]}}),r.touchData.selecting=!0,r.touchData.didSelect=!0,Z[4]=1,!Z||Z.length===0||Z[0]===void 0?(Z[0]=(H[0]+H[2]+H[4])/3,Z[1]=(H[1]+H[3]+H[5])/3,Z[2]=(H[0]+H[2]+H[4])/3+1,Z[3]=(H[1]+H[3]+H[5])/3+1):(Z[2]=(H[0]+H[2]+H[4])/3,Z[3]=(H[1]+H[3]+H[5])/3),r.redrawHint("select",!0),r.redraw();else if(V&&T.touches[1]&&!r.touchData.didSelect&&G.zoomingEnabled()&&G.panningEnabled()&&G.userZoomingEnabled()&&G.userPanningEnabled()){T.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Ye=r.dragData.touchDragEles;if(Ye){r.redrawHint("drag",!0);for(var tr=0;tr0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var X;r.registerBinding(e,"touchcancel",X=function(T){var V=r.touchData.start;r.touchData.capture=!1,V&&V.unactivate()});var se,he,ae,ie;if(r.registerBinding(e,"touchend",se=function(T){var V=r.touchData.start,Z=r.touchData.capture;if(Z)T.touches.length===0&&(r.touchData.capture=!1),T.preventDefault();else return;var G=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var H=r.cy,te=H.zoom(),K=r.touchData.now,re=r.touchData.earlier;if(T.touches[0]){var ye=r.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);K[0]=ye[0],K[1]=ye[1]}if(T.touches[1]){var ye=r.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);K[2]=ye[0],K[3]=ye[1]}if(T.touches[2]){var ye=r.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);K[4]=ye[0],K[5]=ye[1]}V&&V.unactivate();var me;if(r.touchData.cxt){if(me={originalEvent:T,type:"cxttapend",position:{x:K[0],y:K[1]}},V?V.emit(me):H.emit(me),!r.touchData.cxtDragged){var fe={originalEvent:T,type:"cxttap",position:{x:K[0],y:K[1]}};V?V.emit(fe):H.emit(fe)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!T.touches[2]&&H.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var we=H.collection(r.getAllInBox(G[0],G[1],G[2],G[3]));G[0]=void 0,G[1]=void 0,G[2]=void 0,G[3]=void 0,G[4]=0,r.redrawHint("select",!0),H.emit({type:"boxend",originalEvent:T,position:{x:K[0],y:K[1]}});var le=function(cr){return cr.selectable()&&!cr.selected()};we.emit("box").stdFilter(le).select().emit("boxselect"),we.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(V!=null&&V.unactivate(),T.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var ge=r.dragData.touchDragEles;if(V!=null){var Ne=V._private.grabbed;p(ge),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Ne&&(V.emit("freeon"),ge.emit("free"),r.dragData.didDrag&&(V.emit("dragfreeon"),ge.emit("dragfree"))),a(V,["touchend","tapend","vmouseup","tapdragout"],T,{x:K[0],y:K[1]}),V.unactivate(),r.touchData.start=null}else{var Ae=r.findNearestElement(K[0],K[1],!0,!0);a(Ae,["touchend","tapend","vmouseup","tapdragout"],T,{x:K[0],y:K[1]})}var ur=r.touchData.startPosition[0]-K[0],Ze=ur*ur,$e=r.touchData.startPosition[1]-K[1],fr=$e*$e,Qe=Ze+fr,lr=Qe*te*te;r.touchData.singleTouchMoved||(V||H.$(":selected").unselect(["tapunselect"]),a(V,["tap","vclick"],T,{x:K[0],y:K[1]}),he=!1,T.timeStamp-ie<=H.multiClickDebounceTime()?(ae&&clearTimeout(ae),he=!0,ie=null,a(V,["dbltap","vdblclick"],T,{x:K[0],y:K[1]})):(ae=setTimeout(function(){he||a(V,["onetap","voneclick"],T,{x:K[0],y:K[1]})},H.multiClickDebounceTime()),ie=T.timeStamp)),V!=null&&!r.dragData.didDrag&&V._private.selectable&&lr"u"){var ue=[],ce=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},ve=function(T){return{event:T,touch:ce(T)}},pe=function(T){ue.push(ve(T))},Pe=function(T){for(var V=0;V0)return N[0]}return null},d=Object.keys(c),y=0;y0?h:go(i,s,e,t,a,n,o,l)},checkPoint:function(e,t,a,n,i,s,o,l){l=l==="auto"?dt(n,i):l;var u=2*l;if($r(e,t,this.points,s,o,n,i-u,[0,-1],a)||$r(e,t,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(dr(e,t,c)||lt(e,t,u,u,s+n/2-l,o+i/2-l,a)||lt(e,t,u,u,s-n/2+l,o+i/2-l,a))}}};Gr.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",vr(3,0)),this.generateRoundPolygon("round-triangle",vr(3,0)),this.generatePolygon("rectangle",vr(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",vr(5,0)),this.generateRoundPolygon("round-pentagon",vr(5,0)),this.generatePolygon("hexagon",vr(6,0)),this.generateRoundPolygon("round-hexagon",vr(6,0)),this.generatePolygon("heptagon",vr(7,0)),this.generateRoundPolygon("round-heptagon",vr(7,0)),this.generatePolygon("octagon",vr(8,0)),this.generateRoundPolygon("round-octagon",vr(8,0));var a=new Array(20);{var n=$n(5,0),i=$n(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*Fn)break;var S=e.deq(a,p,y);if(S.length>0)for(var E=0;E0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,p,y)&&i())},o=e.priority||ui;n.beforeRender(s,o(a))}}}},kg=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a;ai(this,r),this.idsByKey=new Or,this.keyForId=new Or,this.cachesByLvl=new Or,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return ni(r,[{key:"getIdsFor",value:function(t){t==null&&Ve("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new Ft,a.set(t,n)),n}},{key:"addIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).add(a)}},{key:"deleteIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).delete(a)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);return n!==i}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var a=this.cachesByLvl,n=this.lvls,i=a.get(t);return i||(i=new Or,a.set(t,i),n.push(t)),i}},{key:"getCache",value:function(t,a){return this.getCachesAt(a).get(t)}},{key:"get",value:function(t,a){var n=this.getKey(t),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(t),i}},{key:"getForCachedKey",value:function(t,a){var n=this.keyForId.get(t.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(t,a){return this.getCachesAt(a).has(t)}},{key:"has",value:function(t,a){var n=this.getKey(t);return this.hasCache(n,a)}},{key:"setCache",value:function(t,a,n){n.key=t,this.getCachesAt(a).set(t,n)}},{key:"set",value:function(t,a,n){var i=this.getKey(t);this.setCache(i,a,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,a){this.getCachesAt(a).delete(t)}},{key:"delete",value:function(t,a){var n=this.getKey(t);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(t){var a=this;this.lvls.forEach(function(n){return a.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(t);var i=this.doesEleInvalidateKey(t);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}]),r}(),zs=25,qa=50,Za=-4,jn=3,Pg=7.99,Bg=8,Mg=1024,Lg=1024,Ag=1024,Rg=.2,Og=.8,Ig=10,zg=.15,Ng=.1,Fg=.9,Vg=.9,qg=100,$g=1,Pt={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Hg=er({getKey:null,doesEleInvalidateKey:_a,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:so,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ia=function(e,t){var a=this;a.renderer=e,a.onDequeues=[];var n=Hg(t);be(a,n),a.lookup=new kg(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},Ue=ia.prototype;Ue.reasons=Pt;Ue.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};Ue.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=t[r]=t[r]||[];return a};Ue.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new Ea(function(t,a){return a.reqs-t.reqs});return e};Ue.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};Ue.getElement=function(r,e,t,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!i.allowEdgeTxrCaching&&r.isEdge()||!i.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(vi(o*t))),a=Pg||a>jn)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(r,u);if(!this.isVisible(r,c))return null;var h=l.get(r,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=zs?d=zs:v<=qa?d=qa:d=Math.ceil(v/qa)*qa,v>Ag||f>Lg)return null;var y=i.getTextureQueue(d),p=y[y.length-2],g=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};p||(p=y[y.length-1]),p||(p=g()),p.width-p.usedWidtha;P--)C=i.getElement(r,e,t,P,Pt.downscale);M()}else return i.queueElement(r,E.level-1),E;else{var B;if(!b&&!w&&!S)for(var L=a-1;L>=Za;L--){var k=l.get(r,L);if(k){B=k;break}}if(m(B))return i.queueElement(r,a),B;p.context.translate(p.usedWidth,0),p.context.scale(u,u),this.drawElement(p.context,r,e,c,!1),p.context.scale(1/u,1/u),p.context.translate(-p.usedWidth,0)}return h={x:p.usedWidth,texture:p,level:a,scale:u,width:f,height:v,scaledLabelShown:c},p.usedWidth+=Math.ceil(f+Bg),p.eleCaches.push(h),l.set(r,a,h),i.checkTextureFullness(p),h};Ue.invalidateElements=function(r){for(var e=0;e=Rg*r.width&&this.retireTexture(r)};Ue.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>Og&&r.fullnessChecks>=Ig?_r(t,r):r.fullnessChecks++};Ue.retireTexture=function(r){var e=this,t=r.height,a=e.getTextureQueue(t),n=this.lookup;_r(a,r),r.retired=!0;for(var i=r.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,li(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),_r(n,s),a.push(s),s}};Ue.queueElement=function(r,e){var t=this,a=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(r),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(r),s.reqs++,a.updateItem(s);else{var o={eles:r.spawn().merge(r),level:e,reqs:1,key:i};a.push(o),n[i]=o}};Ue.dequeue=function(r){for(var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s<$g&&t.size()>0;s++){var o=t.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,r,o.level,Pt.dequeue)}return n};Ue.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(r),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=oi,t.updateItem(i),t.pop(),a[n]=null):i.eles.unmerge(r))};Ue.onDequeue=function(r){this.onDequeues.push(r)};Ue.offDequeue=function(r){_r(this.onDequeues,r)};Ue.setupDequeueing=pu.setupDequeueing({deqRedrawThreshold:qg,deqCost:zg,deqAvgCost:Ng,deqNoDrawCost:Fg,deqFastCost:Vg,deq:function(e,t,a){return e.dequeue(t,a)},onDeqd:function(e,t){for(var a=0;a=Kg||t>on)return null}a.validateLayersElesOrdering(t,r);var l=a.layersByLevel,u=Math.pow(2,t),v=l[t]=l[t]||[],f,c=a.levelIsComplete(t,r),h,d=function(){var M=function(O){if(a.validateLayersElesOrdering(O,r),a.levelIsComplete(O,r))return h=l[O],!0},P=function(O){if(!h)for(var A=t+O;oa<=A&&A<=on&&!M(A);A+=O);};P(1),P(-1);for(var B=v.length-1;B>=0;B--){var L=v[B];L.invalid&&_r(v,L)}};if(!c)d();else return v;var y=function(){if(!f){f=hr();for(var M=0;M_g)return null;var L=a.makeLayer(f,t);if(P!=null){var k=v.indexOf(P)+1;v.splice(k,0,L)}else(M.insert===void 0||M.insert)&&v.unshift(L);return L};if(a.skipping&&!o)return null;for(var g=null,m=r.length/Gg,b=!o,w=0;w=m||!ho(g.bb,S.boundingBox()))&&(g=p({insert:!0,after:g}),!g))return null;h||b?a.queueLayer(g,S):a.drawEleInLayer(g,S,t,e),g.eles.push(S),x[t]=g}return h||(b?null:v)};rr.getEleLevelForLayerLevel=function(r,e){return r};rr.drawEleInLayer=function(r,e,t,a){var n=this,i=this.renderer,s=r.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(t=n.getEleLevelForLayerLevel(t,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,t,jg),i.setImgSmoothing(s,!0))};rr.levelIsComplete=function(r,e){var t=this,a=t.layersByLevel[r];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};rr.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var a=0;a0){e=!0;break}}return e};rr.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=qr(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(a,n,i){e.invalidateLayer(a)}))};rr.invalidateLayer=function(r){if(this.lastInvalidationTime=qr(),!r.invalid){var e=r.level,t=r.eles,a=this.layersByLevel[e];_r(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;t&&(l=t,r.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,p=e.pstyle("line-outline-color").value,g=u*v,m=u*v,b=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g;f==="straight-triangle"?(s.eleStrokeStyle(r,e,O),s.drawEdgeTrianglePath(e,r,o.allpts)):(r.lineWidth=h,r.lineCap=d,s.eleStrokeStyle(r,e,O),s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},w=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g;if(r.lineWidth=h+y,r.lineCap=d,y>0)s.colorStrokeStyle(r,p[0],p[1],p[2],O);else{r.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,r,o.allpts):(s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},S=function(){n&&s.drawEdgeOverlay(r,e)},E=function(){n&&s.drawEdgeUnderlay(r,e)},x=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(r,e,O)},D=function(){s.drawElementText(r,e,null,a)};r.lineJoin="round";var C=e.pstyle("ghost").value==="yes";if(C){var M=e.pstyle("ghost-offset-x").pfValue,P=e.pstyle("ghost-offset-y").pfValue,B=e.pstyle("ghost-opacity").value,L=g*B;r.translate(M,P),b(L),x(L),r.translate(-M,-P)}else w();E(),b(),x(),S(),D(),t&&r.translate(l.x1,l.y1)}};var bu=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;t.lineWidth=u,o.edgeType==="self"&&!s?t.lineCap="butt":t.lineCap="round",i.colorStrokeStyle(t,v[0],v[1],v[2],n),i.drawEdgePath(a,t,o.allpts,"solid")}}}};Kr.drawEdgeOverlay=bu("overlay");Kr.drawEdgeUnderlay=bu("underlay");Kr.drawEdgePath=function(r,e,t,a){var n=r._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=r.pstyle("line-dash-pattern").pfValue,v=r.pstyle("line-dash-offset").pfValue;if(l){var f=t.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);r.textAlign=l,r.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,d;t&&(d=t,r.translate(-d.x1,-d.y1)),n==null?(s.drawText(r,e,null,h,i),e.isEdge()&&(s.drawText(r,e,"source",h,i),s.drawText(r,e,"target",h,i))):s.drawText(r,e,n,h,i),t&&r.translate(d.x1,d.y1)};mt.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;r.font=a+" "+s+" "+n+" "+i,r.lineJoin="round",this.colorFillStyle(r,u[0],u[1],u[2],o),this.colorStrokeStyle(r,v[0],v[1],v[2],l)};function qn(r,e,t,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;r.beginPath(),r.moveTo(e+i,t),r.lineTo(e+a-i,t),r.quadraticCurveTo(e+a,t,e+a,t+i),r.lineTo(e+a,t+n-i),r.quadraticCurveTo(e+a,t+n,e+a-i,t+n),r.lineTo(e+i,t+n),r.quadraticCurveTo(e,t+n,e,t+n-i),r.lineTo(e,t+i),r.quadraticCurveTo(e,t,e+i,t),r.closePath(),s?r.stroke():r.fill()}mt.getTextAngle=function(r,e){var t,a=r._private,n=a.rscratch,i=e?e+"-":"",s=r.pstyle(i+"text-rotation"),o=kr(n,"labelAngle",e);return s.strValue==="autorotate"?t=r.isEdge()?o:0:s.strValue==="none"?t=0:t=s.pfValue,t};mt.drawText=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var l=kr(s,"labelX",t),u=kr(s,"labelY",t),v,f,c=this.getLabelText(e,t);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(r,e,n);var h=t?t+"-":"",d=kr(s,"labelWidth",t),y=kr(s,"labelHeight",t),p=e.pstyle(h+"text-margin-x").pfValue,g=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=p,u+=g;var S;switch(a?S=this.getTextAngle(e,t):S=0,S!==0&&(v=l,f=u,r.translate(v,f),r.rotate(S),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var E=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,D=e.pstyle("text-border-width").pfValue,C=e.pstyle("text-background-padding").pfValue,M=e.pstyle("text-background-shape").strValue,P=M.indexOf("round")===0,B=2;if(E>0||D>0&&x>0){var L=l-C;switch(b){case"left":L-=d;break;case"center":L-=d/2;break}var k=u-y-C,O=d+2*C,A=y+2*C;if(E>0){var R=r.fillStyle,I=e.pstyle("text-background-color").value;r.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*o+")",P?qn(r,L,k,O,A,B):r.fillRect(L,k,O,A),r.fillStyle=R}if(D>0&&x>0){var q=r.strokeStyle,$=r.lineWidth,F=e.pstyle("text-border-color").value,N=e.pstyle("text-border-style").value;if(r.strokeStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+x*o+")",r.lineWidth=D,r.setLineDash)switch(N){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=D/4,r.setLineDash([]);break;case"solid":r.setLineDash([]);break}if(P?qn(r,L,k,O,A,B,"stroke"):r.strokeRect(L,k,O,A),N==="double"){var W=D/2;P?qn(r,L+W,k+W,O-W*2,A-W*2,B,"stroke"):r.strokeRect(L+W,k+W,O-W*2,A-W*2)}r.setLineDash&&r.setLineDash([]),r.lineWidth=$,r.strokeStyle=q}}var Q=2*e.pstyle("text-outline-width").pfValue;if(Q>0&&(r.lineWidth=Q),e.pstyle("text-wrap").value==="wrap"){var _=kr(s,"labelWrapCachedLines",t),j=kr(s,"labelLineHeight",t),ee=d/2,U=this.getLabelJustification(e);switch(U==="auto"||(b==="left"?U==="left"?l+=-d:U==="center"&&(l+=-ee):b==="center"?U==="left"?l+=-ee:U==="right"&&(l+=ee):b==="right"&&(U==="center"?l+=ee:U==="right"&&(l+=d))),w){case"top":u-=(_.length-1)*j;break;case"center":case"bottom":u-=(_.length-1)*j;break}for(var z=0;z<_.length;z++)Q>0&&r.strokeText(_[z],l,u),r.fillText(_[z],l,u),u+=j}else Q>0&&r.strokeText(c,l,u),r.fillText(c,l,u);S!==0&&(r.rotate(-S),r.translate(-v,-f))}}};var Yt={};Yt.drawNode=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!ne(f.x)||!ne(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,p=e.padding();o=e.width()+2*p,l=e.height()+2*p;var g;t&&(g=t,r.translate(-g.x1,-g.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),S=new Array(b.length),E=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:L;s.eleFillStyle(r,e,te)},z=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F;s.colorStrokeStyle(r,k[0],k[1],k[2],te)},Y=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_;s.colorStrokeStyle(r,W[0],W[1],W[2],te)},X=function(te,K,re,ye){var me=s.nodePathCache=s.nodePathCache||[],fe=io(re==="polygon"?re+","+ye.join(","):re,""+K,""+te,""+ee),we=me[fe],le,ge=!1;return we!=null?(le=we,ge=!0,v.pathCache=le):(le=new Path2D,me[fe]=v.pathCache=le),{path:le,cacheHit:ge}},se=e.pstyle("shape").strValue,he=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var ae=X(o,l,se,he);d=ae.path,y=ae.cacheHit}var ie=function(){if(!y){var te=f;h&&(te={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||r,te.x,te.y,o,l,ee,v)}h?r.fill(d):r.fill()},ue=function(){for(var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,re=u.backgrounding,ye=0,me=0;me0&&arguments[0]!==void 0?arguments[0]:!1,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(r,e,K),te&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,ee,v)))},ve=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,K=(P>0?P:-P)*te,re=P>0?0:255;P!==0&&(s.colorFillStyle(r,re,re,re,K),h?r.fill(d):r.fill())},pe=function(){if(B>0){if(r.lineWidth=B,r.lineCap=R,r.lineJoin=A,r.setLineDash)switch(O){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(q),r.lineDashOffset=$;break;case"solid":case"double":r.setLineDash([]);break}if(I!=="center"){if(r.save(),r.lineWidth*=2,I==="inside")h?r.clip(d):r.clip();else{var te=new Path2D;te.rect(-o/2-B,-l/2-B,o+2*B,l+2*B),te.addPath(d),r.clip(te,"evenodd")}h?r.stroke(d):r.stroke(),r.restore()}else h?r.stroke(d):r.stroke();if(O==="double"){r.lineWidth=B/3;var K=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(d):r.stroke(),r.globalCompositeOperation=K}r.setLineDash&&r.setLineDash([])}},Pe=function(){if(N>0){if(r.lineWidth=N,r.lineCap="butt",r.setLineDash)switch(Q){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var te=f;h&&(te={x:0,y:0});var K=s.getNodeShape(e),re=B;I==="inside"&&(re=0),I==="outside"&&(re*=2);var ye=(o+re+(N+j))/o,me=(l+re+(N+j))/l,fe=o*ye,we=l*me,le=s.nodeShapes[K].points,ge;if(h){var Ne=X(fe,we,K,le);ge=Ne.path}if(K==="ellipse")s.drawEllipsePath(ge||r,te.x,te.y,fe,we);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(K)){var Ae=0,ur=0,Ze=0;K==="round-diamond"?Ae=(re+j+N)*1.4:K==="round-heptagon"?(Ae=(re+j+N)*1.075,Ze=-(re/2+j+N)/35):K==="round-hexagon"?Ae=(re+j+N)*1.12:K==="round-pentagon"?(Ae=(re+j+N)*1.13,Ze=-(re/2+j+N)/15):K==="round-tag"?(Ae=(re+j+N)*1.12,ur=(re/2+N+j)*.07):K==="round-triangle"&&(Ae=(re+j+N)*(Math.PI/2),Ze=-(re+j/2+N)/Math.PI),Ae!==0&&(ye=(o+Ae)/o,fe=o*ye,["round-hexagon","round-tag"].includes(K)||(me=(l+Ae)/l,we=l*me)),ee=ee==="auto"?yo(fe,we):ee;for(var $e=fe/2,fr=we/2,Qe=ee+(re+N+j)/2,lr=new Array(le.length/2),xr=new Array(le.length/2),yr=0;yr0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(t,v[0],v[1],v[2],u),o.nodeShapes[f].draw(t,n.x,n.y,i+l*2,s+l*2,c),t.fill()}}}};Yt.drawNodeOverlay=wu("overlay");Yt.drawNodeUnderlay=wu("underlay");Yt.hasPie=function(r){return r=r[0],r._private.hasPie};Yt.drawPie=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=a.x,o=a.y,l=e.width(),u=e.height(),v=Math.min(l,u)/2,f=0,c=this.usePaths();c&&(s=0,o=0),i.units==="%"?v=v*i.pfValue:i.pfValue!==void 0&&(v=i.pfValue/2);for(var h=1;h<=n.pieBackgroundN;h++){var d=e.pstyle("pie-"+h+"-background-size").value,y=e.pstyle("pie-"+h+"-background-color").value,p=e.pstyle("pie-"+h+"-background-opacity").value*t,g=d/100;g+f>1&&(g=1-f);var m=1.5*Math.PI+2*Math.PI*f,b=2*Math.PI*g,w=m+b;d===0||f>=1||f+g>1||(r.beginPath(),r.moveTo(s,o),r.arc(s,o,v,m,w),r.closePath(),this.colorFillStyle(r,y[0],y[1],y[2],p),r.fill(),f+=g)}};var pr={},vp=100;pr.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};pr.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,a,n=0;ns.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!f&&(v[s.NODE]=!0,v[s.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),w=n!==void 0?n:b,S=l.pan(),E={x:S.x,y:S.y},x={zoom:b,pan:{x:S.x,y:S.y}},D=s.prevViewport,C=D===void 0||x.zoom!==D.zoom||x.pan.x!==D.pan.x||x.pan.y!==D.pan.y;!C&&!(y&&!d)&&(s.motionBlurPxRatio=1),i&&(E=i),w*=o,E.x*=o,E.y*=o;var M=s.getCachedZSortedEles();function P(ae,ie,ue,ce,ve){var pe=ae.globalCompositeOperation;ae.globalCompositeOperation="destination-out",s.colorFillStyle(ae,255,255,255,s.motionBlurTransparency),ae.fillRect(ie,ue,ce,ve),ae.globalCompositeOperation=pe}function B(ae,ie){var ue,ce,ve,pe;!s.clearingMotionBlur&&(ae===u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]||ae===u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG])?(ue={x:S.x*h,y:S.y*h},ce=b*h,ve=s.canvasWidth*h,pe=s.canvasHeight*h):(ue=E,ce=w,ve=s.canvasWidth,pe=s.canvasHeight),ae.setTransform(1,0,0,1,0,0),ie==="motionBlur"?P(ae,0,0,ve,pe):!e&&(ie===void 0||ie)&&ae.clearRect(0,0,ve,pe),t||(ae.translate(ue.x,ue.y),ae.scale(ce,ce)),i&&ae.translate(i.x,i.y),n&&ae.scale(n,n)}if(f||(s.textureDrawLastFrame=!1),f){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=l.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var L=s.data.bufferContexts[s.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:o*s.textureMult});var x=s.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:s.canvasWidth,height:s.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[s.DRAG]=!1,v[s.NODE]=!1;var k=u.contexts[s.NODE],O=s.textureCache.texture,x=s.textureCache.viewport;k.setTransform(1,0,0,1,0,0),c?P(k,0,0,x.width,x.height):k.clearRect(0,0,x.width,x.height);var A=m.core("outside-texture-bg-color").value,R=m.core("outside-texture-bg-opacity").value;s.colorFillStyle(k,A[0],A[1],A[2],R),k.fillRect(0,0,x.width,x.height);var b=l.zoom();B(k,!1),k.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/o,x.height/x.zoom/o),k.drawImage(O,x.mpan.x,x.mpan.y,x.width/x.zoom/o,x.height/x.zoom/o)}else s.textureOnViewport&&!e&&(s.textureCache=null);var I=l.extent(),q=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),$=s.hideEdgesOnViewport&&q,F=[];if(F[s.NODE]=!v[s.NODE]&&c&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,F[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),F[s.DRAG]=!v[s.DRAG]&&c&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,F[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),v[s.NODE]||t||a||F[s.NODE]){var N=c&&!F[s.NODE]&&h!==1,k=e||(N?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),W=c&&!N?"motionBlur":void 0;B(k,W),$?s.drawCachedNodes(k,M.nondrag,o,I):s.drawLayeredElements(k,M.nondrag,o,I),s.debug&&s.drawDebugPoints(k,M.nondrag),!t&&!c&&(v[s.NODE]=!1)}if(!a&&(v[s.DRAG]||t||F[s.DRAG])){var N=c&&!F[s.DRAG]&&h!==1,k=e||(N?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]);B(k,c&&!N?"motionBlur":void 0),$?s.drawCachedNodes(k,M.drag,o,I):s.drawCachedElements(k,M.drag,o,I),s.debug&&s.drawDebugPoints(k,M.drag),!t&&!c&&(v[s.DRAG]=!1)}if(s.showFps||!a&&v[s.SELECT_BOX]&&!t){var k=e||u.contexts[s.SELECT_BOX];if(B(k),s.selection[4]==1&&(s.hoverData.selecting||s.touchData.selecting)){var b=s.cy.zoom(),Q=m.core("selection-box-border-width").value/b;k.lineWidth=Q,k.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",k.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),Q>0&&(k.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",k.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(u.bgActivePosistion&&!s.hoverData.selecting){var b=s.cy.zoom(),_=u.bgActivePosistion;k.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",k.beginPath(),k.arc(_.x,_.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),k.fill()}var j=s.lastRedrawTime;if(s.showFps&&j){j=Math.round(j);var ee=Math.round(1e3/j);k.setTransform(1,0,0,1,0,0),k.fillStyle="rgba(255, 0, 0, 0.75)",k.strokeStyle="rgba(255, 0, 0, 0.75)",k.lineWidth=1,k.fillText("1 frame = "+j+" ms = "+ee+" fps",0,20);var U=60;k.strokeRect(0,30,250,20),k.fillRect(0,30,250*Math.min(ee/U,1),20)}t||(v[s.SELECT_BOX]=!1)}if(c&&h!==1){var z=u.contexts[s.NODE],Y=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],X=u.contexts[s.DRAG],se=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],he=function(ie,ue,ce){ie.setTransform(1,0,0,1,0,0),ce||!g?ie.clearRect(0,0,s.canvasWidth,s.canvasHeight):P(ie,0,0,s.canvasWidth,s.canvasHeight);var ve=h;ie.drawImage(ue,0,0,s.canvasWidth*ve,s.canvasHeight*ve,0,0,s.canvasWidth,s.canvasHeight)};(v[s.NODE]||F[s.NODE])&&(he(z,Y,F[s.NODE]),v[s.NODE]=!1),(v[s.DRAG]||F[s.DRAG])&&(he(X,se,F[s.DRAG]),v[s.DRAG]=!1)}s.prevViewport=x,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),c&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!f,s.mbFrames=0,v[s.NODE]=!0,v[s.DRAG]=!0,s.redraw()},vp)),e||l.emit("render")};var at={};at.drawPolygonPath=function(r,e,t,a,n,i){var s=a/2,o=n/2;r.beginPath&&r.beginPath(),r.moveTo(e+s*i[0],t+o*i[1]);for(var l=1;l0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(r.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var y=e.pan(),p={x:y.x*u,y:y.y*u};u*=e.zoom(),h.translate(p.x,p.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-p.x,-p.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,i,s),h.fill())}return c};function fp(r,e){for(var t=atob(r),a=new ArrayBuffer(t.length),n=new Uint8Array(a),i=0;i"u"?"undefined":We(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var a=this.cy.window(),n=a.document;t=n.createElement("canvas"),t.width=r,t.height=e}return t};[mu,Nr,Kr,Di,mt,Yt,pr,at,ka,Cu].forEach(function(r){be(De,r)});var hp=[{name:"null",impl:iu},{name:"base",impl:gu},{name:"canvas",impl:cp}],gp=[{type:"layout",extensions:xg},{type:"renderer",extensions:hp}],Tu={},Du={};function ku(r,e,t){var a=t,n=function(D){Me("Can not register `"+e+"` for `"+r+"` since `"+D+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(ma.prototype[e])return n(e);ma.prototype[e]=t}else if(r==="collection"){if(je.prototype[e])return n(e);je.prototype[e]=t}else if(r==="layout"){for(var i=function(D){this.options=D,t.call(this,D),Se(this._private)||(this._private={}),this._private.cy=D.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(t.prototype),o=[],l=0;l{p.clear(),B.clear(),f.clear()},"clear"),D=X((e,t)=>{const n=p.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),I=X((e,t)=>{const n=p.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)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),A=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const d=t.children(e)||[];e!==o&&d.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",d),d.forEach(c=>{if(t.children(c).length>0)A(c,t,n,o);else{const r=t.node(c);i.info("cp ",c," to ",o," with parent ",e),n.setNode(c,r),o!==t.parent(c)&&(i.warn("Setting parent",c,t.parent(c)),n.setParent(c,t.parent(c))),e!==o&&c!==e?(i.debug("Setting parent",c,e),n.setParent(c,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",c,"cluster!==rootId",e!==o,"node!==clusterId",c!==e));const u=t.edges(c);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{I(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",c),t.removeNode(c)})},"copy"),J=X((e,t)=>{const n=t.children(e);let o=[...n];for(const d of n)B.set(d,e),o=[...o,...J(d,t)];return o},"extractDescendants"),L=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),d=e.edges().filter(l=>l.v===n||l.w===n),c=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=d.map(l=>({v:l.v,w:l.w}));return c.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),S=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let d;for(const c of o){const r=S(c,t,n),u=L(t,n,r);if(r)if(u.length>0)d=r;else return r}return d},"findNonClusterChild"),P=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),ee=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: ",S(n,e,n)),p.set(n,J(n,e)),f.set(n,{id:S(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),d=e.edges();o.length>0?(i.debug("Cluster identified",n,p),d.forEach(c=>{const r=D(c.v,n),u=D(c.w,n);r^u&&(i.warn("Edge: ",c," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",p.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,p)});for(let n of f.keys()){const o=f.get(n).id,d=e.parent(o);d!==n&&f.has(d)&&!f.get(d).externalConnections&&(f.get(n).id=d)}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 d=n.v,c=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),d=P(n.v),c=P(n.w),e.removeEdge(n.v,n.w,n.name),d!==n.v){const r=e.parent(d);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(c!==n.w){const r=e.parent(c);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",d,c,n.name),e.setEdge(d,c,o,n.name)}}),i.warn("Adjusted Graph",N(e)),G(e,0),i.trace(f)},"adjustClustersAndEdges"),G=X((e,t)=>{var d,c;if(i.warn("extractor - ",t,N(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(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(c=(d=f.get(r))==null?void 0:d.clusterData)!=null&&c.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new k({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",N(e)),A(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",N(v)),i.debug("Old graph after copy",N(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&G(u.graph,t+1)}},"extractor"),R=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const d=e.children(o),c=R(e,d);n=[...n,...c]}),n},"sorter"),ne=X(e=>R(e,e.children()),"sortNodesByHierarchy"),T=X(async(e,t,n,o,d,c)=>{i.warn("Graph in recursive render:XAX",N(t),d);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(a){const s=t.node(a);if(d!==void 0){const m=JSON.parse(JSON.stringify(d.clusterData));i.trace(`Setting data for parent cluster XXX + Node.id = `,a,` + data=`,m.height,` +Parent cluster`,d.height),t.setNode(d.id,m),t.parent(a)||(i.trace("Setting parent",a,d.id),t.setParent(a,d.id,m))}if(i.info("(Insert) Node XXX"+a+": "+JSON.stringify(t.node(a))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",a,s.width,t.node(a));const{ranksep:m,nodesep:h}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:m+25,nodesep:h});const b=await T(g,s.graph,n,o,t.node(a),c),x=b.elem;H(s,x),s.diff=b.diff||0,i.info("New compound node after recursive render XAX",a,"width",s.width,"height",s.height),q(x,s)}else t.children(a).length>0?(i.trace("Cluster - the non recursive path XBX",a,s.id,s,s.width,"Graph:",t),i.trace(S(s.id,t)),f.set(s.id,{id:S(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",a,g,t.node(a),r),await z(g,t.node(a),{config:c,dir:r}))})),await X(async()=>{const a=t.edges().map(async function(s){const m=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 W(C,m)});await Promise.all(a)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(N(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),Z(t),i.info("Graph after layout:",JSON.stringify(N(t)));let E=0,{subGraphTitleTotalMargin:y}=K(c);return await Promise.all(ne(t).map(async function(a){var m;const s=t.node(a);if(i.info("Position XBX => "+a+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",a,s.id,s.width,s.height,s.x,s.y,t.parent(a)),f.get(s.id).node=s,O(s);else if(t.children(a).length>0){i.info("A pure cluster node XBX1",a,s.id,s.x,s.y,s.width,s.height,t.parent(a)),s.height+=y,t.node(s.parentId);const h=(s==null?void 0:s.padding)/2||0,b=((m=s==null?void 0:s.labelBBox)==null?void 0:m.height)||0,x=b-h||0;i.debug("OffsetY",x,"labelHeight",b,"halfPadding",h),await Q(l,s),f.get(s.id).node=s}else{const h=t.node(s.parentId);s.y+=y/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",h,h==null?void 0:h.offsetY,s),O(s)}})),t.edges().forEach(function(a){const s=t.edge(a);i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=y/2);const m=t.node(a.v);var h=t.node(a.w);const b=U(v,s,f,n,m,h,o);V(s,b)}),t.nodes().forEach(function(a){const s=t.node(a);i.info(a,s.type,s.diff),s.isGroup&&(E=s.diff)}),i.warn("Returning from recursive render XAX",u,E),{elem:u,diff:E}},"recursiveRender"),fe=X(async(e,t)=>{var c,r,u,l,v,C;const n=new k({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((c=e.config)==null?void 0:c.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");M(o,e.markers,e.type,e.diagramId),F(),Y(),_(),$(),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 w=g.start,E=w+"---"+w+"---1",y=w+"---"+w+"---2",a=n.node(w);n.setNode(E,{domId:E,id:E,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(E,a.parentId),n.setNode(y,{domId:y,id:y,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,a.parentId);const s=structuredClone(g),m=structuredClone(g),h=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=w+"-cyclic-special-1",m.arrowTypeEnd="none",m.id=w+"-cyclic-special-mid",h.label="",a.isGroup&&(s.fromCluster=w,h.toCluster=w),h.id=w+"-cyclic-special-2",n.setEdge(w,E,s,w+"-cyclic-special-0"),n.setEdge(E,y,m,w+"-cyclic-special-1"),n.setEdge(y,w,h,w+"-cyc{const t=x({...L,...T().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),H=n(()=>m.packet,"getPacket"),I=n(t=>{t.length>0&&m.packet.push(t)},"pushWord"),M=n(()=>{E(),m=structuredClone(C)},"clear"),h={pushWord:I,getPacket:H,getConfig:Y,clear:M,setAccTitle:S,getAccTitle:F,setDiagramTitle:z,getDiagramTitle:P,getAccDescription:W,setAccDescription:D},O=1e4,q=n(t=>{w(t,h);let e=-1,o=[],s=1;const{bitsPerRow:i}=h.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),K={parse:n(async t=>{const e=await N("packet",t);v.debug(e),q(e)},"parse")},R=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=_(e);f.attr("viewbox",`0 0 ${k} ${d}`),A(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())U(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=x(j,t);return` + .packetByte { + font-size: ${e.byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `},"styles"),lt={parser:K,db:h,renderer:X,styles:J};export{lt as diagram}; diff --git a/pr-528/assets/chunks/erDiagram-DKC2X5TE.C10OkHln.js b/pr-528/assets/chunks/erDiagram-DKC2X5TE.C10OkHln.js new file mode 100644 index 000000000..113991364 --- /dev/null +++ b/pr-528/assets/chunks/erDiagram-DKC2X5TE.C10OkHln.js @@ -0,0 +1,51 @@ +import{_ as u,d as U,s as kt,g as xt,c as Rt,b as Ot,q as bt,r as Nt,l as X,v as Tt,j as at,u as At,k as Mt,a0 as vt,a6 as St,a7 as wt}from"../app.CKrDwBa1.js";import{G as It}from"./graph.DDKaZ6Ct.js";import{l as Dt}from"./layout.PWtEKM9a.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";const Lt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bt(t){return typeof t=="string"&&Lt.test(t)}const v=[];for(let t=0;t<256;++t)v.push((t+256).toString(16).slice(1));function Ct(t,e=0){return v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]}function Pt(t){if(!Bt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Yt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ht(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const y=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=k,k=m,m=it(g,30)>>>0,g=h,h=b}r[0]=r[0]+h>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const zt=Wt("v5",80,Ht);var nt=function(){var t=u(function(w,i,n,l){for(n=n||{},l=w.length;l--;n[w[l]]=i);return n},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],f=[1,11],c=[1,12],_=[1,13],y=[1,14],o=[1,15],h=[1,21],g=[1,22],m=[1,23],k=[1,24],x=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],O=[1,34],b=[27,28,46,47],Y=[41,42,43,44,45],Z=[17,34],F=[1,54],M=[1,53],S=[17,34,36,38],N={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:u(function(i,n,l,d,E,a,V){var s=a.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(a[s-4]),d.addEntity(a[s-2]),d.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:d.addEntity(a[s-3]),d.addAttributes(a[s-3],a[s-1]);break;case 10:d.addEntity(a[s-2]);break;case 11:d.addEntity(a[s]);break;case 12:d.addEntity(a[s-6],a[s-4]),d.addAttributes(a[s-6],a[s-1]);break;case 13:d.addEntity(a[s-5],a[s-3]);break;case 14:d.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:g,43:m,44:k,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:y,28:o},{16:30,17:[1,31],29:32,30:33,34:O},{11:35,27:y,28:o},{40:36,46:[1,37],47:[1,38]},t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),t(b,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:O},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:g,43:m,44:k,45:x},t(Y,[2,39]),t(Y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(Z,[2,23],{32:50,33:51,35:52,37:F,38:M}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(Z,[2,24],{33:56,36:[1,57],38:M}),t(Z,[2,25]),t(S,[2,29]),t(Z,[2,32]),t(S,[2,31]),{16:58,17:[1,59],29:32,30:33,34:O},t(Z,[2,26]),{35:60,37:F},{17:[1,61]},t(e,[2,13]),t(S,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:u(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:u(function(i){var n=this,l=[0],d=[],E=[null],a=[],V=this.table,s="",j=0,lt=0,_t=2,ct=1,Et=a.slice.call(arguments,1),A=Object.create(this.lexer),H={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(H.yy[$]=this.yy[$]);A.setInput(i,H.yy),H.yy.lexer=A,H.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var tt=A.yylloc;a.push(tt);var gt=A.options&&A.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mt(D){l.length=l.length-2*D,E.length=E.length-D,a.length=a.length-D}u(mt,"popStack");function ht(){var D;return D=d.pop()||A.lex()||ct,typeof D!="number"&&(D instanceof Array&&(d=D,D=d.pop()),D=n.symbols_[D]||D),D}u(ht,"lex");for(var I,z,B,et,K={},q,W,dt,J;;){if(z=l[l.length-1],this.defaultActions[z]?B=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=ht()),B=V[z]&&V[z][I]),typeof B>"u"||!B.length||!B[0]){var rt="";J=[];for(q in V[z])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");A.showPosition?rt="Parse error on line "+(j+1)+`: +`+A.showPosition()+` +Expecting `+J.join(", ")+", got '"+(this.terminals_[I]||I)+"'":rt="Parse error on line "+(j+1)+": Unexpected "+(I==ct?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(rt,{text:A.match,token:this.terminals_[I]||I,line:A.yylineno,loc:tt,expected:J})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(B[0]){case 1:l.push(I),E.push(A.yytext),a.push(A.yylloc),l.push(B[1]),I=null,lt=A.yyleng,s=A.yytext,j=A.yylineno,tt=A.yylloc;break;case 2:if(W=this.productions_[B[1]][1],K.$=E[E.length-W],K._$={first_line:a[a.length-(W||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(W||1)].first_column,last_column:a[a.length-1].last_column},gt&&(K._$.range=[a[a.length-(W||1)].range[0],a[a.length-1].range[1]]),et=this.performAction.apply(K,[s,lt,j,H.yy,B[1],E,a].concat(Et)),typeof et<"u")return et;W&&(l=l.slice(0,-1*W*2),E=E.slice(0,-1*W),a=a.slice(0,-1*W)),l.push(this.productions_[B[1]][0]),E.push(K.$),a.push(K._$),dt=V[l[l.length-2]][l[l.length-1]],l.push(dt);break;case 3:return!0}}return!0},"parse")},T=function(){var w={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:u(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var d=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),l.length-1&&(this.yylineno-=l.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:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:u(function(i,n){var l,d,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))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var a in E)this[a]=E[a];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,d;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),a=0;an[0].length)){if(n=l,d=a,this.options.backtrack_lexer){if(i=this.test_match(l,E[a]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,E[d]),i!==!1?i:!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:u(function(){var n=this.next();return n||this.lex()},"lex"),begin:u(function(n){this.conditionStack.push(n)},"begin"),popState:u(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(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:u(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:u(function(n){this.begin(n)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(n,l,d,E){switch(d){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return l.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return l.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return w}();N.lexer=T;function L(){this.yy={}}return u(L,"Parser"),L.prototype=N,N.Parser=L,new L}();nt.parser=nt;var Gt=nt,G=new Map,ot=[],Kt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Vt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},ft=u(function(t,e=void 0){return G.has(t)?!G.get(t).alias&&e&&(G.get(t).alias=e,X.info(`Add alias '${e}' to entity '${t}'`)):(G.set(t,{attributes:[],alias:e}),X.info("Added new entity :",t)),G.get(t)},"addEntity"),Xt=u(()=>G,"getEntities"),Qt=u(function(t,e){let r=ft(t),f;for(f=e.length-1;f>=0;f--)r.attributes.push(e[f]),X.debug("Added attribute ",e[f].attributeName)},"addAttributes"),jt=u(function(t,e,r,f){let c={entityA:t,roleA:e,entityB:r,relSpec:f};ot.push(c),X.debug("Added new relationship :",c)},"addRelationship"),qt=u(()=>ot,"getRelationships"),Jt=u(function(){G=new Map,ot=[],Tt()},"clear"),$t={Cardinality:Kt,Identification:Vt,getConfig:u(()=>U().er,"getConfig"),addEntity:ft,addAttributes:Qt,getEntities:Xt,addRelationship:jt,getRelationships:qt,clear:Jt,setAccTitle:kt,getAccTitle:xt,setAccDescription:Rt,getAccDescription:Ot,setDiagramTitle:bt,getDiagramTitle:Nt},C={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},te=u(function(t,e){let r;t.append("defs").append("marker").attr("id",C.MD_PARENT_START).attr("refX",0).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"),t.append("defs").append("marker").attr("id",C.MD_PARENT_END).attr("refX",19).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"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),P={ERMarkers:C,insertMarkers:te},ee=/[^\dA-Za-z](\W)*/g,R={},Q=new Map,re=u(function(t){const e=Object.keys(t);for(const r of e)R[r]=t[r]},"setConf"),ae=u((t,e,r)=>{const f=R.entityPadding/3,c=R.entityPadding/3,_=R.fontSize*.85,y=e.node().getBBox(),o=[];let h=!1,g=!1,m=0,k=0,x=0,p=0,O=y.height+f*2,b=1;r.forEach(M=>{M.attributeKeyTypeList!==void 0&&M.attributeKeyTypeList.length>0&&(h=!0),M.attributeComment!==void 0&&(g=!0)}),r.forEach(M=>{const S=`${e.node().id}-attr-${b}`;let N=0;const T=wt(M.attributeType),L=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(T),w=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeName),i={};i.tn=L,i.nn=w;const n=L.node().getBBox(),l=w.node().getBBox();if(m=Math.max(m,n.width),k=Math.max(k,l.width),N=Math.max(n.height,l.height),h){const d=M.attributeKeyTypeList!==void 0?M.attributeKeyTypeList.join(","):"",E=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(d);i.kn=E;const a=E.node().getBBox();x=Math.max(x,a.width),N=Math.max(N,a.height)}if(g){const d=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeComment||"");i.cn=d;const E=d.node().getBBox();p=Math.max(p,E.width),N=Math.max(N,E.height)}i.height=N,o.push(i),O+=N+f*2,b+=1});let Y=4;h&&(Y+=2),g&&(Y+=2);const Z=m+k+x+p,F={width:Math.max(R.minEntityWidth,Math.max(y.width+R.entityPadding*2,Z+c*Y)),height:r.length>0?O:Math.max(R.minEntityHeight,y.height+R.entityPadding*2)};if(r.length>0){const M=Math.max(0,(F.width-Z-c*Y)/(Y/2));e.attr("transform","translate("+F.width/2+","+(f+y.height/2)+")");let S=y.height+f*2,N="attributeBoxOdd";o.forEach(T=>{const L=S+f+T.height/2;T.tn.attr("transform","translate("+c+","+L+")");const w=t.insert("rect","#"+T.tn.node().id).classed(`er ${N}`,!0).attr("x",0).attr("y",S).attr("width",m+c*2+M).attr("height",T.height+f*2),i=parseFloat(w.attr("x"))+parseFloat(w.attr("width"));T.nn.attr("transform","translate("+(i+c)+","+L+")");const n=t.insert("rect","#"+T.nn.node().id).classed(`er ${N}`,!0).attr("x",i).attr("y",S).attr("width",k+c*2+M).attr("height",T.height+f*2);let l=parseFloat(n.attr("x"))+parseFloat(n.attr("width"));if(h){T.kn.attr("transform","translate("+(l+c)+","+L+")");const d=t.insert("rect","#"+T.kn.node().id).classed(`er ${N}`,!0).attr("x",l).attr("y",S).attr("width",x+c*2+M).attr("height",T.height+f*2);l=parseFloat(d.attr("x"))+parseFloat(d.attr("width"))}g&&(T.cn.attr("transform","translate("+(l+c)+","+L+")"),t.insert("rect","#"+T.cn.node().id).classed(`er ${N}`,"true").attr("x",l).attr("y",S).attr("width",p+c*2+M).attr("height",T.height+f*2)),S+=T.height+f*2,N=N==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else F.height=Math.max(R.minEntityHeight,O),e.attr("transform","translate("+F.width/2+","+F.height/2+")");return F},"drawAttributes"),ie=u(function(t,e,r){const f=[...e.keys()];let c;return f.forEach(function(_){const y=pt(_,"entity");Q.set(_,y);const o=t.append("g").attr("id",y);c=c===void 0?y:c;const h="text-"+y,g=o.append("text").classed("er entityLabel",!0).attr("id",h).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px").text(e.get(_).alias??_),{width:m,height:k}=ae(o,g,e.get(_).attributes),p=o.insert("rect","#"+h).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",m).attr("height",k).node().getBBox();r.setNode(y,{width:p.width,height:p.height,shape:"rect",id:y})}),c},"drawEntities"),ne=u(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),yt=u(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),se=u(function(t,e){return t.forEach(function(r){e.setEdge(Q.get(r.entityA),Q.get(r.entityB),{relationship:r},yt(r))}),t},"addRelationships"),ut=0,oe=u(function(t,e,r,f,c){ut++;const _=r.edge(Q.get(e.entityA),Q.get(e.entityB),yt(e)),y=vt().x(function(b){return b.x}).y(function(b){return b.y}).curve(St),o=t.insert("path","#"+f).classed("er relationshipLine",!0).attr("d",y(_.points)).style("stroke",R.stroke).style("fill","none");e.relSpec.relType===c.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let h="";switch(R.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_END+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_END+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_END+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONLY_ONE_END+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+h+"#"+P.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_START+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_START+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_START+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONLY_ONE_START+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+h+"#"+P.ERMarkers.MD_PARENT_START+")");break}const g=o.node().getTotalLength(),m=o.node().getPointAtLength(g*.5),k="rel"+ut,x=e.roleA.split(/
    /g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",k).attr("x",m.x).attr("y",m.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px");if(x.length==1)p.text(e.roleA);else{const b=-(x.length-1)*.5;x.forEach((Y,Z)=>{p.append("tspan").attr("x",m.x).attr("dy",`${Z===0?b:1}em`).text(Y)})}const O=p.node().getBBox();t.insert("rect","#"+k).classed("er relationshipLabelBox",!0).attr("x",m.x-O.width/2).attr("y",m.y-O.height/2).attr("width",O.width).attr("height",O.height)},"drawRelationshipFromLayout"),le=u(function(t,e,r,f){R=U().er,X.info("Drawing ER diagram");const c=U().securityLevel;let _;c==="sandbox"&&(_=at("#i"+e));const o=(c==="sandbox"?at(_.nodes()[0].contentDocument.body):at("body")).select(`[id='${e}']`);P.insertMarkers(o,R);let h;h=new It({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const g=ie(o,f.db.getEntities(),h),m=se(f.db.getRelationships(),h);Dt(h),ne(o,h),m.forEach(function(b){oe(o,b,h,g,f)});const k=R.diagramPadding;At.insertTitle(o,"entityTitleText",R.titleTopMargin,f.db.getDiagramTitle());const x=o.node().getBBox(),p=x.width+k*2,O=x.height+k*2;Mt(o,O,p,R.useMaxWidth),o.attr("viewBox",`${x.x-k} ${x.y-k} ${p} ${O}`)},"draw"),ce="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function pt(t="",e=""){const r=t.replace(ee,"");return`${st(e)}${st(r)}${zt(t,ce)}`}u(pt,"generateId");function st(t=""){return t.length>0?`${t}-`:""}u(st,"strWithHyphen");var he={setConf:re,draw:le},de=u(t=>` + .entityBox { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${t.attributeBackgroundColorOdd}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxEven { + fill: ${t.attributeBackgroundColorEven}; + stroke: ${t.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${t.tertiaryColor}; + opacity: 0.7; + background-color: ${t.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${t.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + +`,"getStyles"),ue=de,ke={parser:Gt,db:$t,renderer:he,styles:ue};export{ke as diagram}; diff --git a/pr-528/assets/chunks/execution_callout.Y2UDM0wA.js b/pr-528/assets/chunks/execution_callout.Y2UDM0wA.js new file mode 100644 index 000000000..e5879075f --- /dev/null +++ b/pr-528/assets/chunks/execution_callout.Y2UDM0wA.js @@ -0,0 +1 @@ +import{_ as n,o as a,c as i,j as e,a as t}from"./framework.B8-VHxRu.js";const r={name:"ExecutionCallout"};function u(c,o,s,l,h,d){return a(),i("div",null,o[0]||(o[0]=[e("p",null,[t("Rollkit is currently undergoing an execution overhaul with the creation of the "),e("a",{href:"https://github.com/rollkit/go-execution"},"go-execution interface"),t(". In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub "),e("a",{href:"https://github.com/rollkit/docs/issues/new"},"issue ticket"),t(" or reach out in our "),e("a",{href:"https://t.me/rollkit"},"Telegram group"),t(".")],-1)]))}const f=n(r,[["render",u],["__scopeId","data-v-402f8dca"]]);export{f as E}; diff --git a/pr-528/assets/chunks/flowDiagram-NWEUNK3L.B7qW0ski.js b/pr-528/assets/chunks/flowDiagram-NWEUNK3L.B7qW0ski.js new file mode 100644 index 000000000..1ca4a301b --- /dev/null +++ b/pr-528/assets/chunks/flowDiagram-NWEUNK3L.B7qW0ski.js @@ -0,0 +1,160 @@ +import{g as gt,s as At}from"./chunk-4LC2V6XN.Cfx7Swlc.js";import{d as U1,_ as l,o as Ze,p as bt,s as kt,g as mt,b as Et,c as St,q as Dt,r as Ct,t as xt,J as Tt,l as e1,u as ge,v as yt,x as Ft,j as x1,y as vt,z as _t,e as Bt,A as Vt}from"../app.CKrDwBa1.js";import{c as Lt}from"./channel.BijykDEK.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";var wt="flowchart-",$e=0,G1=U1(),b1=new Map,K=[],K1=new Map,p1=[],Ae=new Map,be=new Map,ee=0,pe=!0,J,se,re=[],ie=l(e=>Bt.sanitizeText(e,G1),"sanitizeText"),ae=l(function(e){for(const r of b1.values())if(r.id===e)return r.domId;return e},"lookUpDomId"),It=l(function(e,r,i,a,u,d,g={},D){var _,z;if(!e||e.trim().length===0)return;let c,o=b1.get(e);if(o===void 0&&(o={id:e,labelType:"text",domId:wt+e+"-"+$e,styles:[],classes:[]},b1.set(e,o)),$e++,r!==void 0?(G1=U1(),c=ie(r.text.trim()),o.labelType=r.type,c.startsWith('"')&&c.endsWith('"')&&(c=c.substring(1,c.length-1)),o.text=c):o.text===void 0&&(o.text=e),i!==void 0&&(o.type=i),a!=null&&a.forEach(function(v){o.styles.push(v)}),u!=null&&u.forEach(function(v){o.classes.push(v)}),d!==void 0&&(o.dir=d),o.props===void 0?o.props=g:g!==void 0&&Object.assign(o.props,g),D!==void 0){let v;D.includes(` +`)?v=D+` +`:v=`{ +`+D+` +}`;const h=xt(v,{schema:Tt});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h!=null&&h.shape&&(o.type=h==null?void 0:h.shape),h!=null&&h.label&&(o.text=h==null?void 0:h.label),h!=null&&h.icon&&(o.icon=h==null?void 0:h.icon,!((_=h.label)!=null&&_.trim())&&o.text===e&&(o.text="")),h!=null&&h.form&&(o.form=h==null?void 0:h.form),h!=null&&h.pos&&(o.pos=h==null?void 0:h.pos),h!=null&&h.img&&(o.img=h==null?void 0:h.img,!((z=h.label)!=null&&z.trim())&&o.text===e&&(o.text="")),h!=null&&h.constraint&&(o.constraint=h.constraint),h.w&&(o.assetWidth=Number(h.w)),h.h&&(o.assetHeight=Number(h.h))}},"addVertex"),Rt=l(function(e,r,i){const d={start:e,end:r,type:void 0,text:"",labelType:"text"};e1.info("abc78 Got edge...",d);const g=i.text;if(g!==void 0&&(d.text=ie(g.text.trim()),d.text.startsWith('"')&&d.text.endsWith('"')&&(d.text=d.text.substring(1,d.text.length-1)),d.labelType=g.type),i!==void 0&&(d.type=i.type,d.stroke=i.stroke,d.length=i.length>10?10:i.length),K.length<(G1.maxEdges??500))e1.info("Pushing edge..."),K.push(d);else throw new Error(`Edge limit exceeded. ${K.length} edges found, but the limit is ${G1.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)},"addSingleLink"),Nt=l(function(e,r,i){e1.info("addLink",e,r,i);for(const a of e)for(const u of r)Rt(a,u,i)},"addLink"),Pt=l(function(e,r){e.forEach(function(i){i==="default"?K.defaultInterpolate=r:K[i].interpolate=r})},"updateLinkInterpolate"),Ot=l(function(e,r){e.forEach(function(i){var a,u,d,g,D,c;if(typeof i=="number"&&i>=K.length)throw new Error(`The index ${i} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${K.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);i==="default"?K.defaultStyle=r:(K[i].style=r,(((u=(a=K[i])==null?void 0:a.style)==null?void 0:u.length)??0)>0&&!((g=(d=K[i])==null?void 0:d.style)!=null&&g.some(o=>o==null?void 0:o.startsWith("fill")))&&((c=(D=K[i])==null?void 0:D.style)==null||c.push("fill:none")))})},"updateLink"),Mt=l(function(e,r){e.split(",").forEach(function(i){let a=K1.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},K1.set(i,a)),r!=null&&r.forEach(function(u){if(/color/.exec(u)){const d=u.replace("fill","bgFill");a.textStyles.push(d)}a.styles.push(u)})})},"addClass"),Gt=l(function(e){J=e,/.*/.exec(J)&&(J="LR"),/.*v/.exec(J)&&(J="TB"),J==="TD"&&(J="TB")},"setDirection"),ke=l(function(e,r){for(const i of e.split(",")){const a=b1.get(i);a&&a.classes.push(r);const u=Ae.get(i);u&&u.classes.push(r)}},"setClass"),Ut=l(function(e,r){if(r!==void 0){r=ie(r);for(const i of e.split(","))be.set(se==="gen-1"?ae(i):i,r)}},"setTooltip"),Wt=l(function(e,r,i){const a=ae(e);if(U1().securityLevel!=="loose"||r===void 0)return;let u=[];if(typeof i=="string"){u=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g")),u.classed("hover",!0)}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),x1(this).classed("hover",!1)})},"setupToolTips");re.push(it);var qt=l(function(e="gen-1"){b1=new Map,K1=new Map,K=[],re=[it],p1=[],Ae=new Map,ee=0,be=new Map,pe=!0,se=e,G1=U1(),yt()},"clear"),Ht=l(e=>{se=e||"gen-2"},"setGen"),Xt=l(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),Qt=l(function(e,r,i){let a=e.text.trim(),u=i.text;e===i&&/\s/.exec(i.text)&&(a=void 0);function d(o){const _={boolean:{},number:{},string:{}},z=[];let v;return{nodeList:o.filter(function(b){const C=typeof b;return b.stmt&&b.stmt==="dir"?(v=b.value,!1):b.trim()===""?!1:C in _?_[C].hasOwnProperty(b)?!1:_[C][b]=!0:z.includes(b)?!1:z.push(b)}),dir:v}}l(d,"uniq");const{nodeList:g,dir:D}=d(r.flat());if(se==="gen-1")for(let o=0;o2e3)return{result:!1,count:0};if(at[j1]=r,p1[r].id===e)return{result:!0,count:0};let a=0,u=1;for(;a=0){const g=nt(e,d);if(g.result)return{result:!0,count:u+g.count};u=u+g.count}a=a+1}return{result:!1,count:u}},"indexNodes2"),Zt=l(function(e){return at[e]},"getDepthFirstPos"),$t=l(function(){j1=-1,p1.length>0&&nt("none",p1.length-1)},"indexNodes"),ut=l(function(){return p1},"getSubGraphs"),es=l(()=>pe?(pe=!1,!0):!1,"firstGraph"),ts=l(e=>{let r=e.trim(),i="arrow_open";switch(r[0]){case"<":i="arrow_point",r=r.slice(1);break;case"x":i="arrow_cross",r=r.slice(1);break;case"o":i="arrow_circle",r=r.slice(1);break}let a="normal";return r.includes("=")&&(a="thick"),r.includes(".")&&(a="dotted"),{type:i,stroke:a}},"destructStartLink"),ss=l((e,r)=>{const i=r.length;let a=0;for(let u=0;u{const r=e.trim();let i=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross",r.startsWith("x")&&(a="double_"+a,i=i.slice(1));break;case">":a="arrow_point",r.startsWith("<")&&(a="double_"+a,i=i.slice(1));break;case"o":a="arrow_circle",r.startsWith("o")&&(a="double_"+a,i=i.slice(1));break}let u="normal",d=i.length-1;i.startsWith("=")&&(u="thick"),i.startsWith("~")&&(u="invisible");const g=ss(".",i);return g&&(u="dotted",d=g),{type:a,stroke:u,length:d}},"destructEndLink"),is=l((e,r)=>{const i=rs(e);let a;if(r){if(a=ts(r),a.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=i.type;else{if(a.type!==i.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=i.length,a}return i},"destructLink"),lt=l((e,r)=>{for(const i of e)if(i.nodes.includes(r))return!0;return!1},"exists"),ot=l((e,r)=>{const i=[];return e.nodes.forEach((a,u)=>{lt(r,a)||i.push(e.nodes[u])}),{nodes:i}},"makeUniq"),as={firstGraph:es},ns=l(e=>e.img?"imageSquare":e.icon?e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon":e.type==="square"?"squareRect":e.type==="round"?"roundedRect":e.type??"squareRect","getTypeFromVertex"),us=l((e,r)=>e.find(i=>i.id===r),"findNode"),ls=l(e=>{let r="none",i="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":i=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),i=r;break}return{arrowTypeStart:r,arrowTypeEnd:i}},"destructEdgeType"),os=l((e,r,i,a,u,d)=>{var o;const g=i.get(e.id),D=a.get(e.id)??!1,c=us(r,e.id);c?(c.cssStyles=e.styles,c.cssCompiledStyles=te(e.classes),c.cssClasses=e.classes.join(" ")):r.push({id:e.id,label:e.text,labelStyle:"",parentId:g,padding:((o=u.flowchart)==null?void 0:o.padding)||8,cssStyles:e.styles,cssCompiledStyles:te(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),shape:ns(e),dir:e.dir,domId:e.domId,isGroup:D,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:et(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint})},"addNodeFromVertex");function te(e){let r=[];for(const i of e){const a=K1.get(i);a!=null&&a.styles&&(r=[...r,...a.styles??[]].map(u=>u.trim())),a!=null&&a.textStyles&&(r=[...r,...a.textStyles??[]].map(u=>u.trim()))}return r}l(te,"getCompiledStyles");var cs=l(()=>{const e=U1(),r=[],i=[],a=ut(),u=new Map,d=new Map;for(let c=a.length-1;c>=0;c--){const o=a[c];o.nodes.length>0&&d.set(o.id,!0);for(const _ of o.nodes)u.set(_,o.id)}for(let c=a.length-1;c>=0;c--){const o=a[c];r.push({id:o.id,label:o.title,labelStyle:"",parentId:u.get(o.id),padding:8,cssCompiledStyles:te(o.classes),cssClasses:o.classes.join(" "),shape:"rect",dir:o.dir,isGroup:!0,look:e.look})}st().forEach(c=>{os(c,r,u,d,e,e.look||"classic")});const D=rt();return D.forEach((c,o)=>{const{arrowTypeStart:_,arrowTypeEnd:z}=ls(c.type),v=[...D.defaultStyle??[]];c.style&&v.push(...c.style);const h={id:Ft(c.start,c.end,{counter:o,prefix:"L"}),start:c.start,end:c.end,type:c.type??"normal",label:c.text,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:(c==null?void 0:c.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(c==null?void 0:c.stroke)==="invisible"?"none":_,arrowTypeEnd:(c==null?void 0:c.stroke)==="invisible"?"none":z,arrowheadStyle:"fill: #333",labelStyle:v,style:v,pattern:c.stroke,look:e.look};i.push(h)}),{nodes:r,edges:i,other:{},config:e}},"getData"),de={defaultConfig:l(()=>bt.flowchart,"defaultConfig"),setAccTitle:kt,getAccTitle:mt,getAccDescription:Et,getData:cs,setAccDescription:St,addVertex:It,lookUpDomId:ae,addLink:Nt,updateLinkInterpolate:Pt,updateLink:Ot,addClass:Mt,setDirection:Gt,setClass:ke,setTooltip:Ut,getTooltip:et,setClickEvent:jt,setLink:zt,bindFunctions:Kt,getDirection:tt,getVertices:st,getEdges:rt,getClasses:Yt,clear:qt,setGen:Ht,defaultStyle:Xt,addSubGraph:Qt,getDepthFirstPos:Zt,indexNodes:$t,getSubGraphs:ut,destructLink:is,lex:as,exists:lt,makeUniq:ot,setDiagramTitle:Dt,getDiagramTitle:Ct},hs=l(function(e,r){return r.db.getClasses()},"getClasses"),ds=l(async function(e,r,i,a){var h;e1.info("REF0:"),e1.info("Drawing state diagram (v2)",r);const{securityLevel:u,flowchart:d,layout:g}=U1();let D;u==="sandbox"&&(D=x1("#i"+r));const c=u==="sandbox"?D.nodes()[0].contentDocument:document;e1.debug("Before getData: ");const o=a.db.getData();e1.debug("Data: ",o);const _=gt(r,u),z=tt();o.type=a.type,o.layoutAlgorithm=vt(g),o.layoutAlgorithm==="dagre"&&g==="elk"&&e1.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),o.direction=z,o.nodeSpacing=(d==null?void 0:d.nodeSpacing)||50,o.rankSpacing=(d==null?void 0:d.rankSpacing)||50,o.markers=["point","circle","cross"],o.diagramId=r,e1.debug("REF1:",o),await _t(o,_);const v=((h=o.config.flowchart)==null?void 0:h.diagramPadding)??8;ge.insertTitle(_,"flowchartTitleText",(d==null?void 0:d.titleTopMargin)||0,a.db.getDiagramTitle()),At(_,v,"flowchart",(d==null?void 0:d.useMaxWidth)||!1);for(const b of o.nodes){const C=x1(`#${r} [id="${b.id}"]`);if(!C||!b.link)continue;const Z=c.createElementNS("http://www.w3.org/2000/svg","a");Z.setAttributeNS("http://www.w3.org/2000/svg","class",b.cssClasses),Z.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?Z.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):b.linkTarget&&Z.setAttributeNS("http://www.w3.org/2000/svg","target",b.linkTarget);const k1=C.insert(function(){return Z},":first-child"),m1=C.select(".label-container");m1&&k1.append(function(){return m1.node()});const E1=C.select(".label");E1&&k1.append(function(){return E1.node()})}},"draw"),ps={getClasses:hs,draw:ds},fe=function(){var e=l(function(A1,p,f,A){for(f=f||{},A=A1.length;A--;f[A1[A]]=p);return f},"o"),r=[1,4],i=[1,3],a=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],d=[2,2],g=[1,13],D=[1,14],c=[1,15],o=[1,16],_=[1,23],z=[1,25],v=[1,26],h=[1,27],b=[1,49],C=[1,48],Z=[1,29],k1=[1,30],m1=[1,31],E1=[1,32],Y1=[1,33],B=[1,44],V=[1,46],L=[1,42],w=[1,47],I=[1,43],R=[1,50],N=[1,45],P=[1,51],O=[1,52],q1=[1,34],H1=[1,35],X1=[1,36],Q1=[1,37],f1=[1,57],x=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],t1=[1,61],s1=[1,60],r1=[1,62],T1=[8,9,11,75,77],me=[1,77],y1=[1,90],F1=[1,95],v1=[1,94],_1=[1,91],B1=[1,87],V1=[1,93],L1=[1,89],w1=[1,96],I1=[1,92],R1=[1,97],N1=[1,88],S1=[8,9,10,11,40,75,77],G=[8,9,10,11,40,46,75,77],Y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],Ee=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],W1=[44,60,88,101,104,105,108,110,113,114,115],Se=[1,123],De=[1,122],Ce=[1,130],xe=[1,144],Te=[1,145],ye=[1,146],Fe=[1,147],ve=[1,132],_e=[1,134],Be=[1,138],Ve=[1,139],Le=[1,140],we=[1,141],Ie=[1,142],Re=[1,143],Ne=[1,148],Pe=[1,149],Oe=[1,128],Me=[1,129],Ge=[1,136],Ue=[1,131],We=[1,135],ze=[1,133],ne=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],je=[1,151],Ke=[1,153],F=[8,9,11],q=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],k=[1,173],U=[1,169],W=[1,170],m=[1,174],E=[1,171],S=[1,172],P1=[77,115,118],T=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Ye=[10,105],g1=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],i1=[1,242],a1=[1,240],n1=[1,244],u1=[1,238],l1=[1,239],o1=[1,241],c1=[1,243],h1=[1,245],O1=[1,263],qe=[8,9,11,105],$=[8,9,10,11,60,83,104,105,108,109,110,111],ue={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:l(function(p,f,A,n,y,t,z1){var s=t.length-1;switch(y){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 181:this.$=t[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=n.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=n.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 43:this.$=t[s-1]+t[s];break;case 44:this.$=t[s];break;case 45:n.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),n.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 46:n.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 47:n.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 48:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 49:n.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),this.$={stmt:t[s-1],nodes:t[s-1],shapeData:t[s]};break;case 50:this.$={stmt:t[s],nodes:t[s]};break;case 51:this.$=[t[s]];break;case 52:n.addVertex(t[s-5][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s-4]),this.$=t[s-5].concat(t[s]);break;case 53:this.$=t[s-4].concat(t[s]);break;case 54:this.$=t[s];break;case 55:this.$=t[s-2],n.setClass(t[s-2],t[s]);break;case 56:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"square");break;case 57:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"doublecircle");break;case 58:this.$=t[s-5],n.addVertex(t[s-5],t[s-2],"circle");break;case 59:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"ellipse");break;case 60:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"stadium");break;case 61:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"subroutine");break;case 62:this.$=t[s-7],n.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 63:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"cylinder");break;case 64:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"round");break;case 65:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"diamond");break;case 66:this.$=t[s-5],n.addVertex(t[s-5],t[s-2],"hexagon");break;case 67:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"odd");break;case 68:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"trapezoid");break;case 69:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 70:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"lean_right");break;case 71:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"lean_left");break;case 72:this.$=t[s],n.addVertex(t[s]);break;case 73:t[s-1].text=t[s],this.$=t[s-1];break;case 74:case 75:t[s-2].text=t[s-1],this.$=t[s-2];break;case 76:this.$=t[s];break;case 77:var X=n.destructLink(t[s],t[s-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:t[s-1]};break;case 78:this.$={text:t[s],type:"text"};break;case 79:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 80:this.$={text:t[s],type:"string"};break;case 81:this.$={text:t[s],type:"markdown"};break;case 82:var X=n.destructLink(t[s]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 83:this.$=t[s-1];break;case 84:this.$={text:t[s],type:"text"};break;case 85:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 86:this.$={text:t[s],type:"string"};break;case 87:case 102:this.$={text:t[s],type:"markdown"};break;case 99:this.$={text:t[s],type:"text"};break;case 100:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 101:this.$={text:t[s],type:"text"};break;case 103:this.$=t[s-4],n.addClass(t[s-2],t[s]);break;case 104:this.$=t[s-4],n.setClass(t[s-2],t[s]);break;case 105:case 113:this.$=t[s-1],n.setClickEvent(t[s-1],t[s]);break;case 106:case 114:this.$=t[s-3],n.setClickEvent(t[s-3],t[s-2]),n.setTooltip(t[s-3],t[s]);break;case 107:this.$=t[s-2],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 108:this.$=t[s-4],n.setClickEvent(t[s-4],t[s-3],t[s-2]),n.setTooltip(t[s-4],t[s]);break;case 109:this.$=t[s-2],n.setLink(t[s-2],t[s]);break;case 110:this.$=t[s-4],n.setLink(t[s-4],t[s-2]),n.setTooltip(t[s-4],t[s]);break;case 111:this.$=t[s-4],n.setLink(t[s-4],t[s-2],t[s]);break;case 112:this.$=t[s-6],n.setLink(t[s-6],t[s-4],t[s]),n.setTooltip(t[s-6],t[s-2]);break;case 115:this.$=t[s-1],n.setLink(t[s-1],t[s]);break;case 116:this.$=t[s-3],n.setLink(t[s-3],t[s-2]),n.setTooltip(t[s-3],t[s]);break;case 117:this.$=t[s-3],n.setLink(t[s-3],t[s-2],t[s]);break;case 118:this.$=t[s-5],n.setLink(t[s-5],t[s-4],t[s]),n.setTooltip(t[s-5],t[s-2]);break;case 119:this.$=t[s-4],n.addVertex(t[s-2],void 0,void 0,t[s]);break;case 120:this.$=t[s-4],n.updateLink([t[s-2]],t[s]);break;case 121:this.$=t[s-4],n.updateLink(t[s-2],t[s]);break;case 122:this.$=t[s-8],n.updateLinkInterpolate([t[s-6]],t[s-2]),n.updateLink([t[s-6]],t[s]);break;case 123:this.$=t[s-8],n.updateLinkInterpolate(t[s-6],t[s-2]),n.updateLink(t[s-6],t[s]);break;case 124:this.$=t[s-6],n.updateLinkInterpolate([t[s-4]],t[s]);break;case 125:this.$=t[s-6],n.updateLinkInterpolate(t[s-4],t[s]);break;case 126:case 128:this.$=[t[s]];break;case 127:case 129:t[s-2].push(t[s]),this.$=t[s-2];break;case 131:this.$=t[s-1]+t[s];break;case 179:this.$=t[s];break;case 180:this.$=t[s-1]+""+t[s];break;case 182:this.$=t[s-1]+""+t[s];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:i,12:a},{1:[3]},e(u,d,{5:6}),{4:7,9:r,10:i,12:a},{4:8,9:r,10:i,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,33:24,34:z,36:v,38:h,42:28,43:38,44:b,45:39,47:40,60:C,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(u,[2,9]),e(u,[2,10]),e(u,[2,11]),{8:[1,54],9:[1,55],10:f1,15:53,18:56},e(x,[2,3]),e(x,[2,4]),e(x,[2,5]),e(x,[2,6]),e(x,[2,7]),e(x,[2,8]),{8:t1,9:s1,11:r1,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:t1,9:s1,11:r1,21:66},{8:t1,9:s1,11:r1,21:67},{8:t1,9:s1,11:r1,21:68},{8:t1,9:s1,11:r1,21:69},{8:t1,9:s1,11:r1,21:70},{8:t1,9:s1,10:[1,71],11:r1,21:72},e(x,[2,36]),{35:[1,73]},{37:[1,74]},e(x,[2,39]),e(T1,[2,50],{18:75,39:76,10:f1,40:me}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:y1,44:F1,60:v1,79:[1,85],88:_1,94:[1,82],96:[1,83],100:84,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},e(x,[2,183]),e(x,[2,184]),e(x,[2,185]),e(x,[2,186]),e(S1,[2,51]),e(S1,[2,54],{46:[1,98]}),e(G,[2,72],{112:111,29:[1,99],44:b,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:C,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(Y,[2,179]),e(Y,[2,140]),e(Y,[2,141]),e(Y,[2,142]),e(Y,[2,143]),e(Y,[2,144]),e(Y,[2,145]),e(Y,[2,146]),e(Y,[2,147]),e(Y,[2,148]),e(Y,[2,149]),e(Y,[2,150]),e(u,[2,12]),e(u,[2,18]),e(u,[2,19]),{9:[1,112]},e(Ee,[2,26],{18:113,10:f1}),e(x,[2,27]),{42:114,43:38,44:b,45:39,47:40,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(W1,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:Se,118:De},e([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),e(x,[2,28]),e(x,[2,29]),e(x,[2,30]),e(x,[2,31]),e(x,[2,32]),{10:Ce,12:xe,14:Te,27:ye,28:124,32:Fe,44:ve,60:_e,75:Be,79:[1,126],80:[1,127],82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:125,104:Oe,108:Me,110:Ge,113:Ue,114:We,115:ze},e(ne,d,{5:150}),e(x,[2,37]),e(x,[2,38]),e(T1,[2,48],{44:je}),e(T1,[2,49],{18:152,10:f1,40:Ke}),e(S1,[2,44]),{44:b,47:154,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{101:[1,155],102:156,104:[1,157]},{44:b,47:158,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{44:b,47:159,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},e(F,[2,113],{119:164,10:[1,163],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,115],{10:[1,165]}),e(q,[2,181]),e(q,[2,168]),e(q,[2,169]),e(q,[2,170]),e(q,[2,171]),e(q,[2,172]),e(q,[2,173]),e(q,[2,174]),e(q,[2,175]),e(q,[2,176]),e(q,[2,177]),e(q,[2,178]),{44:b,47:166,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{30:167,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:175,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:177,50:[1,176],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:178,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:179,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:180,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{108:[1,181]},{30:182,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:183,65:[1,184],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:185,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:186,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:187,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(Y,[2,180]),e(u,[2,20]),e(Ee,[2,25]),e(T1,[2,46],{39:188,18:189,10:f1,40:me}),e(W1,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{77:[1,193],78:194,115:Se,118:De},e(P1,[2,78]),e(P1,[2,80]),e(P1,[2,81]),e(P1,[2,166]),e(P1,[2,167]),{8:t1,9:s1,10:Ce,11:r1,12:xe,14:Te,21:196,27:ye,29:[1,195],32:Fe,44:ve,60:_e,75:Be,82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:197,104:Oe,108:Me,110:Ge,113:Ue,114:We,115:ze},e(T,[2,99]),e(T,[2,101]),e(T,[2,102]),e(T,[2,155]),e(T,[2,156]),e(T,[2,157]),e(T,[2,158]),e(T,[2,159]),e(T,[2,160]),e(T,[2,161]),e(T,[2,162]),e(T,[2,163]),e(T,[2,164]),e(T,[2,165]),e(T,[2,88]),e(T,[2,89]),e(T,[2,90]),e(T,[2,91]),e(T,[2,92]),e(T,[2,93]),e(T,[2,94]),e(T,[2,95]),e(T,[2,96]),e(T,[2,97]),e(T,[2,98]),{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,198],33:24,34:z,36:v,38:h,42:28,43:38,44:b,45:39,47:40,60:C,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:f1,18:199},{44:[1,200]},e(S1,[2,43]),{10:[1,201],44:b,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,202]},{10:[1,203],105:[1,204]},e(Ye,[2,126]),{10:[1,205],44:b,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,206],44:b,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{79:[1,207]},e(F,[2,107],{10:[1,208]}),e(F,[2,109],{10:[1,209]}),{79:[1,210]},e(q,[2,182]),{79:[1,211],97:[1,212]},e(S1,[2,55],{112:111,44:b,60:C,88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),{31:[1,213],67:k,81:214,115:m,116:E,117:S},e(g1,[2,84]),e(g1,[2,86]),e(g1,[2,87]),e(g1,[2,151]),e(g1,[2,152]),e(g1,[2,153]),e(g1,[2,154]),{49:[1,215],67:k,81:214,115:m,116:E,117:S},{30:216,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{51:[1,217],67:k,81:214,115:m,116:E,117:S},{53:[1,218],67:k,81:214,115:m,116:E,117:S},{55:[1,219],67:k,81:214,115:m,116:E,117:S},{57:[1,220],67:k,81:214,115:m,116:E,117:S},{60:[1,221]},{64:[1,222],67:k,81:214,115:m,116:E,117:S},{66:[1,223],67:k,81:214,115:m,116:E,117:S},{30:224,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{31:[1,225],67:k,81:214,115:m,116:E,117:S},{67:k,69:[1,226],71:[1,227],81:214,115:m,116:E,117:S},{67:k,69:[1,229],71:[1,228],81:214,115:m,116:E,117:S},e(T1,[2,45],{18:152,10:f1,40:Ke}),e(T1,[2,47],{44:je}),e(W1,[2,75]),e(W1,[2,74]),{62:[1,230],67:k,81:214,115:m,116:E,117:S},e(W1,[2,77]),e(P1,[2,79]),{30:231,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(ne,d,{5:232}),e(T,[2,100]),e(x,[2,35]),{43:233,44:b,45:39,47:40,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{10:f1,18:234},{10:i1,60:a1,83:n1,91:235,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:246,103:[1,247],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:248,103:[1,249],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{104:[1,250]},{10:i1,60:a1,83:n1,91:251,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{44:b,47:252,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},e(F,[2,114]),e(F,[2,116],{10:[1,256]}),e(F,[2,117]),e(G,[2,56]),e(g1,[2,85]),e(G,[2,57]),{51:[1,257],67:k,81:214,115:m,116:E,117:S},e(G,[2,64]),e(G,[2,59]),e(G,[2,60]),e(G,[2,61]),{108:[1,258]},e(G,[2,63]),e(G,[2,65]),{66:[1,259],67:k,81:214,115:m,116:E,117:S},e(G,[2,67]),e(G,[2,68]),e(G,[2,70]),e(G,[2,69]),e(G,[2,71]),e([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,261],33:24,34:z,36:v,38:h,42:28,43:38,44:b,45:39,47:40,60:C,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(S1,[2,53]),{43:262,44:b,45:39,47:40,60:C,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,119],{105:O1}),e(qe,[2,128],{107:264,10:i1,60:a1,83:n1,104:u1,108:l1,109:o1,110:c1,111:h1}),e($,[2,130]),e($,[2,132]),e($,[2,133]),e($,[2,134]),e($,[2,135]),e($,[2,136]),e($,[2,137]),e($,[2,138]),e($,[2,139]),e(F,[2,120],{105:O1}),{10:[1,265]},e(F,[2,121],{105:O1}),{10:[1,266]},e(Ye,[2,127]),e(F,[2,103],{105:O1}),e(F,[2,104],{112:111,44:b,60:C,88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(F,[2,108]),e(F,[2,110],{10:[1,267]}),e(F,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:t1,9:s1,11:r1,21:272},e(x,[2,34]),e(S1,[2,52]),{10:i1,60:a1,83:n1,104:u1,106:273,107:237,108:l1,109:o1,110:c1,111:h1},e($,[2,131]),{14:y1,44:F1,60:v1,88:_1,100:274,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{14:y1,44:F1,60:v1,88:_1,100:275,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{97:[1,276]},e(F,[2,118]),e(G,[2,58]),{30:277,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(G,[2,66]),e(ne,d,{5:278}),e(qe,[2,129],{107:264,10:i1,60:a1,83:n1,104:u1,108:l1,109:o1,110:c1,111:h1}),e(F,[2,124],{119:164,10:[1,279],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,125],{119:164,10:[1,280],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,112]),{31:[1,281],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,282],33:24,34:z,36:v,38:h,42:28,43:38,44:b,45:39,47:40,60:C,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:i1,60:a1,83:n1,91:283,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:284,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},e(G,[2,62]),e(x,[2,33]),e(F,[2,122],{105:O1}),e(F,[2,123],{105:O1})],defaultActions:{},parseError:l(function(p,f){if(f.recoverable)this.trace(p);else{var A=new Error(p);throw A.hash=f,A}},"parseError"),parse:l(function(p){var f=this,A=[0],n=[],y=[null],t=[],z1=this.table,s="",X=0,He=0,ht=2,Xe=1,dt=t.slice.call(arguments,1),M=Object.create(this.lexer),D1={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(D1.yy[le]=this.yy[le]);M.setInput(p,D1.yy),D1.yy.lexer=M,D1.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var oe=M.yylloc;t.push(oe);var pt=M.options&&M.options.ranges;typeof D1.yy.parseError=="function"?this.parseError=D1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(H){A.length=A.length-2*H,y.length=y.length-H,t.length=t.length-H}l(ft,"popStack");function Qe(){var H;return H=n.pop()||M.lex()||Xe,typeof H!="number"&&(H instanceof Array&&(n=H,H=n.pop()),H=f.symbols_[H]||H),H}l(Qe,"lex");for(var j,C1,Q,ce,M1={},Z1,d1,Je,$1;;){if(C1=A[A.length-1],this.defaultActions[C1]?Q=this.defaultActions[C1]:((j===null||typeof j>"u")&&(j=Qe()),Q=z1[C1]&&z1[C1][j]),typeof Q>"u"||!Q.length||!Q[0]){var he="";$1=[];for(Z1 in z1[C1])this.terminals_[Z1]&&Z1>ht&&$1.push("'"+this.terminals_[Z1]+"'");M.showPosition?he="Parse error on line "+(X+1)+`: +`+M.showPosition()+` +Expecting `+$1.join(", ")+", got '"+(this.terminals_[j]||j)+"'":he="Parse error on line "+(X+1)+": Unexpected "+(j==Xe?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(he,{text:M.match,token:this.terminals_[j]||j,line:M.yylineno,loc:oe,expected:$1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C1+", token: "+j);switch(Q[0]){case 1:A.push(j),y.push(M.yytext),t.push(M.yylloc),A.push(Q[1]),j=null,He=M.yyleng,s=M.yytext,X=M.yylineno,oe=M.yylloc;break;case 2:if(d1=this.productions_[Q[1]][1],M1.$=y[y.length-d1],M1._$={first_line:t[t.length-(d1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(d1||1)].first_column,last_column:t[t.length-1].last_column},pt&&(M1._$.range=[t[t.length-(d1||1)].range[0],t[t.length-1].range[1]]),ce=this.performAction.apply(M1,[s,He,X,D1.yy,Q[1],y,t].concat(dt)),typeof ce<"u")return ce;d1&&(A=A.slice(0,-1*d1*2),y=y.slice(0,-1*d1),t=t.slice(0,-1*d1)),A.push(this.productions_[Q[1]][0]),y.push(M1.$),t.push(M1._$),Je=z1[A[A.length-2]][A[A.length-1]],A.push(Je);break;case 3:return!0}}return!0},"parse")},ct=function(){var A1={EOF:1,parseError:l(function(f,A){if(this.yy.parser)this.yy.parser.parseError(f,A);else throw new Error(f)},"parseError"),setInput:l(function(p,f){return this.yy=f||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var f=p.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:l(function(p){var f=p.length,A=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;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),A.length-1&&(this.yylineno-=A.length-1);var y=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:A?(A.length===n.length?this.yylloc.first_column:0)+n[n.length-A.length].length-A[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(p){this.unput(this.match.slice(p))},"less"),pastInput:l(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var p=this.pastInput(),f=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+f+"^"},"showPosition"),test_match:l(function(p,f){var A,n,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),n=p[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+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],A=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,f,A,n;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;tf[0].length)){if(f=A,n=t,this.options.backtrack_lexer){if(p=this.test_match(A,y[t]),p!==!1)return p;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(p=this.test_match(f,y[n]),p!==!1?p:!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:l(function(){var f=this.next();return f||this.lex()},"lex"),begin:l(function(f){this.conditionStack.push(f)},"begin"),popState:l(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:l(function(f){this.begin(f)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:l(function(f,A,n,y){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),A.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return A.yytext=A.yytext.replace(t,"
    "),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return f.lex.firstGraph()&&this.begin("dir"),12;case 36:return f.lex.firstGraph()&&this.begin("dir"),12;case 37:return f.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-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\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return A1}();ue.lexer=ct;function J1(){this.yy={}}return l(J1,"Parser"),J1.prototype=ue,ue.Parser=J1,new J1}();fe.parser=fe;var fs=fe,gs=l((e,r)=>{const i=Lt,a=i(e,"r"),u=i(e,"g"),d=i(e,"b");return Vt(a,u,d,r)},"fade"),As=l(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + 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; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .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}; + p { + 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: ${gs(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + 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}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } +`,"getStyles"),bs=As,Cs={parser:fs,db:de,renderer:ps,styles:bs,init:l(e=>{e.flowchart||(e.flowchart={}),e.layout&&Ze({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ze({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),de.clear(),de.setGen("gen-2")},"init")};export{Cs as diagram}; diff --git a/pr-528/assets/chunks/framework.B8-VHxRu.js b/pr-528/assets/chunks/framework.B8-VHxRu.js new file mode 100644 index 000000000..a449e286a --- /dev/null +++ b/pr-528/assets/chunks/framework.B8-VHxRu.js @@ -0,0 +1,18 @@ +/** +* @vue/shared v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ee={},St=[],Ue=()=>{},Jo=()=>!1,nn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Bs=e=>e.startsWith("onUpdate:"),ae=Object.assign,ks=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},zo=Object.prototype.hasOwnProperty,Q=(e,t)=>zo.call(e,t),K=Array.isArray,Tt=e=>Hn(e)==="[object Map]",ai=e=>Hn(e)==="[object Set]",q=e=>typeof e=="function",ie=e=>typeof e=="string",Xe=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",fi=e=>(se(e)||q(e))&&q(e.then)&&q(e.catch),ui=Object.prototype.toString,Hn=e=>ui.call(e),Qo=e=>Hn(e).slice(8,-1),di=e=>Hn(e)==="[object Object]",Vs=e=>ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ct=js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Dn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Zo=/-(\w)/g,Ie=Dn(e=>e.replace(Zo,(t,n)=>n?n.toUpperCase():"")),el=/\B([A-Z])/g,rt=Dn(e=>e.replace(el,"-$1").toLowerCase()),$n=Dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),_n=Dn(e=>e?`on${$n(e)}`:""),nt=(e,t)=>!Object.is(e,t),wn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ws=e=>{const t=parseFloat(e);return isNaN(t)?e:t},pi=e=>{const t=ie(e)?Number(e):NaN;return isNaN(t)?e:t};let gr;const jn=()=>gr||(gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Us(e){if(K(e)){const t={};for(let n=0;n{if(n){const s=n.split(nl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ws(e){let t="";if(ie(e))t=e;else if(K(e))for(let n=0;n!!(e&&e.__v_isRef===!0),ll=e=>ie(e)?e:e==null?"":K(e)||se(e)&&(e.toString===ui||!q(e.toString))?mi(e)?ll(e.value):JSON.stringify(e,yi,2):String(e),yi=(e,t)=>mi(t)?yi(e,t.value):Tt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[es(s,i)+" =>"]=r,n),{})}:ai(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>es(n))}:Xe(t)?es(t):se(t)&&!K(t)&&!di(t)?String(t):t,es=(e,t="")=>{var n;return Xe(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let _e;class cl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_e,!t&&_e&&(this.index=(_e.scopes||(_e.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(Ut){let t=Ut;for(Ut=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Vt;){let t=Vt;for(Vt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ei(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function xi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Gs(s),fl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Es(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Si(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Si(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Xt))return;e.globalVersion=Xt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Es(e)){e.flags&=-3;return}const n=ne,s=Fe;ne=e,Fe=!0;try{Ei(e);const r=e.fn(e._value);(t.version===0||nt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ne=n,Fe=s,xi(e),e.flags&=-3}}function Gs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Gs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Fe=!0;const Ti=[];function it(){Ti.push(Fe),Fe=!1}function ot(){const e=Ti.pop();Fe=e===void 0?!0:e}function mr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ne;ne=void 0;try{t()}finally{ne=n}}}let Xt=0;class ul{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Bn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ne||!Fe||ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ne)n=this.activeLink=new ul(ne,this),ne.deps?(n.prevDep=ne.depsTail,ne.depsTail.nextDep=n,ne.depsTail=n):ne.deps=ne.depsTail=n,Ci(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ne.depsTail,n.nextDep=void 0,ne.depsTail.nextDep=n,ne.depsTail=n,ne.deps===n&&(ne.deps=s)}return n}trigger(t){this.version++,Xt++,this.notify(t)}notify(t){Ks();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qs()}}}function Ci(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ci(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const An=new WeakMap,dt=Symbol(""),xs=Symbol(""),Jt=Symbol("");function ye(e,t,n){if(Fe&&ne){let s=An.get(e);s||An.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Bn),r.map=s,r.key=n),r.track()}}function Ge(e,t,n,s,r,i){const o=An.get(e);if(!o){Xt++;return}const l=c=>{c&&c.trigger()};if(Ks(),t==="clear")o.forEach(l);else{const c=K(e),a=c&&Vs(n);if(c&&n==="length"){const f=Number(s);o.forEach((u,g)=>{(g==="length"||g===Jt||!Xe(g)&&g>=f)&&l(u)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),a&&l(o.get(Jt)),t){case"add":c?a&&l(o.get("length")):(l(o.get(dt)),Tt(e)&&l(o.get(xs)));break;case"delete":c||(l(o.get(dt)),Tt(e)&&l(o.get(xs)));break;case"set":Tt(e)&&l(o.get(dt));break}}qs()}function dl(e,t){const n=An.get(e);return n&&n.get(t)}function bt(e){const t=z(e);return t===e?t:(ye(t,"iterate",Jt),Pe(e)?t:t.map(ve))}function kn(e){return ye(e=z(e),"iterate",Jt),e}const hl={__proto__:null,[Symbol.iterator](){return ns(this,Symbol.iterator,ve)},concat(...e){return bt(this).concat(...e.map(t=>K(t)?bt(t):t))},entries(){return ns(this,"entries",e=>(e[1]=ve(e[1]),e))},every(e,t){return Ke(this,"every",e,t,void 0,arguments)},filter(e,t){return Ke(this,"filter",e,t,n=>n.map(ve),arguments)},find(e,t){return Ke(this,"find",e,t,ve,arguments)},findIndex(e,t){return Ke(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ke(this,"findLast",e,t,ve,arguments)},findLastIndex(e,t){return Ke(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ke(this,"forEach",e,t,void 0,arguments)},includes(...e){return ss(this,"includes",e)},indexOf(...e){return ss(this,"indexOf",e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return ss(this,"lastIndexOf",e)},map(e,t){return Ke(this,"map",e,t,void 0,arguments)},pop(){return jt(this,"pop")},push(...e){return jt(this,"push",e)},reduce(e,...t){return yr(this,"reduce",e,t)},reduceRight(e,...t){return yr(this,"reduceRight",e,t)},shift(){return jt(this,"shift")},some(e,t){return Ke(this,"some",e,t,void 0,arguments)},splice(...e){return jt(this,"splice",e)},toReversed(){return bt(this).toReversed()},toSorted(e){return bt(this).toSorted(e)},toSpliced(...e){return bt(this).toSpliced(...e)},unshift(...e){return jt(this,"unshift",e)},values(){return ns(this,"values",ve)}};function ns(e,t,n){const s=kn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const pl=Array.prototype;function Ke(e,t,n,s,r,i){const o=kn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==pl[t]){const u=c.apply(e,i);return l?ve(u):u}let a=n;o!==e&&(l?a=function(u,g){return n.call(this,ve(u),g,e)}:n.length>2&&(a=function(u,g){return n.call(this,u,g,e)}));const f=c.call(o,a,s);return l&&r?r(f):f}function yr(e,t,n,s){const r=kn(e);let i=n;return r!==e&&(Pe(e)?n.length>3&&(i=function(o,l,c){return n.call(this,o,l,c,e)}):i=function(o,l,c){return n.call(this,o,ve(l),c,e)}),r[t](i,...s)}function ss(e,t,n){const s=z(e);ye(s,"iterate",Jt);const r=s[t](...n);return(r===-1||r===!1)&&Js(n[0])?(n[0]=z(n[0]),s[t](...n)):r}function jt(e,t,n=[]){it(),Ks();const s=z(e)[t].apply(e,n);return qs(),ot(),s}const gl=js("__proto__,__v_isRef,__isVue"),Ai=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xe));function ml(e){Xe(e)||(e=String(e));const t=z(this);return ye(t,"has",e),t.hasOwnProperty(e)}class Ri{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Cl:Ii:i?Pi:Mi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=K(t);if(!r){let c;if(o&&(c=hl[n]))return c;if(n==="hasOwnProperty")return ml}const l=Reflect.get(t,n,fe(t)?t:s);return(Xe(n)?Ai.has(n):gl(n))||(r||ye(t,"get",n),i)?l:fe(l)?o&&Vs(n)?l:l.value:se(l)?r?Un(l):Vn(l):l}}class Oi extends Ri{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const c=yt(i);if(!Pe(s)&&!yt(s)&&(i=z(i),s=z(s)),!K(t)&&fe(i)&&!fe(s))return c?!1:(i.value=s,!0)}const o=K(t)&&Vs(n)?Number(n)e,an=e=>Reflect.getPrototypeOf(e);function wl(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=Tt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,a=r[e](...s),f=n?Ss:t?Ts:ve;return!t&&ye(i,"iterate",c?xs:dt),{next(){const{value:u,done:g}=a.next();return g?{value:u,done:g}:{value:l?[f(u[0]),f(u[1])]:f(u),done:g}},[Symbol.iterator](){return this}}}}function fn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function El(e,t){const n={get(r){const i=this.__v_raw,o=z(i),l=z(r);e||(nt(r,l)&&ye(o,"get",r),ye(o,"get",l));const{has:c}=an(o),a=t?Ss:e?Ts:ve;if(c.call(o,r))return a(i.get(r));if(c.call(o,l))return a(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&ye(z(r),"iterate",dt),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=z(i),l=z(r);return e||(nt(r,l)&&ye(o,"has",r),ye(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=z(l),a=t?Ss:e?Ts:ve;return!e&&ye(c,"iterate",dt),l.forEach((f,u)=>r.call(i,a(f),a(u),o))}};return ae(n,e?{add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear")}:{add(r){!t&&!Pe(r)&&!yt(r)&&(r=z(r));const i=z(this);return an(i).has.call(i,r)||(i.add(r),Ge(i,"add",r,r)),this},set(r,i){!t&&!Pe(i)&&!yt(i)&&(i=z(i));const o=z(this),{has:l,get:c}=an(o);let a=l.call(o,r);a||(r=z(r),a=l.call(o,r));const f=c.call(o,r);return o.set(r,i),a?nt(i,f)&&Ge(o,"set",r,i):Ge(o,"add",r,i),this},delete(r){const i=z(this),{has:o,get:l}=an(i);let c=o.call(i,r);c||(r=z(r),c=o.call(i,r)),l&&l.call(i,r);const a=i.delete(r);return c&&Ge(i,"delete",r,void 0),a},clear(){const r=z(this),i=r.size!==0,o=r.clear();return i&&Ge(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=wl(r,e,t)}),n}function Ys(e,t){const n=El(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Q(n,r)&&r in s?n:s,r,i)}const xl={get:Ys(!1,!1)},Sl={get:Ys(!1,!0)},Tl={get:Ys(!0,!1)};const Mi=new WeakMap,Pi=new WeakMap,Ii=new WeakMap,Cl=new WeakMap;function Al(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Rl(e){return e.__v_skip||!Object.isExtensible(e)?0:Al(Qo(e))}function Vn(e){return yt(e)?e:Xs(e,!1,vl,xl,Mi)}function Ol(e){return Xs(e,!1,_l,Sl,Pi)}function Un(e){return Xs(e,!0,bl,Tl,Ii)}function Xs(e,t,n,s,r){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=Rl(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ht(e){return yt(e)?ht(e.__v_raw):!!(e&&e.__v_isReactive)}function yt(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function Js(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function En(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&hi(e,"__v_skip",!0),e}const ve=e=>se(e)?Vn(e):e,Ts=e=>se(e)?Un(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function le(e){return Li(e,!1)}function zs(e){return Li(e,!0)}function Li(e,t){return fe(e)?e:new Ml(e,t)}class Ml{constructor(t,n){this.dep=new Bn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:z(t),this._value=n?t:ve(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||yt(t);t=s?t:z(t),nt(t,n)&&(this._rawValue=t,this._value=s?t:ve(t),this.dep.trigger())}}function Fi(e){return fe(e)?e.value:e}const Pl={get:(e,t,n)=>t==="__v_raw"?e:Fi(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return fe(r)&&!fe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Ni(e){return ht(e)?e:new Proxy(e,Pl)}class Il{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Bn,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Ll(e){return new Il(e)}class Fl{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return dl(z(this._object),this._key)}}class Nl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Hl(e,t,n){return fe(e)?e:q(e)?new Nl(e):se(e)&&arguments.length>1?Dl(e,t,n):le(e)}function Dl(e,t,n){const s=e[t];return fe(s)?s:new Fl(e,t,n)}class $l{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Bn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Xt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ne!==this)return wi(this,!0),!0}get value(){const t=this.dep.track();return Si(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function jl(e,t,n=!1){let s,r;return q(e)?s=e:(s=e.get,r=e.set),new $l(s,r,n)}const un={},Rn=new WeakMap;let ut;function Bl(e,t=!1,n=ut){if(n){let s=Rn.get(n);s||Rn.set(n,s=[]),s.push(e)}}function kl(e,t,n=ee){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,a=m=>r?m:Pe(m)||r===!1||r===0?Ye(m,1):Ye(m);let f,u,g,y,w=!1,b=!1;if(fe(e)?(u=()=>e.value,w=Pe(e)):ht(e)?(u=()=>a(e),w=!0):K(e)?(b=!0,w=e.some(m=>ht(m)||Pe(m)),u=()=>e.map(m=>{if(fe(m))return m.value;if(ht(m))return a(m);if(q(m))return c?c(m,2):m()})):q(e)?t?u=c?()=>c(e,2):e:u=()=>{if(g){it();try{g()}finally{ot()}}const m=ut;ut=f;try{return c?c(e,3,[y]):e(y)}finally{ut=m}}:u=Ue,t&&r){const m=u,E=r===!0?1/0:r;u=()=>Ye(m(),E)}const U=vi(),F=()=>{f.stop(),U&&ks(U.effects,f)};if(i&&t){const m=t;t=(...E)=>{m(...E),F()}}let $=b?new Array(e.length).fill(un):un;const p=m=>{if(!(!(f.flags&1)||!f.dirty&&!m))if(t){const E=f.run();if(r||w||(b?E.some((O,H)=>nt(O,$[H])):nt(E,$))){g&&g();const O=ut;ut=f;try{const H=[E,$===un?void 0:b&&$[0]===un?[]:$,y];c?c(t,3,H):t(...H),$=E}finally{ut=O}}}else f.run()};return l&&l(p),f=new bi(u),f.scheduler=o?()=>o(p,!1):p,y=m=>Bl(m,!1,f),g=f.onStop=()=>{const m=Rn.get(f);if(m){if(c)c(m,4);else for(const E of m)E();Rn.delete(f)}},t?s?p(!0):$=f.run():o?o(p.bind(null,!0),!0):f.run(),F.pause=f.pause.bind(f),F.resume=f.resume.bind(f),F.stop=F,F}function Ye(e,t=1/0,n){if(t<=0||!se(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,fe(e))Ye(e.value,t,n);else if(K(e))for(let s=0;s{Ye(s,t,n)});else if(di(e)){for(const s in e)Ye(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ye(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function sn(e,t,n,s){try{return s?e(...s):e()}catch(r){Nt(r,t,n)}}function He(e,t,n,s){if(q(e)){const r=sn(e,t,n,s);return r&&fi(r)&&r.catch(i=>{Nt(i,t,n)}),r}if(K(e)){const r=[];for(let i=0;i>>1,r=we[s],i=zt(r);i=zt(n)?we.push(e):we.splice(Ul(t),0,e),e.flags|=1,Di()}}function Di(){On||(On=Hi.then($i))}function Cs(e){K(e)?At.push(...e):Ze&&e.id===-1?Ze.splice(wt+1,0,e):e.flags&1||(At.push(e),e.flags|=1),Di()}function vr(e,t,n=Be+1){for(;nzt(n)-zt(s));if(At.length=0,Ze){Ze.push(...t);return}for(Ze=t,wt=0;wte.id==null?e.flags&2?-1:1/0:e.id;function $i(e){try{for(Be=0;Be{s._d&&Lr(-1);const i=Pn(t);let o;try{o=e(...r)}finally{Pn(i),s._d&&Lr(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Pf(e,t){if(he===null)return e;const n=Jn(he),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Wt=e=>e&&(e.disabled||e.disabled===""),Kl=e=>e&&(e.defer||e.defer===""),br=e=>typeof SVGElement<"u"&&e instanceof SVGElement,_r=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,As=(e,t)=>{const n=e&&e.to;return ie(n)?t?t(n):null:n},ql={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,a){const{mc:f,pc:u,pbc:g,o:{insert:y,querySelector:w,createText:b,createComment:U}}=a,F=Wt(t.props);let{shapeFlag:$,children:p,dynamicChildren:m}=t;if(e==null){const E=t.el=b(""),O=t.anchor=b("");y(E,n,s),y(O,n,s);const H=(C,_)=>{$&16&&(r&&r.isCE&&(r.ce._teleportTarget=C),f(p,C,_,r,i,o,l,c))},D=()=>{const C=t.target=As(t.props,w),_=Vi(C,t,b,y);C&&(o!=="svg"&&br(C)?o="svg":o!=="mathml"&&_r(C)&&(o="mathml"),F||(H(C,_),xn(t,!1)))};F&&(H(n,O),xn(t,!0)),Kl(t.props)?xe(D,i):D()}else{t.el=e.el,t.targetStart=e.targetStart;const E=t.anchor=e.anchor,O=t.target=e.target,H=t.targetAnchor=e.targetAnchor,D=Wt(e.props),C=D?n:O,_=D?E:H;if(o==="svg"||br(O)?o="svg":(o==="mathml"||_r(O))&&(o="mathml"),m?(g(e.dynamicChildren,m,C,r,i,o,l),sr(e,t,!0)):c||u(e,t,C,_,r,i,o,l,!1),F)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):dn(t,n,E,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const I=t.target=As(t.props,w);I&&dn(t,I,null,a,0)}else D&&dn(t,O,H,a,1);xn(t,F)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:a,targetAnchor:f,target:u,props:g}=e;if(u&&(r(a),r(f)),i&&r(c),o&16){const y=i||!Wt(g);for(let w=0;w{e.isMounted=!0}),Xi(()=>{e.isUnmounting=!0}),e}const Oe=[Function,Array],Ui={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Oe,onEnter:Oe,onAfterEnter:Oe,onEnterCancelled:Oe,onBeforeLeave:Oe,onLeave:Oe,onAfterLeave:Oe,onLeaveCancelled:Oe,onBeforeAppear:Oe,onAppear:Oe,onAfterAppear:Oe,onAppearCancelled:Oe},Wi=e=>{const t=e.subTree;return t.component?Wi(t.component):t},Xl={name:"BaseTransition",props:Ui,setup(e,{slots:t}){const n=Xn(),s=Yl();return()=>{const r=t.default&&Gi(t.default(),!0);if(!r||!r.length)return;const i=Ki(r),o=z(e),{mode:l}=o;if(s.isLeaving)return rs(i);const c=wr(i);if(!c)return rs(i);let a=Rs(c,o,s,n,g=>a=g);c.type!==ue&&Qt(c,a);const f=n.subTree,u=f&&wr(f);if(u&&u.type!==ue&&!Ve(c,u)&&Wi(n).type!==ue){const g=Rs(u,o,s,n);if(Qt(u,g),l==="out-in"&&c.type!==ue)return s.isLeaving=!0,g.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete g.afterLeave},rs(i);l==="in-out"&&c.type!==ue&&(g.delayLeave=(y,w,b)=>{const U=qi(s,u);U[String(u.key)]=u,y[et]=()=>{w(),y[et]=void 0,delete a.delayedLeave},a.delayedLeave=b})}return i}}};function Ki(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ue){t=n;break}}return t}const Jl=Xl;function qi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Rs(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:f,onEnterCancelled:u,onBeforeLeave:g,onLeave:y,onAfterLeave:w,onLeaveCancelled:b,onBeforeAppear:U,onAppear:F,onAfterAppear:$,onAppearCancelled:p}=t,m=String(e.key),E=qi(n,e),O=(C,_)=>{C&&He(C,s,9,_)},H=(C,_)=>{const I=_[1];O(C,_),K(C)?C.every(x=>x.length<=1)&&I():C.length<=1&&I()},D={mode:o,persisted:l,beforeEnter(C){let _=c;if(!n.isMounted)if(i)_=U||c;else return;C[et]&&C[et](!0);const I=E[m];I&&Ve(e,I)&&I.el[et]&&I.el[et](),O(_,[C])},enter(C){let _=a,I=f,x=u;if(!n.isMounted)if(i)_=F||a,I=$||f,x=p||u;else return;let B=!1;const J=C[hn]=re=>{B||(B=!0,re?O(x,[C]):O(I,[C]),D.delayedLeave&&D.delayedLeave(),C[hn]=void 0)};_?H(_,[C,J]):J()},leave(C,_){const I=String(e.key);if(C[hn]&&C[hn](!0),n.isUnmounting)return _();O(g,[C]);let x=!1;const B=C[et]=J=>{x||(x=!0,_(),J?O(b,[C]):O(w,[C]),C[et]=void 0,E[I]===e&&delete E[I])};E[I]=e,y?H(y,[C,B]):B()},clone(C){const _=Rs(C,t,n,s,r);return r&&r(_),_}};return D}function rs(e){if(rn(e))return e=st(e),e.children=null,e}function wr(e){if(!rn(e))return ki(e.type)&&e.children?Ki(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&q(n.default))return n.default()}}function Qt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Qt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iIn(w,t&&(K(t)?t[b]:t),n,s,r));return}if(pt(s)&&!r)return;const i=s.shapeFlag&4?Jn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,a=t&&t.r,f=l.refs===ee?l.refs={}:l.refs,u=l.setupState,g=z(u),y=u===ee?()=>!1:w=>Q(g,w);if(a!=null&&a!==c&&(ie(a)?(f[a]=null,y(a)&&(u[a]=null)):fe(a)&&(a.value=null)),q(c))sn(c,l,12,[o,f]);else{const w=ie(c),b=fe(c);if(w||b){const U=()=>{if(e.f){const F=w?y(c)?u[c]:f[c]:c.value;r?K(F)&&ks(F,i):K(F)?F.includes(i)||F.push(i):w?(f[c]=[i],y(c)&&(u[c]=f[c])):(c.value=[i],e.k&&(f[e.k]=c.value))}else w?(f[c]=o,y(c)&&(u[c]=o)):b&&(c.value=o,e.k&&(f[e.k]=o))};o?(U.id=-1,xe(U,n)):U()}}}let Er=!1;const _t=()=>{Er||(console.error("Hydration completed but contains mismatches."),Er=!0)},zl=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Ql=e=>e.namespaceURI.includes("MathML"),pn=e=>{if(e.nodeType===1){if(zl(e))return"svg";if(Ql(e))return"mathml"}},xt=e=>e.nodeType===8;function Zl(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:a}}=e,f=(p,m)=>{if(!m.hasChildNodes()){n(null,p,m),Mn(),m._vnode=p;return}u(m.firstChild,p,null,null,null),Mn(),m._vnode=p},u=(p,m,E,O,H,D=!1)=>{D=D||!!m.dynamicChildren;const C=xt(p)&&p.data==="[",_=()=>b(p,m,E,O,H,C),{type:I,ref:x,shapeFlag:B,patchFlag:J}=m;let re=p.nodeType;m.el=p,J===-2&&(D=!1,m.dynamicChildren=null);let j=null;switch(I){case gt:re!==3?m.children===""?(c(m.el=r(""),o(p),p),j=p):j=_():(p.data!==m.children&&(_t(),p.data=m.children),j=i(p));break;case ue:$(p)?(j=i(p),F(m.el=p.content.firstChild,p,E)):re!==8||C?j=_():j=i(p);break;case qt:if(C&&(p=i(p),re=p.nodeType),re===1||re===3){j=p;const Y=!m.children.length;for(let V=0;V{D=D||!!m.dynamicChildren;const{type:C,props:_,patchFlag:I,shapeFlag:x,dirs:B,transition:J}=m,re=C==="input"||C==="option";if(re||I!==-1){B&&ke(m,null,E,"created");let j=!1;if($(p)){j=ho(null,J)&&E&&E.vnode.props&&E.vnode.props.appear;const V=p.content.firstChild;j&&J.beforeEnter(V),F(V,p,E),m.el=p=V}if(x&16&&!(_&&(_.innerHTML||_.textContent))){let V=y(p.firstChild,m,p,E,O,H,D);for(;V;){gn(p,1)||_t();const pe=V;V=V.nextSibling,l(pe)}}else if(x&8){let V=m.children;V[0]===` +`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(V=V.slice(1)),p.textContent!==V&&(gn(p,0)||_t(),p.textContent=m.children)}if(_){if(re||!D||I&48){const V=p.tagName.includes("-");for(const pe in _)(re&&(pe.endsWith("value")||pe==="indeterminate")||nn(pe)&&!Ct(pe)||pe[0]==="."||V)&&s(p,pe,null,_[pe],void 0,E)}else if(_.onClick)s(p,"onClick",null,_.onClick,void 0,E);else if(I&4&&ht(_.style))for(const V in _.style)_.style[V]}let Y;(Y=_&&_.onVnodeBeforeMount)&&Me(Y,E,m),B&&ke(m,null,E,"beforeMount"),((Y=_&&_.onVnodeMounted)||B||j)&&bo(()=>{Y&&Me(Y,E,m),j&&J.enter(p),B&&ke(m,null,E,"mounted")},O)}return p.nextSibling},y=(p,m,E,O,H,D,C)=>{C=C||!!m.dynamicChildren;const _=m.children,I=_.length;for(let x=0;x{const{slotScopeIds:C}=m;C&&(H=H?H.concat(C):C);const _=o(p),I=y(i(p),m,_,E,O,H,D);return I&&xt(I)&&I.data==="]"?i(m.anchor=I):(_t(),c(m.anchor=a("]"),_,I),I)},b=(p,m,E,O,H,D)=>{if(gn(p.parentElement,1)||_t(),m.el=null,D){const I=U(p);for(;;){const x=i(p);if(x&&x!==I)l(x);else break}}const C=i(p),_=o(p);return l(p),n(null,m,_,C,E,O,pn(_),H),C},U=(p,m="[",E="]")=>{let O=0;for(;p;)if(p=i(p),p&&xt(p)&&(p.data===m&&O++,p.data===E)){if(O===0)return i(p);O--}return p},F=(p,m,E)=>{const O=m.parentNode;O&&O.replaceChild(p,m);let H=E;for(;H;)H.vnode.el===m&&(H.vnode.el=H.subTree.el=p),H=H.parent},$=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[f,u]}const xr="data-allow-mismatch",ec={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function gn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(xr);)e=e.parentElement;const n=e&&e.getAttribute(xr);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:n.split(",").includes(ec[t])}}jn().requestIdleCallback;jn().cancelIdleCallback;function tc(e,t){if(xt(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(xt(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const pt=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Lf(e){q(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let a=null,f,u=0;const g=()=>(u++,a=null,y()),y=()=>{let w;return a||(w=a=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),c)return new Promise((U,F)=>{c(b,()=>U(g()),()=>F(b),u+1)});throw b}).then(b=>w!==a&&a?a:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),f=b,b)))};return Zs({name:"AsyncComponentWrapper",__asyncLoader:y,__asyncHydrate(w,b,U){const F=i?()=>{const $=i(U,p=>tc(w,p));$&&(b.bum||(b.bum=[])).push($)}:U;f?F():y().then(()=>!b.isUnmounted&&F())},get __asyncResolved(){return f},setup(){const w=de;if(er(w),f)return()=>is(f,w);const b=p=>{a=null,Nt(p,w,13,!s)};if(l&&w.suspense||Lt)return y().then(p=>()=>is(p,w)).catch(p=>(b(p),()=>s?ce(s,{error:p}):null));const U=le(!1),F=le(),$=le(!!r);return r&&setTimeout(()=>{$.value=!1},r),o!=null&&setTimeout(()=>{if(!U.value&&!F.value){const p=new Error(`Async component timed out after ${o}ms.`);b(p),F.value=p}},o),y().then(()=>{U.value=!0,w.parent&&rn(w.parent.vnode)&&w.parent.update()}).catch(p=>{b(p),F.value=p}),()=>{if(U.value&&f)return is(f,w);if(F.value&&s)return ce(s,{error:F.value});if(n&&!$.value)return ce(n)}}})}function is(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=ce(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const rn=e=>e.type.__isKeepAlive;function nc(e,t){Yi(e,"a",t)}function sc(e,t){Yi(e,"da",t)}function Yi(e,t,n=de){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Kn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)rn(r.parent.vnode)&&rc(s,t,n,r),r=r.parent}}function rc(e,t,n,s){const r=Kn(t,e,s,!0);qn(()=>{ks(s[t],r)},n)}function Kn(e,t,n=de,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{it();const l=on(n),c=He(t,n,e,o);return l(),ot(),c});return s?r.unshift(i):r.push(i),i}}const Je=e=>(t,n=de)=>{(!Lt||e==="sp")&&Kn(e,(...s)=>t(...s),n)},ic=Je("bm"),Ht=Je("m"),oc=Je("bu"),lc=Je("u"),Xi=Je("bum"),qn=Je("um"),cc=Je("sp"),ac=Je("rtg"),fc=Je("rtc");function uc(e,t=de){Kn("ec",e,t)}const Ji="components";function Ff(e,t){return Qi(Ji,e,!0,t)||e}const zi=Symbol.for("v-ndc");function Nf(e){return ie(e)?Qi(Ji,e,!1)||e:e||zi}function Qi(e,t,n=!0,s=!1){const r=he||de;if(r){const i=r.type;{const l=ta(i,!1);if(l&&(l===t||l===Ie(t)||l===$n(Ie(t))))return i}const o=Sr(r[e]||i[e],t)||Sr(r.appContext[e],t);return!o&&s?i:o}}function Sr(e,t){return e&&(e[t]||e[Ie(t)]||e[$n(Ie(t))])}function Hf(e,t,n,s){let r;const i=n,o=K(e);if(o||ie(e)){const l=o&&ht(e);let c=!1;l&&(c=!Pe(e),e=kn(e)),r=new Array(e.length);for(let a=0,f=e.length;at(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;cIt(t)?!(t.type===ue||t.type===Ee&&!Zi(t.children)):!0)?e:null}function $f(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:_n(s)]=e[s];return n}const Os=e=>e?To(e)?Jn(e):Os(e.parent):null,Kt=ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Os(e.parent),$root:e=>Os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>tr(e),$forceUpdate:e=>e.f||(e.f=()=>{Qs(e.update)}),$nextTick:e=>e.n||(e.n=Wn.bind(e.proxy)),$watch:e=>Lc.bind(e)}),os=(e,t)=>e!==ee&&!e.__isScriptSetup&&Q(e,t),dc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let a;if(t[0]!=="$"){const y=o[t];if(y!==void 0)switch(y){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(os(s,t))return o[t]=1,s[t];if(r!==ee&&Q(r,t))return o[t]=2,r[t];if((a=e.propsOptions[0])&&Q(a,t))return o[t]=3,i[t];if(n!==ee&&Q(n,t))return o[t]=4,n[t];Ms&&(o[t]=0)}}const f=Kt[t];let u,g;if(f)return t==="$attrs"&&ye(e.attrs,"get",""),f(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ee&&Q(n,t))return o[t]=4,n[t];if(g=c.config.globalProperties,Q(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return os(r,t)?(r[t]=n,!0):s!==ee&&Q(s,t)?(s[t]=n,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==ee&&Q(e,o)||os(t,o)||(l=i[0])&&Q(l,o)||Q(s,o)||Q(Kt,o)||Q(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function jf(){return hc().slots}function hc(){const e=Xn();return e.setupContext||(e.setupContext=Ao(e))}function Tr(e){return K(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ms=!0;function pc(e){const t=tr(e),n=e.proxy,s=e.ctx;Ms=!1,t.beforeCreate&&Cr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:a,created:f,beforeMount:u,mounted:g,beforeUpdate:y,updated:w,activated:b,deactivated:U,beforeDestroy:F,beforeUnmount:$,destroyed:p,unmounted:m,render:E,renderTracked:O,renderTriggered:H,errorCaptured:D,serverPrefetch:C,expose:_,inheritAttrs:I,components:x,directives:B,filters:J}=t;if(a&&gc(a,s,null),o)for(const Y in o){const V=o[Y];q(V)&&(s[Y]=V.bind(n))}if(r){const Y=r.call(n,n);se(Y)&&(e.data=Vn(Y))}if(Ms=!0,i)for(const Y in i){const V=i[Y],pe=q(V)?V.bind(n,n):q(V.get)?V.get.bind(n,n):Ue,ln=!q(V)&&q(V.set)?V.set.bind(n):Ue,lt=oe({get:pe,set:ln});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>lt.value,set:$e=>lt.value=$e})}if(l)for(const Y in l)eo(l[Y],s,n,Y);if(c){const Y=q(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(V=>{wc(V,Y[V])})}f&&Cr(f,e,"c");function j(Y,V){K(V)?V.forEach(pe=>Y(pe.bind(n))):V&&Y(V.bind(n))}if(j(ic,u),j(Ht,g),j(oc,y),j(lc,w),j(nc,b),j(sc,U),j(uc,D),j(fc,O),j(ac,H),j(Xi,$),j(qn,m),j(cc,C),K(_))if(_.length){const Y=e.exposed||(e.exposed={});_.forEach(V=>{Object.defineProperty(Y,V,{get:()=>n[V],set:pe=>n[V]=pe})})}else e.exposed||(e.exposed={});E&&e.render===Ue&&(e.render=E),I!=null&&(e.inheritAttrs=I),x&&(e.components=x),B&&(e.directives=B),C&&er(e)}function gc(e,t,n=Ue){K(e)&&(e=Ps(e));for(const s in e){const r=e[s];let i;se(r)?"default"in r?i=Ot(r.from||s,r.default,!0):i=Ot(r.from||s):i=Ot(r),fe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Cr(e,t,n){He(K(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function eo(e,t,n,s){let r=s.includes(".")?go(n,s):()=>n[s];if(ie(e)){const i=t[e];q(i)&&Ne(r,i)}else if(q(e))Ne(r,e.bind(n));else if(se(e))if(K(e))e.forEach(i=>eo(i,t,n,s));else{const i=q(e.handler)?e.handler.bind(n):t[e.handler];q(i)&&Ne(r,i,e)}}function tr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>Ln(c,a,o,!0)),Ln(c,t,o)),se(t)&&i.set(t,c),c}function Ln(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Ln(e,i,n,!0),r&&r.forEach(o=>Ln(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=mc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const mc={data:Ar,props:Rr,emits:Rr,methods:kt,computed:kt,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,beforeUnmount:be,destroyed:be,unmounted:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:kt,directives:kt,watch:vc,provide:Ar,inject:yc};function Ar(e,t){return t?e?function(){return ae(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function yc(e,t){return kt(Ps(e),Ps(t))}function Ps(e){if(K(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}const no={},so=()=>Object.create(no),ro=e=>Object.getPrototypeOf(e)===no;function Ec(e,t,n,s=!1){const r={},i=so();e.propsDefaults=Object.create(null),io(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Ol(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function xc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=z(r),[c]=e.propsOptions;let a=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let u=0;u{c=!0;const[g,y]=oo(u,t,!0);ae(o,g),y&&l.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return se(e)&&s.set(e,St),St;if(K(i))for(let f=0;fe[0]==="_"||e==="$stable",nr=e=>K(e)?e.map(Re):[Re(e)],Tc=(e,t,n)=>{if(t._n)return t;const s=Wl((...r)=>nr(t(...r)),n);return s._c=!1,s},co=(e,t,n)=>{const s=e._ctx;for(const r in e){if(lo(r))continue;const i=e[r];if(q(i))t[r]=Tc(r,i,s);else if(i!=null){const o=nr(i);t[r]=()=>o}}},ao=(e,t)=>{const n=nr(t);e.slots.default=()=>n},fo=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},Cc=(e,t,n)=>{const s=e.slots=so();if(e.vnode.shapeFlag&32){const r=t._;r?(fo(s,t,n),n&&hi(s,"_",r,!0)):co(t,s)}else t&&ao(e,t)},Ac=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ee;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:fo(r,t,n):(i=!t.$stable,co(t,r)),o=t}else t&&(ao(e,t),o={default:1});if(i)for(const l in r)!lo(l)&&o[l]==null&&delete r[l]},xe=bo;function Rc(e){return uo(e)}function Oc(e){return uo(e,Zl)}function uo(e,t){const n=jn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:a,setElementText:f,parentNode:u,nextSibling:g,setScopeId:y=Ue,insertStaticContent:w}=e,b=(d,h,v,A=null,S=null,T=null,L=void 0,P=null,M=!!h.dynamicChildren)=>{if(d===h)return;d&&!Ve(d,h)&&(A=cn(d),$e(d,S,T,!0),d=null),h.patchFlag===-2&&(M=!1,h.dynamicChildren=null);const{type:R,ref:W,shapeFlag:N}=h;switch(R){case gt:U(d,h,v,A);break;case ue:F(d,h,v,A);break;case qt:d==null&&$(h,v,A,L);break;case Ee:x(d,h,v,A,S,T,L,P,M);break;default:N&1?E(d,h,v,A,S,T,L,P,M):N&6?B(d,h,v,A,S,T,L,P,M):(N&64||N&128)&&R.process(d,h,v,A,S,T,L,P,M,vt)}W!=null&&S&&In(W,d&&d.ref,T,h||d,!h)},U=(d,h,v,A)=>{if(d==null)s(h.el=l(h.children),v,A);else{const S=h.el=d.el;h.children!==d.children&&a(S,h.children)}},F=(d,h,v,A)=>{d==null?s(h.el=c(h.children||""),v,A):h.el=d.el},$=(d,h,v,A)=>{[d.el,d.anchor]=w(d.children,h,v,A,d.el,d.anchor)},p=({el:d,anchor:h},v,A)=>{let S;for(;d&&d!==h;)S=g(d),s(d,v,A),d=S;s(h,v,A)},m=({el:d,anchor:h})=>{let v;for(;d&&d!==h;)v=g(d),r(d),d=v;r(h)},E=(d,h,v,A,S,T,L,P,M)=>{h.type==="svg"?L="svg":h.type==="math"&&(L="mathml"),d==null?O(h,v,A,S,T,L,P,M):C(d,h,S,T,L,P,M)},O=(d,h,v,A,S,T,L,P)=>{let M,R;const{props:W,shapeFlag:N,transition:k,dirs:G}=d;if(M=d.el=o(d.type,T,W&&W.is,W),N&8?f(M,d.children):N&16&&D(d.children,M,null,A,S,ls(d,T),L,P),G&&ke(d,null,A,"created"),H(M,d,d.scopeId,L,A),W){for(const te in W)te!=="value"&&!Ct(te)&&i(M,te,null,W[te],T,A);"value"in W&&i(M,"value",null,W.value,T),(R=W.onVnodeBeforeMount)&&Me(R,A,d)}G&&ke(d,null,A,"beforeMount");const X=ho(S,k);X&&k.beforeEnter(M),s(M,h,v),((R=W&&W.onVnodeMounted)||X||G)&&xe(()=>{R&&Me(R,A,d),X&&k.enter(M),G&&ke(d,null,A,"mounted")},S)},H=(d,h,v,A,S)=>{if(v&&y(d,v),A)for(let T=0;T{for(let R=M;R{const P=h.el=d.el;let{patchFlag:M,dynamicChildren:R,dirs:W}=h;M|=d.patchFlag&16;const N=d.props||ee,k=h.props||ee;let G;if(v&&ct(v,!1),(G=k.onVnodeBeforeUpdate)&&Me(G,v,h,d),W&&ke(h,d,v,"beforeUpdate"),v&&ct(v,!0),(N.innerHTML&&k.innerHTML==null||N.textContent&&k.textContent==null)&&f(P,""),R?_(d.dynamicChildren,R,P,v,A,ls(h,S),T):L||V(d,h,P,null,v,A,ls(h,S),T,!1),M>0){if(M&16)I(P,N,k,v,S);else if(M&2&&N.class!==k.class&&i(P,"class",null,k.class,S),M&4&&i(P,"style",N.style,k.style,S),M&8){const X=h.dynamicProps;for(let te=0;te{G&&Me(G,v,h,d),W&&ke(h,d,v,"updated")},A)},_=(d,h,v,A,S,T,L)=>{for(let P=0;P{if(h!==v){if(h!==ee)for(const T in h)!Ct(T)&&!(T in v)&&i(d,T,h[T],null,S,A);for(const T in v){if(Ct(T))continue;const L=v[T],P=h[T];L!==P&&T!=="value"&&i(d,T,P,L,S,A)}"value"in v&&i(d,"value",h.value,v.value,S)}},x=(d,h,v,A,S,T,L,P,M)=>{const R=h.el=d?d.el:l(""),W=h.anchor=d?d.anchor:l("");let{patchFlag:N,dynamicChildren:k,slotScopeIds:G}=h;G&&(P=P?P.concat(G):G),d==null?(s(R,v,A),s(W,v,A),D(h.children||[],v,W,S,T,L,P,M)):N>0&&N&64&&k&&d.dynamicChildren?(_(d.dynamicChildren,k,v,S,T,L,P),(h.key!=null||S&&h===S.subTree)&&sr(d,h,!0)):V(d,h,v,W,S,T,L,P,M)},B=(d,h,v,A,S,T,L,P,M)=>{h.slotScopeIds=P,d==null?h.shapeFlag&512?S.ctx.activate(h,v,A,L,M):J(h,v,A,S,T,L,M):re(d,h,M)},J=(d,h,v,A,S,T,L)=>{const P=d.component=zc(d,A,S);if(rn(d)&&(P.ctx.renderer=vt),Qc(P,!1,L),P.asyncDep){if(S&&S.registerDep(P,j,L),!d.el){const M=P.subTree=ce(ue);F(null,M,h,v)}}else j(P,d,h,v,S,T,L)},re=(d,h,v)=>{const A=h.component=d.component;if(jc(d,h,v))if(A.asyncDep&&!A.asyncResolved){Y(A,h,v);return}else A.next=h,A.update();else h.el=d.el,A.vnode=h},j=(d,h,v,A,S,T,L)=>{const P=()=>{if(d.isMounted){let{next:N,bu:k,u:G,parent:X,vnode:te}=d;{const Ce=po(d);if(Ce){N&&(N.el=te.el,Y(d,N,L)),Ce.asyncDep.then(()=>{d.isUnmounted||P()});return}}let Z=N,Te;ct(d,!1),N?(N.el=te.el,Y(d,N,L)):N=te,k&&wn(k),(Te=N.props&&N.props.onVnodeBeforeUpdate)&&Me(Te,X,N,te),ct(d,!0);const ge=cs(d),Le=d.subTree;d.subTree=ge,b(Le,ge,u(Le.el),cn(Le),d,S,T),N.el=ge.el,Z===null&&ir(d,ge.el),G&&xe(G,S),(Te=N.props&&N.props.onVnodeUpdated)&&xe(()=>Me(Te,X,N,te),S)}else{let N;const{el:k,props:G}=h,{bm:X,m:te,parent:Z,root:Te,type:ge}=d,Le=pt(h);if(ct(d,!1),X&&wn(X),!Le&&(N=G&&G.onVnodeBeforeMount)&&Me(N,Z,h),ct(d,!0),k&&Zn){const Ce=()=>{d.subTree=cs(d),Zn(k,d.subTree,d,S,null)};Le&&ge.__asyncHydrate?ge.__asyncHydrate(k,d,Ce):Ce()}else{Te.ce&&Te.ce._injectChildStyle(ge);const Ce=d.subTree=cs(d);b(null,Ce,v,A,d,S,T),h.el=Ce.el}if(te&&xe(te,S),!Le&&(N=G&&G.onVnodeMounted)){const Ce=h;xe(()=>Me(N,Z,Ce),S)}(h.shapeFlag&256||Z&&pt(Z.vnode)&&Z.vnode.shapeFlag&256)&&d.a&&xe(d.a,S),d.isMounted=!0,h=v=A=null}};d.scope.on();const M=d.effect=new bi(P);d.scope.off();const R=d.update=M.run.bind(M),W=d.job=M.runIfDirty.bind(M);W.i=d,W.id=d.uid,M.scheduler=()=>Qs(W),ct(d,!0),R()},Y=(d,h,v)=>{h.component=d;const A=d.vnode.props;d.vnode=h,d.next=null,xc(d,h.props,A,v),Ac(d,h.children,v),it(),vr(d),ot()},V=(d,h,v,A,S,T,L,P,M=!1)=>{const R=d&&d.children,W=d?d.shapeFlag:0,N=h.children,{patchFlag:k,shapeFlag:G}=h;if(k>0){if(k&128){ln(R,N,v,A,S,T,L,P,M);return}else if(k&256){pe(R,N,v,A,S,T,L,P,M);return}}G&8?(W&16&&Dt(R,S,T),N!==R&&f(v,N)):W&16?G&16?ln(R,N,v,A,S,T,L,P,M):Dt(R,S,T,!0):(W&8&&f(v,""),G&16&&D(N,v,A,S,T,L,P,M))},pe=(d,h,v,A,S,T,L,P,M)=>{d=d||St,h=h||St;const R=d.length,W=h.length,N=Math.min(R,W);let k;for(k=0;kW?Dt(d,S,T,!0,!1,N):D(h,v,A,S,T,L,P,M,N)},ln=(d,h,v,A,S,T,L,P,M)=>{let R=0;const W=h.length;let N=d.length-1,k=W-1;for(;R<=N&&R<=k;){const G=d[R],X=h[R]=M?tt(h[R]):Re(h[R]);if(Ve(G,X))b(G,X,v,null,S,T,L,P,M);else break;R++}for(;R<=N&&R<=k;){const G=d[N],X=h[k]=M?tt(h[k]):Re(h[k]);if(Ve(G,X))b(G,X,v,null,S,T,L,P,M);else break;N--,k--}if(R>N){if(R<=k){const G=k+1,X=Gk)for(;R<=N;)$e(d[R],S,T,!0),R++;else{const G=R,X=R,te=new Map;for(R=X;R<=k;R++){const Ae=h[R]=M?tt(h[R]):Re(h[R]);Ae.key!=null&&te.set(Ae.key,R)}let Z,Te=0;const ge=k-X+1;let Le=!1,Ce=0;const $t=new Array(ge);for(R=0;R=ge){$e(Ae,S,T,!0);continue}let je;if(Ae.key!=null)je=te.get(Ae.key);else for(Z=X;Z<=k;Z++)if($t[Z-X]===0&&Ve(Ae,h[Z])){je=Z;break}je===void 0?$e(Ae,S,T,!0):($t[je-X]=R+1,je>=Ce?Ce=je:Le=!0,b(Ae,h[je],v,null,S,T,L,P,M),Te++)}const hr=Le?Mc($t):St;for(Z=hr.length-1,R=ge-1;R>=0;R--){const Ae=X+R,je=h[Ae],pr=Ae+1{const{el:T,type:L,transition:P,children:M,shapeFlag:R}=d;if(R&6){lt(d.component.subTree,h,v,A);return}if(R&128){d.suspense.move(h,v,A);return}if(R&64){L.move(d,h,v,vt);return}if(L===Ee){s(T,h,v);for(let N=0;NP.enter(T),S);else{const{leave:N,delayLeave:k,afterLeave:G}=P,X=()=>s(T,h,v),te=()=>{N(T,()=>{X(),G&&G()})};k?k(T,X,te):te()}else s(T,h,v)},$e=(d,h,v,A=!1,S=!1)=>{const{type:T,props:L,ref:P,children:M,dynamicChildren:R,shapeFlag:W,patchFlag:N,dirs:k,cacheIndex:G}=d;if(N===-2&&(S=!1),P!=null&&In(P,null,v,d,!0),G!=null&&(h.renderCache[G]=void 0),W&256){h.ctx.deactivate(d);return}const X=W&1&&k,te=!pt(d);let Z;if(te&&(Z=L&&L.onVnodeBeforeUnmount)&&Me(Z,h,d),W&6)Xo(d.component,v,A);else{if(W&128){d.suspense.unmount(v,A);return}X&&ke(d,null,h,"beforeUnmount"),W&64?d.type.remove(d,h,v,vt,A):R&&!R.hasOnce&&(T!==Ee||N>0&&N&64)?Dt(R,h,v,!1,!0):(T===Ee&&N&384||!S&&W&16)&&Dt(M,h,v),A&&ur(d)}(te&&(Z=L&&L.onVnodeUnmounted)||X)&&xe(()=>{Z&&Me(Z,h,d),X&&ke(d,null,h,"unmounted")},v)},ur=d=>{const{type:h,el:v,anchor:A,transition:S}=d;if(h===Ee){Yo(v,A);return}if(h===qt){m(d);return}const T=()=>{r(v),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(d.shapeFlag&1&&S&&!S.persisted){const{leave:L,delayLeave:P}=S,M=()=>L(v,T);P?P(d.el,T,M):M()}else T()},Yo=(d,h)=>{let v;for(;d!==h;)v=g(d),r(d),d=v;r(h)},Xo=(d,h,v)=>{const{bum:A,scope:S,job:T,subTree:L,um:P,m:M,a:R}=d;Mr(M),Mr(R),A&&wn(A),S.stop(),T&&(T.flags|=8,$e(L,d,h,v)),P&&xe(P,h),xe(()=>{d.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Dt=(d,h,v,A=!1,S=!1,T=0)=>{for(let L=T;L{if(d.shapeFlag&6)return cn(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),v=h&&h[Bi];return v?g(v):h};let zn=!1;const dr=(d,h,v)=>{d==null?h._vnode&&$e(h._vnode,null,null,!0):b(h._vnode||null,d,h,null,null,null,v),h._vnode=d,zn||(zn=!0,vr(),Mn(),zn=!1)},vt={p:b,um:$e,m:lt,r:ur,mt:J,mc:D,pc:V,pbc:_,n:cn,o:e};let Qn,Zn;return t&&([Qn,Zn]=t(vt)),{render:dr,hydrate:Qn,createApp:_c(dr,Qn)}}function ls({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ho(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sr(e,t,n=!1){const s=e.children,r=t.children;if(K(s)&&K(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function po(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:po(t)}function Mr(e){if(e)for(let t=0;tOt(Pc);function rr(e,t){return Gn(e,null,t)}function Bf(e,t){return Gn(e,null,{flush:"post"})}function Ne(e,t,n){return Gn(e,t,n)}function Gn(e,t,n=ee){const{immediate:s,deep:r,flush:i,once:o}=n,l=ae({},n),c=t&&s||!t&&i!=="post";let a;if(Lt){if(i==="sync"){const y=Ic();a=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=Ue,y.resume=Ue,y.pause=Ue,y}}const f=de;l.call=(y,w,b)=>He(y,f,w,b);let u=!1;i==="post"?l.scheduler=y=>{xe(y,f&&f.suspense)}:i!=="sync"&&(u=!0,l.scheduler=(y,w)=>{w?y():Qs(y)}),l.augmentJob=y=>{t&&(y.flags|=4),u&&(y.flags|=2,f&&(y.id=f.uid,y.i=f))};const g=kl(e,t,l);return Lt&&(a?a.push(g):c&&g()),g}function Lc(e,t,n){const s=this.proxy,r=ie(e)?e.includes(".")?go(s,e):()=>s[e]:e.bind(s,s);let i;q(t)?i=t:(i=t.handler,n=t);const o=on(this),l=Gn(r,i.bind(s),n);return o(),l}function go(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ie(t)}Modifiers`]||e[`${rt(t)}Modifiers`];function Nc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ee;let r=n;const i=t.startsWith("update:"),o=i&&Fc(s,t.slice(7));o&&(o.trim&&(r=n.map(f=>ie(f)?f.trim():f)),o.number&&(r=n.map(ws)));let l,c=s[l=_n(t)]||s[l=_n(Ie(t))];!c&&i&&(c=s[l=_n(rt(t))]),c&&He(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,He(a,e,6,r)}}function mo(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!q(e)){const c=a=>{const f=mo(a,t,!0);f&&(l=!0,ae(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(se(e)&&s.set(e,null),null):(K(i)?i.forEach(c=>o[c]=null):ae(o,i),se(e)&&s.set(e,o),o)}function Yn(e,t){return!e||!nn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,rt(t))||Q(e,t))}function cs(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:a,renderCache:f,props:u,data:g,setupState:y,ctx:w,inheritAttrs:b}=e,U=Pn(e);let F,$;try{if(n.shapeFlag&4){const m=r||s,E=m;F=Re(a.call(E,m,f,u,y,g,w)),$=l}else{const m=t;F=Re(m.length>1?m(u,{attrs:l,slots:o,emit:c}):m(u,null)),$=t.props?l:Dc(l)}}catch(m){Gt.length=0,Nt(m,e,1),F=ce(ue)}let p=F;if($&&b!==!1){const m=Object.keys($),{shapeFlag:E}=p;m.length&&E&7&&(i&&m.some(Bs)&&($=$c($,i)),p=st(p,$,!1,!0))}return n.dirs&&(p=st(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&Qt(p,n.transition),F=p,Pn(U),F}function Hc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||nn(n))&&((t||(t={}))[n]=e[n]);return t},$c=(e,t)=>{const n={};for(const s in e)(!Bs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function jc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,a=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Pr(s,o,a):!!o;if(c&8){const f=t.dynamicProps;for(let u=0;ue.__isSuspense;let Ls=0;const Bc={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,i,o,l,c,a){if(e==null)kc(t,n,s,r,i,o,l,c,a);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Vc(e,t,n,s,r,o,l,c,a)}},hydrate:Uc,normalize:Wc},kf=Bc;function Zt(e,t){const n=e.props&&e.props[t];q(n)&&n()}function kc(e,t,n,s,r,i,o,l,c){const{p:a,o:{createElement:f}}=c,u=f("div"),g=e.suspense=vo(e,r,s,t,u,n,i,o,l,c);a(null,g.pendingBranch=e.ssContent,u,null,s,g,i,o),g.deps>0?(Zt(e,"onPending"),Zt(e,"onFallback"),a(null,e.ssFallback,t,n,s,null,i,o),Mt(g,e.ssFallback)):g.resolve(!1,!0)}function Vc(e,t,n,s,r,i,o,l,{p:c,um:a,o:{createElement:f}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const g=t.ssContent,y=t.ssFallback,{activeBranch:w,pendingBranch:b,isInFallback:U,isHydrating:F}=u;if(b)u.pendingBranch=g,Ve(g,b)?(c(b,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0?u.resolve():U&&(F||(c(w,y,n,s,r,null,i,o,l),Mt(u,y)))):(u.pendingId=Ls++,F?(u.isHydrating=!1,u.activeBranch=b):a(b,r,u),u.deps=0,u.effects.length=0,u.hiddenContainer=f("div"),U?(c(null,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0?u.resolve():(c(w,y,n,s,r,null,i,o,l),Mt(u,y))):w&&Ve(g,w)?(c(w,g,n,s,r,u,i,o,l),u.resolve(!0)):(c(null,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0&&u.resolve()));else if(w&&Ve(g,w))c(w,g,n,s,r,u,i,o,l),Mt(u,g);else if(Zt(t,"onPending"),u.pendingBranch=g,g.shapeFlag&512?u.pendingId=g.component.suspenseId:u.pendingId=Ls++,c(null,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0)u.resolve();else{const{timeout:$,pendingId:p}=u;$>0?setTimeout(()=>{u.pendingId===p&&u.fallback(y)},$):$===0&&u.fallback(y)}}function vo(e,t,n,s,r,i,o,l,c,a,f=!1){const{p:u,m:g,um:y,n:w,o:{parentNode:b,remove:U}}=a;let F;const $=Kc(e);$&&t&&t.pendingBranch&&(F=t.pendingId,t.deps++);const p=e.props?pi(e.props.timeout):void 0,m=i,E={vnode:e,parent:t,parentComponent:n,namespace:o,container:s,hiddenContainer:r,deps:0,pendingId:Ls++,timeout:typeof p=="number"?p:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(O=!1,H=!1){const{vnode:D,activeBranch:C,pendingBranch:_,pendingId:I,effects:x,parentComponent:B,container:J}=E;let re=!1;E.isHydrating?E.isHydrating=!1:O||(re=C&&_.transition&&_.transition.mode==="out-in",re&&(C.transition.afterLeave=()=>{I===E.pendingId&&(g(_,J,i===m?w(C):i,0),Cs(x))}),C&&(b(C.el)===J&&(i=w(C)),y(C,B,E,!0)),re||g(_,J,i,0)),Mt(E,_),E.pendingBranch=null,E.isInFallback=!1;let j=E.parent,Y=!1;for(;j;){if(j.pendingBranch){j.effects.push(...x),Y=!0;break}j=j.parent}!Y&&!re&&Cs(x),E.effects=[],$&&t&&t.pendingBranch&&F===t.pendingId&&(t.deps--,t.deps===0&&!H&&t.resolve()),Zt(D,"onResolve")},fallback(O){if(!E.pendingBranch)return;const{vnode:H,activeBranch:D,parentComponent:C,container:_,namespace:I}=E;Zt(H,"onFallback");const x=w(D),B=()=>{E.isInFallback&&(u(null,O,_,x,C,null,I,l,c),Mt(E,O))},J=O.transition&&O.transition.mode==="out-in";J&&(D.transition.afterLeave=B),E.isInFallback=!0,y(D,C,null,!0),J||B()},move(O,H,D){E.activeBranch&&g(E.activeBranch,O,H,D),E.container=O},next(){return E.activeBranch&&w(E.activeBranch)},registerDep(O,H,D){const C=!!E.pendingBranch;C&&E.deps++;const _=O.vnode.el;O.asyncDep.catch(I=>{Nt(I,O,0)}).then(I=>{if(O.isUnmounted||E.isUnmounted||E.pendingId!==O.suspenseId)return;O.asyncResolved=!0;const{vnode:x}=O;Hs(O,I,!1),_&&(x.el=_);const B=!_&&O.subTree.el;H(O,x,b(_||O.subTree.el),_?null:w(O.subTree),E,o,D),B&&U(B),ir(O,x.el),C&&--E.deps===0&&E.resolve()})},unmount(O,H){E.isUnmounted=!0,E.activeBranch&&y(E.activeBranch,n,O,H),E.pendingBranch&&y(E.pendingBranch,n,O,H)}};return E}function Uc(e,t,n,s,r,i,o,l,c){const a=t.suspense=vo(t,s,n,e.parentNode,document.createElement("div"),null,r,i,o,l,!0),f=c(e,a.pendingBranch=t.ssContent,n,a,i,o);return a.deps===0&&a.resolve(!1,!0),f}function Wc(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Ir(s?n.default:n),e.ssFallback=s?Ir(n.fallback):ce(ue)}function Ir(e){let t;if(q(e)){const n=Pt&&e._c;n&&(e._d=!1,Fn()),e=e(),n&&(e._d=!0,t=Se,_o())}return K(e)&&(e=Hc(e)),e=Re(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function bo(e,t){t&&t.pendingBranch?K(e)?t.effects.push(...e):t.effects.push(e):Cs(e)}function Mt(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,s&&s.subTree===n&&(s.vnode.el=r,ir(s,r))}function Kc(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ee=Symbol.for("v-fgt"),gt=Symbol.for("v-txt"),ue=Symbol.for("v-cmt"),qt=Symbol.for("v-stc"),Gt=[];let Se=null;function Fn(e=!1){Gt.push(Se=e?null:[])}function _o(){Gt.pop(),Se=Gt[Gt.length-1]||null}let Pt=1;function Lr(e){Pt+=e,e<0&&Se&&(Se.hasOnce=!0)}function wo(e){return e.dynamicChildren=Pt>0?Se||St:null,_o(),Pt>0&&Se&&Se.push(e),e}function Vf(e,t,n,s,r,i){return wo(xo(e,t,n,s,r,i,!0))}function Fs(e,t,n,s,r){return wo(ce(e,t,n,s,r,!0))}function It(e){return e?e.__v_isVNode===!0:!1}function Ve(e,t){return e.type===t.type&&e.key===t.key}const Eo=({key:e})=>e??null,Sn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ie(e)||fe(e)||q(e)?{i:he,r:e,k:t,f:!!n}:e:null);function xo(e,t=null,n=null,s=0,r=null,i=e===Ee?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Eo(t),ref:t&&Sn(t),scopeId:ji,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:he};return l?(or(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ie(n)?8:16),Pt>0&&!o&&Se&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Se.push(c),c}const ce=qc;function qc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===zi)&&(e=ue),It(e)){const l=st(e,t,!0);return n&&or(l,n),Pt>0&&!i&&Se&&(l.shapeFlag&6?Se[Se.indexOf(e)]=l:Se.push(l)),l.patchFlag=-2,l}if(na(e)&&(e=e.__vccOpts),t){t=Gc(t);let{class:l,style:c}=t;l&&!ie(l)&&(t.class=Ws(l)),se(c)&&(Js(c)&&!K(c)&&(c=ae({},c)),t.style=Us(c))}const o=ie(e)?1:yo(e)?128:ki(e)?64:se(e)?4:q(e)?2:0;return xo(e,t,n,s,r,o,i,!0)}function Gc(e){return e?Js(e)||ro(e)?ae({},e):e:null}function st(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,a=t?Yc(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Eo(a),ref:t&&t.ref?n&&i?K(i)?i.concat(Sn(t)):[i,Sn(t)]:Sn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ee?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&st(e.ssContent),ssFallback:e.ssFallback&&st(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Qt(f,c.clone(f)),f}function So(e=" ",t=0){return ce(gt,null,e,t)}function Uf(e,t){const n=ce(qt,null,e);return n.staticCount=t,n}function Wf(e="",t=!1){return t?(Fn(),Fs(ue,null,e)):ce(ue,null,e)}function Re(e){return e==null||typeof e=="boolean"?ce(ue):K(e)?ce(Ee,null,e.slice()):It(e)?tt(e):ce(gt,null,String(e))}function tt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:st(e)}function or(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(K(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),or(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ro(t)?t._ctx=he:r===3&&he&&(he.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:he},n=32):(t=String(t),s&64?(n=16,t=[So(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yc(...e){const t={};for(let n=0;nde||he;let Nn,Ns;{const e=jn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Nn=t("__VUE_INSTANCE_SETTERS__",n=>de=n),Ns=t("__VUE_SSR_SETTERS__",n=>Lt=n)}const on=e=>{const t=de;return Nn(e),e.scope.on(),()=>{e.scope.off(),Nn(t)}},Fr=()=>{de&&de.scope.off(),Nn(null)};function To(e){return e.vnode.shapeFlag&4}let Lt=!1;function Qc(e,t=!1,n=!1){t&&Ns(t);const{props:s,children:r}=e.vnode,i=To(e);Ec(e,s,i,t),Cc(e,r,n);const o=i?Zc(e,t):void 0;return t&&Ns(!1),o}function Zc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,dc);const{setup:s}=n;if(s){it();const r=e.setupContext=s.length>1?Ao(e):null,i=on(e),o=sn(s,e,0,[e.props,r]),l=fi(o);if(ot(),i(),(l||e.sp)&&!pt(e)&&er(e),l){if(o.then(Fr,Fr),t)return o.then(c=>{Hs(e,c,t)}).catch(c=>{Nt(c,e,0)});e.asyncDep=o}else Hs(e,o,t)}else Co(e,t)}function Hs(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Ni(t)),Co(e,n)}let Nr;function Co(e,t,n){const s=e.type;if(!e.render){if(!t&&Nr&&!s.render){const r=s.template||tr(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,a=ae(ae({isCustomElement:i,delimiters:l},o),c);s.render=Nr(r,a)}}e.render=s.render||Ue}{const r=on(e);it();try{pc(e)}finally{ot(),r()}}}const ea={get(e,t){return ye(e,"get",""),e[t]}};function Ao(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ea),slots:e.slots,emit:e.emit,expose:t}}function Jn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ni(En(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Kt)return Kt[n](e)},has(t,n){return n in t||n in Kt}})):e.proxy}function ta(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function na(e){return q(e)&&"__vccOpts"in e}const oe=(e,t)=>jl(e,t,Lt);function Ds(e,t,n){const s=arguments.length;return s===2?se(t)&&!K(t)?It(t)?ce(e,null,[t]):ce(e,t):ce(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&It(n)&&(n=[n]),ce(e,t,n))}const sa="3.5.12";/** +* @vue/runtime-dom v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let $s;const Hr=typeof window<"u"&&window.trustedTypes;if(Hr)try{$s=Hr.createPolicy("vue",{createHTML:e=>e})}catch{}const Ro=$s?e=>$s.createHTML(e):e=>e,ra="http://www.w3.org/2000/svg",ia="http://www.w3.org/1998/Math/MathML",qe=typeof document<"u"?document:null,Dr=qe&&qe.createElement("template"),oa={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?qe.createElementNS(ra,e):t==="mathml"?qe.createElementNS(ia,e):n?qe.createElement(e,{is:n}):qe.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>qe.createTextNode(e),createComment:e=>qe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Dr.innerHTML=Ro(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Dr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ze="transition",Bt="animation",en=Symbol("_vtc"),Oo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},la=ae({},Ui,Oo),ca=e=>(e.displayName="Transition",e.props=la,e),Kf=ca((e,{slots:t})=>Ds(Jl,aa(e),t)),at=(e,t=[])=>{K(e)?e.forEach(n=>n(...t)):e&&e(...t)},$r=e=>e?K(e)?e.some(t=>t.length>1):e.length>1:!1;function aa(e){const t={};for(const x in e)x in Oo||(t[x]=e[x]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:a=o,appearToClass:f=l,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,w=fa(r),b=w&&w[0],U=w&&w[1],{onBeforeEnter:F,onEnter:$,onEnterCancelled:p,onLeave:m,onLeaveCancelled:E,onBeforeAppear:O=F,onAppear:H=$,onAppearCancelled:D=p}=t,C=(x,B,J)=>{ft(x,B?f:l),ft(x,B?a:o),J&&J()},_=(x,B)=>{x._isLeaving=!1,ft(x,u),ft(x,y),ft(x,g),B&&B()},I=x=>(B,J)=>{const re=x?H:$,j=()=>C(B,x,J);at(re,[B,j]),jr(()=>{ft(B,x?c:i),Qe(B,x?f:l),$r(re)||Br(B,s,b,j)})};return ae(t,{onBeforeEnter(x){at(F,[x]),Qe(x,i),Qe(x,o)},onBeforeAppear(x){at(O,[x]),Qe(x,c),Qe(x,a)},onEnter:I(!1),onAppear:I(!0),onLeave(x,B){x._isLeaving=!0;const J=()=>_(x,B);Qe(x,u),Qe(x,g),ha(),jr(()=>{x._isLeaving&&(ft(x,u),Qe(x,y),$r(m)||Br(x,s,U,J))}),at(m,[x,J])},onEnterCancelled(x){C(x,!1),at(p,[x])},onAppearCancelled(x){C(x,!0),at(D,[x])},onLeaveCancelled(x){_(x),at(E,[x])}})}function fa(e){if(e==null)return null;if(se(e))return[as(e.enter),as(e.leave)];{const t=as(e);return[t,t]}}function as(e){return pi(e)}function Qe(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[en]||(e[en]=new Set)).add(t)}function ft(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[en];n&&(n.delete(t),n.size||(e[en]=void 0))}function jr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ua=0;function Br(e,t,n,s){const r=e._endId=++ua,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=da(e,t);if(!o)return s();const a=o+"end";let f=0;const u=()=>{e.removeEventListener(a,g),i()},g=y=>{y.target===e&&++f>=c&&u()};setTimeout(()=>{f(n[w]||"").split(", "),r=s(`${ze}Delay`),i=s(`${ze}Duration`),o=kr(r,i),l=s(`${Bt}Delay`),c=s(`${Bt}Duration`),a=kr(l,c);let f=null,u=0,g=0;t===ze?o>0&&(f=ze,u=o,g=i.length):t===Bt?a>0&&(f=Bt,u=a,g=c.length):(u=Math.max(o,a),f=u>0?o>a?ze:Bt:null,g=f?f===ze?i.length:c.length:0);const y=f===ze&&/\b(transform|all)(,|$)/.test(s(`${ze}Property`).toString());return{type:f,timeout:u,propCount:g,hasTransform:y}}function kr(e,t){for(;e.lengthVr(n)+Vr(e[s])))}function Vr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ha(){return document.body.offsetHeight}function pa(e,t,n){const s=e[en];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ur=Symbol("_vod"),ga=Symbol("_vsh"),ma=Symbol(""),ya=/(^|;)\s*display\s*:/;function va(e,t,n){const s=e.style,r=ie(n);let i=!1;if(n&&!r){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&Tn(s,l,"")}else for(const o in t)n[o]==null&&Tn(s,o,"");for(const o in n)o==="display"&&(i=!0),Tn(s,o,n[o])}else if(r){if(t!==n){const o=s[ma];o&&(n+=";"+o),s.cssText=n,i=ya.test(n)}}else t&&e.removeAttribute("style");Ur in e&&(e[Ur]=i?s.display:"",e[ga]&&(s.display="none"))}const Wr=/\s*!important$/;function Tn(e,t,n){if(K(n))n.forEach(s=>Tn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ba(e,t);Wr.test(n)?e.setProperty(rt(s),n.replace(Wr,""),"important"):e[s]=n}}const Kr=["Webkit","Moz","ms"],fs={};function ba(e,t){const n=fs[t];if(n)return n;let s=Ie(t);if(s!=="filter"&&s in e)return fs[t]=s;s=$n(s);for(let r=0;rus||(xa.then(()=>us=0),us=Date.now());function Ta(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;He(Ca(s,n.value),t,5,[s])};return n.value=e,n.attached=Sa(),n}function Ca(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const zr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Aa=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?pa(e,s,o):t==="style"?va(e,n,s):nn(t)?Bs(t)||wa(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ra(e,t,s,o))?(Yr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ie(s))?Yr(e,Ie(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Gr(e,t,s,o))};function Ra(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&zr(t)&&q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return zr(t)&&ie(n)?!1:t in e}const Qr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return K(t)?n=>wn(t,n):t};function Oa(e){e.target.composing=!0}function Zr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ds=Symbol("_assign"),qf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[ds]=Qr(r);const i=s||r.props&&r.props.type==="number";Et(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=ws(l)),e[ds](l)}),n&&Et(e,"change",()=>{e.value=e.value.trim()}),t||(Et(e,"compositionstart",Oa),Et(e,"compositionend",Zr),Et(e,"change",Zr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[ds]=Qr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?ws(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},Ma=["ctrl","shift","alt","meta"],Pa={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ma.some(n=>e[`${n}Key`]&&!t.includes(n))},Gf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=rt(r.key);if(t.some(o=>o===i||Ia[o]===i))return e(r)})},Mo=ae({patchProp:Aa},oa);let Yt,ei=!1;function La(){return Yt||(Yt=Rc(Mo))}function Fa(){return Yt=ei?Yt:Oc(Mo),ei=!0,Yt}const Xf=(...e)=>{const t=La().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Io(s);if(!r)return;const i=t._component;!q(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Po(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},Jf=(...e)=>{const t=Fa().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Io(s);if(r)return n(r,!0,Po(r))},t};function Po(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Io(e){return ie(e)?document.querySelector(e):e}const zf=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Na="modulepreload",Ha=function(e){return"/docs-preview/pr-528/"+e},ti={},Qf=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Ha(c),c in ti)return;ti[c]=!0;const a=c.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Na,a||(u.as="script"),u.crossOrigin="",u.href=c,l&&u.setAttribute("nonce",l),document.head.appendChild(u),a)return new Promise((g,y)=>{u.addEventListener("load",g),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Da=window.__VP_SITE_DATA__;function lr(e){return vi()?(al(e),!0):!1}function We(e){return typeof e=="function"?e():Fi(e)}const Lo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Zf=e=>e!=null,$a=Object.prototype.toString,ja=e=>$a.call(e)==="[object Object]",tn=()=>{},ni=Ba();function Ba(){var e,t;return Lo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ka(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Fo=e=>e();function Va(e,t={}){let n,s,r=tn;const i=l=>{clearTimeout(l),r(),r=tn};return l=>{const c=We(e),a=We(t.maxWait);return n&&i(n),c<=0||a!==void 0&&a<=0?(s&&(i(s),s=null),Promise.resolve(l())):new Promise((f,u)=>{r=t.rejectOnCancel?u:f,a&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,f(l())},a)),n=setTimeout(()=>{s&&i(s),s=null,f(l())},c)})}}function Ua(e=Fo){const t=le(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:Un(t),pause:n,resume:s,eventFilter:r}}function Wa(e){return Xn()}function No(...e){if(e.length!==1)return Hl(...e);const t=e[0];return typeof t=="function"?Un(Ll(()=>({get:t,set:tn}))):le(t)}function Ho(e,t,n={}){const{eventFilter:s=Fo,...r}=n;return Ne(e,ka(s,t),r)}function Ka(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Ua(s);return{stop:Ho(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function cr(e,t=!0,n){Wa()?Ht(e,n):t?e():Wn(e)}function eu(e,t,n={}){const{debounce:s=0,maxWait:r=void 0,...i}=n;return Ho(e,t,{...i,eventFilter:Va(s,{maxWait:r})})}function tu(e,t,n){let s;fe(n)?s={evaluating:n}:s={};const{lazy:r=!1,evaluating:i=void 0,shallow:o=!0,onError:l=tn}=s,c=le(!r),a=o?zs(t):le(t);let f=0;return rr(async u=>{if(!c.value)return;f++;const g=f;let y=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const w=await e(b=>{u(()=>{i&&(i.value=!1),y||b()})});g===f&&(a.value=w)}catch(w){l(w)}finally{i&&g===f&&(i.value=!1),y=!0}}),r?oe(()=>(c.value=!0,a.value)):a}const De=Lo?window:void 0;function Do(e){var t;const n=We(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Ft(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=De):[t,n,s,r]=e,!t)return tn;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(f=>f()),i.length=0},l=(f,u,g,y)=>(f.addEventListener(u,g,y),()=>f.removeEventListener(u,g,y)),c=Ne(()=>[Do(t),We(r)],([f,u])=>{if(o(),!f)return;const g=ja(u)?{...u}:u;i.push(...n.flatMap(y=>s.map(w=>l(f,y,w,g))))},{immediate:!0,flush:"post"}),a=()=>{c(),o()};return lr(a),a}function qa(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function nu(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=De,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=qa(t);return Ft(r,i,f=>{f.repeat&&We(l)||c(f)&&n(f)},o)}function Ga(){const e=le(!1),t=Xn();return t&&Ht(()=>{e.value=!0},t),e}function Ya(e){const t=Ga();return oe(()=>(t.value,!!e()))}function $o(e,t={}){const{window:n=De}=t,s=Ya(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=le(!1),o=a=>{i.value=a.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=rr(()=>{s.value&&(l(),r=n.matchMedia(We(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return lr(()=>{c(),l(),r=void 0}),i}const mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yn="__vueuse_ssr_handlers__",Xa=Ja();function Ja(){return yn in mn||(mn[yn]=mn[yn]||{}),mn[yn]}function jo(e,t){return Xa[e]||t}function ar(e){return $o("(prefers-color-scheme: dark)",e)}function za(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Qa={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},si="vueuse-storage";function fr(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:a=!1,shallow:f,window:u=De,eventFilter:g,onError:y=_=>{console.error(_)},initOnMounted:w}=s,b=(f?zs:le)(typeof t=="function"?t():t);if(!n)try{n=jo("getDefaultStorage",()=>{var _;return(_=De)==null?void 0:_.localStorage})()}catch(_){y(_)}if(!n)return b;const U=We(t),F=za(U),$=(r=s.serializer)!=null?r:Qa[F],{pause:p,resume:m}=Ka(b,()=>O(b.value),{flush:i,deep:o,eventFilter:g});u&&l&&cr(()=>{n instanceof Storage?Ft(u,"storage",D):Ft(u,si,C),w&&D()}),w||D();function E(_,I){if(u){const x={key:e,oldValue:_,newValue:I,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent("storage",x):new CustomEvent(si,{detail:x}))}}function O(_){try{const I=n.getItem(e);if(_==null)E(I,null),n.removeItem(e);else{const x=$.write(_);I!==x&&(n.setItem(e,x),E(I,x))}}catch(I){y(I)}}function H(_){const I=_?_.newValue:n.getItem(e);if(I==null)return c&&U!=null&&n.setItem(e,$.write(U)),U;if(!_&&a){const x=$.read(I);return typeof a=="function"?a(x,U):F==="object"&&!Array.isArray(x)?{...U,...x}:x}else return typeof I!="string"?I:$.read(I)}function D(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){b.value=U;return}if(!(_&&_.key!==e)){p();try{(_==null?void 0:_.newValue)!==$.write(b.value)&&(b.value=H(_))}catch(I){y(I)}finally{_?Wn(m):m()}}}}function C(_){D(_.detail)}return b}const Za="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function ef(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=De,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:a,disableTransition:f=!0}=e,u={auto:"",light:"light",dark:"dark",...e.modes||{}},g=ar({window:r}),y=oe(()=>g.value?"dark":"light"),w=c||(o==null?No(s):fr(o,s,i,{window:r,listenToStorageChanges:l})),b=oe(()=>w.value==="auto"?y.value:w.value),U=jo("updateHTMLAttrs",(m,E,O)=>{const H=typeof m=="string"?r==null?void 0:r.document.querySelector(m):Do(m);if(!H)return;const D=new Set,C=new Set;let _=null;if(E==="class"){const x=O.split(/\s/g);Object.values(u).flatMap(B=>(B||"").split(/\s/g)).filter(Boolean).forEach(B=>{x.includes(B)?D.add(B):C.add(B)})}else _={key:E,value:O};if(D.size===0&&C.size===0&&_===null)return;let I;f&&(I=r.document.createElement("style"),I.appendChild(document.createTextNode(Za)),r.document.head.appendChild(I));for(const x of D)H.classList.add(x);for(const x of C)H.classList.remove(x);_&&H.setAttribute(_.key,_.value),f&&(r.getComputedStyle(I).opacity,document.head.removeChild(I))});function F(m){var E;U(t,n,(E=u[m])!=null?E:m)}function $(m){e.onChanged?e.onChanged(m,F):F(m)}Ne(b,$,{flush:"post",immediate:!0}),cr(()=>$(b.value));const p=oe({get(){return a?w.value:b.value},set(m){w.value=m}});try{return Object.assign(p,{store:w,system:y,state:b})}catch{return p}}function tf(e={}){const{valueDark:t="dark",valueLight:n="",window:s=De}=e,r=ef({...e,onChanged:(l,c)=>{var a;e.onChanged?(a=e.onChanged)==null||a.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=oe(()=>r.system?r.system.value:ar({window:s}).value?"dark":"light");return oe({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function hs(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function su(e,t,n={}){const{window:s=De}=n;return fr(e,t,s==null?void 0:s.localStorage,n)}function Bo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const ps=new WeakMap;function ru(e,t=!1){const n=le(t);let s=null,r="";Ne(No(e),l=>{const c=hs(We(l));if(c){const a=c;if(ps.get(a)||ps.set(a,a.style.overflow),a.style.overflow!=="hidden"&&(r=a.style.overflow),a.style.overflow==="hidden")return n.value=!0;if(n.value)return a.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=hs(We(e));!l||n.value||(ni&&(s=Ft(l,"touchmove",c=>{nf(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=hs(We(e));!l||!n.value||(ni&&(s==null||s()),l.style.overflow=r,ps.delete(l),n.value=!1)};return lr(o),oe({get(){return n.value},set(l){l?i():o()}})}function iu(e,t,n={}){const{window:s=De}=n;return fr(e,t,s==null?void 0:s.sessionStorage,n)}function ou(e={}){const{window:t=De,behavior:n="auto"}=e;if(!t)return{x:le(0),y:le(0)};const s=le(t.scrollX),r=le(t.scrollY),i=oe({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=oe({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return Ft(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function lu(e={}){const{window:t=De,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=le(n),c=le(s),a=()=>{t&&(o==="outer"?(l.value=t.outerWidth,c.value=t.outerHeight):i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(a(),cr(a),Ft("resize",a,{passive:!0}),r){const f=$o("(orientation: portrait)");Ne(f,()=>a())}return{width:l,height:c}}const gs={BASE_URL:"/docs-preview/pr-528/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var ms={};const ko=/^(?:[a-z]+:|\/\/)/i,sf="vitepress-theme-appearance",rf=/#.*$/,of=/[?#].*$/,lf=/(?:(^|\/)index)?\.(?:md|html)$/,me=typeof document<"u",Vo={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function cf(e,t,n=!1){if(t===void 0)return!1;if(e=ri(`/${e}`),n)return new RegExp(t).test(e);if(ri(t)!==e)return!1;const s=t.match(rf);return s?(me?location.hash:"")===s[0]:!0}function ri(e){return decodeURI(e).replace(of,"").replace(lf,"$1")}function af(e){return ko.test(e)}function ff(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!af(n)&&cf(t,`/${n}/`,!0))||"root"}function uf(e,t){var s,r,i,o,l,c,a;const n=ff(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:Wo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(a=e.locales[n])==null?void 0:a.themeConfig}})}function Uo(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=df(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function df(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function hf(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function Wo(e,t){return[...e.filter(n=>!hf(t,n)),...t]}const pf=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,gf=/^[a-z]:/i;function ii(e){const t=gf.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(pf,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const ys=new Set;function mf(e){if(ys.size===0){const n=typeof process=="object"&&(ms==null?void 0:ms.VITE_EXTRA_EXTENSIONS)||(gs==null?void 0:gs.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>ys.add(s))}const t=e.split(".").pop();return t==null||!ys.has(t.toLowerCase())}function cu(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const yf=Symbol(),mt=zs(Da);function au(e){const t=oe(()=>uf(mt.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?le(!0):n==="force-auto"?ar():n?tf({storageKey:sf,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):le(!1),r=le(me?location.hash:"");return me&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Ne(()=>e.data,()=>{r.value=me?location.hash:""}),{site:t,theme:oe(()=>t.value.themeConfig),page:oe(()=>e.data),frontmatter:oe(()=>e.data.frontmatter),params:oe(()=>e.data.params),lang:oe(()=>t.value.lang),dir:oe(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:oe(()=>t.value.localeIndex||"root"),title:oe(()=>Uo(t.value,e.data)),description:oe(()=>e.data.description||t.value.description),isDark:s,hash:oe(()=>r.value)}}function vf(){const e=Ot(yf);if(!e)throw new Error("vitepress data not properly injected in app");return e}function bf(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function oi(e){return ko.test(e)||!e.startsWith("/")?e:bf(mt.value.base,e)}function _f(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),me){const n="/docs-preview/pr-528/";t=ii(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${ii(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Cn=[];function fu(e){Cn.push(e),qn(()=>{Cn=Cn.filter(t=>t!==e)})}function wf(){let e=mt.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=li(e,n);else if(Array.isArray(e))for(const s of e){const r=li(s,n);if(r){t=r;break}}return t}function li(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Ef=Symbol(),Ko="http://a.com",xf=()=>({path:"/",component:null,data:Vo});function uu(e,t){const n=Vn(xf()),s={route:n,go:r};async function r(l=me?location.href:"/"){var c,a;l=vs(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(me&&l!==vs(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((a=s.onAfterRouteChanged)==null?void 0:a.call(s,l)))}let i=null;async function o(l,c=0,a=!1){var g,y;if(await((g=s.onBeforePageLoad)==null?void 0:g.call(s,l))===!1)return;const f=new URL(l,Ko),u=i=f.pathname;try{let w=await e(u);if(!w)throw new Error(`Page not found: ${u}`);if(i===u){i=null;const{default:b,__pageData:U}=w;if(!b)throw new Error(`Invalid route component: ${b}`);await((y=s.onAfterPageLoad)==null?void 0:y.call(s,l)),n.path=me?u:oi(u),n.component=En(b),n.data=En(U),me&&Wn(()=>{let F=mt.value.base+U.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!mt.value.cleanUrls&&!F.endsWith("/")&&(F+=".html"),F!==f.pathname&&(f.pathname=F,l=F+f.search+f.hash,history.replaceState({},"",l)),f.hash&&!c){let $=null;try{$=document.getElementById(decodeURIComponent(f.hash).slice(1))}catch(p){console.warn(p)}if($){ci($,f.hash);return}}window.scrollTo(0,c)})}}catch(w){if(!/fetch|Page not found/.test(w.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(w),!a)try{const b=await fetch(mt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await b.json(),await o(l,c,!0);return}catch{}if(i===u){i=null,n.path=me?u:oi(u),n.component=t?En(t):null;const b=me?u.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...Vo,relativePath:b}}}}return me&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const a=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(a==null)return;const{href:f,origin:u,pathname:g,hash:y,search:w}=new URL(a,c.baseURI),b=new URL(location.href);u===b.origin&&mf(g)&&(l.preventDefault(),g===b.pathname&&w===b.search?(y!==b.hash&&(history.pushState({},"",f),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:b.href,newURL:f}))),y?ci(c,y,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(f))},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(vs(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function Sf(){const e=Ot(Ef);if(!e)throw new Error("useRouter() is called without provider.");return e}function qo(){return Sf().route}function ci(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-wf()+i;requestAnimationFrame(r)}}function vs(e){const t=new URL(e,Ko);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),mt.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const vn=()=>Cn.forEach(e=>e()),du=Zs({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=qo(),{frontmatter:n,site:s}=vf();return Ne(n,vn,{deep:!0,flush:"post"}),()=>Ds(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?Ds(t.component,{onVnodeMounted:vn,onVnodeUpdated:vn,onVnodeUnmounted:vn}):"404 Page Not Found"])}}),hu=Zs({setup(e,{slots:t}){const n=le(!1);return Ht(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function pu(){me&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(a=>a.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function gu(){if(me){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(f=>f.remove());let a=c.textContent||"";o&&(a=a.replace(/^ *(\$|>) /gm,"").trim()),Tf(a).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const f=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,f)})}})}}async function Tf(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function mu(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=bs(l);for(const a of document.head.children)if(a.isEqualNode(c)){s.push(a);return}});return}const o=i.map(bs);s.forEach((l,c)=>{const a=o.findIndex(f=>f==null?void 0:f.isEqualNode(l??null));a!==-1?delete o[a]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};rr(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],a=Uo(o,i);a!==document.title&&(document.title=a);const f=l||o.description;let u=document.querySelector("meta[name=description]");u?u.getAttribute("content")!==f&&u.setAttribute("content",f):bs(["meta",{name:"description",content:f}]),r(Wo(o.head,Af(c)))})}function bs([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function Cf(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function Af(e){return e.filter(t=>!Cf(t))}const _s=new Set,Go=()=>document.createElement("link"),Rf=e=>{const t=Go();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Of=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let bn;const Mf=me&&(bn=Go())&&bn.relList&&bn.relList.supports&&bn.relList.supports("prefetch")?Rf:Of;function yu(){if(!me||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!_s.has(c)){_s.add(c);const a=_f(c);a&&Mf(a)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):_s.add(l))})})};Ht(s);const r=qo();Ne(()=>r.path,s),qn(()=>{n&&n.disconnect()})}export{Xi as $,wf as A,Ff as B,Hf as C,zs as D,fu as E,Ee as F,ce as G,Nf as H,ko as I,qo as J,Yc as K,Ot as L,lu as M,Us as N,nu as O,Wn as P,ou as Q,me as R,Un as S,Kf as T,Lf as U,Qf as V,ru as W,wc as X,$f as Y,Yf as Z,zf as _,So as a,Gf as a0,jf as a1,Ds as a2,Uf as a3,kf as a4,We as a5,Do as a6,Zf as a7,lr as a8,tu as a9,iu as aa,su as ab,eu as ac,Sf as ad,Ft as ae,Pf as af,qf as ag,fe as ah,If as ai,En as aj,Xf as ak,yf as al,_f as am,cu as an,z as ao,mu as ap,Ef as aq,au as ar,du as as,hu as at,mt as au,Jf as av,uu as aw,yu as ax,gu as ay,pu as az,Fs as b,Vf as c,Zs as d,Wf as e,mf as f,oi as g,oe as h,af as i,xo as j,Fi as k,cf as l,$o as m,Ws as n,Fn as o,le as p,Ne as q,Df as r,rr as s,ll as t,vf as u,Ht as v,Wl as w,qn as x,Bf as y,lc as z}; diff --git a/pr-528/assets/chunks/ganttDiagram-HLVPPPRE.DwgrFMyV.js b/pr-528/assets/chunks/ganttDiagram-HLVPPPRE.DwgrFMyV.js new file mode 100644 index 000000000..20df92636 --- /dev/null +++ b/pr-528/assets/chunks/ganttDiagram-HLVPPPRE.DwgrFMyV.js @@ -0,0 +1,257 @@ +import{aV as ir,aW as sr,aX as or,aY as cr,aZ as Wr,a_ as ct,a$ as Or,_ as f,b0 as ae,d as Ye,s as Hr,g as Nr,q as Vr,r as Pr,c as zr,b as Rr,v as Br,m as Zr,l as tt,j as je,k as qr,e as Xr,u as Gr}from"../app.CKrDwBa1.js";import{b as Qr,t as Vt,c as jr,a as Jr,l as $r}from"./linear.CWPBtVa2.js";import{i as Kr}from"./init.Gi6I4Gst.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";function en(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let a of e)(a=t(a,++n,e))!=null&&(r=a)&&(r=a)}return r}function tn(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of e)(a=t(a,++n,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function rn(e){return e}var $e=1,lt=2,bt=3,Je=4,Pt=1e-6;function nn(e){return"translate("+e+",0)"}function an(e){return"translate(0,"+e+")"}function sn(e){return t=>+e(t)}function on(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function cn(){return!this.__axis}function lr(e,t){var r=[],n=null,a=null,i=6,s=6,g=3,k=typeof window<"u"&&window.devicePixelRatio>1?0:.5,v=e===$e||e===Je?-1:1,y=e===Je||e===lt?"x":"y",S=e===$e||e===bt?nn:an;function C(p){var N=n??(t.ticks?t.ticks.apply(t,r):t.domain()),M=a??(t.tickFormat?t.tickFormat.apply(t,r):rn),B=Math.max(i,0)+g,Q=t.range(),K=+Q[0]+k,R=+Q[Q.length-1]+k,Z=(t.bandwidth?on:sn)(t.copy(),k),j=p.selection?p.selection():p,w=j.selectAll(".domain").data([null]),L=j.selectAll(".tick").data(N,t).order(),D=L.exit(),F=L.enter().append("g").attr("class","tick"),_=L.select("line"),Y=L.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),L=L.merge(F),_=_.merge(F.append("line").attr("stroke","currentColor").attr(y+"2",v*i)),Y=Y.merge(F.append("text").attr("fill","currentColor").attr(y,v*B).attr("dy",e===$e?"0em":e===bt?"0.71em":"0.32em")),p!==j&&(w=w.transition(p),L=L.transition(p),_=_.transition(p),Y=Y.transition(p),D=D.transition(p).attr("opacity",Pt).attr("transform",function(x){return isFinite(x=Z(x))?S(x+k):this.getAttribute("transform")}),F.attr("opacity",Pt).attr("transform",function(x){var A=this.parentNode.__axis;return S((A&&isFinite(A=A(x))?A:Z(x))+k)})),D.remove(),w.attr("d",e===Je||e===lt?s?"M"+v*s+","+K+"H"+k+"V"+R+"H"+v*s:"M"+k+","+K+"V"+R:s?"M"+K+","+v*s+"V"+k+"H"+R+"V"+v*s:"M"+K+","+k+"H"+R),L.attr("opacity",1).attr("transform",function(x){return S(Z(x)+k)}),_.attr(y+"2",v*i),Y.attr(y,v*B).text(M),j.filter(cn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===lt?"start":e===Je?"end":"middle"),j.each(function(){this.__axis=Z})}return C.scale=function(p){return arguments.length?(t=p,C):t},C.ticks=function(){return r=Array.from(arguments),C},C.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),C):r.slice()},C.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),C):n&&n.slice()},C.tickFormat=function(p){return arguments.length?(a=p,C):a},C.tickSize=function(p){return arguments.length?(i=s=+p,C):i},C.tickSizeInner=function(p){return arguments.length?(i=+p,C):i},C.tickSizeOuter=function(p){return arguments.length?(s=+p,C):s},C.tickPadding=function(p){return arguments.length?(g=+p,C):g},C.offset=function(p){return arguments.length?(k=+p,C):k},C}function ln(e){return lr($e,e)}function un(e){return lr(bt,e)}const fn=Math.PI/180,hn=180/Math.PI,rt=18,ur=.96422,fr=1,hr=.82521,dr=4/29,Fe=6/29,mr=3*Fe*Fe,dn=Fe*Fe*Fe;function gr(e){if(e instanceof fe)return new fe(e.l,e.a,e.b,e.opacity);if(e instanceof ge)return yr(e);e instanceof or||(e=Wr(e));var t=dt(e.r),r=dt(e.g),n=dt(e.b),a=ut((.2225045*t+.7168786*r+.0606169*n)/fr),i,s;return t===r&&r===n?i=s=a:(i=ut((.4360747*t+.3850649*r+.1430804*n)/ur),s=ut((.0139322*t+.0971045*r+.7141733*n)/hr)),new fe(116*a-16,500*(i-a),200*(a-s),e.opacity)}function mn(e,t,r,n){return arguments.length===1?gr(e):new fe(e,t,r,n??1)}function fe(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}ir(fe,mn,sr(cr,{brighter(e){return new fe(this.l+rt*(e??1),this.a,this.b,this.opacity)},darker(e){return new fe(this.l-rt*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=ur*ft(t),e=fr*ft(e),r=hr*ft(r),new or(ht(3.1338561*t-1.6168667*e-.4906146*r),ht(-.9787684*t+1.9161415*e+.033454*r),ht(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function ut(e){return e>dn?Math.pow(e,1/3):e/mr+dr}function ft(e){return e>Fe?e*e*e:mr*(e-dr)}function ht(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function gn(e){if(e instanceof ge)return new ge(e.h,e.c,e.l,e.opacity);if(e instanceof fe||(e=gr(e)),e.a===0&&e.b===0)return new ge(NaN,0(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),g=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,g)=>{const k=[];if(i=a.ceil(i),g=g==null?1:Math.floor(g),!(i0))return k;let v;do k.push(v=new Date(+i)),t(i,g),e(i);while(v$(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,g)=>{if(s>=s)if(g<0)for(;++g<=0;)for(;t(s,-1),!i(s););else for(;--g>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(mt.setTime(+i),gt.setTime(+s),e(mt),e(gt),Math.floor(r(mt,gt))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ee=$(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ee.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?$(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ee);Ee.range;const ye=1e3,se=ye*60,ke=se*60,ve=ke*24,St=ve*7,zt=ve*30,yt=ve*365,Te=$(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ye)},(e,t)=>(t-e)/ye,e=>e.getUTCSeconds());Te.range;const Ve=$(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ye)},(e,t)=>{e.setTime(+e+t*se)},(e,t)=>(t-e)/se,e=>e.getMinutes());Ve.range;const pn=$(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*se)},(e,t)=>(t-e)/se,e=>e.getUTCMinutes());pn.range;const Pe=$(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ye-e.getMinutes()*se)},(e,t)=>{e.setTime(+e+t*ke)},(e,t)=>(t-e)/ke,e=>e.getHours());Pe.range;const Tn=$(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ke)},(e,t)=>(t-e)/ke,e=>e.getUTCHours());Tn.range;const xe=$(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*se)/ve,e=>e.getDate()-1);xe.range;const _t=$(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ve,e=>e.getUTCDate()-1);_t.range;const bn=$(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ve,e=>Math.floor(e/ve));bn.range;function Ce(e){return $(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*se)/St)}const Be=Ce(0),ze=Ce(1),kr=Ce(2),vr=Ce(3),we=Ce(4),pr=Ce(5),Tr=Ce(6);Be.range;ze.range;kr.range;vr.range;we.range;pr.range;Tr.range;function Me(e){return $(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/St)}const br=Me(0),nt=Me(1),xn=Me(2),wn=Me(3),Ie=Me(4),Dn=Me(5),Cn=Me(6);br.range;nt.range;xn.range;wn.range;Ie.range;Dn.range;Cn.range;const Re=$(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Re.range;const Mn=$(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Mn.range;const pe=$(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pe.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});pe.range;const De=$(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());De.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});De.range;function Sn(e,t,r,n,a,i){const s=[[Te,1,ye],[Te,5,5*ye],[Te,15,15*ye],[Te,30,30*ye],[i,1,se],[i,5,5*se],[i,15,15*se],[i,30,30*se],[a,1,ke],[a,3,3*ke],[a,6,6*ke],[a,12,12*ke],[n,1,ve],[n,2,2*ve],[r,1,St],[t,1,zt],[t,3,3*zt],[e,1,yt]];function g(v,y,S){const C=yB).right(s,C);if(p===s.length)return e.every(Vt(v/yt,y/yt,S));if(p===0)return Ee.every(Math.max(Vt(v,y,S),1));const[N,M]=s[C/s[p-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?(U=vt(Le(l.y,0,1)),G=U.getUTCDay(),U=G>4||G===0?nt.ceil(U):nt(U),U=_t.offset(U,(l.V-1)*7),l.y=U.getUTCFullYear(),l.m=U.getUTCMonth(),l.d=U.getUTCDate()+(l.w+6)%7):(U=kt(Le(l.y,0,1)),G=U.getDay(),U=G>4||G===0?ze.ceil(U):ze(U),U=xe.offset(U,(l.V-1)*7),l.y=U.getFullYear(),l.m=U.getMonth(),l.d=U.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),G="Z"in l?vt(Le(l.y,0,1)).getUTCDay():kt(Le(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(G+5)%7:l.w+l.U*7-(G+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,vt(l)):kt(l)}}function D(T,I,W,l){for(var re=0,U=I.length,G=W.length,z,ce;re=G)return-1;if(z=I.charCodeAt(re++),z===37){if(z=I.charAt(re++),ce=j[z in Rt?I.charAt(re++):z],!ce||(l=ce(T,W,l))<0)return-1}else if(z!=W.charCodeAt(l++))return-1}return l}function F(T,I,W){var l=v.exec(I.slice(W));return l?(T.p=y.get(l[0].toLowerCase()),W+l[0].length):-1}function _(T,I,W){var l=p.exec(I.slice(W));return l?(T.w=N.get(l[0].toLowerCase()),W+l[0].length):-1}function Y(T,I,W){var l=S.exec(I.slice(W));return l?(T.w=C.get(l[0].toLowerCase()),W+l[0].length):-1}function x(T,I,W){var l=Q.exec(I.slice(W));return l?(T.m=K.get(l[0].toLowerCase()),W+l[0].length):-1}function A(T,I,W){var l=M.exec(I.slice(W));return l?(T.m=B.get(l[0].toLowerCase()),W+l[0].length):-1}function u(T,I,W){return D(T,t,I,W)}function d(T,I,W){return D(T,r,I,W)}function b(T,I,W){return D(T,n,I,W)}function m(T){return s[T.getDay()]}function E(T){return i[T.getDay()]}function c(T){return k[T.getMonth()]}function h(T){return g[T.getMonth()]}function o(T){return a[+(T.getHours()>=12)]}function P(T){return 1+~~(T.getMonth()/3)}function O(T){return s[T.getUTCDay()]}function V(T){return i[T.getUTCDay()]}function ee(T){return k[T.getUTCMonth()]}function q(T){return g[T.getUTCMonth()]}function X(T){return a[+(T.getUTCHours()>=12)]}function oe(T){return 1+~~(T.getUTCMonth()/3)}return{format:function(T){var I=w(T+="",R);return I.toString=function(){return T},I},parse:function(T){var I=L(T+="",!1);return I.toString=function(){return T},I},utcFormat:function(T){var I=w(T+="",Z);return I.toString=function(){return T},I},utcParse:function(T){var I=L(T+="",!0);return I.toString=function(){return T},I}}}var Rt={"-":"",_:" ",0:"0"},te=/^\s*\d+/,Un=/^%/,En=/[\\^$*+?|[\]().{}]/g;function H(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i[t.toLowerCase(),r]))}function An(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ln(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Wn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function On(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Hn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Bt(e,t,r){var n=te.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Zt(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Nn(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Vn(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Pn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function qt(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zn(e,t,r){var n=te.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Xt(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Rn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Bn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Zn(e,t,r){var n=te.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function qn(e,t,r){var n=te.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Xn(e,t,r){var n=Un.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Gn(e,t,r){var n=te.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Qn(e,t,r){var n=te.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Gt(e,t){return H(e.getDate(),t,2)}function jn(e,t){return H(e.getHours(),t,2)}function Jn(e,t){return H(e.getHours()%12||12,t,2)}function $n(e,t){return H(1+xe.count(pe(e),e),t,3)}function xr(e,t){return H(e.getMilliseconds(),t,3)}function Kn(e,t){return xr(e,t)+"000"}function ea(e,t){return H(e.getMonth()+1,t,2)}function ta(e,t){return H(e.getMinutes(),t,2)}function ra(e,t){return H(e.getSeconds(),t,2)}function na(e){var t=e.getDay();return t===0?7:t}function aa(e,t){return H(Be.count(pe(e)-1,e),t,2)}function wr(e){var t=e.getDay();return t>=4||t===0?we(e):we.ceil(e)}function ia(e,t){return e=wr(e),H(we.count(pe(e),e)+(pe(e).getDay()===4),t,2)}function sa(e){return e.getDay()}function oa(e,t){return H(ze.count(pe(e)-1,e),t,2)}function ca(e,t){return H(e.getFullYear()%100,t,2)}function la(e,t){return e=wr(e),H(e.getFullYear()%100,t,2)}function ua(e,t){return H(e.getFullYear()%1e4,t,4)}function fa(e,t){var r=e.getDay();return e=r>=4||r===0?we(e):we.ceil(e),H(e.getFullYear()%1e4,t,4)}function ha(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+H(t/60|0,"0",2)+H(t%60,"0",2)}function Qt(e,t){return H(e.getUTCDate(),t,2)}function da(e,t){return H(e.getUTCHours(),t,2)}function ma(e,t){return H(e.getUTCHours()%12||12,t,2)}function ga(e,t){return H(1+_t.count(De(e),e),t,3)}function Dr(e,t){return H(e.getUTCMilliseconds(),t,3)}function ya(e,t){return Dr(e,t)+"000"}function ka(e,t){return H(e.getUTCMonth()+1,t,2)}function va(e,t){return H(e.getUTCMinutes(),t,2)}function pa(e,t){return H(e.getUTCSeconds(),t,2)}function Ta(e){var t=e.getUTCDay();return t===0?7:t}function ba(e,t){return H(br.count(De(e)-1,e),t,2)}function Cr(e){var t=e.getUTCDay();return t>=4||t===0?Ie(e):Ie.ceil(e)}function xa(e,t){return e=Cr(e),H(Ie.count(De(e),e)+(De(e).getUTCDay()===4),t,2)}function wa(e){return e.getUTCDay()}function Da(e,t){return H(nt.count(De(e)-1,e),t,2)}function Ca(e,t){return H(e.getUTCFullYear()%100,t,2)}function Ma(e,t){return e=Cr(e),H(e.getUTCFullYear()%100,t,2)}function Sa(e,t){return H(e.getUTCFullYear()%1e4,t,4)}function _a(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ie(e):Ie.ceil(e),H(e.getUTCFullYear()%1e4,t,4)}function Ya(){return"+0000"}function jt(){return"%"}function Jt(e){return+e}function $t(e){return Math.floor(+e/1e3)}var _e,at;Fa({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fa(e){return _e=Fn(e),at=_e.format,_e.parse,_e.utcFormat,_e.utcParse,_e}function Ua(e){return new Date(e)}function Ea(e){return e instanceof Date?+e:+new Date(+e)}function Mr(e,t,r,n,a,i,s,g,k,v){var y=jr(),S=y.invert,C=y.domain,p=v(".%L"),N=v(":%S"),M=v("%I:%M"),B=v("%I %p"),Q=v("%a %d"),K=v("%b %d"),R=v("%B"),Z=v("%Y");function j(w){return(k(w)4&&(S+=7),y.add(S,pt)},a=function(k){return k.add(4-k.isoWeekday(),pt)},i=t.prototype;i.isoWeekYear=function(){var g=a(this);return g.year()},i.isoWeek=function(g){if(!this.$utils().u(g))return this.add((g-this.isoWeek())*7,pt);var k=a(this),v=n(this.isoWeekYear(),this.$u);return k.diff(v,Aa)+1},i.isoWeekday=function(g){return this.$utils().u(g)?this.day()||7:this.day(this.day()%7?g:g-7)};var s=i.startOf;i.startOf=function(g,k){var v=this.$utils(),y=v.u(k)?!0:k,S=v.p(g);return S===Oa?y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(g,k)}};var Na=function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(r,n,a){return n||a.slice(1)})},Va={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Pa=function(t,r){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(n,a,i){var s=i&&i.toUpperCase();return a||r[i]||Va[i]||Na(r[s])})},za=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,Kt=/\d/,He=/\d\d/,Ra=/\d{3}/,Ba=/\d{4}/,le=/\d\d?/,Za=/[+-]?\d+/,qa=/[+-]\d\d:?(\d\d)?|Z/,Ne=/\d*[^-_:/,()\s\d]+/,be={},Sr=function(t){return t=+t,t+(t>68?1900:2e3)};function Xa(e){if(!e||e==="Z")return 0;var t=e.match(/([+-]|\d\d)/g),r=+(t[1]*60)+(+t[2]||0);return r===0?0:t[0]==="+"?-r:r}var ne=function(t){return function(r){this[t]=+r}},er=[qa,function(e){var t=this.zone||(this.zone={});t.offset=Xa(e)}],Tt=function(t){var r=be[t];return r&&(r.indexOf?r:r.s.concat(r.f))},tr=function(t,r){var n,a=be,i=a.meridiem;if(!i)n=t===(r?"pm":"PM");else for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,r))>-1){n=s>12;break}return n},Ga={A:[Ne,function(e){this.afternoon=tr(e,!1)}],a:[Ne,function(e){this.afternoon=tr(e,!0)}],Q:[Kt,function(e){this.month=(e-1)*3+1}],S:[Kt,function(e){this.milliseconds=+e*100}],SS:[He,function(e){this.milliseconds=+e*10}],SSS:[Ra,function(e){this.milliseconds=+e}],s:[le,ne("seconds")],ss:[le,ne("seconds")],m:[le,ne("minutes")],mm:[le,ne("minutes")],H:[le,ne("hours")],h:[le,ne("hours")],HH:[le,ne("hours")],hh:[le,ne("hours")],D:[le,ne("day")],DD:[He,ne("day")],Do:[Ne,function(e){var t=be,r=t.ordinal,n=e.match(/\d+/);if(this.day=n[0],!!r)for(var a=1;a<=31;a+=1)r(a).replace(/\[|\]/g,"")===e&&(this.day=a)}],w:[le,ne("week")],ww:[He,ne("week")],M:[le,ne("month")],MM:[He,ne("month")],MMM:[Ne,function(e){var t=Tt("months"),r=Tt("monthsShort"),n=(r||t.map(function(a){return a.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[Ne,function(e){var t=Tt("months"),r=t.indexOf(e)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[Za,ne("year")],YY:[He,function(e){this.year=Sr(e)}],YYYY:[Ba,ne("year")],Z:er,ZZ:er};function Qa(e){var t=e.afternoon;if(t!==void 0){var r=e.hours;t?r<12&&(e.hours+=12):r===12&&(e.hours=0),delete e.afternoon}}function ja(e){e=Pa(e,be&&be.formats);for(var t=e.match(za),r=t.length,n=0;n-1)return new Date((r==="X"?1e3:1)*t);var i=ja(r),s=i(t),g=s.year,k=s.month,v=s.day,y=s.hours,S=s.minutes,C=s.seconds,p=s.milliseconds,N=s.zone,M=s.week,B=new Date,Q=v||(!g&&!k?B.getDate():1),K=g||B.getFullYear(),R=0;g&&!k||(R=k>0?k-1:B.getMonth());var Z=y||0,j=S||0,w=C||0,L=p||0;if(N)return new Date(Date.UTC(K,R,Q,Z,j,w,L+N.offset*60*1e3));if(n)return new Date(Date.UTC(K,R,Q,Z,j,w,L));var D;return D=new Date(K,R,Q,Z,j,w,L),M&&(D=a(D).week(M).toDate()),D}catch{return new Date("")}};const $a=function(e,t,r){r.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(Sr=e.parseTwoDigitYear);var n=t.prototype,a=n.parse;n.parse=function(i){var s=i.date,g=i.utc,k=i.args;this.$u=g;var v=k[1];if(typeof v=="string"){var y=k[2]===!0,S=k[3]===!0,C=y||S,p=k[2];S&&(p=k[2]),be=this.$locale(),!y&&p&&(be=r.Ls[p]),this.$d=Ja(s,v,g,r),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),C&&s!=this.format(v)&&(this.$d=new Date("")),be={}}else if(v instanceof Array)for(var N=v.length,M=1;M<=N;M+=1){k[1]=v[M-1];var B=r.apply(this,k);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}M===N&&(this.$d=new Date(""))}else a.call(this,i)}},Ka=function(e,t){var r=t.prototype,n=r.format;r.format=function(a){var i=this,s=this.$locale();if(!this.isValid())return n.bind(this)(a);var g=this.$utils(),k=a||Wa,v=k.replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(y){switch(y){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return s.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return s.ordinal(i.week(),"W");case"w":case"ww":return g.s(i.week(),y==="w"?1:2,"0");case"W":case"WW":return g.s(i.isoWeek(),y==="W"?1:2,"0");case"k":case"kk":return g.s(String(i.$H===0?24:i.$H),y==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return y}});return n.bind(this)(v)}};var wt=function(){var e=f(function(A,u,d,b){for(d=d||{},b=A.length;b--;d[A[b]]=u);return d},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],a=[1,28],i=[1,29],s=[1,30],g=[1,31],k=[1,32],v=[1,33],y=[1,34],S=[1,9],C=[1,10],p=[1,11],N=[1,12],M=[1,13],B=[1,14],Q=[1,15],K=[1,16],R=[1,19],Z=[1,20],j=[1,21],w=[1,22],L=[1,23],D=[1,25],F=[1,35],_={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:f(function(u,d,b,m,E,c,h){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:a,15:i,16:s,17:g,18:k,19:18,20:v,21:y,22:S,23:C,24:p,25:N,26:M,27:B,28:Q,29:K,30:R,31:Z,33:j,35:w,36:L,37:24,38:D,40:F},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:n,14:a,15:i,16:s,17:g,18:k,19:18,20:v,21:y,22:S,23:C,24:p,25:N,26:M,27:B,28:Q,29:K,30:R,31:Z,33:j,35:w,36:L,37:24,38:D,40:F},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:f(function(u,d){if(d.recoverable)this.trace(u);else{var b=new Error(u);throw b.hash=d,b}},"parseError"),parse:f(function(u){var d=this,b=[0],m=[],E=[null],c=[],h=this.table,o="",P=0,O=0,V=2,ee=1,q=c.slice.call(arguments,1),X=Object.create(this.lexer),oe={yy:{}};for(var T in this.yy)Object.prototype.hasOwnProperty.call(this.yy,T)&&(oe.yy[T]=this.yy[T]);X.setInput(u,oe.yy),oe.yy.lexer=X,oe.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var I=X.yylloc;c.push(I);var W=X.options&&X.options.ranges;typeof oe.yy.parseError=="function"?this.parseError=oe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(ie){b.length=b.length-2*ie,E.length=E.length-ie,c.length=c.length-ie}f(l,"popStack");function re(){var ie;return ie=m.pop()||X.lex()||ee,typeof ie!="number"&&(ie instanceof Array&&(m=ie,ie=m.pop()),ie=d.symbols_[ie]||ie),ie}f(re,"lex");for(var U,G,z,ce,he={},Ge,de,Nt,Qe;;){if(G=b[b.length-1],this.defaultActions[G]?z=this.defaultActions[G]:((U===null||typeof U>"u")&&(U=re()),z=h[G]&&h[G][U]),typeof z>"u"||!z.length||!z[0]){var ot="";Qe=[];for(Ge in h[G])this.terminals_[Ge]&&Ge>V&&Qe.push("'"+this.terminals_[Ge]+"'");X.showPosition?ot="Parse error on line "+(P+1)+`: +`+X.showPosition()+` +Expecting `+Qe.join(", ")+", got '"+(this.terminals_[U]||U)+"'":ot="Parse error on line "+(P+1)+": Unexpected "+(U==ee?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(ot,{text:X.match,token:this.terminals_[U]||U,line:X.yylineno,loc:I,expected:Qe})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+U);switch(z[0]){case 1:b.push(U),E.push(X.yytext),c.push(X.yylloc),b.push(z[1]),U=null,O=X.yyleng,o=X.yytext,P=X.yylineno,I=X.yylloc;break;case 2:if(de=this.productions_[z[1]][1],he.$=E[E.length-de],he._$={first_line:c[c.length-(de||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(de||1)].first_column,last_column:c[c.length-1].last_column},W&&(he._$.range=[c[c.length-(de||1)].range[0],c[c.length-1].range[1]]),ce=this.performAction.apply(he,[o,O,P,oe.yy,z[1],E,c].concat(q)),typeof ce<"u")return ce;de&&(b=b.slice(0,-1*de*2),E=E.slice(0,-1*de),c=c.slice(0,-1*de)),b.push(this.productions_[z[1]][0]),E.push(he.$),c.push(he._$),Nt=h[b[b.length-2]][b[b.length-1]],b.push(Nt);break;case 3:return!0}}return!0},"parse")},Y=function(){var A={EOF:1,parseError:f(function(d,b){if(this.yy.parser)this.yy.parser.parseError(d,b);else throw new Error(d)},"parseError"),setInput:f(function(u,d){return this.yy=d||this.yy||{},this._input=u,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 u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var d=u.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:f(function(u){var d=u.length,b=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var m=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),b.length-1&&(this.yylineno-=b.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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),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(u){this.unput(this.match.slice(u))},"less"),pastInput:f(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var u=this.pastInput(),d=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:f(function(u,d){var b,m,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))),m=u[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],b=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var c in E)this[c]=E[c];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,d,b,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),c=0;cd[0].length)){if(d=b,m=c,this.options.backtrack_lexer){if(u=this.test_match(b,E[c]),u!==!1)return u;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(u=this.test_match(d,E[m]),u!==!1?u:!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 d=this.next();return d||this.lex()},"lex"),begin:f(function(d){this.conditionStack.push(d)},"begin"),popState:f(function(){var d=this.conditionStack.length-1;return d>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(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:f(function(d){this.begin(d)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(d,b,m,E){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return A}();_.lexer=Y;function x(){this.yy={}}return f(x,"Parser"),x.prototype=_,_.Parser=x,new x}();wt.parser=wt;var ei=wt;ae.extend(Ha);ae.extend($a);ae.extend(Ka);var rr={friday:5,saturday:6},ue="",Yt="",Ft=void 0,Ut="",Ze=[],qe=[],Et=new Map,It=[],it=[],Ae="",At="",_r=["active","done","crit","milestone"],Lt=[],Xe=!1,Wt=!1,Ot="sunday",st="saturday",Dt=0,ti=f(function(){It=[],it=[],Ae="",Lt=[],Ke=0,Mt=void 0,et=void 0,J=[],ue="",Yt="",At="",Ft=void 0,Ut="",Ze=[],qe=[],Xe=!1,Wt=!1,Dt=0,Et=new Map,Br(),Ot="sunday",st="saturday"},"clear"),ri=f(function(e){Yt=e},"setAxisFormat"),ni=f(function(){return Yt},"getAxisFormat"),ai=f(function(e){Ft=e},"setTickInterval"),ii=f(function(){return Ft},"getTickInterval"),si=f(function(e){Ut=e},"setTodayMarker"),oi=f(function(){return Ut},"getTodayMarker"),ci=f(function(e){ue=e},"setDateFormat"),li=f(function(){Xe=!0},"enableInclusiveEndDates"),ui=f(function(){return Xe},"endDatesAreInclusive"),fi=f(function(){Wt=!0},"enableTopAxis"),hi=f(function(){return Wt},"topAxisEnabled"),di=f(function(e){At=e},"setDisplayMode"),mi=f(function(){return At},"getDisplayMode"),gi=f(function(){return ue},"getDateFormat"),yi=f(function(e){Ze=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),ki=f(function(){return Ze},"getIncludes"),vi=f(function(e){qe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),pi=f(function(){return qe},"getExcludes"),Ti=f(function(){return Et},"getLinks"),bi=f(function(e){Ae=e,It.push(e)},"addSection"),xi=f(function(){return It},"getSections"),wi=f(function(){let e=nr();const t=10;let r=0;for(;!e&&r[\d\w- ]+)/.exec(r);if(a!==null){let s=null;for(const k of a.groups.ids.split(" ")){let v=Se(k);v!==void 0&&(!s||v.endTime>s.endTime)&&(s=v)}if(s)return s.endTime;const g=new Date;return g.setHours(0,0,0,0),g}let i=ae(r,t.trim(),!0);if(i.isValid())return i.toDate();{tt.debug("Invalid date:"+r),tt.debug("With date format:"+t.trim());const s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),Ur=f(function(e){const t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Er=f(function(e,t,r,n=!1){r=r.trim();const i=/^until\s+(?[\d\w- ]+)/.exec(r);if(i!==null){let y=null;for(const C of i.groups.ids.split(" ")){let p=Se(C);p!==void 0&&(!y||p.startTime{window.open(r,"_self")}),Et.set(n,r))}),Ar(e,"clickable")},"setLink"),Ar=f(function(e,t){e.split(",").forEach(function(r){let n=Se(r);n!==void 0&&n.classes.push(t)})},"setClass"),Ii=f(function(e,t,r){if(Ye().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i{Gr.runFunc(t,...n)})},"setClickFun"),Lr=f(function(e,t){Lt.push(function(){const r=document.querySelector(`[id="${e}"]`);r!==null&&r.addEventListener("click",function(){t()})},function(){const r=document.querySelector(`[id="${e}-text"]`);r!==null&&r.addEventListener("click",function(){t()})})},"pushFun"),Ai=f(function(e,t,r){e.split(",").forEach(function(n){Ii(n,t,r)}),Ar(e,"clickable")},"setClickEvent"),Li=f(function(e){Lt.forEach(function(t){t(e)})},"bindFunctions"),Wi={getConfig:f(()=>Ye().gantt,"getConfig"),clear:ti,setDateFormat:ci,getDateFormat:gi,enableInclusiveEndDates:li,endDatesAreInclusive:ui,enableTopAxis:fi,topAxisEnabled:hi,setAxisFormat:ri,getAxisFormat:ni,setTickInterval:ai,getTickInterval:ii,setTodayMarker:si,getTodayMarker:oi,setAccTitle:Hr,getAccTitle:Nr,setDiagramTitle:Vr,getDiagramTitle:Pr,setDisplayMode:di,getDisplayMode:mi,setAccDescription:zr,getAccDescription:Rr,addSection:bi,getSections:xi,getTasks:wi,addTask:Fi,findTaskById:Se,addTaskOrg:Ui,setIncludes:yi,getIncludes:ki,setExcludes:vi,getExcludes:pi,setClickEvent:Ai,setLink:Ei,getLinks:Ti,bindFunctions:Li,parseDuration:Ur,isInvalidDate:Yr,setWeekday:Di,getWeekday:Ci,setWeekend:Mi};function Ht(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(a){const i="^\\s*"+a+"\\s*$",s=new RegExp(i);e[0].match(s)&&(t[a]=!0,e.shift(1),n=!0)})}f(Ht,"getTaskTags");var Oi=f(function(){tt.debug("Something is calling, setConf, remove the call")},"setConf"),ar={monday:ze,tuesday:kr,wednesday:vr,thursday:we,friday:pr,saturday:Tr,sunday:Be},Hi=f((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((i,s)=>i.startTime-s.startTime||i.order-s.order),a=0;for(const i of n)for(let s=0;s=r[s]){r[s]=i.endTime,i.order=s+t,s>a&&(a=s);break}return a},"getMaxIntersections"),me,Ni=f(function(e,t,r,n){const a=Ye().gantt,i=Ye().securityLevel;let s;i==="sandbox"&&(s=je("#i"+t));const g=i==="sandbox"?je(s.nodes()[0].contentDocument.body):je("body"),k=i==="sandbox"?s.nodes()[0].contentDocument:document,v=k.getElementById(t);me=v.parentElement.offsetWidth,me===void 0&&(me=1200),a.useWidth!==void 0&&(me=a.useWidth);const y=n.db.getTasks();let S=[];for(const D of y)S.push(D.type);S=L(S);const C={};let p=2*a.topPadding;if(n.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const D={};for(const _ of y)D[_.section]===void 0?D[_.section]=[_]:D[_.section].push(_);let F=0;for(const _ of Object.keys(D)){const Y=Hi(D[_],F)+1;F+=Y,p+=Y*(a.barHeight+a.barGap),C[_]=Y}}else{p+=y.length*(a.barHeight+a.barGap);for(const D of S)C[D]=y.filter(F=>F.type===D).length}v.setAttribute("viewBox","0 0 "+me+" "+p);const N=g.select(`[id="${t}"]`),M=Ia().domain([tn(y,function(D){return D.startTime}),en(y,function(D){return D.endTime})]).rangeRound([0,me-a.leftPadding-a.rightPadding]);function B(D,F){const _=D.startTime,Y=F.startTime;let x=0;return _>Y?x=1:_h.order))].map(h=>D.find(o=>o.order===h));N.append("g").selectAll("rect").data(b).enter().append("rect").attr("x",0).attr("y",function(h,o){return o=h.order,o*F+_-2}).attr("width",function(){return u-a.rightPadding/2}).attr("height",F).attr("class",function(h){for(const[o,P]of S.entries())if(h.type===P)return"section section"+o%a.numberSectionStyles;return"section section0"});const m=N.append("g").selectAll("rect").data(D).enter(),E=n.db.getLinks();if(m.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?M(h.startTime)+Y+.5*(M(h.endTime)-M(h.startTime))-.5*x:M(h.startTime)+Y}).attr("y",function(h,o){return o=h.order,o*F+_}).attr("width",function(h){return h.milestone?x:M(h.renderEndTime||h.endTime)-M(h.startTime)}).attr("height",x).attr("transform-origin",function(h,o){return o=h.order,(M(h.startTime)+Y+.5*(M(h.endTime)-M(h.startTime))).toString()+"px "+(o*F+_+.5*x).toString()+"px"}).attr("class",function(h){const o="task";let P="";h.classes.length>0&&(P=h.classes.join(" "));let O=0;for(const[ee,q]of S.entries())h.type===q&&(O=ee%a.numberSectionStyles);let V="";return h.active?h.crit?V+=" activeCrit":V=" active":h.done?h.crit?V=" doneCrit":V=" done":h.crit&&(V+=" crit"),V.length===0&&(V=" task"),h.milestone&&(V=" milestone "+V),V+=O,V+=" "+P,o+V}),m.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",a.fontSize).attr("x",function(h){let o=M(h.startTime),P=M(h.renderEndTime||h.endTime);h.milestone&&(o+=.5*(M(h.endTime)-M(h.startTime))-.5*x),h.milestone&&(P=o+x);const O=this.getBBox().width;return O>P-o?P+O+1.5*a.leftPadding>u?o+Y-5:P+Y+5:(P-o)/2+o+Y}).attr("y",function(h,o){return o=h.order,o*F+a.barHeight/2+(a.fontSize/2-2)+_}).attr("text-height",x).attr("class",function(h){const o=M(h.startTime);let P=M(h.endTime);h.milestone&&(P=o+x);const O=this.getBBox().width;let V="";h.classes.length>0&&(V=h.classes.join(" "));let ee=0;for(const[X,oe]of S.entries())h.type===oe&&(ee=X%a.numberSectionStyles);let q="";return h.active&&(h.crit?q="activeCritText"+ee:q="activeText"+ee),h.done?h.crit?q=q+" doneCritText"+ee:q=q+" doneText"+ee:h.crit&&(q=q+" critText"+ee),h.milestone&&(q+=" milestoneText"),O>P-o?P+O+1.5*a.leftPadding>u?V+" taskTextOutsideLeft taskTextOutside"+ee+" "+q:V+" taskTextOutsideRight taskTextOutside"+ee+" "+q+" width-"+O:V+" taskText taskText"+ee+" "+q+" width-"+O}),Ye().securityLevel==="sandbox"){let h;h=je("#i"+t);const o=h.nodes()[0].contentDocument;m.filter(function(P){return E.has(P.id)}).each(function(P){var O=o.querySelector("#"+P.id),V=o.querySelector("#"+P.id+"-text");const ee=O.parentNode;var q=o.createElement("a");q.setAttribute("xlink:href",E.get(P.id)),q.setAttribute("target","_top"),ee.appendChild(q),q.appendChild(O),q.appendChild(V)})}}f(K,"drawRects");function R(D,F,_,Y,x,A,u,d){if(u.length===0&&d.length===0)return;let b,m;for(const{startTime:O,endTime:V}of A)(b===void 0||Om)&&(m=V);if(!b||!m)return;if(ae(m).diff(ae(b),"year")>5){tt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const E=n.db.getDateFormat(),c=[];let h=null,o=ae(b);for(;o.valueOf()<=m;)n.db.isInvalidDate(o,E,u,d)?h?h.end=o:h={start:o,end:o}:h&&(c.push(h),h=null),o=o.add(1,"d");N.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",function(O){return"exclude-"+O.start.format("YYYY-MM-DD")}).attr("x",function(O){return M(O.start)+_}).attr("y",a.gridLineStartPadding).attr("width",function(O){const V=O.end.add(1,"day");return M(V)-M(O.start)}).attr("height",x-F-a.gridLineStartPadding).attr("transform-origin",function(O,V){return(M(O.start)+_+.5*(M(O.end)-M(O.start))).toString()+"px "+(V*D+.5*x).toString()+"px"}).attr("class","exclude-range")}f(R,"drawExcludeDays");function Z(D,F,_,Y){let x=un(M).tickSize(-Y+F+a.gridLineStartPadding).tickFormat(at(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(u!==null){const d=u[1],b=u[2],m=n.db.getWeekday()||a.weekday;switch(b){case"millisecond":x.ticks(Ee.every(d));break;case"second":x.ticks(Te.every(d));break;case"minute":x.ticks(Ve.every(d));break;case"hour":x.ticks(Pe.every(d));break;case"day":x.ticks(xe.every(d));break;case"week":x.ticks(ar[m].every(d));break;case"month":x.ticks(Re.every(d));break}}if(N.append("g").attr("class","grid").attr("transform","translate("+D+", "+(Y-50)+")").call(x).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let d=ln(M).tickSize(-Y+F+a.gridLineStartPadding).tickFormat(at(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(u!==null){const b=u[1],m=u[2],E=n.db.getWeekday()||a.weekday;switch(m){case"millisecond":d.ticks(Ee.every(b));break;case"second":d.ticks(Te.every(b));break;case"minute":d.ticks(Ve.every(b));break;case"hour":d.ticks(Pe.every(b));break;case"day":d.ticks(xe.every(b));break;case"week":d.ticks(ar[E].every(b));break;case"month":d.ticks(Re.every(b));break}}N.append("g").attr("class","grid").attr("transform","translate("+D+", "+F+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}f(Z,"makeGrid");function j(D,F){let _=0;const Y=Object.keys(C).map(x=>[x,C[x]]);N.append("g").selectAll("text").data(Y).enter().append(function(x){const A=x[0].split(Xr.lineBreakRegex),u=-(A.length-1)/2,d=k.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("dy",u+"em");for(const[b,m]of A.entries()){const E=k.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),b>0&&E.setAttribute("dy","1em"),E.textContent=m,d.appendChild(E)}return d}).attr("x",10).attr("y",function(x,A){if(A>0)for(let u=0;u` + .mermaid-main-font { + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } +`,"getStyles"),zi=Pi,Gi={parser:ei,db:Wi,renderer:Vi,styles:zi};export{Gi as diagram}; diff --git a/pr-528/assets/chunks/gitGraph-YCYPL57B.DhPOFTVl.js b/pr-528/assets/chunks/gitGraph-YCYPL57B.DhPOFTVl.js new file mode 100644 index 000000000..3531d2a63 --- /dev/null +++ b/pr-528/assets/chunks/gitGraph-YCYPL57B.DhPOFTVl.js @@ -0,0 +1,127 @@ +var Fl=Object.defineProperty;var Gl=(n,e,t)=>e in n?Fl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Je=(n,e,t)=>Gl(n,typeof e!="symbol"?e+"":e,t);import{V as tn}from"./framework.B8-VHxRu.js";import{bz as Ul,bA as Bl,aQ as so,bj as Vl,aU as Wl,aR as Z,aA as jl,aB as Ji,b9 as Hl,bc as ao,bd as oo,bo as Qi,ba as Kl,aD as mt,aE as D,aS as Zi,aM as zl}from"../app.CKrDwBa1.js";import{k as Mt,l as Ti,g as Kt,S as ql,w as Yl,x as Xl,c as co,v as K,y as lo,m as Jl,z as Ql,A as Zl,B as eu,C as tu,a as uo,d as C,i as ze,h as _,r as oe,f as ve,D as q}from"./baseUniq.HRNeWzar.js";import{i as Ri,m as S,d as nu,f as Ne,g as Dt,h as Ai,l as Ft,e as ru}from"./basePickBy.nUpO2mqN.js";import{c as te}from"./clone.BlcZCRmq.js";var iu=Object.prototype,su=iu.hasOwnProperty,Ae=Ul(function(n,e){if(Bl(e)||so(e)){Vl(e,Mt(e),n);return}for(var t in e)su.call(e,t)&&Wl(n,t,e[t])});function fo(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++r=lu&&(s=Xl,a=!1,e=new ql(e));e:for(;++i-1:!!i&&lo(n,e,t)>-1}function es(n,e,t){var r=n==null?0:n.length;if(!r)return-1;var i=0;return lo(n,e,i)}var Tu="[object RegExp]";function Ru(n){return ao(n)&&oo(n)==Tu}var ts=Qi&&Qi.isRegExp,qe=ts?Kl(ts):Ru,Au="Expected a function";function vu(n){if(typeof n!="function")throw new TypeError(Au);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Pe(n,e){if(n==null)return{};var t=Jl(Ql(n),function(r){return[r]});return e=Kt(e),nu(n,t,function(r,i){return e(r,i[0])})}function rr(n,e){var t=Z(n)?Zl:eu;return t(n,vu(Kt(e)))}function Eu(n,e){var t;return Ti(n,function(r,i,s){return t=e(r,i,s),!t}),!!t}function ho(n,e,t){var r=Z(n)?tu:Eu;return r(n,Kt(e))}function vi(n){return n&&n.length?uo(n):[]}function ku(n,e){return n&&n.length?uo(n,Kt(e)):[]}function ae(n){return typeof n=="object"&&n!==null&&typeof n.$type=="string"}function Ge(n){return typeof n=="object"&&n!==null&&typeof n.$refText=="string"}function Su(n){return typeof n=="object"&&n!==null&&typeof n.name=="string"&&typeof n.type=="string"&&typeof n.path=="string"}function xn(n){return typeof n=="object"&&n!==null&&ae(n.container)&&Ge(n.reference)&&typeof n.message=="string"}class po{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return ae(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[t];if(i!==void 0)return i;{const s=this.computeIsSubtype(e,t);return r[t]=s,s}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Gt(n){return typeof n=="object"&&n!==null&&Array.isArray(n.content)}function mo(n){return typeof n=="object"&&n!==null&&typeof n.tokenType=="object"}function go(n){return Gt(n)&&typeof n.fullText=="string"}class ie{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do r=t.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(i=>[e?e(i):i,t?t(i):i]);return new Map(r)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new ie(()=>({first:this.startFn(),firstDone:!1}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=t.next(),!i.done)return i;while(!i.done);return xe})}join(e=","){const t=this.iterator();let r="",i,s=!1;do i=t.next(),i.done||(s&&(r+=e),r+=Iu(i.value)),s=!0;while(!i.done);return r}indexOf(e,t=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=t&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(e){return new ie(this.startFn,t=>{const{done:r,value:i}=this.nextFn(t);return r?xe:{done:!1,value:e(i)}})}filter(e){return new ie(this.startFn,t=>{let r;do if(r=this.nextFn(t),!r.done&&e(r.value))return r;while(!r.done);return xe})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){const r=this.iterator();let i=t,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,t,r);return s===void 0?i.value:t(s,i.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(e){return new ie(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const s=t.iterator.next();if(s.done)t.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(t.this);if(!r){const s=e(i);if($n(s))t.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(t.iterator);return xe})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new ie(()=>({this:t.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=t.nextFn(r.this);if(!i)if($n(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return xe})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(e=1){return new ie(()=>{const t=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?xe:this.nextFn(t.state)))}distinct(e){const t=new Set;return this.filter(r=>{const i=e?e(r):r;return t.has(i)?!1:(t.add(i),!0)})}exclude(e,t){const r=new Set;for(const i of e){const s=t?t(i):i;r.add(s)}return this.filter(i=>{const s=t?t(i):i;return!r.has(s)})}}function Iu(n){return typeof n=="string"?n:typeof n>"u"?"undefined":typeof n.toString=="function"?n.toString():Object.prototype.toString.call(n)}function $n(n){return!!n&&typeof n[Symbol.iterator]=="function"}const xu=new ie(()=>{},()=>xe),xe=Object.freeze({done:!0,value:void 0});function Q(...n){if(n.length===1){const e=n[0];if(e instanceof ie)return e;if($n(e))return new ie(()=>e[Symbol.iterator](),t=>t.next());if(typeof e.length=="number")return new ie(()=>({index:0}),t=>t.index1?new ie(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(t(a.value)[Symbol.iterator]()),a}return xe})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var br;(function(n){function e(s){return s.reduce((a,o)=>a+o,0)}n.sum=e;function t(s){return s.reduce((a,o)=>a*o,0)}n.product=t;function r(s){return s.reduce((a,o)=>Math.min(a,o))}n.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}n.max=i})(br||(br={}));function Pr(n){return new Ei(n,e=>Gt(e)?e.content:[],{includeRoot:!0})}function Nu(n,e){for(;n.container;)if(n=n.container,n===e)return!0;return!1}function Mr(n){return{start:{character:n.startColumn-1,line:n.startLine-1},end:{character:n.endColumn,line:n.endLine-1}}}function On(n){if(!n)return;const{offset:e,end:t,range:r}=n;return{range:r,offset:e,end:t,length:t-e}}var Ze;(function(n){n[n.Before=0]="Before",n[n.After=1]="After",n[n.OverlapFront=2]="OverlapFront",n[n.OverlapBack=3]="OverlapBack",n[n.Inside=4]="Inside"})(Ze||(Ze={}));function Cu(n,e){if(n.end.linee.end.line||n.start.line===e.end.line&&n.start.character>e.end.character)return Ze.After;const t=n.start.line>e.start.line||n.start.line===e.start.line&&n.start.character>=e.start.character,r=n.end.lineZe.After}const wu=/^[\w\p{L}]$/u;function Lu(n,e){if(n){const t=$u(n,!0);if(t&&ns(t,e))return t;if(go(n)){const r=n.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=n.content[i];if(ns(s,e))return s}}}}function ns(n,e){return mo(n)&&e.includes(n.tokenType.name)}function $u(n,e=!0){for(;n.container;){const t=n.container;let r=t.content.indexOf(n);for(;r>0;){r--;const i=t.content[r];if(e||!i.hidden)return i}n=t}}class yo extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function ir(n){throw new Error("Error! The input value was not handled.")}const Ar="AbstractRule",vr="AbstractType",rs="Condition",Ou="TypeDefinition",is="ValueLiteral",To="AbstractElement";function bu(n){return M.isInstance(n,To)}const Pu="ArrayLiteral",Mu="ArrayType",Ro="BooleanLiteral";function Du(n){return M.isInstance(n,Ro)}const Ao="Conjunction";function Fu(n){return M.isInstance(n,Ao)}const vo="Disjunction";function Gu(n){return M.isInstance(n,vo)}const Uu="Grammar",Eo="InferredType";function ko(n){return M.isInstance(n,Eo)}const So="Interface";function Io(n){return M.isInstance(n,So)}const xo="Negation";function Bu(n){return M.isInstance(n,xo)}const Vu="NumberLiteral",Wu="Parameter",No="ParameterReference";function ju(n){return M.isInstance(n,No)}const Co="ParserRule";function Ce(n){return M.isInstance(n,Co)}const Hu="ReferenceType",Ku="ReturnType";function zu(n){return M.isInstance(n,Ku)}const _o="SimpleType";function qu(n){return M.isInstance(n,_o)}const Yu="StringLiteral",Dr="TerminalRule";function gt(n){return M.isInstance(n,Dr)}const wo="Type";function Lo(n){return M.isInstance(n,wo)}const Xu="UnionType",$o="Action";function sr(n){return M.isInstance(n,$o)}const Oo="Alternatives";function bo(n){return M.isInstance(n,Oo)}const Po="Assignment";function ut(n){return M.isInstance(n,Po)}const Mo="CharacterRange";function Ju(n){return M.isInstance(n,Mo)}const Do="CrossReference";function ki(n){return M.isInstance(n,Do)}const Fo="EndOfFile";function Qu(n){return M.isInstance(n,Fo)}const Go="Group";function Si(n){return M.isInstance(n,Go)}const Uo="Keyword";function dt(n){return M.isInstance(n,Uo)}const Bo="NegatedToken";function Zu(n){return M.isInstance(n,Bo)}const Vo="RegexToken";function ed(n){return M.isInstance(n,Vo)}const Wo="RuleCall";function ft(n){return M.isInstance(n,Wo)}const jo="TerminalAlternatives";function td(n){return M.isInstance(n,jo)}const Ho="TerminalGroup";function nd(n){return M.isInstance(n,Ho)}const Ko="TerminalRuleCall";function rd(n){return M.isInstance(n,Ko)}const zo="UnorderedGroup";function qo(n){return M.isInstance(n,zo)}const Yo="UntilToken";function id(n){return M.isInstance(n,Yo)}const Xo="Wildcard";function sd(n){return M.isInstance(n,Xo)}class Jo extends po{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case $o:case Oo:case Po:case Mo:case Do:case Fo:case Go:case Uo:case Bo:case Vo:case Wo:case jo:case Ho:case Ko:case zo:case Yo:case Xo:return this.isSubtype(To,t);case Pu:case Vu:case Yu:return this.isSubtype(is,t);case Mu:case Hu:case _o:case Xu:return this.isSubtype(Ou,t);case Ro:return this.isSubtype(rs,t)||this.isSubtype(is,t);case Ao:case vo:case xo:case No:return this.isSubtype(rs,t);case Eo:case So:case wo:return this.isSubtype(vr,t);case Co:return this.isSubtype(Ar,t)||this.isSubtype(vr,t);case Dr:return this.isSubtype(Ar,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return vr;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Ar;case"Grammar:usedGrammars":return Uu;case"NamedArgument:parameter":case"ParameterReference:parameter":return Wu;case"TerminalRuleCall:rule":return Dr;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const M=new Jo;function ad(n){for(const[e,t]of Object.entries(n))e.startsWith("$")||(Array.isArray(t)?t.forEach((r,i)=>{ae(r)&&(r.$container=n,r.$containerProperty=e,r.$containerIndex=i)}):ae(t)&&(t.$container=n,t.$containerProperty=e))}function ar(n,e){let t=n;for(;t;){if(e(t))return t;t=t.$container}}function Ue(n){const t=od(n).$document;if(!t)throw new Error("AST node has no document.");return t}function od(n){for(;n.$container;)n=n.$container;return n}function Ii(n,e){if(!n)throw new Error("Node must be an AstNode.");const t=e==null?void 0:e.range;return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndexIi(t,e))}function vt(n,e){if(!n)throw new Error("Root node must be an AstNode.");return new Ei(n,t=>Ii(t,e),{includeRoot:!0})}function ss(n,e){var t;if(!e)return!0;const r=(t=n.$cstNode)===null||t===void 0?void 0:t.range;return r?_u(r,e):!1}function Qo(n){return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class or{visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const fd=/\r?\n/gm,hd=new ec;class pd extends or{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=cr(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const kr=new pd;function md(n){try{return typeof n=="string"&&(n=new RegExp(n)),n=n.toString(),kr.reset(n),kr.visit(hd.pattern(n)),kr.multiline}catch{return!1}}function cs(n){return(typeof n=="string"?new RegExp(n):n).test(" ")}function cr(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gd(n){return Array.prototype.map.call(n,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:cr(e)).join("")}function yd(n,e){const t=Td(n),r=e.match(t);return!!r&&r[0].length>0}function Td(n){typeof n=="string"&&(n=new RegExp(n));const e=n,t=n.source;let r=0;function i(){let s="",a;function o(l){s+=t.substr(r,l),r+=l}function c(l){s+="(?:"+t.substr(r,l)+"|$)",r+=l}for(;r",r)-r+1);break;default:c(2);break}break;case"[":a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(t)||[],c(a[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(t),a?o(a[0].length):c(1);break;case"(":if(t[r+1]==="?")switch(t[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":a=r,r+=3,i(),s+=t.substr(a,r-a);break;case"<":switch(t[r+3]){case"=":case"!":a=r,r+=4,i(),s+=t.substr(a,r-a);break;default:o(t.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:c(1);break}return s}return new RegExp(i(),n.flags)}function Rd(n){return n.rules.find(e=>Ce(e)&&e.entry)}function Ad(n){return n.rules.filter(e=>gt(e)&&e.hidden)}function tc(n,e){const t=new Set,r=Rd(n);if(!r)return new Set(n.rules);const i=[r].concat(Ad(n));for(const a of i)nc(a,t,e);const s=new Set;for(const a of n.rules)(t.has(a.name)||gt(a)&&a.hidden)&&s.add(a);return s}function nc(n,e,t){e.add(n.name),pn(n).forEach(r=>{if(ft(r)||t){const i=r.rule.ref;i&&!e.has(i.name)&&nc(i,e,t)}})}function vd(n){if(n.terminal)return n.terminal;if(n.type.ref){const e=ic(n.type.ref);return e==null?void 0:e.terminal}}function Ed(n){return n.hidden&&!Ci(n).test(" ")}function kd(n,e){return!n||!e?[]:xi(n,e,n.astNode,!0)}function rc(n,e,t){if(!n||!e)return;const r=xi(n,e,n.astNode,!0);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function xi(n,e,t,r){if(!r){const i=ar(n.grammarSource,ut);if(i&&i.feature===e)return[n]}return Gt(n)&&n.astNode===t?n.content.flatMap(i=>xi(i,e,t,!1)):[]}function Sd(n,e,t){if(!n)return;const r=Id(n,e,n==null?void 0:n.astNode);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function Id(n,e,t){if(n.astNode!==t)return[];if(dt(n.grammarSource)&&n.grammarSource.value===e)return[n];const r=Pr(n).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===t?dt(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function xd(n){var e;const t=n.astNode;for(;t===((e=n.container)===null||e===void 0?void 0:e.astNode);){const r=ar(n.grammarSource,ut);if(r)return r;n=n.container}}function ic(n){let e=n;return ko(e)&&(sr(e.$container)?e=e.$container.$container:Ce(e.$container)?e=e.$container:ir(e.$container)),sc(n,e,new Map)}function sc(n,e,t){var r;function i(s,a){let o;return ar(s,ut)||(o=sc(a,a,t)),t.set(n,o),o}if(t.has(n))return t.get(n);t.set(n,void 0);for(const s of pn(e)){if(ut(s)&&s.feature.toLowerCase()==="name")return t.set(n,s),s;if(ft(s)&&Ce(s.rule.ref))return i(s,s.rule.ref);if(qu(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function Ni(n){return ac(n,new Set)}function ac(n,e){if(e.has(n))return!0;e.add(n);for(const t of pn(n))if(ft(t)){if(!t.rule.ref||Ce(t.rule.ref)&&!ac(t.rule.ref,e))return!1}else{if(ut(t))return!1;if(sr(t))return!1}return!!n.definition}function oc(n){if(n.inferredType)return n.inferredType.name;if(n.dataType)return n.dataType;if(n.returnType){const e=n.returnType.ref;if(e){if(Ce(e))return e.name;if(Io(e)||Lo(e))return e.name}}}function lr(n){var e;if(Ce(n))return Ni(n)?n.name:(e=oc(n))!==null&&e!==void 0?e:n.name;if(Io(n)||Lo(n)||zu(n))return n.name;if(sr(n)){const t=Nd(n);if(t)return t}else if(ko(n))return n.name;throw new Error("Cannot get name of Unknown Type")}function Nd(n){var e;if(n.inferredType)return n.inferredType.name;if(!((e=n.type)===null||e===void 0)&&e.ref)return lr(n.type.ref)}function Cd(n){var e,t,r;return gt(n)?(t=(e=n.type)===null||e===void 0?void 0:e.name)!==null&&t!==void 0?t:"string":Ni(n)?n.name:(r=oc(n))!==null&&r!==void 0?r:n.name}function Ci(n){const e={s:!1,i:!1,u:!1},t=zt(n.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(t,r)}const _i=/[\s\S]/.source;function zt(n,e){if(td(n))return _d(n);if(nd(n))return wd(n);if(Ju(n))return Od(n);if(rd(n)){const t=n.rule.ref;if(!t)throw new Error("Missing rule reference.");return Ke(zt(t.definition),{cardinality:n.cardinality,lookahead:n.lookahead})}else{if(Zu(n))return $d(n);if(id(n))return Ld(n);if(ed(n)){const t=n.regex.lastIndexOf("/"),r=n.regex.substring(1,t),i=n.regex.substring(t+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Ke(r,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}else{if(sd(n))return Ke(_i,{cardinality:n.cardinality,lookahead:n.lookahead});throw new Error(`Invalid terminal element: ${n==null?void 0:n.$type}`)}}}function _d(n){return Ke(n.elements.map(e=>zt(e)).join("|"),{cardinality:n.cardinality,lookahead:n.lookahead})}function wd(n){return Ke(n.elements.map(e=>zt(e)).join(""),{cardinality:n.cardinality,lookahead:n.lookahead})}function Ld(n){return Ke(`${_i}*?${zt(n.terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead})}function $d(n){return Ke(`(?!${zt(n.terminal)})${_i}*?`,{cardinality:n.cardinality,lookahead:n.lookahead})}function Od(n){return n.right?Ke(`[${Sr(n.left)}-${Sr(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):Ke(Sr(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}function Sr(n){return cr(n.value)}function Ke(n,e){var t;return(e.wrap!==!1||e.lookahead)&&(n=`(${(t=e.lookahead)!==null&&t!==void 0?t:""}${n})`),e.cardinality?`${n}${e.cardinality}`:n}function bd(n){const e=[],t=n.Grammar;for(const r of t.rules)gt(r)&&Ed(r)&&md(Ci(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:wu}}function Fr(n){console&&console.error&&console.error(`Error: ${n}`)}function cc(n){console&&console.warn&&console.warn(`Warning: ${n}`)}function lc(n){const e=new Date().getTime(),t=n();return{time:new Date().getTime()-e,value:t}}function uc(n){function e(){}e.prototype=n;const t=new e;function r(){return typeof t.bar}return r(),r(),n}function Pd(n){return Md(n)?n.LABEL:n.name}function Md(n){return fe(n.LABEL)&&n.LABEL!==""}class Be{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),C(this.definition,t=>{t.accept(e)})}}class ce extends Be{constructor(e){super([]),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class qt extends Be{constructor(e){super(e.definition),this.orgText="",Ae(this,Pe(e,t=>t!==void 0))}}class he extends Be{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Ae(this,Pe(e,t=>t!==void 0))}}class ee extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class Ee extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class ke extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class W extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class pe extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class me extends Be{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ae(this,Pe(e,t=>t!==void 0))}}class G{constructor(e){this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}accept(e){e.visit(this)}}function Dd(n){return S(n,Nn)}function Nn(n){function e(t){return S(t,Nn)}if(n instanceof ce){const t={type:"NonTerminal",name:n.nonTerminalName,idx:n.idx};return fe(n.label)&&(t.label=n.label),t}else{if(n instanceof he)return{type:"Alternative",definition:e(n.definition)};if(n instanceof ee)return{type:"Option",idx:n.idx,definition:e(n.definition)};if(n instanceof Ee)return{type:"RepetitionMandatory",idx:n.idx,definition:e(n.definition)};if(n instanceof ke)return{type:"RepetitionMandatoryWithSeparator",idx:n.idx,separator:Nn(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof pe)return{type:"RepetitionWithSeparator",idx:n.idx,separator:Nn(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof W)return{type:"Repetition",idx:n.idx,definition:e(n.definition)};if(n instanceof me)return{type:"Alternation",idx:n.idx,definition:e(n.definition)};if(n instanceof G){const t={type:"Terminal",name:n.terminalType.name,label:Pd(n.terminalType),idx:n.idx};fe(n.label)&&(t.terminalLabel=n.label);const r=n.terminalType.PATTERN;return n.terminalType.PATTERN&&(t.pattern=qe(r)?r.source:r),t}else{if(n instanceof qt)return{type:"Rule",name:n.name,orgText:n.orgText,definition:e(n.definition)};throw Error("non exhaustive match")}}}class Yt{visit(e){const t=e;switch(t.constructor){case ce:return this.visitNonTerminal(t);case he:return this.visitAlternative(t);case ee:return this.visitOption(t);case Ee:return this.visitRepetitionMandatory(t);case ke:return this.visitRepetitionMandatoryWithSeparator(t);case pe:return this.visitRepetitionWithSeparator(t);case W:return this.visitRepetition(t);case me:return this.visitAlternation(t);case G:return this.visitTerminal(t);case qt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Fd(n){return n instanceof he||n instanceof ee||n instanceof W||n instanceof Ee||n instanceof ke||n instanceof pe||n instanceof G||n instanceof qt}function Mn(n,e=[]){return n instanceof ee||n instanceof W||n instanceof pe?!0:n instanceof me?ho(n.definition,r=>Mn(r,e)):n instanceof ce&&ue(e,n)?!1:n instanceof Be?(n instanceof ce&&e.push(n),$e(n.definition,r=>Mn(r,e))):!1}function Gd(n){return n instanceof me}function Fe(n){if(n instanceof ce)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Ee)return"AT_LEAST_ONE";if(n instanceof ke)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof W)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}class ur{walk(e,t=[]){C(e.definition,(r,i)=>{const s=J(e.definition,i+1);if(r instanceof ce)this.walkProdRef(r,s,t);else if(r instanceof G)this.walkTerminal(r,s,t);else if(r instanceof he)this.walkFlat(r,s,t);else if(r instanceof ee)this.walkOption(r,s,t);else if(r instanceof Ee)this.walkAtLeastOne(r,s,t);else if(r instanceof ke)this.walkAtLeastOneSep(r,s,t);else if(r instanceof pe)this.walkManySep(r,s,t);else if(r instanceof W)this.walkMany(r,s,t);else if(r instanceof me)this.walkOr(r,s,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const i=t.concat(r);this.walk(e,i)}walkOption(e,t,r){const i=t.concat(r);this.walk(e,i)}walkAtLeastOne(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkAtLeastOneSep(e,t,r){const i=ls(e,t,r);this.walk(e,i)}walkMany(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkManySep(e,t,r){const i=ls(e,t,r);this.walk(e,i)}walkOr(e,t,r){const i=t.concat(r);C(e.definition,s=>{const a=new he({definition:[s]});this.walk(a,i)})}}function ls(n,e,t){return[new ee({definition:[new G({terminalType:n.separator})].concat(n.definition)})].concat(e,t)}function mn(n){if(n instanceof ce)return mn(n.referencedRule);if(n instanceof G)return Vd(n);if(Fd(n))return Ud(n);if(Gd(n))return Bd(n);throw Error("non exhaustive match")}function Ud(n){let e=[];const t=n.definition;let r=0,i=t.length>r,s,a=!0;for(;i&&a;)s=t[r],a=Mn(s),e=e.concat(mn(s)),r=r+1,i=t.length>r;return vi(e)}function Bd(n){const e=S(n.definition,t=>mn(t));return vi(Ne(e))}function Vd(n){return[n.terminalType]}const dc="_~IN~_";class Wd extends ur{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const i=Hd(e.referencedRule,e.idx)+this.topProd.name,s=t.concat(r),a=new he({definition:s}),o=mn(a);this.follows[i]=o}}function jd(n){const e={};return C(n,t=>{const r=new Wd(t).startWalking();Ae(e,r)}),e}function Hd(n,e){return n.name+e+dc}let Cn={};const Kd=new ec;function dr(n){const e=n.toString();if(Cn.hasOwnProperty(e))return Cn[e];{const t=Kd.pattern(e);return Cn[e]=t,t}}function zd(){Cn={}}const fc="Complement Sets are not supported for first char optimization",Dn=`Unable to use "first char" lexer optimizations: +`;function qd(n,e=!1){try{const t=dr(n);return Gr(t.value,{},t.flags.ignoreCase)}catch(t){if(t.message===fc)e&&cc(`${Dn} Unable to optimize: < ${n.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Fr(`${Dn} + Failed parsing: < ${n.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Gr(n,e,t){switch(n.type){case"Disjunction":for(let i=0;i{if(typeof c=="number")kn(c,e,t);else{const l=c;if(t===!0)for(let u=l.from;u<=l.to;u++)kn(u,e,t);else{for(let u=l.from;u<=l.to&&u=on){const u=l.from>=on?l.from:on,d=l.to,f=et(u),h=et(d);for(let m=f;m<=h;m++)e[m]=m}}}});break;case"Group":Gr(a.value,e,t);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Ur(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return K(e)}function kn(n,e,t){const r=et(n);e[r]=r,t===!0&&Yd(n,e)}function Yd(n,e){const t=String.fromCharCode(n),r=t.toUpperCase();if(r!==t){const i=et(r.charCodeAt(0));e[i]=i}else{const i=t.toLowerCase();if(i!==t){const s=et(i.charCodeAt(0));e[s]=s}}}function us(n,e){return Dt(n.value,t=>{if(typeof t=="number")return ue(e,t);{const r=t;return Dt(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Ur(n){const e=n.quantifier;return e&&e.atLeast===0?!0:n.value?Z(n.value)?$e(n.value,Ur):Ur(n.value):!1}class Xd extends or{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){ue(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?us(e,this.targetCharCodes)===void 0&&(this.found=!0):us(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function wi(n,e){if(e instanceof RegExp){const t=dr(e),r=new Xd(n);return r.visit(t),r.found}else return Dt(e,t=>ue(n,t.charCodeAt(0)))!==void 0}const ht="PATTERN",an="defaultMode",Sn="modes";let hc=typeof new RegExp("(?:)").sticky=="boolean";function Jd(n,e){e=Ai(e,{useSticky:hc,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:(v,R)=>R()});const t=e.tracer;t("initCharCodeToOptimizedIndexMap",()=>{vf()});let r;t("Reject Lexer.NA",()=>{r=rr(n,v=>v[ht]===de.NA)});let i=!1,s;t("Transform Patterns",()=>{i=!1,s=S(r,v=>{const R=v[ht];if(qe(R)){const N=R.source;return N.length===1&&N!=="^"&&N!=="$"&&N!=="."&&!R.ignoreCase?N:N.length===2&&N[0]==="\\"&&!ue(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],N[1])?N[1]:e.useSticky?fs(R):ds(R)}else{if(mt(R))return i=!0,{exec:R};if(typeof R=="object")return i=!0,R;if(typeof R=="string"){if(R.length===1)return R;{const N=R.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),F=new RegExp(N);return e.useSticky?fs(F):ds(F)}}else throw Error("non exhaustive match")}})});let a,o,c,l,u;t("misc mapping",()=>{a=S(r,v=>v.tokenTypeIdx),o=S(r,v=>{const R=v.GROUP;if(R!==de.SKIPPED){if(fe(R))return R;if(ze(R))return!1;throw Error("non exhaustive match")}}),c=S(r,v=>{const R=v.LONGER_ALT;if(R)return Z(R)?S(R,F=>es(r,F)):[es(r,R)]}),l=S(r,v=>v.PUSH_MODE),u=S(r,v=>_(v,"POP_MODE"))});let d;t("Line Terminator Handling",()=>{const v=gc(e.lineTerminatorCharacters);d=S(r,R=>!1),e.positionTracking!=="onlyOffset"&&(d=S(r,R=>_(R,"LINE_BREAKS")?!!R.LINE_BREAKS:mc(R,v)===!1&&wi(v,R.PATTERN)))});let f,h,m,g;t("Misc Mapping #2",()=>{f=S(r,pc),h=S(s,Tf),m=oe(r,(v,R)=>{const N=R.GROUP;return fe(N)&&N!==de.SKIPPED&&(v[N]=[]),v},{}),g=S(s,(v,R)=>({pattern:s[R],longerAlt:c[R],canLineTerminator:d[R],isCustom:f[R],short:h[R],group:o[R],push:l[R],pop:u[R],tokenTypeIdx:a[R],tokenType:r[R]}))});let A=!0,y=[];return e.safeMode||t("First Char Optimization",()=>{y=oe(r,(v,R,N)=>{if(typeof R.PATTERN=="string"){const F=R.PATTERN.charCodeAt(0),ne=et(F);Ir(v,ne,g[N])}else if(Z(R.START_CHARS_HINT)){let F;C(R.START_CHARS_HINT,ne=>{const we=typeof ne=="string"?ne.charCodeAt(0):ne,ge=et(we);F!==ge&&(F=ge,Ir(v,ge,g[N]))})}else if(qe(R.PATTERN))if(R.PATTERN.unicode)A=!1,e.ensureOptimizations&&Fr(`${Dn} Unable to analyze < ${R.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const F=qd(R.PATTERN,e.ensureOptimizations);D(F)&&(A=!1),C(F,ne=>{Ir(v,ne,g[N])})}else e.ensureOptimizations&&Fr(`${Dn} TokenType: <${R.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),A=!1;return v},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:A}}function Qd(n,e){let t=[];const r=ef(n);t=t.concat(r.errors);const i=tf(r.valid),s=i.valid;return t=t.concat(i.errors),t=t.concat(Zd(s)),t=t.concat(uf(s)),t=t.concat(df(s,e)),t=t.concat(ff(s)),t}function Zd(n){let e=[];const t=ve(n,r=>qe(r[ht]));return e=e.concat(rf(t)),e=e.concat(of(t)),e=e.concat(cf(t)),e=e.concat(lf(t)),e=e.concat(sf(t)),e}function ef(n){const e=ve(n,i=>!_(i,ht)),t=S(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:j.MISSING_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}function tf(n){const e=ve(n,i=>{const s=i[ht];return!qe(s)&&!mt(s)&&!_(s,"exec")&&!fe(s)}),t=S(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:j.INVALID_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}const nf=/[^\\][$]/;function rf(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const t=ve(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return nf.test(s.source)}});return S(t,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:j.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function sf(n){const e=ve(n,r=>r.PATTERN.test(""));return S(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:j.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const af=/[^\\[][\^]|^\^/;function of(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const t=ve(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return af.test(s.source)}});return S(t,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:j.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function cf(n){const e=ve(n,r=>{const i=r[ht];return i instanceof RegExp&&(i.multiline||i.global)});return S(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:j.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function lf(n){const e=[];let t=S(n,s=>oe(n,(a,o)=>(s.PATTERN.source===o.PATTERN.source&&!ue(e,o)&&o.PATTERN!==de.NA&&(e.push(o),a.push(o)),a),[]));t=hn(t);const r=ve(t,s=>s.length>1);return S(r,s=>{const a=S(s,c=>c.name);return{message:`The same RegExp pattern ->${be(s).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:j.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function uf(n){const e=ve(n,r=>{if(!_(r,"GROUP"))return!1;const i=r.GROUP;return i!==de.SKIPPED&&i!==de.NA&&!fe(i)});return S(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:j.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function df(n,e){const t=ve(n,i=>i.PUSH_MODE!==void 0&&!ue(e,i.PUSH_MODE));return S(t,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:j.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function ff(n){const e=[],t=oe(n,(r,i,s)=>{const a=i.PATTERN;return a===de.NA||(fe(a)?r.push({str:a,idx:s,tokenType:i}):qe(a)&&pf(a)&&r.push({str:a.source,idx:s,tokenType:i})),r},[]);return C(n,(r,i)=>{C(t,({str:s,idx:a,tokenType:o})=>{if(i${o.name}<- can never be matched. +Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:j.UNREACHABLE_PATTERN,tokenTypes:[r,o]})}})}),e}function hf(n,e){if(qe(e)){const t=e.exec(n);return t!==null&&t.index===0}else{if(mt(e))return e(n,0,[],{});if(_(e,"exec"))return e.exec(n,0,[],{});if(typeof e=="string")return e===n;throw Error("non exhaustive match")}}function pf(n){return Dt([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>n.source.indexOf(t)!==-1)===void 0}function ds(n){const e=n.ignoreCase?"i":"";return new RegExp(`^(?:${n.source})`,e)}function fs(n){const e=n.ignoreCase?"iy":"y";return new RegExp(`${n.source}`,e)}function mf(n,e,t){const r=[];return _(n,an)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+an+`> property in its definition +`,type:j.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),_(n,Sn)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Sn+`> property in its definition +`,type:j.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),_(n,Sn)&&_(n,an)&&!_(n.modes,n.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${an}: <${n.defaultMode}>which does not exist +`,type:j.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),_(n,Sn)&&C(n.modes,(i,s)=>{C(i,(a,o)=>{if(ze(a))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${o}> +`,type:j.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(_(a,"LONGER_ALT")){const c=Z(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];C(c,l=>{!ze(l)&&!ue(i,l)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${a.name}> outside of mode <${s}> +`,type:j.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function gf(n,e,t){const r=[];let i=!1;const s=hn(Ne(K(n.modes))),a=rr(s,c=>c[ht]===de.NA),o=gc(t);return e&&C(a,c=>{const l=mc(c,o);if(l!==!1){const d={message:Af(c,l),type:l.issue,tokenType:c};r.push(d)}else _(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(i=!0):wi(o,c.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:j.NO_LINE_BREAKS_FLAGS}),r}function yf(n){const e={},t=Mt(n);return C(t,r=>{const i=n[r];if(Z(i))e[r]=[];else throw Error("non exhaustive match")}),e}function pc(n){const e=n.PATTERN;if(qe(e))return!1;if(mt(e))return!0;if(_(e,"exec"))return!0;if(fe(e))return!1;throw Error("non exhaustive match")}function Tf(n){return fe(n)&&n.length===1?n.charCodeAt(0):!1}const Rf={test:function(n){const e=n.length;for(let t=this.lastIndex;t Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===j.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${n.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function gc(n){return S(n,t=>fe(t)?t.charCodeAt(0):t)}function Ir(n,e,t){n[e]===void 0?n[e]=[t]:n[e].push(t)}const on=256;let _n=[];function et(n){return n255?255+~~(n/255):n}}function gn(n,e){const t=n.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}function Fn(n,e){return n.tokenTypeIdx===e.tokenTypeIdx}let hs=1;const yc={};function yn(n){const e=Ef(n);kf(e),If(e),Sf(e),C(e,t=>{t.isParent=t.categoryMatches.length>0})}function Ef(n){let e=te(n),t=n,r=!0;for(;r;){t=hn(Ne(S(t,s=>s.CATEGORIES)));const i=nr(t,e);e=e.concat(i),D(i)?r=!1:t=i}return e}function kf(n){C(n,e=>{Rc(e)||(yc[hs]=e,e.tokenTypeIdx=hs++),ps(e)&&!Z(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ps(e)||(e.CATEGORIES=[]),xf(e)||(e.categoryMatches=[]),Nf(e)||(e.categoryMatchesMap={})})}function Sf(n){C(n,e=>{e.categoryMatches=[],C(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(yc[r].tokenTypeIdx)})})}function If(n){C(n,e=>{Tc([],e)})}function Tc(n,e){C(n,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),C(e.CATEGORIES,t=>{const r=n.concat(e);ue(r,t)||Tc(r,t)})}function Rc(n){return _(n,"tokenTypeIdx")}function ps(n){return _(n,"CATEGORIES")}function xf(n){return _(n,"categoryMatches")}function Nf(n){return _(n,"categoryMatchesMap")}function Cf(n){return _(n,"tokenTypeIdx")}const _f={buildUnableToPopLexerModeMessage(n){return`Unable to pop Lexer Mode after encountering Token ->${n.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(n,e,t,r,i){return`unexpected character: ->${n.charAt(e)}<- at offset: ${e}, skipped ${t} characters.`}};var j;(function(n){n[n.MISSING_PATTERN=0]="MISSING_PATTERN",n[n.INVALID_PATTERN=1]="INVALID_PATTERN",n[n.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",n[n.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",n[n.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",n[n.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",n[n.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",n[n.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",n[n.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",n[n.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",n[n.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",n[n.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",n[n.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",n[n.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",n[n.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",n[n.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",n[n.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",n[n.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(j||(j={}));const cn={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:_f,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(cn);class de{constructor(e,t=cn){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);const{time:o,value:c}=lc(s),l=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,c}else return s()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=Ae({},cn,t);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===cn.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Rf;else if(this.config.lineTerminatorCharacters===cn.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Z(e)?i={modes:{defaultMode:te(e)},defaultMode:an}:(s=!1,i=te(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(mf(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(gf(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},C(i.modes,(o,c)=>{i.modes[c]=rr(o,l=>ze(l))});const a=Mt(i.modes);if(C(i.modes,(o,c)=>{this.TRACE_INIT(`Mode: <${c}> processing`,()=>{if(this.modes.push(c),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Qd(o,a))}),D(this.lexerDefinitionErrors)){yn(o);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=Jd(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[c]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[c]=l.charCodeToPatternIdxToConfig,this.emptyGroups=Ae({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[c]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!D(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const c=S(this.lexerDefinitionErrors,l=>l.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}C(this.lexerDefinitionWarning,o=>{cc(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(hc?(this.chopInput=Zi,this.match=this.matchWithTest):(this.updateLastIndex=q,this.match=this.matchWithExec),s&&(this.handleModes=q),this.trackStartLines===!1&&(this.computeNewColumn=Zi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=q),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=oe(this.canModeBeOptimized,(c,l,u)=>(l===!1&&c.push(u),c),[]);if(t.ensureOptimizations&&!D(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{zd()}),this.TRACE_INIT("toFastProperties",()=>{uc(this)})})}tokenize(e,t=this.defaultMode){if(!D(this.lexerDefinitionErrors)){const i=S(this.lexerDefinitionErrors,s=>s.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,i,s,a,o,c,l,u,d,f,h,m,g,A,y;const v=e,R=v.length;let N=0,F=0;const ne=this.hasCustom?0:Math.floor(e.length/10),we=new Array(ne),ge=[];let De=this.trackStartLines?1:void 0,Se=this.trackStartLines?1:void 0;const k=yf(this.emptyGroups),T=this.trackStartLines,E=this.config.lineTerminatorsPattern;let I=0,O=[],$=[];const L=[],ye=[];Object.freeze(ye);let z;function V(){return O}function at(re){const Ie=et(re),Tt=$[Ie];return Tt===void 0?ye:Tt}const Dl=re=>{if(L.length===1&&re.tokenType.PUSH_MODE===void 0){const Ie=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(re);ge.push({offset:re.startOffset,line:re.startLine,column:re.startColumn,length:re.image.length,message:Ie})}else{L.pop();const Ie=Ft(L);O=this.patternIdxToConfig[Ie],$=this.charCodeToPatternIdxToConfig[Ie],I=O.length;const Tt=this.canModeBeOptimized[Ie]&&this.config.safeMode===!1;$&&Tt?z=at:z=V}};function qi(re){L.push(re),$=this.charCodeToPatternIdxToConfig[re],O=this.patternIdxToConfig[re],I=O.length,I=O.length;const Ie=this.canModeBeOptimized[re]&&this.config.safeMode===!1;$&&Ie?z=at:z=V}qi.call(this,t);let Le;const Yi=this.config.recoveryEnabled;for(;Nc.length){c=a,l=u,Le=We;break}}}break}}if(c!==null){if(d=c.length,f=Le.group,f!==void 0&&(h=Le.tokenTypeIdx,m=this.createTokenInstance(c,N,h,Le.tokenType,De,Se,d),this.handlePayload(m,l),f===!1?F=this.addToken(we,F,m):k[f].push(m)),e=this.chopInput(e,d),N=N+d,Se=this.computeNewColumn(Se,d),T===!0&&Le.canLineTerminator===!0){let Te=0,Ve,Xe;E.lastIndex=0;do Ve=E.test(c),Ve===!0&&(Xe=E.lastIndex-1,Te++);while(Ve===!0);Te!==0&&(De=De+Te,Se=d-Xe,this.updateTokenEndLineColumnLocation(m,f,Xe,Te,De,Se,d))}this.handleModes(Le,Dl,qi,m)}else{const Te=N,Ve=De,Xe=Se;let We=Yi===!1;for(;We===!1&&N ${Et(n)} <--`:`token of type --> ${n.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:n,ruleName:e}){return"Redundant input, expecting EOF but found: "+n.image},buildNoViableAltMessage({expectedPathsPerAlt:n,actual:e,previous:t,customUserDescription:r,ruleName:i}){const s="Expecting: ",o=` +but found: '`+be(e).image+"'";if(r)return s+r+o;{const c=oe(n,(f,h)=>f.concat(h),[]),l=S(c,f=>`[${S(f,h=>Et(h)).join(", ")}]`),d=`one of these possible Token sequences: +${S(l,(f,h)=>` ${h+1}. ${f}`).join(` +`)}`;return s+d+o}},buildEarlyExitMessage({expectedIterationPaths:n,actual:e,customUserDescription:t,ruleName:r}){const i="Expecting: ",a=` +but found: '`+be(e).image+"'";if(t)return i+t+a;{const c=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${S(n,l=>`[${S(l,u=>Et(u)).join(",")}]`).join(" ,")}>`;return i+c+a}}};Object.freeze(At);const $f={buildRuleNotFoundError(n,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+n.name+"<-"}},lt={buildDuplicateFoundError(n,e){function t(u){return u instanceof G?u.terminalType.name:u instanceof ce?u.nonTerminalName:""}const r=n.name,i=be(e),s=i.idx,a=Fe(i),o=t(i),c=s>0;let l=`->${a}${c?s:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${r}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,` +`),l},buildNamespaceConflictError(n){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${n.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(n){const e=S(n.prefixPath,i=>Et(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;return`Ambiguous alternatives: <${n.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${n.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(n){const e=S(n.prefixPath,i=>Et(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(" ,")}> in inside <${n.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r},buildEmptyRepetitionError(n){let e=Fe(n.repetition);return n.repetition.idx!==0&&(e+=n.repetition.idx),`The repetition <${e}> within Rule <${n.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(n){return"deprecated"},buildEmptyAlternationError(n){return`Ambiguous empty alternative: <${n.emptyChoiceIdx+1}> in inside <${n.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(n){return`An Alternation cannot have more than 256 alternatives: + inside <${n.topLevelRule.name}> Rule. + has ${n.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(n){const e=n.topLevelRule.name,t=S(n.leftRecursionPath,s=>s.name),r=`${e} --> ${t.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${r} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(n){return"deprecated"},buildDuplicateRuleNameError(n){let e;return n.topLevelRule instanceof qt?e=n.topLevelRule.name:e=n.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${n.grammarName}<-`}};function Of(n,e){const t=new bf(n,e);return t.resolveRefs(),t.errors}class bf extends Yt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){C(K(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:le.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Pf extends ur{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=te(this.path.ruleStack).reverse(),this.occurrenceStack=te(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){D(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Mf extends Pf{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=t.concat(r),s=new he({definition:i});this.possibleTokTypes=mn(s),this.found=!0}}}class fr extends ur{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class Df extends fr{walkMany(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,t,r)}}class ks extends fr{walkManySep(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,t,r)}}class Ff extends fr{walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,t,r)}}class Ss extends fr{walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,t,r)}}function Br(n,e,t=[]){t=te(t);let r=[],i=0;function s(o){return o.concat(J(n,i+1))}function a(o){const c=Br(s(o),e,t);return r.concat(c)}for(;t.length{D(c.definition)===!1&&(r=a(c.definition))}),r;if(o instanceof G)t.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:t,suffixDef:J(n,i)}),r}function kc(n,e,t,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=e.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:n,ruleStack:[],occurrenceStack:[]});!D(d);){const f=d.pop();if(f===a){o&&Ft(d).idx<=l&&d.pop();continue}const h=f.def,m=f.idx,g=f.ruleStack,A=f.occurrenceStack;if(D(h))continue;const y=h[0];if(y===i){const v={idx:m,def:J(h),ruleStack:ln(g),occurrenceStack:ln(A)};d.push(v)}else if(y instanceof G)if(m=0;v--){const R=y.definition[v],N={idx:m,def:R.definition.concat(J(h)),ruleStack:g,occurrenceStack:A};d.push(N),d.push(a)}else if(y instanceof he)d.push({idx:m,def:y.definition.concat(J(h)),ruleStack:g,occurrenceStack:A});else if(y instanceof qt)d.push(Gf(y,m,g,A));else throw Error("non exhaustive match")}return u}function Gf(n,e,t,r){const i=te(t);i.push(n.name);const s=te(r);return s.push(1),{idx:e,def:n.definition,ruleStack:i,occurrenceStack:s}}var B;(function(n){n[n.OPTION=0]="OPTION",n[n.REPETITION=1]="REPETITION",n[n.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",n[n.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",n[n.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",n[n.ALTERNATION=5]="ALTERNATION"})(B||(B={}));function $i(n){if(n instanceof ee||n==="Option")return B.OPTION;if(n instanceof W||n==="Repetition")return B.REPETITION;if(n instanceof Ee||n==="RepetitionMandatory")return B.REPETITION_MANDATORY;if(n instanceof ke||n==="RepetitionMandatoryWithSeparator")return B.REPETITION_MANDATORY_WITH_SEPARATOR;if(n instanceof pe||n==="RepetitionWithSeparator")return B.REPETITION_WITH_SEPARATOR;if(n instanceof me||n==="Alternation")return B.ALTERNATION;throw Error("non exhaustive match")}function Is(n){const{occurrence:e,rule:t,prodType:r,maxLookahead:i}=n,s=$i(r);return s===B.ALTERNATION?hr(e,t,i):pr(e,t,s,i)}function Uf(n,e,t,r,i,s){const a=hr(n,e,t),o=xc(a)?Fn:gn;return s(a,r,o,i)}function Bf(n,e,t,r,i,s){const a=pr(n,e,i,t),o=xc(a)?Fn:gn;return s(a[0],o,r)}function Vf(n,e,t,r){const i=n.length,s=$e(n,a=>$e(a,o=>o.length===1));if(e)return function(a){const o=S(a,c=>c.GATE);for(let c=0;cNe(c)),o=oe(a,(c,l,u)=>(C(l,d=>{_(c,d.tokenTypeIdx)||(c[d.tokenTypeIdx]=u),C(d.categoryMatches,f=>{_(c,f)||(c[f]=u)})}),c),{});return function(){const c=this.LA(1);return o[c.tokenTypeIdx]}}else return function(){for(let a=0;as.length===1),i=n.length;if(r&&!t){const s=Ne(n);if(s.length===1&&D(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=oe(s,(o,c,l)=>(o[c.tokenTypeIdx]=!0,C(c.categoryMatches,u=>{o[u]=!0}),o),[]);return function(){const o=this.LA(1);return a[o.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sBr([a],1)),r=xs(t.length),i=S(t,a=>{const o={};return C(a,c=>{const l=xr(c.partialPath);C(l,u=>{o[u]=!0})}),o});let s=t;for(let a=1;a<=e;a++){const o=s;s=xs(o.length);for(let c=0;c{const y=xr(A.partialPath);C(y,v=>{i[c][v]=!0})})}}}}return r}function hr(n,e,t,r){const i=new Sc(n,B.ALTERNATION,r);return e.accept(i),Ic(i.result,t)}function pr(n,e,t,r){const i=new Sc(n,t);e.accept(i);const s=i.result,o=new jf(e,n,t).startWalking(),c=new he({definition:s}),l=new he({definition:o});return Ic([c,l],r)}function Vr(n,e){e:for(let t=0;t{const i=e[r];return t===i||i.categoryMatchesMap[t.tokenTypeIdx]})}function xc(n){return $e(n,e=>$e(e,t=>$e(t,r=>D(r.categoryMatches))))}function zf(n){const e=n.lookaheadStrategy.validate({rules:n.rules,tokenTypes:n.tokenTypes,grammarName:n.grammarName});return S(e,t=>Object.assign({type:le.CUSTOM_LOOKAHEAD_VALIDATION},t))}function qf(n,e,t,r){const i=Re(n,c=>Yf(c,t)),s=oh(n,e,t),a=Re(n,c=>rh(c,t)),o=Re(n,c=>Qf(c,n,r,t));return i.concat(s,a,o)}function Yf(n,e){const t=new Jf;n.accept(t);const r=t.allProductions,i=mu(r,Xf),s=Pe(i,o=>o.length>1);return S(K(s),o=>{const c=be(o),l=e.buildDuplicateFoundError(n,o),u=Fe(c),d={message:l,type:le.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:u,occurrence:c.idx},f=Nc(c);return f&&(d.parameter=f),d})}function Xf(n){return`${Fe(n)}_#_${n.idx}_#_${Nc(n)}`}function Nc(n){return n instanceof G?n.terminalType.name:n instanceof ce?n.nonTerminalName:""}class Jf extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Qf(n,e,t,r){const i=[];if(oe(e,(a,o)=>o.name===n.name?a+1:a,0)>1){const a=r.buildDuplicateRuleNameError({topLevelRule:n,grammarName:t});i.push({message:a,type:le.DUPLICATE_RULE_NAME,ruleName:n.name})}return i}function Zf(n,e,t){const r=[];let i;return ue(e,n)||(i=`Invalid rule override, rule: ->${n}<- cannot be overridden in the grammar: ->${t}<-as it is not defined in any of the super grammars `,r.push({message:i,type:le.INVALID_RULE_OVERRIDE,ruleName:n})),r}function Cc(n,e,t,r=[]){const i=[],s=wn(e.definition);if(D(s))return[];{const a=n.name;ue(s,n)&&i.push({message:t.buildLeftRecursionError({topLevelRule:n,leftRecursionPath:r}),type:le.LEFT_RECURSION,ruleName:a});const c=nr(s,r.concat([n])),l=Re(c,u=>{const d=te(r);return d.push(u),Cc(n,u,t,d)});return i.concat(l)}}function wn(n){let e=[];if(D(n))return e;const t=be(n);if(t instanceof ce)e.push(t.referencedRule);else if(t instanceof he||t instanceof ee||t instanceof Ee||t instanceof ke||t instanceof pe||t instanceof W)e=e.concat(wn(t.definition));else if(t instanceof me)e=Ne(S(t.definition,s=>wn(s.definition)));else if(!(t instanceof G))throw Error("non exhaustive match");const r=Mn(t),i=n.length>1;if(r&&i){const s=J(n);return e.concat(wn(s))}else return e}class Oi extends Yt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function eh(n,e){const t=new Oi;n.accept(t);const r=t.alternations;return Re(r,s=>{const a=ln(s.definition);return Re(a,(o,c)=>{const l=kc([o],[],gn,1);return D(l)?[{message:e.buildEmptyAlternationError({topLevelRule:n,alternation:s,emptyChoiceIdx:c}),type:le.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:s.idx,alternative:c+1}]:[]})})}function th(n,e,t){const r=new Oi;n.accept(r);let i=r.alternations;return i=rr(i,a=>a.ignoreAmbiguities===!0),Re(i,a=>{const o=a.idx,c=a.maxLookahead||e,l=hr(o,n,c,a),u=sh(l,a,n,t),d=ah(l,a,n,t);return u.concat(d)})}class nh extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function rh(n,e){const t=new Oi;n.accept(t);const r=t.alternations;return Re(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:n,alternation:s}),type:le.TOO_MANY_ALTS,ruleName:n.name,occurrence:s.idx}]:[])}function ih(n,e,t){const r=[];return C(n,i=>{const s=new nh;i.accept(s);const a=s.allProductions;C(a,o=>{const c=$i(o),l=o.maxLookahead||e,u=o.idx,f=pr(u,i,c,l)[0];if(D(Ne(f))){const h=t.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:h,type:le.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function sh(n,e,t,r){const i=[],s=oe(n,(o,c,l)=>(e.definition[l].ignoreAmbiguities===!0||C(c,u=>{const d=[l];C(n,(f,h)=>{l!==h&&Vr(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&d.push(h)}),d.length>1&&!Vr(i,u)&&(i.push(u),o.push({alts:d,path:u}))}),o),[]);return S(s,o=>{const c=S(o.alts,u=>u+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:c,prefixPath:o.path}),type:le.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:o.alts}})}function ah(n,e,t,r){const i=oe(n,(a,o,c)=>{const l=S(o,u=>({idx:c,path:u}));return a.concat(l)},[]);return hn(Re(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const c=a.idx,l=a.path,u=ve(i,f=>e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{const h=[f.idx+1,c+1],m=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:h,prefixPath:f.path}),type:le.AMBIGUOUS_PREFIX_ALTS,ruleName:t.name,occurrence:m,alternatives:h}})}))}function oh(n,e,t){const r=[],i=S(e,s=>s.name);return C(n,s=>{const a=s.name;if(ue(i,a)){const o=t.buildNamespaceConflictError(s);r.push({message:o,type:le.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function ch(n){const e=Ai(n,{errMsgProvider:$f}),t={};return C(n.rules,r=>{t[r.name]=r}),Of(t,e.errMsgProvider)}function lh(n){return n=Ai(n,{errMsgProvider:lt}),qf(n.rules,n.tokenTypes,n.errMsgProvider,n.grammarName)}const _c="MismatchedTokenException",wc="NoViableAltException",Lc="EarlyExitException",$c="NotAllInputParsedException",Oc=[_c,wc,Lc,$c];Object.freeze(Oc);function Gn(n){return ue(Oc,n.name)}class mr extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class bc extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=_c}}class uh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=wc}}class dh extends mr{constructor(e,t){super(e,t),this.name=$c}}class fh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Lc}}const Nr={},Pc="InRuleRecoveryException";class hh extends Error{constructor(e){super(e),this.name=Pc}}class ph{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=_(e,"recoveryEnabled")?e.recoveryEnabled:Ye.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=mh)}getTokenToInsert(e){const t=Li(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){const s=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let c=!1;const l=this.LA(1);let u=this.LA(1);const d=()=>{const f=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:f,ruleName:this.getCurrRuleFullName()}),m=new bc(h,l,this.LA(0));m.resyncedTokens=ln(o),this.SAVE_ERROR(m)};for(;!c;)if(this.tokenMatcher(u,i)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,s)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){const r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new hh("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||D(t))return!1;const r=this.LA(1);return Dt(t,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return ue(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const i=Dt(e,s=>Ec(t,s));if(i!==void 0)return i;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Nr;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return S(e,(r,i)=>i===0?Nr:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=S(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ne(e)}getFollowSetFromFollowKey(e){if(e===Nr)return[tt];const t=e.ruleName+e.idxInCallingRule+dc+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,tt)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return ln(t)}attemptInRepetitionRecovery(e,t,r,i,s,a,o){}getCurrentGrammarPath(e,t){const r=this.getHumanReadableRuleStack(),i=te(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return S(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function mh(n,e,t,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===void 0){const f=this.getCurrRuleFullName(),h=this.getGAstProductions()[f];c=new s(h,i).startWalking(),this.firstAfterRepMap[o]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;this.RULE_STACK.length===1&&d&&l===void 0&&(l=tt,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,a)&&this.tryInRepetitionRecovery(n,e,t,l)}const gh=4,it=8,Mc=1<Cc(t,t,lt))}validateEmptyOrAlternatives(e){return Re(e,t=>eh(t,lt))}validateAmbiguousAlternationAlternatives(e,t){return Re(e,r=>th(r,t,lt))}validateSomeNonEmptyLookaheadPath(e,t){return ih(e,t,lt)}buildLookaheadForAlternation(e){return Uf(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Vf)}buildLookaheadForOptional(e){return Bf(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,$i(e.prodType),Wf)}}class yh{initLooksAhead(e){this.dynamicTokensEnabled=_(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ye.dynamicTokensEnabled,this.maxLookahead=_(e,"maxLookahead")?e.maxLookahead:Ye.maxLookahead,this.lookaheadStrategy=_(e,"lookaheadStrategy")?e.lookaheadStrategy:new bi({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){C(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:c}=Rh(t);C(r,l=>{const u=l.idx===0?"":l.idx;this.TRACE_INIT(`${Fe(l)}${u}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:t,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=Cr(this.fullRuleNameToShort[t.name],Mc,l.idx);this.setLaFuncCache(f,d)})}),C(i,l=>{this.computeLookaheadFunc(t,l.idx,Wr,"Repetition",l.maxLookahead,Fe(l))}),C(s,l=>{this.computeLookaheadFunc(t,l.idx,Dc,"Option",l.maxLookahead,Fe(l))}),C(a,l=>{this.computeLookaheadFunc(t,l.idx,jr,"RepetitionMandatory",l.maxLookahead,Fe(l))}),C(o,l=>{this.computeLookaheadFunc(t,l.idx,Ln,"RepetitionMandatoryWithSeparator",l.maxLookahead,Fe(l))}),C(c,l=>{this.computeLookaheadFunc(t,l.idx,Hr,"RepetitionWithSeparator",l.maxLookahead,Fe(l))})})})}computeLookaheadFunc(e,t,r,i,s,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),c=Cr(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(c,o)})}getKeyForAutomaticLookahead(e,t){const r=this.getLastExplicitRuleShortName();return Cr(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class Th extends Yt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const In=new Th;function Rh(n){In.reset(),n.accept(In);const e=In.dslMethods;return In.reset(),e}function Ns(n,e){isNaN(n.startOffset)===!0?(n.startOffset=e.startOffset,n.endOffset=e.endOffset):n.endOffseta.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${s.join(` + +`).replace(/\n/g,` + `)}`)}}};return t.prototype=r,t.prototype.constructor=t,t._RULE_NAMES=e,t}function Ih(n,e,t){const r=function(){};Fc(r,n+"BaseSemanticsWithDefaults");const i=Object.create(t.prototype);return C(e,s=>{i[s]=kh}),r.prototype=i,r.prototype.constructor=r,r}var Kr;(function(n){n[n.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",n[n.MISSING_METHOD=1]="MISSING_METHOD"})(Kr||(Kr={}));function xh(n,e){return Nh(n,e)}function Nh(n,e){const t=ve(e,i=>mt(n[i])===!1),r=S(t,i=>({msg:`Missing visitor method: <${i}> on ${n.constructor.name} CST Visitor.`,type:Kr.MISSING_METHOD,methodName:i}));return hn(r)}class Ch{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=_(e,"nodeLocationTracking")?e.nodeLocationTracking:Ye.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=q,this.cstFinallyStateUpdate=q,this.cstPostTerminal=q,this.cstPostNonTerminal=q,this.cstPostRule=q;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Cs,this.setNodeLocationFromNode=Cs,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ns,this.setNodeLocationFromNode=Ns,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=q,this.setInitialNodeLocation=q;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];Ah(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];vh(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(ze(this.baseCstVisitorConstructor)){const e=Sh(this.className,Mt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ze(this.baseCstVisitorWithDefaultsConstructor)){const e=Ih(this.className,Mt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class _h{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Bn}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Bn:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class wh{ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=Vn){if(ue(this.definedRulesNames,e)){const a={message:lt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:le.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);const i=this.defineRule(e,t,r);return this[e]=i,i}OVERRIDE_RULE(e,t,r=Vn){const i=Zf(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,t,r);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(i){if(Gn(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Dd(K(this.gastProductionsCache))}}class Lh{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Fn,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},_(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(Z(e)){if(D(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(Z(e))this.tokensMap=oe(e,(s,a)=>(s[a.name]=a,s),{});else if(_(e,"modes")&&$e(Ne(K(e.modes)),Cf)){const s=Ne(K(e.modes)),a=vi(s);this.tokensMap=oe(a,(o,c)=>(o[c.name]=c,o),{})}else if(zl(e))this.tokensMap=te(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=tt;const r=_(e,"modes")?Ne(K(e.modes)):K(e),i=$e(r,s=>D(s.categoryMatches));this.tokenMatcher=i?Fn:gn,yn(K(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=_(r,"resyncEnabled")?r.resyncEnabled:Vn.resyncEnabled,s=_(r,"recoveryValueFunc")?r.recoveryValueFunc:Vn.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&o.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(jr,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const a=t.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=t;if(i.call(this)===!0){let a=this.doSingleRepetition(s);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,B.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,jr,e,Ff)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Ln,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,Ss],o,Ln,e,Ss)}else throw this.raiseEarlyExitException(e,B.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(Wr,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const o=t.GATE;if(o!==void 0){const c=i;i=()=>o.call(this)&&c.call(this)}}else s=t;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,Wr,e,Df,a)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Hr,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,ks],o,Hr,e,ks)}}repetitionSepSecondInternal(e,t,r,i,s){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,s],r,Ln,e,s)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(Mc,t),i=Z(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new dh(t,e))}}subruleInternal(e,t,r){let i;try{const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,t,r){throw Gn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new bc(i,t,s))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===Pc?r:s}}else throw r}saveRecogState(){const e=this.errors,t=te(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),tt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class $h{initErrorHandler(e){this._errors=[],this.errorMessageProvider=_(e,"errorMessageProvider")?e.errorMessageProvider:Ye.errorMessageProvider}SAVE_ERROR(e){if(Gn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:te(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return te(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=pr(e,s,t,this.maxLookahead)[0],c=[];for(let u=1;u<=this.maxLookahead;u++)c.push(this.LA(u));const l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:c,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new fh(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=hr(e,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));const o=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new uh(c,this.LA(1),o))}}class Oh{initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(ze(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return kc([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=be(e.ruleStack),i=this.getGAstProductions()[t];return new Mf(i,e).startWalking()}}const gr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(gr);const _s=!0,ws=Math.pow(2,it)-1,Gc=vc({name:"RECORDING_PHASE_TOKEN",pattern:de.NA});yn([Gc]);const Uc=Li(Gc,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Uc);const bh={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class Ph{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${t}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Bn}topLevelRuleRecord(e,t){try{const r=new qt({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return rn.call(this,ee,e,t)}atLeastOneInternalRecord(e,t){rn.call(this,Ee,t,e)}atLeastOneSepFirstInternalRecord(e,t){rn.call(this,ke,t,e,_s)}manyInternalRecord(e,t){rn.call(this,W,t,e)}manySepFirstInternalRecord(e,t){rn.call(this,pe,t,e,_s)}orInternalRecord(e,t){return Mh.call(this,e,t)}subruleInternalRecord(e,t,r){if(Un(t),!e||_(e,"ruleName")===!1){const o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=Ft(this.recordingProdStack),s=e.ruleName,a=new ce({idx:t,nonTerminalName:s,label:r==null?void 0:r.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?bh:gr}consumeInternalRecord(e,t,r){if(Un(t),!Rc(e)){const a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=Ft(this.recordingProdStack),s=new G({idx:t,terminalType:e,label:r==null?void 0:r.LABEL});return i.definition.push(s),Uc}}function rn(n,e,t,r=!1){Un(t);const i=Ft(this.recordingProdStack),s=mt(e)?e:e.DEF,a=new n({definition:[],idx:t});return r&&(a.separator=e.SEP),_(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),gr}function Mh(n,e){Un(e);const t=Ft(this.recordingProdStack),r=Z(n)===!1,i=r===!1?n:n.DEF,s=new me({definition:[],idx:e,ignoreAmbiguities:r&&n.IGNORE_AMBIGUITIES===!0});_(n,"MAX_LOOKAHEAD")&&(s.maxLookahead=n.MAX_LOOKAHEAD);const a=ho(i,o=>mt(o.GATE));return s.hasPredicates=a,t.definition.push(s),C(i,o=>{const c=new he({definition:[]});s.definition.push(c),_(o,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:_(o,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),o.ALT.call(this),this.recordingProdStack.pop()}),gr}function Ls(n){return n===0?"":`${n}`}function Un(n){if(n<0||n>ws){const e=new Error(`Invalid DSL Method idx value: <${n}> + Idx value must be a none negative value smaller than ${ws+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class Dh{initPerformanceTracer(e){if(_(e,"traceInitPerf")){const t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ye.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);const{time:i,value:s}=lc(t),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return t()}}function Fh(n,e){e.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(n.prototype,i,s):n.prototype[i]=t.prototype[i]})})}const Bn=Li(tt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Bn);const Ye=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:At,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Vn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var le;(function(n){n[n.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",n[n.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",n[n.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",n[n.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",n[n.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",n[n.LEFT_RECURSION=5]="LEFT_RECURSION",n[n.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",n[n.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",n[n.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",n[n.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",n[n.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",n[n.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",n[n.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",n[n.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(le||(le={}));function $s(n=void 0){return function(){return n}}class Tn{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{uc(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),C(this.definedRulesNames,i=>{const a=this[i].originalGrammarAction;let o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=ch({rules:K(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(D(r)&&this.skipValidations===!1){const i=lh({rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),errMsgProvider:lt,grammarName:t}),s=zf({lookaheadStrategy:this.lookaheadStrategy,rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(i,s)}}),D(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=jd(K(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:K(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(K(this.gastProductionsCache))})),!Tn.DEFER_DEFINITION_ERRORS_HANDLING&&!D(this.definitionErrors))throw e=S(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: + ${e.join(` +------------------------------- +`)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),_(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=_(t,"skipValidations")?t.skipValidations:Ye.skipValidations}}Tn.DEFER_DEFINITION_ERRORS_HANDLING=!1;Fh(Tn,[ph,yh,Ch,_h,Lh,wh,$h,Oh,Ph,Dh]);class Gh extends Tn{constructor(e,t=Ye){const r=te(t);r.outputCst=!1,super(e,r)}}function Ut(n,e,t){return`${n.name}_${e}_${t}`}const nt=1,Uh=2,Bc=4,Vc=5,Rn=7,Bh=8,Vh=9,Wh=10,jh=11,Wc=12;class Pi{constructor(e){this.target=e}isEpsilon(){return!1}}class Mi extends Pi{constructor(e,t){super(e),this.tokenType=t}}class jc extends Pi{constructor(e){super(e)}isEpsilon(){return!0}}class Di extends Pi{constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}}function Hh(n){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Kh(e,n);const t=n.length;for(let r=0;rHc(n,e,a));return Xt(n,e,r,t,...i)}function Qh(n,e,t){const r=Y(n,e,t,{type:nt});st(n,r);const i=Xt(n,e,r,t,yt(n,e,t));return Zh(n,e,t,i)}function yt(n,e,t){const r=ve(S(t.definition,i=>Hc(n,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:tp(n,r)}function Kc(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:jh});st(n,o);const c=Y(n,e,t,{type:Wc});return s.loopback=o,c.loopback=o,n.decisionMap[Ut(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",t.idx)]=o,H(a,o),i===void 0?(H(o,s),H(o,c)):(H(o,c),H(o,i.left),H(i.right,s)),{left:s,right:c}}function zc(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:Wh});st(n,o);const c=Y(n,e,t,{type:Wc}),l=Y(n,e,t,{type:Vh});return o.loopback=l,c.loopback=l,H(o,s),H(o,c),H(a,l),i!==void 0?(H(l,c),H(l,i.left),H(i.right,s)):H(l,o),n.decisionMap[Ut(e,i?"RepetitionWithSeparator":"Repetition",t.idx)]=o,{left:o,right:c}}function Zh(n,e,t,r){const i=r.left,s=r.right;return H(i,s),n.decisionMap[Ut(e,"Option",t.idx)]=i,r}function st(n,e){return n.decisionStates.push(e),e.decision=n.decisionStates.length-1,e.decision}function Xt(n,e,t,r,...i){const s=Y(n,e,r,{type:Bh,start:t});t.end=s;for(const o of i)o!==void 0?(H(t,o.left),H(o.right,s)):H(t,s);const a={left:t,right:s};return n.decisionMap[Ut(e,ep(r),r.idx)]=t,a}function ep(n){if(n instanceof me)return"Alternation";if(n instanceof ee)return"Option";if(n instanceof W)return"Repetition";if(n instanceof pe)return"RepetitionWithSeparator";if(n instanceof Ee)return"RepetitionMandatory";if(n instanceof ke)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function tp(n,e){const t=e.length;for(let s=0;se.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function qc(n,e=!0){return`${e?`a${n.alt}`:""}s${n.state.stateNumber}:${n.stack.map(t=>t.stateNumber.toString()).join("_")}`}function sp(n,e){const t={};return r=>{const i=r.toString();let s=t[i];return s!==void 0||(s={atnStartState:n,decision:e,states:{}},t[i]=s),s}}class Yc{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;rconsole.log(r)}initialize(e){this.atn=Hh(e.rules),this.dfas=op(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,c=Ut(r,"Alternation",t),u=this.atn.decisionMap[c].decision,d=S(Is({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>S(f,h=>h[0]));if(bs(d,!1)&&!s){const f=oe(d,(h,m,g)=>(C(m,A=>{A&&(h[A.tokenTypeIdx]=g,C(A.categoryMatches,y=>{h[y]=g}))}),h),{});return i?function(h){var m;const g=this.LA(1),A=f[g.tokenTypeIdx];if(h!==void 0&&A!==void 0){const y=(m=h[A])===null||m===void 0?void 0:m.GATE;if(y!==void 0&&y.call(this)===!1)return}return A}:function(){const h=this.LA(1);return f[h.tokenTypeIdx]}}else return i?function(f){const h=new Yc,m=f===void 0?0:f.length;for(let A=0;AS(f,h=>h[0]));if(bs(d)&&d[0][0]&&!s){const f=d[0],h=Ne(f);if(h.length===1&&D(h[0].categoryMatches)){const g=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{const m=oe(h,(g,A)=>(A!==void 0&&(g[A.tokenTypeIdx]=!0,C(A.categoryMatches,y=>{g[y]=!0})),g),{});return function(){const g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){const f=_r.call(this,a,u,Os,o);return typeof f=="object"?!1:f===0}}}function bs(n,e=!0){const t=new Set;for(const r of n){const i=new Set;for(const s of r){if(s===void 0){if(e)break;return!1}const a=[s.tokenTypeIdx].concat(s.categoryMatches);for(const o of a)if(t.has(o)){if(!i.has(o))return!1}else t.add(o),i.add(o)}}return!0}function op(n){const e=n.decisionStates.length,t=Array(e);for(let r=0;rEt(i)).join(", "),t=n.production.idx===0?"":n.production.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(", ")}> in <${fp(n.production)}${t}> inside <${n.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r}function fp(n){if(n instanceof ce)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Ee)return"AT_LEAST_ONE";if(n instanceof ke)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof W)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}function hp(n,e,t){const r=Re(e.configs.elements,s=>s.state.transitions),i=ku(r.filter(s=>s instanceof Mi).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:t,possibleTokenTypes:i,tokenPath:n}}function pp(n,e){return n.edges[e.tokenTypeIdx]}function mp(n,e,t){const r=new zr,i=[];for(const a of n.elements){if(t.is(a.alt)===!1)continue;if(a.state.type===Rn){i.push(a);continue}const o=a.state.transitions.length;for(let c=0;c0&&!Ap(s))for(const a of i)s.add(a);return s}function gp(n,e){if(n instanceof Mi&&Ec(e,n.tokenType))return n.target}function yp(n,e){let t;for(const r of n.elements)if(e.is(r.alt)===!0){if(t===void 0)t=r.alt;else if(t!==r.alt)return}return t}function Xc(n){return{configs:n,edges:{},isAcceptState:!1,prediction:-1}}function Ps(n,e,t,r){return r=Jc(n,r),e.edges[t.tokenTypeIdx]=r,r}function Jc(n,e){if(e===Wn)return e;const t=e.configs.key,r=n.states[t];return r!==void 0?r:(e.configs.finalize(),n.states[t]=e,e)}function Tp(n){const e=new zr,t=n.transitions.length;for(let r=0;r0){const i=[...n.stack],a={state:i.pop(),alt:n.alt,stack:i};jn(a,e)}else e.add(n);return}t.epsilonOnlyTransitions||e.add(n);const r=t.transitions.length;for(let i=0;i1)return!0;return!1}function Ip(n){for(const e of Array.from(n.values()))if(Object.keys(e).length===1)return!0;return!1}var Ms;(function(n){function e(t){return typeof t=="string"}n.is=e})(Ms||(Ms={}));var qr;(function(n){function e(t){return typeof t=="string"}n.is=e})(qr||(qr={}));var Ds;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Ds||(Ds={}));var Hn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Hn||(Hn={}));var P;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Hn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Hn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&p.uinteger(i.line)&&p.uinteger(i.character)}n.is=t})(P||(P={}));var b;(function(n){function e(r,i,s,a){if(p.uinteger(r)&&p.uinteger(i)&&p.uinteger(s)&&p.uinteger(a))return{start:P.create(r,i),end:P.create(s,a)};if(P.is(r)&&P.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&P.is(i.start)&&P.is(i.end)}n.is=t})(b||(b={}));var Kn;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&b.is(i.range)&&(p.string(i.uri)||p.undefined(i.uri))}n.is=t})(Kn||(Kn={}));var Fs;(function(n){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&b.is(i.targetRange)&&p.string(i.targetUri)&&b.is(i.targetSelectionRange)&&(b.is(i.originSelectionRange)||p.undefined(i.originSelectionRange))}n.is=t})(Fs||(Fs={}));var Yr;(function(n){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.numberRange(i.red,0,1)&&p.numberRange(i.green,0,1)&&p.numberRange(i.blue,0,1)&&p.numberRange(i.alpha,0,1)}n.is=t})(Yr||(Yr={}));var Gs;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&b.is(i.range)&&Yr.is(i.color)}n.is=t})(Gs||(Gs={}));var Us;(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.undefined(i.textEdit)||Vt.is(i))&&(p.undefined(i.additionalTextEdits)||p.typedArray(i.additionalTextEdits,Vt.is))}n.is=t})(Us||(Us={}));var Bs;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Bs||(Bs={}));var Vs;(function(n){function e(r,i,s,a,o,c){const l={startLine:r,endLine:i};return p.defined(s)&&(l.startCharacter=s),p.defined(a)&&(l.endCharacter=a),p.defined(o)&&(l.kind=o),p.defined(c)&&(l.collapsedText=c),l}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.uinteger(i.startLine)&&p.uinteger(i.startLine)&&(p.undefined(i.startCharacter)||p.uinteger(i.startCharacter))&&(p.undefined(i.endCharacter)||p.uinteger(i.endCharacter))&&(p.undefined(i.kind)||p.string(i.kind))}n.is=t})(Vs||(Vs={}));var Xr;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&Kn.is(i.location)&&p.string(i.message)}n.is=t})(Xr||(Xr={}));var Ws;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Ws||(Ws={}));var js;(function(n){n.Unnecessary=1,n.Deprecated=2})(js||(js={}));var Hs;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&p.string(r.href)}n.is=e})(Hs||(Hs={}));var zn;(function(n){function e(r,i,s,a,o,c){let l={range:r,message:i};return p.defined(s)&&(l.severity=s),p.defined(a)&&(l.code=a),p.defined(o)&&(l.source=o),p.defined(c)&&(l.relatedInformation=c),l}n.create=e;function t(r){var i;let s=r;return p.defined(s)&&b.is(s.range)&&p.string(s.message)&&(p.number(s.severity)||p.undefined(s.severity))&&(p.integer(s.code)||p.string(s.code)||p.undefined(s.code))&&(p.undefined(s.codeDescription)||p.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(p.string(s.source)||p.undefined(s.source))&&(p.undefined(s.relatedInformation)||p.typedArray(s.relatedInformation,Xr.is))}n.is=t})(zn||(zn={}));var Bt;(function(n){function e(r,i,...s){let a={title:r,command:i};return p.defined(s)&&s.length>0&&(a.arguments=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.title)&&p.string(i.command)}n.is=t})(Bt||(Bt={}));var Vt;(function(n){function e(s,a){return{range:s,newText:a}}n.replace=e;function t(s,a){return{range:{start:s,end:s},newText:a}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){const a=s;return p.objectLiteral(a)&&p.string(a.newText)&&b.is(a.range)}n.is=i})(Vt||(Vt={}));var Jr;(function(n){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(p.string(i.description)||i.description===void 0)}n.is=t})(Jr||(Jr={}));var Wt;(function(n){function e(t){const r=t;return p.string(r)}n.is=e})(Wt||(Wt={}));var Ks;(function(n){function e(s,a,o){return{range:s,newText:a,annotationId:o}}n.replace=e;function t(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}n.insert=t;function r(s,a){return{range:s,newText:"",annotationId:a}}n.del=r;function i(s){const a=s;return Vt.is(a)&&(Jr.is(a.annotationId)||Wt.is(a.annotationId))}n.is=i})(Ks||(Ks={}));var Qr;(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&ri.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(Qr||(Qr={}));var Zr;(function(n){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&p.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Wt.is(i.annotationId))}n.is=t})(Zr||(Zr={}));var ei;(function(n){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&p.string(i.oldUri)&&p.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Wt.is(i.annotationId))}n.is=t})(ei||(ei={}));var ti;(function(n){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&p.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||p.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||p.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Wt.is(i.annotationId))}n.is=t})(ti||(ti={}));var ni;(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>p.string(i.kind)?Zr.is(i)||ei.is(i)||ti.is(i):Qr.is(i)))}n.is=e})(ni||(ni={}));var zs;(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)}n.is=t})(zs||(zs={}));var qs;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.integer(i.version)}n.is=t})(qs||(qs={}));var ri;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&(i.version===null||p.integer(i.version))}n.is=t})(ri||(ri={}));var Ys;(function(n){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.string(i.languageId)&&p.integer(i.version)&&p.string(i.text)}n.is=t})(Ys||(Ys={}));var ii;(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){const r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(ii||(ii={}));var un;(function(n){function e(t){const r=t;return p.objectLiteral(t)&&ii.is(r.kind)&&p.string(r.value)}n.is=e})(un||(un={}));var Xs;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Xs||(Xs={}));var Js;(function(n){n.PlainText=1,n.Snippet=2})(Js||(Js={}));var Qs;(function(n){n.Deprecated=1})(Qs||(Qs={}));var Zs;(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){const i=r;return i&&p.string(i.newText)&&b.is(i.insert)&&b.is(i.replace)}n.is=t})(Zs||(Zs={}));var ea;(function(n){n.asIs=1,n.adjustIndentation=2})(ea||(ea={}));var ta;(function(n){function e(t){const r=t;return r&&(p.string(r.detail)||r.detail===void 0)&&(p.string(r.description)||r.description===void 0)}n.is=e})(ta||(ta={}));var na;(function(n){function e(t){return{label:t}}n.create=e})(na||(na={}));var ra;(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(ra||(ra={}));var qn;(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){const i=r;return p.string(i)||p.objectLiteral(i)&&p.string(i.language)&&p.string(i.value)}n.is=t})(qn||(qn={}));var ia;(function(n){function e(t){let r=t;return!!r&&p.objectLiteral(r)&&(un.is(r.contents)||qn.is(r.contents)||p.typedArray(r.contents,qn.is))&&(t.range===void 0||b.is(t.range))}n.is=e})(ia||(ia={}));var sa;(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(sa||(sa={}));var aa;(function(n){function e(t,r,...i){let s={label:t};return p.defined(r)&&(s.documentation=r),p.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(aa||(aa={}));var oa;(function(n){n.Text=1,n.Read=2,n.Write=3})(oa||(oa={}));var ca;(function(n){function e(t,r){let i={range:t};return p.number(r)&&(i.kind=r),i}n.create=e})(ca||(ca={}));var la;(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(la||(la={}));var ua;(function(n){n.Deprecated=1})(ua||(ua={}));var da;(function(n){function e(t,r,i,s,a){let o={name:t,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}n.create=e})(da||(da={}));var fa;(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(fa||(fa={}));var ha;(function(n){function e(r,i,s,a,o,c){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(l.children=c),l}n.create=e;function t(r){let i=r;return i&&p.string(i.name)&&p.number(i.kind)&&b.is(i.range)&&b.is(i.selectionRange)&&(i.detail===void 0||p.string(i.detail))&&(i.deprecated===void 0||p.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(ha||(ha={}));var pa;(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(pa||(pa={}));var Yn;(function(n){n.Invoked=1,n.Automatic=2})(Yn||(Yn={}));var ma;(function(n){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.typedArray(i.diagnostics,zn.is)&&(i.only===void 0||p.typedArray(i.only,p.string))&&(i.triggerKind===void 0||i.triggerKind===Yn.Invoked||i.triggerKind===Yn.Automatic)}n.is=t})(ma||(ma={}));var ga;(function(n){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Bt.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}n.create=e;function t(r){let i=r;return i&&p.string(i.title)&&(i.diagnostics===void 0||p.typedArray(i.diagnostics,zn.is))&&(i.kind===void 0||p.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Bt.is(i.command))&&(i.isPreferred===void 0||p.boolean(i.isPreferred))&&(i.edit===void 0||ni.is(i.edit))}n.is=t})(ga||(ga={}));var ya;(function(n){function e(r,i){let s={range:r};return p.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return p.defined(i)&&b.is(i.range)&&(p.undefined(i.command)||Bt.is(i.command))}n.is=t})(ya||(ya={}));var Ta;(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.uinteger(i.tabSize)&&p.boolean(i.insertSpaces)}n.is=t})(Ta||(Ta={}));var Ra;(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return p.defined(i)&&b.is(i.range)&&(p.undefined(i.target)||p.string(i.target))}n.is=t})(Ra||(Ra={}));var Aa;(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&b.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Aa||(Aa={}));var va;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(va||(va={}));var Ea;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Ea||(Ea={}));var ka;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(ka||(ka={}));var Sa;(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){const i=r;return i!=null&&b.is(i.range)&&p.string(i.text)}n.is=t})(Sa||(Sa={}));var Ia;(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){const i=r;return i!=null&&b.is(i.range)&&p.boolean(i.caseSensitiveLookup)&&(p.string(i.variableName)||i.variableName===void 0)}n.is=t})(Ia||(Ia={}));var xa;(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){const i=r;return i!=null&&b.is(i.range)&&(p.string(i.expression)||i.expression===void 0)}n.is=t})(xa||(xa={}));var Na;(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){const i=r;return p.defined(i)&&b.is(r.stoppedLocation)}n.is=t})(Na||(Na={}));var si;(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(si||(si={}));var ai;(function(n){function e(r){return{value:r}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.location===void 0||Kn.is(i.location))&&(i.command===void 0||Bt.is(i.command))}n.is=t})(ai||(ai={}));var Ca;(function(n){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&P.is(i.position)&&(p.string(i.label)||p.typedArray(i.label,ai.is))&&(i.kind===void 0||si.is(i.kind))&&i.textEdits===void 0||p.typedArray(i.textEdits,Vt.is)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.paddingLeft===void 0||p.boolean(i.paddingLeft))&&(i.paddingRight===void 0||p.boolean(i.paddingRight))}n.is=t})(Ca||(Ca={}));var _a;(function(n){function e(t){return{kind:"snippet",value:t}}n.createSnippet=e})(_a||(_a={}));var wa;(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(wa||(wa={}));var La;(function(n){function e(t){return{items:t}}n.create=e})(La||(La={}));var $a;(function(n){n.Invoked=0,n.Automatic=1})($a||($a={}));var Oa;(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Oa||(Oa={}));var ba;(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(ba||(ba={}));var Pa;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&qr.is(r.uri)&&p.string(r.name)}n.is=e})(Pa||(Pa={}));var Ma;(function(n){function e(s,a,o,c){return new xp(s,a,o,c)}n.create=e;function t(s){let a=s;return!!(p.defined(a)&&p.string(a.uri)&&(p.undefined(a.languageId)||p.string(a.languageId))&&p.uinteger(a.lineCount)&&p.func(a.getText)&&p.func(a.positionAt)&&p.func(a.offsetAt))}n.is=t;function r(s,a){let o=s.getText(),c=i(a,(u,d)=>{let f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f}),l=o.length;for(let u=c.length-1;u>=0;u--){let d=c[u],f=s.offsetAt(d.range.start),h=s.offsetAt(d.range.end);if(h<=l)o=o.substring(0,f)+d.newText+o.substring(h,o.length);else throw new Error("Overlapping edit");l=f}return o}n.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);let u=0,d=0,f=0;for(;u0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return P.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return P.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(h){return h===!0||h===!1}n.boolean=i;function s(h){return e.call(h)==="[object String]"}n.string=s;function a(h){return e.call(h)==="[object Number]"}n.number=a;function o(h,m,g){return e.call(h)==="[object Number]"&&m<=h&&h<=g}n.numberRange=o;function c(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}n.integer=c;function l(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}n.uinteger=l;function u(h){return e.call(h)==="[object Function]"}n.func=u;function d(h){return h!==null&&typeof h=="object"}n.objectLiteral=d;function f(h,m){return Array.isArray(h)&&h.every(m)}n.typedArray=f})(p||(p={}));class Np{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new Zc(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new Ui;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new oi(e.startOffset,e.image.length,Mr(e),e.tokenType,!1);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}construct(e){const t=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();(r==null?void 0:r.content.length)===0&&this.removeNode(r)}addHiddenTokens(e){for(const t of e){const r=new oi(t.startOffset,t.image.length,Mr(t),t.tokenType,!0);r.root=this.rootNode,this.addHiddenToken(this.rootNode,r)}}addHiddenToken(e,t){const{offset:r,end:i}=t;for(let s=0;so&&i=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class Bi extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Bi.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}}class Zc extends Ui{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ci=Symbol("Datatype");function wr(n){return n.$type===ci}const Da="​",el=n=>n.endsWith(Da)?n:n+Da;class tl{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new $p(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class Cp extends tl{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Np,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const r=e.fragment?void 0:Ni(e)?ci:lr(e),i=this.wrapper.DEFINE_RULE(el(e.name),this.startImplementation(r,t).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const r=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:r,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return r=>{if(!this.isRecording()){const s={$type:e};this.stack.push(s),e===ci&&(s.value="")}let i;try{i=t(r)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,t,r){const i=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(i)){const s=this.nodeBuilder.buildLeafNode(i,r),{assignment:a,isCrossRef:o}=this.getAssignment(r),c=this.current;if(a){const l=dt(r)?i.image:this.converter.convert(i.image,s);this.assign(a.operator,a.feature,l,s,o)}else if(wr(c)){let l=i.image;dt(r)||(l=this.converter.convert(l,s).toString()),c.value+=l}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,i){let s;this.isRecording()||(s=this.nodeBuilder.buildCompositeNode(r));const a=this.wrapper.wrapSubrule(e,t,i);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(a,r,s)}performSubruleAssignment(e,t,r){const{assignment:i,isCrossRef:s}=this.getAssignment(t);if(i)this.assign(i.operator,i.feature,e,r,s);else if(!i){const a=this.current;if(wr(a))a.value+=e.toString();else if(typeof e=="object"&&e){const o=e.$type,c=this.assignWithoutOverride(e,a);o&&(c.$type=o);const l=c;this.stack.pop(),this.stack.push(l)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(!r.$cstNode&&t.feature&&t.operator){r=this.construct(!1);const s=r.$cstNode.feature;this.nodeBuilder.buildCompositeNode(s)}const i={$type:e};this.stack.pop(),this.stack.push(i),t.feature&&t.operator&&this.assign(t.operator,t.feature,r,r.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return ad(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),wr(t)?this.converter.convert(t.value,t.$cstNode):(cd(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=ar(e,ut);this.assignmentMap.set(e,{assignment:t,isCrossRef:t?ki(t.terminal):!1})}return this.assignmentMap.get(e)}assign(e,t,r,i,s){const a=this.current;let o;switch(s&&typeof r=="string"?o=this.linker.buildReference(a,t,i,r):o=r,e){case"=":{a[t]=o;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const s=e[r];s===void 0?e[r]=i:Array.isArray(s)&&Array.isArray(i)&&(i.push(...s),e[r]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class _p{buildMismatchTokenMessage(e){return At.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return At.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return At.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return At.buildEarlyExitMessage(e)}}class nl extends _p{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class wp extends tl{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const r=this.wrapper.DEFINE_RULE(el(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const Lp={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new nl};class $p extends Gh{constructor(e,t){const r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},Lp),{lookaheadStrategy:r?new bi({maxLookahead:t.maxLookahead}):new ap}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function rl(n,e,t){return Op({parser:e,tokens:t,rules:new Map,ruleNames:new Map},n),e}function Op(n,e){const t=tc(e,!1),r=Q(e.rules).filter(Ce).filter(i=>t.has(i));for(const i of r){const s=Object.assign(Object.assign({},n),{consume:1,optional:1,subrule:1,many:1,or:1});s.rules.set(i.name,n.parser.rule(i,pt(s,i.definition)))}}function pt(n,e,t=!1){let r;if(dt(e))r=Up(n,e);else if(sr(e))r=bp(n,e);else if(ut(e))r=pt(n,e.terminal);else if(ki(e))r=il(n,e);else if(ft(e))r=Pp(n,e);else if(bo(e))r=Dp(n,e);else if(qo(e))r=Fp(n,e);else if(Si(e))r=Gp(n,e);else if(Qu(e)){const i=n.consume++;r=()=>n.parser.consume(i,tt,e)}else throw new yo(e.$cstNode,`Unexpected element type: ${e.$type}`);return sl(n,t?void 0:Xn(e),r,e.cardinality)}function bp(n,e){const t=lr(e);return()=>n.parser.action(t,e)}function Pp(n,e){const t=e.rule.ref;if(Ce(t)){const r=n.subrule++,i=e.arguments.length>0?Mp(t,e.arguments):()=>({});return s=>n.parser.subrule(r,al(n,t),e,i(s))}else if(gt(t)){const r=n.consume++,i=li(n,t.name);return()=>n.parser.consume(r,i,e)}else if(t)ir();else throw new yo(e.$cstNode,`Undefined rule type: ${e.$type}`)}function Mp(n,e){const t=e.map(r=>He(r.value));return r=>{const i={};for(let s=0;se(r)||t(r)}else if(Fu(n)){const e=He(n.left),t=He(n.right);return r=>e(r)&&t(r)}else if(Bu(n)){const e=He(n.value);return t=>!e(t)}else if(ju(n)){const e=n.parameter.ref.name;return t=>t!==void 0&&t[e]===!0}else if(Du(n)){const e=!!n.true;return()=>e}ir()}function Dp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);{const t=[];for(const i of e.elements){const s={ALT:pt(n,i,!0)},a=Xn(i);a&&(s.GATE=He(a)),t.push(s)}const r=n.or++;return i=>n.parser.alternatives(r,t.map(s=>{const a={ALT:()=>s.ALT(i)},o=s.GATE;return o&&(a.GATE=()=>o(i)),a}))}}function Fp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);const t=[];for(const o of e.elements){const c={ALT:pt(n,o,!0)},l=Xn(o);l&&(c.GATE=He(l)),t.push(c)}const r=n.or++,i=(o,c)=>{const l=c.getRuleStack().join("-");return`uGroup_${o}_${l}`},s=o=>n.parser.alternatives(r,t.map((c,l)=>{const u={ALT:()=>!0},d=n.parser;u.ALT=()=>{if(c.ALT(o),!d.isRecording()){const h=i(r,d);d.unorderedGroups.get(h)||d.unorderedGroups.set(h,[]);const m=d.unorderedGroups.get(h);typeof(m==null?void 0:m[l])>"u"&&(m[l]=!0)}};const f=c.GATE;return f?u.GATE=()=>f(o):u.GATE=()=>{const h=d.unorderedGroups.get(i(r,d));return!(h!=null&&h[l])},u})),a=sl(n,Xn(e),s,"*");return o=>{a(o),n.parser.isRecording()||n.parser.unorderedGroups.delete(i(r,n.parser))}}function Gp(n,e){const t=e.elements.map(r=>pt(n,r));return r=>t.forEach(i=>i(r))}function Xn(n){if(Si(n))return n.guardCondition}function il(n,e,t=e.terminal){if(t)if(ft(t)&&Ce(t.rule.ref)){const r=n.subrule++;return i=>n.parser.subrule(r,al(n,t.rule.ref),e,i)}else if(ft(t)&>(t.rule.ref)){const r=n.consume++,i=li(n,t.rule.ref.name);return()=>n.parser.consume(r,i,e)}else if(dt(t)){const r=n.consume++,i=li(n,t.value);return()=>n.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=ic(e.type.ref),i=r==null?void 0:r.terminal;if(!i)throw new Error("Could not find name assignment for type: "+lr(e.type.ref));return il(n,e,i)}}function Up(n,e){const t=n.consume++,r=n.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>n.parser.consume(t,r,e)}function sl(n,e,t,r){const i=e&&He(e);if(!r)if(i){const s=n.or++;return a=>n.parser.alternatives(s,[{ALT:()=>t(a),GATE:()=>i(a)},{ALT:$s(),GATE:()=>!i(a)}])}else return t;if(r==="*"){const s=n.many++;return a=>n.parser.many(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else if(r==="+"){const s=n.many++;if(i){const a=n.or++;return o=>n.parser.alternatives(a,[{ALT:()=>n.parser.atLeastOne(s,{DEF:()=>t(o)}),GATE:()=>i(o)},{ALT:$s(),GATE:()=>!i(o)}])}else return a=>n.parser.atLeastOne(s,{DEF:()=>t(a)})}else if(r==="?"){const s=n.optional++;return a=>n.parser.optional(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else ir()}function al(n,e){const t=Bp(n,e),r=n.rules.get(t);if(!r)throw new Error(`Rule "${t}" not found."`);return r}function Bp(n,e){if(Ce(e))return e.name;if(n.ruleNames.has(e))return n.ruleNames.get(e);{let t=e,r=t.$container,i=e.$type;for(;!Ce(r);)(Si(r)||bo(r)||qo(r))&&(i=r.elements.indexOf(t).toString()+":"+i),t=r,r=r.$container;return i=r.name+":"+i,n.ruleNames.set(e,i),i}}function li(n,e){const t=n.tokens[e];if(!t)throw new Error(`Token "${e}" not found."`);return t}function Vp(n){const e=n.Grammar,t=n.parser.Lexer,r=new wp(n);return rl(e,r,t.definition),r.finalize(),r}function Wp(n){const e=jp(n);return e.finalize(),e}function jp(n){const e=n.Grammar,t=n.parser.Lexer,r=new Cp(n);return rl(e,r,t.definition)}class ol{buildTokens(e,t){const r=Q(tc(e,!1)),i=this.buildTerminalTokens(r),s=this.buildKeywordTokens(r,i,t);return i.forEach(a=>{const o=a.PATTERN;typeof o=="object"&&o&&"test"in o&&cs(o)?s.unshift(a):s.push(a)}),s}buildTerminalTokens(e){return e.filter(gt).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){const t=Ci(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=cs(t)?de.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?(t.lastIndex=i,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Ce).flatMap(i=>pn(i).filter(dt)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,t,!!(r!=null&&r.caseInsensitive)))}buildKeywordToken(e,t,r){return{name:e.value,PATTERN:this.buildKeywordPattern(e,r),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(gd(e.value)):e.value}findLongerAlt(e,t){return t.reduce((r,i)=>{const s=i==null?void 0:i.PATTERN;return s!=null&&s.source&&yd("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class cl{convert(e,t){let r=t.grammarSource;if(ki(r)&&(r=vd(r)),ft(r)){const i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,t)}return e}runConverter(e,t,r){var i;switch(e.name.toUpperCase()){case"INT":return je.convertInt(t);case"STRING":return je.convertString(t);case"ID":return je.convertID(t)}switch((i=Cd(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return je.convertNumber(t);case"boolean":return je.convertBoolean(t);case"bigint":return je.convertBigint(t);case"date":return je.convertDate(t);default:return t}}}var je;(function(n){function e(l){let u="";for(let d=1;dll(e))}se.stringArray=Yp;var jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.Emitter=jt.Event=void 0;const Xp=yr;var Fa;(function(n){const e={dispose(){}};n.None=function(){return e}})(Fa||(jt.Event=Fa={}));class Jp{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new Jp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=Tr._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}jt.Emitter=Tr;Tr._noop=function(){};var X;Object.defineProperty(dn,"__esModule",{value:!0});var fi=dn.CancellationTokenSource=X=dn.CancellationToken=void 0;const Qp=yr,Zp=se,hi=jt;var Jn;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:hi.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:hi.Event.None});function e(t){const r=t;return r&&(r===n.None||r===n.Cancelled||Zp.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(Jn||(X=dn.CancellationToken=Jn={}));const em=Object.freeze(function(n,e){const t=(0,Qp.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}});class Ga{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?em:(this._emitter||(this._emitter=new hi.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class tm{get token(){return this._token||(this._token=new Ga),this._token}cancel(){this._token?this._token.cancel():this._token=Jn.Cancelled}dispose(){this._token?this._token instanceof Ga&&this._token.dispose():this._token=Jn.None}}fi=dn.CancellationTokenSource=tm;function nm(){return new Promise(n=>{typeof setImmediate>"u"?setTimeout(n,0):setImmediate(n)})}let Ua=0,rm=10;const Qn=Symbol("OperationCancelled");function Vi(n){return n===Qn}async function Oe(n){if(n===X.None)return;const e=Date.now();if(e-Ua>=rm&&(Ua=e,await nm()),n.isCancellationRequested)throw Qn}class Wi{constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}}class fn{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(const r of e)if(fn.isIncremental(r)){const i=fl(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),c=Math.max(i.end.line,0);let l=this._lineOffsets;const u=Ba(r.text,!1,s);if(c-o===u.length)for(let f=0,h=u.length;fe?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const i=e.line+1t&&dl(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")}static isFull(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0}}var pi;(function(n){function e(i,s,a,o){return new fn(i,s,a,o)}n.create=e;function t(i,s,a){if(i instanceof fn)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){const a=i.getText(),o=mi(s.map(im),(u,d)=>{const f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f});let c=0;const l=[];for(const u of o){const d=i.offsetAt(u.range.start);if(dc&&l.push(a.substring(c,d)),u.newText.length&&l.push(u.newText),c=i.offsetAt(u.range.end)}return l.push(a.substr(c)),l.join("")}n.applyEdits=r})(pi||(pi={}));function mi(n,e){if(n.length<=1)return n;const t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);mi(r,e),mi(i,e);let s=0,a=0,o=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function im(n){const e=fl(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var hl;(()=>{var n={470:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function a(c,l){for(var u,d="",f=0,h=-1,m=0,g=0;g<=c.length;++g){if(g2){var A=d.lastIndexOf("/");if(A!==d.length-1){A===-1?(d="",f=0):f=(d=d.slice(0,A)).length-1-d.lastIndexOf("/"),h=g,m=0;continue}}else if(d.length===2||d.length===1){d="",f=0,h=g,m=0;continue}}l&&(d.length>0?d+="/..":d="..",f=2)}else d.length>0?d+="/"+c.slice(h+1,g):d=c.slice(h+1,g),f=g-h-1;h=g,m=0}else u===46&&m!==-1?++m:m=-1}return d}var o={resolve:function(){for(var c,l="",u=!1,d=arguments.length-1;d>=-1&&!u;d--){var f;d>=0?f=arguments[d]:(c===void 0&&(c=process.cwd()),f=c),s(f),f.length!==0&&(l=f+"/"+l,u=f.charCodeAt(0)===47)}return l=a(l,!u),u?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(c){if(s(c),c.length===0)return".";var l=c.charCodeAt(0)===47,u=c.charCodeAt(c.length-1)===47;return(c=a(c,!l)).length!==0||l||(c="."),c.length>0&&u&&(c+="/"),l?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,l=0;l0&&(c===void 0?c=u:c+="/"+u)}return c===void 0?".":o.normalize(c)},relative:function(c,l){if(s(c),s(l),c===l||(c=o.resolve(c))===(l=o.resolve(l)))return"";for(var u=1;ug){if(l.charCodeAt(h+y)===47)return l.slice(h+y+1);if(y===0)return l.slice(h+y)}else f>g&&(c.charCodeAt(u+y)===47?A=y:y===0&&(A=0));break}var v=c.charCodeAt(u+y);if(v!==l.charCodeAt(h+y))break;v===47&&(A=y)}var R="";for(y=u+A+1;y<=d;++y)y!==d&&c.charCodeAt(y)!==47||(R.length===0?R+="..":R+="/..");return R.length>0?R+l.slice(h+A):(h+=A,l.charCodeAt(h)===47&&++h,l.slice(h))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var l=c.charCodeAt(0),u=l===47,d=-1,f=!0,h=c.length-1;h>=1;--h)if((l=c.charCodeAt(h))===47){if(!f){d=h;break}}else f=!1;return d===-1?u?"/":".":u&&d===1?"//":c.slice(0,d)},basename:function(c,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(c);var u,d=0,f=-1,h=!0;if(l!==void 0&&l.length>0&&l.length<=c.length){if(l.length===c.length&&l===c)return"";var m=l.length-1,g=-1;for(u=c.length-1;u>=0;--u){var A=c.charCodeAt(u);if(A===47){if(!h){d=u+1;break}}else g===-1&&(h=!1,g=u+1),m>=0&&(A===l.charCodeAt(m)?--m==-1&&(f=u):(m=-1,f=g))}return d===f?f=g:f===-1&&(f=c.length),c.slice(d,f)}for(u=c.length-1;u>=0;--u)if(c.charCodeAt(u)===47){if(!h){d=u+1;break}}else f===-1&&(h=!1,f=u+1);return f===-1?"":c.slice(d,f)},extname:function(c){s(c);for(var l=-1,u=0,d=-1,f=!0,h=0,m=c.length-1;m>=0;--m){var g=c.charCodeAt(m);if(g!==47)d===-1&&(f=!1,d=m+1),g===46?l===-1?l=m:h!==1&&(h=1):l!==-1&&(h=-1);else if(!f){u=m+1;break}}return l===-1||d===-1||h===0||h===1&&l===d-1&&l===u+1?"":c.slice(l,d)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return function(l,u){var d=u.dir||u.root,f=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+f:d+"/"+f:f}(0,c)},parse:function(c){s(c);var l={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return l;var u,d=c.charCodeAt(0),f=d===47;f?(l.root="/",u=1):u=0;for(var h=-1,m=0,g=-1,A=!0,y=c.length-1,v=0;y>=u;--y)if((d=c.charCodeAt(y))!==47)g===-1&&(A=!1,g=y+1),d===46?h===-1?h=y:v!==1&&(v=1):h!==-1&&(v=-1);else if(!A){m=y+1;break}return h===-1||g===-1||v===0||v===1&&h===g-1&&h===m+1?g!==-1&&(l.base=l.name=m===0&&f?c.slice(1,g):c.slice(m,g)):(m===0&&f?(l.name=c.slice(1,h),l.base=c.slice(1,g)):(l.name=c.slice(m,h),l.base=c.slice(m,g)),l.ext=c.slice(h,g)),m>0?l.dir=c.slice(0,m-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function t(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return n[i](a,a.exports,t),a.exports}t.d=(i,s)=>{for(var a in s)t.o(s,a)&&!t.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},t.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),t.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;t.r(r),t.d(r,{URI:()=>f,Utils:()=>Se}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function c(k,T){if(!k.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}", path: "${k.path}", query: "${k.query}", fragment: "${k.fragment}"}`);if(k.scheme&&!s.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!a.test(k.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const l="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(T,E,I,O,$,L=!1){Je(this,"scheme");Je(this,"authority");Je(this,"path");Je(this,"query");Je(this,"fragment");typeof T=="object"?(this.scheme=T.scheme||l,this.authority=T.authority||l,this.path=T.path||l,this.query=T.query||l,this.fragment=T.fragment||l):(this.scheme=function(ye,z){return ye||z?ye:"file"}(T,L),this.authority=E||l,this.path=function(ye,z){switch(ye){case"https":case"http":case"file":z?z[0]!==u&&(z=u+z):z=u}return z}(this.scheme,I||l),this.query=O||l,this.fragment=$||l,c(this,L))}static isUri(T){return T instanceof f||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}get fsPath(){return v(this)}with(T){if(!T)return this;let{scheme:E,authority:I,path:O,query:$,fragment:L}=T;return E===void 0?E=this.scheme:E===null&&(E=l),I===void 0?I=this.authority:I===null&&(I=l),O===void 0?O=this.path:O===null&&(O=l),$===void 0?$=this.query:$===null&&($=l),L===void 0?L=this.fragment:L===null&&(L=l),E===this.scheme&&I===this.authority&&O===this.path&&$===this.query&&L===this.fragment?this:new m(E,I,O,$,L)}static parse(T,E=!1){const I=d.exec(T);return I?new m(I[2]||l,ne(I[4]||l),ne(I[5]||l),ne(I[7]||l),ne(I[9]||l),E):new m(l,l,l,l,l)}static file(T){let E=l;if(i&&(T=T.replace(/\\/g,u)),T[0]===u&&T[1]===u){const I=T.indexOf(u,2);I===-1?(E=T.substring(2),T=u):(E=T.substring(2,I),T=T.substring(I)||u)}return new m("file",E,T,l,l)}static from(T){const E=new m(T.scheme,T.authority,T.path,T.query,T.fragment);return c(E,!0),E}toString(T=!1){return R(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof f)return T;{const E=new m(T);return E._formatted=T.external,E._fsPath=T._sep===h?T.fsPath:null,E}}return T}}const h=i?1:void 0;class m extends f{constructor(){super(...arguments);Je(this,"_formatted",null);Je(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=v(this)),this._fsPath}toString(E=!1){return E?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const E={$mid:1};return this._fsPath&&(E.fsPath=this._fsPath,E._sep=h),this._formatted&&(E.external=this._formatted),this.path&&(E.path=this.path),this.scheme&&(E.scheme=this.scheme),this.authority&&(E.authority=this.authority),this.query&&(E.query=this.query),this.fragment&&(E.fragment=this.fragment),E}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function A(k,T,E){let I,O=-1;for(let $=0;$=97&&L<=122||L>=65&&L<=90||L>=48&&L<=57||L===45||L===46||L===95||L===126||T&&L===47||E&&L===91||E&&L===93||E&&L===58)O!==-1&&(I+=encodeURIComponent(k.substring(O,$)),O=-1),I!==void 0&&(I+=k.charAt($));else{I===void 0&&(I=k.substr(0,$));const ye=g[L];ye!==void 0?(O!==-1&&(I+=encodeURIComponent(k.substring(O,$)),O=-1),I+=ye):O===-1&&(O=$)}}return O!==-1&&(I+=encodeURIComponent(k.substring(O))),I!==void 0?I:k}function y(k){let T;for(let E=0;E1&&k.scheme==="file"?`//${k.authority}${k.path}`:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?k.path[1].toLowerCase()+k.path.substr(2):k.path,i&&(E=E.replace(/\//g,"\\")),E}function R(k,T){const E=T?y:A;let I="",{scheme:O,authority:$,path:L,query:ye,fragment:z}=k;if(O&&(I+=O,I+=":"),($||O==="file")&&(I+=u,I+=u),$){let V=$.indexOf("@");if(V!==-1){const at=$.substr(0,V);$=$.substr(V+1),V=at.lastIndexOf(":"),V===-1?I+=E(at,!1,!1):(I+=E(at.substr(0,V),!1,!1),I+=":",I+=E(at.substr(V+1),!1,!0)),I+="@"}$=$.toLowerCase(),V=$.lastIndexOf(":"),V===-1?I+=E($,!1,!0):(I+=E($.substr(0,V),!1,!0),I+=$.substr(V))}if(L){if(L.length>=3&&L.charCodeAt(0)===47&&L.charCodeAt(2)===58){const V=L.charCodeAt(1);V>=65&&V<=90&&(L=`/${String.fromCharCode(V+32)}:${L.substr(3)}`)}else if(L.length>=2&&L.charCodeAt(1)===58){const V=L.charCodeAt(0);V>=65&&V<=90&&(L=`${String.fromCharCode(V+32)}:${L.substr(2)}`)}I+=E(L,!0,!1)}return ye&&(I+="?",I+=E(ye,!1,!1)),z&&(I+="#",I+=T?z:A(z,!1,!1)),I}function N(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+N(k.substr(3)):k}}const F=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ne(k){return k.match(F)?k.replace(F,T=>N(T)):k}var we=t(470);const ge=we.posix||we,De="/";var Se;(function(k){k.joinPath=function(T,...E){return T.with({path:ge.join(T.path,...E)})},k.resolvePath=function(T,...E){let I=T.path,O=!1;I[0]!==De&&(I=De+I,O=!0);let $=ge.resolve(I,...E);return O&&$[0]===De&&!T.authority&&($=$.substring(1)),T.with({path:$})},k.dirname=function(T){if(T.path.length===0||T.path===De)return T;let E=ge.dirname(T.path);return E.length===1&&E.charCodeAt(0)===46&&(E=""),T.with({path:E})},k.basename=function(T){return ge.basename(T.path)},k.extname=function(T){return ge.extname(T.path)}})(Se||(Se={}))})(),hl=r})();const{URI:Ht,Utils:sn}=hl;var rt;(function(n){n.basename=sn.basename,n.dirname=sn.dirname,n.extname=sn.extname,n.joinPath=sn.joinPath,n.resolvePath=sn.resolvePath;function e(r,i){return(r==null?void 0:r.toString())===(i==null?void 0:i.toString())}n.equals=e;function t(r,i){const s=typeof r=="string"?r:r.path,a=typeof i=="string"?i:i.path,o=s.split("/").filter(f=>f.length>0),c=a.split("/").filter(f=>f.length>0);let l=0;for(;li??(i=pi.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}}class am{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Q(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,r.precomputedScopes=void 0,r.references=[],r.diagnostics=void 0),r}deleteDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,this.documentMap.delete(t)),r}}class om{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=X.None){for(const r of vt(e.parseResult.value))await Oe(t),Qo(r).forEach(i=>this.doLink(i,e))}doLink(e,t){const r=e.reference;if(r._ref===void 0)try{const i=this.getCandidate(e);if(xn(i))r._ref=i;else if(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){const s=this.loadAstNode(i);r._ref=s??this.createLinkingError(e,i)}}catch(i){r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': ${i}`})}t.references.push(r)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const r=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return r??this.createLinkingError(e)}buildReference(e,t,r,i){const s=this,a={$refNode:r,$refText:i,get ref(){var o;if(ae(this._ref))return this._ref;if(Su(this._nodeDescription)){const c=s.loadAstNode(this._nodeDescription);this._ref=c??s.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){const c=s.getLinkedNode({reference:a,container:e,property:t});if(c.error&&Ue(e).state=e.end)return s.ref}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Nu(e,i)))return r}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(t!=null&&t.$cstNode){const r=this.nameProvider.getNameNode(t);return r??t.$cstNode}}findReferences(e,t){const r=[];if(t.includeDeclaration){const s=this.getReferenceToSelf(e);s&&r.push(s)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(s=>rt.equals(s.sourceUri,t.documentUri))),r.push(...i),Q(r)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const r=Ue(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:On(t),local:!0}}}}class ji{constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return br.sum(Q(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const i=r.indexOf(t);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){var t;return(t=this.map.get(e))!==null&&t!==void 0?t:[]}has(e,t){if(t===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Q(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return Q(this.map.keys())}values(){return Q(this.map.values()).flat()}entriesGroupedByKey(){return Q(this.map.entries())}}class Va{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}}class dm{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=X.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=Ii,i=X.None){const s=[];this.exportNode(e,s,t);for(const a of r(e))await Oe(i),this.exportNode(a,s,t);return s}exportNode(e,t,r){const i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async computeLocalScopes(e,t=X.None){const r=e.parseResult.value,i=new ji;for(const s of pn(r))await Oe(t),this.processNode(s,e,i);return i}processNode(e,t,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,t))}}}class Wa{constructor(e,t,r){var i;this.elements=e,this.outerScope=t,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?this.elements.find(r=>r.name.toLowerCase()===e.toLowerCase()):this.elements.find(r=>r.name===e);if(t)return t;if(this.outerScope)return this.outerScope.getElement(e)}}class fm{constructor(e,t,r){var i;this.elements=new Map,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1;for(const s of e){const a=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(a,s)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Q(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class pl{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class hm extends pl{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class pm extends pl{constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();const i=this.cacheForContext(e);if(i.has(t))return i.get(t);if(r){const s=r();return i.set(t,s),s}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}}class mm extends hm{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class gm{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new mm(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),i=Ue(e.container).precomputedScopes;if(i){let a=e.container;do{const o=i.get(a);o.length>0&&t.push(Q(o).filter(c=>this.reflection.isSubtype(c.type,r))),a=a.$container}while(a)}let s=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)s=this.createScope(t[a],s);return s}createScope(e,t,r){return new Wa(Q(e),t,r)}createScopeForNodes(e,t,r){const i=Q(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new Wa(i,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new fm(this.indexManager.allElements(e)))}}function ym(n){return typeof n.$comment=="string"}function ja(n){return typeof n=="object"&&!!n&&("$ref"in n||"$error"in n)}class Tm{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const r=t==null?void 0:t.replacer,i=(a,o)=>this.replacer(a,o,t),s=r?(a,o)=>r(a,o,i):i;try{return this.currentDocument=Ue(e),JSON.stringify(e,s,t==null?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const r=JSON.parse(e);return this.linkNode(r,r,t),r}replacer(e,t,{refText:r,sourceText:i,textRegions:s,comments:a,uriConverter:o}){var c,l,u,d;if(!this.ignoreProperties.has(e))if(Ge(t)){const f=t.ref,h=r?t.$refText:void 0;if(f){const m=Ue(f);let g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,t):g=m.uri.toString());const A=this.astNodeLocator.getAstNodePath(f);return{$ref:`${g}#${A}`,$refText:h}}else return{$error:(l=(c=t.error)===null||c===void 0?void 0:c.message)!==null&&l!==void 0?l:"Could not resolve reference",$refText:h}}else if(ae(t)){let f;if(s&&(f=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),(!e||t.$document)&&(f!=null&&f.$textRegion)&&(f.$textRegion.documentURI=(u=this.currentDocument)===null||u===void 0?void 0:u.uri.toString())),i&&!e&&(f??(f=Object.assign({},t)),f.$sourceText=(d=t.$cstNode)===null||d===void 0?void 0:d.text),a){f??(f=Object.assign({},t));const h=this.commentProvider.getComment(t);h&&(f.$comment=h.replace(/\r/g,""))}return f??t}else return t}addAstNodeRegionWithAssignmentsTo(e){const t=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=t(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith("$")).forEach(s=>{const a=kd(e.$cstNode,s).map(t);a.length!==0&&(i[s]=a)}),e}}linkNode(e,t,r,i,s,a){for(const[c,l]of Object.entries(e))if(Array.isArray(l))for(let u=0;u{try{await e.call(t,r,i,s)}catch(a){if(Vi(a))throw a;console.error("An error occurred during validation:",a);const o=a instanceof Error?a.message:String(a);a instanceof Error&&a.stack&&console.error(a.stack),i("error","An error occurred during validation: "+o,{node:r})}}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Q(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(i=>t.includes(i.category))),r.map(i=>i.check)}}class vm{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=X.None){const i=e.parseResult,s=[];if(await Oe(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(i,s,t),t.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LexingError})||(this.processParsingErrors(i,s,t),t.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.ParsingError}))||(this.processLinkingErrors(e,s,t),t.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,t,r))}catch(a){if(Vi(a))throw a;console.error("An error occurred during validation:",a)}return await Oe(r),s}processLexingErrors(e,t,r){for(const i of e.lexerErrors){const s={severity:Lr("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Ha(Qe.LexingError),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const a=i.previousToken;if(isNaN(a.startOffset)){const o={line:0,character:0};s={start:o,end:o}}else{const o={line:a.endLine-1,character:a.endColumn};s={start:o,end:o}}}}else s=Mr(i.token);if(s){const a={severity:Lr("error"),range:s,message:i.message,data:Ha(Qe.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(const i of e.references){const s=i.error;if(s){const a={node:s.container,property:s.property,index:s.index,data:{code:Qe.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};t.push(this.toDiagnostic("error",s.message,a))}}}async validateAst(e,t,r=X.None){const i=[],s=(a,o,c)=>{i.push(this.toDiagnostic(a,o,c))};return await Promise.all(vt(e).map(async a=>{await Oe(r);const o=this.validationRegistry.getChecks(a.$type,t.categories);for(const c of o)await c(a,s,r)})),i}toDiagnostic(e,t,r){return{message:t,range:Em(r),severity:Lr(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Em(n){if(n.range)return n.range;let e;return typeof n.property=="string"?e=rc(n.node.$cstNode,n.property,n.index):typeof n.keyword=="string"&&(e=Sd(n.node.$cstNode,n.keyword,n.index)),e??(e=n.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Lr(n){switch(n){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+n)}}var Qe;(function(n){n.LexingError="lexing-error",n.ParsingError="parsing-error",n.LinkingError="linking-error"})(Qe||(Qe={}));class km{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r=Ue(e)){t??(t=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let s;const a=()=>{var o;return s??(s=On((o=this.nameProvider.getNameNode(e))!==null&&o!==void 0?o:e.$cstNode))};return{node:e,name:t,get nameSegment(){return a()},selectionSegment:On(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}}class Sm{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=X.None){const r=[],i=e.parseResult.value;for(const s of vt(i))await Oe(t),Qo(s).filter(a=>!xn(a)).forEach(a=>{const o=this.createDescription(a);o&&r.push(o)});return r}createDescription(e){const t=e.reference.$nodeDescription,r=e.reference.$refNode;if(!t||!r)return;const i=Ue(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:On(r),local:rt.equals(t.documentUri,i)}}}class Im{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const a=s.indexOf(this.indexSeparator);if(a>0){const o=s.substring(0,a),c=parseInt(s.substring(a+1)),l=i[o];return l==null?void 0:l[c]}return i[s]},e)}}class xm{constructor(e){this._ready=new Wi,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,r;this.workspaceConfig=(r=(t=e.capabilities.workspace)===null||t===void 0?void 0:t.configuration)!==null&&r!==void 0?r:!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(t=>{this.updateSectionConfiguration(t,e.settings[t])})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}}var er;(function(n){function e(t){return{dispose:async()=>await t()}}n.create=e})(er||(er={}));class Nm{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new ji,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=U.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=X.None){var i,s;for(const a of e){const o=a.uri.toString();if(a.state===U.Validated){if(typeof t.validation=="boolean"&&t.validation)a.state=U.IndexedReferences,a.diagnostics=void 0,this.buildState.delete(o);else if(typeof t.validation=="object"){const c=this.buildState.get(o),l=(i=c==null?void 0:c.result)===null||i===void 0?void 0:i.validationChecks;if(l){const d=((s=t.validation.categories)!==null&&s!==void 0?s:Zn.all).filter(f=>!l.includes(f));d.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:d})},result:c.result}),a.state=U.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=U.Changed,await this.emitUpdate(e.map(a=>a.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=X.None){this.currentState=U.Changed;for(const a of t)this.langiumDocuments.deleteDocument(a),this.buildState.delete(a.toString()),this.indexManager.remove(a);for(const a of e){if(!this.langiumDocuments.invalidateDocument(a)){const c=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a);c.state=U.Changed,this.langiumDocuments.addDocument(c)}this.buildState.delete(a.toString())}const i=Q(e).concat(t).map(a=>a.toString()).toSet();this.langiumDocuments.all.filter(a=>!i.has(a.uri.toString())&&this.shouldRelink(a,i)).forEach(a=>{this.serviceRegistry.getServices(a.uri).references.Linker.unlink(a),a.state=Math.min(a.state,U.ComputedScopes),a.diagnostics=void 0}),await this.emitUpdate(e,t),await Oe(r);const s=this.langiumDocuments.all.filter(a=>{var o;return a.stater(e,t)))}shouldRelink(e,t){return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),er.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,U.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,U.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,U.ComputedScopes,r,async s=>{const a=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await a.computeLocalScopes(s,r)}),await this.runCancelable(e,U.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,U.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,U.Validated,r,s=>this.validate(s,r));for(const s of e){const a=this.buildState.get(s.uri.toString());a&&(a.completed=!0)}}prepareBuild(e,t){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:t,result:s==null?void 0:s.result})}}async runCancelable(e,t,r,i){const s=e.filter(a=>a.state{this.buildPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;if(t&&"path"in t?i=t:r=t,r??(r=X.None),i){const s=this.langiumDocuments.getDocument(i);if(s&&s.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):r.isCancellationRequested?Promise.reject(Qn):new Promise((s,a)=>{const o=this.onBuildPhase(e,()=>{if(o.dispose(),c.dispose(),i){const l=this.langiumDocuments.getDocument(i);s(l==null?void 0:l.uri)}else s(void 0)}),c=r.onCancellationRequested(()=>{o.dispose(),c.dispose(),a(Qn)})})}async notifyBuildPhase(e,t,r){if(e.length===0)return;const i=this.buildPhaseListeners.get(t);for(const s of i)await Oe(r),await s(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r,i;const s=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e).validation,o=typeof a=="object"?a:void 0,c=await s.validateDocument(e,o,t);e.diagnostics?e.diagnostics.push(...c):e.diagnostics=c;const l=this.buildState.get(e.uri.toString());if(l){(r=l.result)!==null&&r!==void 0||(l.result={});const u=(i=o==null?void 0:o.categories)!==null&&i!==void 0?i:Zn.all;l.result.validationChecks?l.result.validationChecks.push(...u):l.result.validationChecks=[...u]}}getBuildOptions(e){var t,r;return(r=(t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.options)!==null&&r!==void 0?r:{}}}class Cm{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new pm,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=Ue(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{rt.equals(a.targetUri,r)&&a.targetPath===t&&i.push(a)})}),Q(i)}allElements(e,t){let r=Q(this.symbolIndex.keys());return t&&(r=r.filter(i=>!t||t.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,t){var r;return t?this.symbolByTypeIndex.get(e,t,()=>{var s;return((s=this.symbolIndex.get(e))!==null&&s!==void 0?s:[]).filter(o=>this.astReflection.isSubtype(o.type,t))}):(r=this.symbolIndex.get(e))!==null&&r!==void 0?r:[]}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&t.has(i.targetUri.toString())):!1}}class _m{constructor(e){this.initialBuildOptions={},this._ready=new Wi,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=(t=e.workspaceFolders)!==null&&t!==void 0?t:void 0}initialized(e){return this.mutex.write(t=>{var r;return this.initializeWorkspace((r=this.folders)!==null&&r!==void 0?r:[],t)})}async initializeWorkspace(e,t=X.None){const r=await this.performStartup(e);await Oe(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),r=[],i=s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,t,i))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Ht.parse(e.uri)}async traverseFolder(e,t,r,i){const s=await this.fileSystemProvider.readDirectory(t);await Promise.all(s.map(async a=>{if(this.includeEntry(e,a,r)){if(a.isDirectory)await this.traverseFolder(e,a.uri,r,i);else if(a.isFile){const o=await this.langiumDocuments.getOrCreateDocument(a.uri);i(o)}}}))}includeEntry(e,t,r){const i=rt.basename(t.uri);if(i.startsWith("."))return!1;if(t.isDirectory)return i!=="node_modules"&&i!=="out";if(t.isFile){const s=rt.extname(t.uri);return r.includes(s)}return!1}}class wm{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=Ka(t)?Object.values(t):t;this.chevrotainLexer=new de(r,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:(t=r.groups.hidden)!==null&&t!==void 0?t:[]}}toTokenTypeDictionary(e){if(Ka(e))return e;const t=ml(e)?Object.values(e.modes).flat():e,r={};return t.forEach(i=>r[i.name]=i),r}}function Lm(n){return Array.isArray(n)&&(n.length===0||"name"in n[0])}function ml(n){return n&&"modes"in n&&"defaultMode"in n}function Ka(n){return!Lm(n)&&!ml(n)}function $m(n,e,t){let r,i;typeof n=="string"?(i=e,r=t):(i=n.range.start,r=e),i||(i=P.create(0,0));const s=gl(n),a=Hi(r),o=Pm({lines:s,position:i,options:a});return Um({index:0,tokens:o,position:i})}function Om(n,e){const t=Hi(e),r=gl(n);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=t.start,o=t.end;return!!(a!=null&&a.exec(i))&&!!(o!=null&&o.exec(s))}function gl(n){let e="";return typeof n=="string"?e=n:e=n.text,e.split(fd)}const za=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,bm=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Pm(n){var e,t,r;const i=[];let s=n.position.line,a=n.position.character;for(let o=0;o=u.length){if(i.length>0){const h=P.create(s,a);i.push({type:"break",content:"",range:b.create(h,h)})}}else{za.lastIndex=d;const h=za.exec(u);if(h){const m=h[0],g=h[1],A=P.create(s,a+d),y=P.create(s,a+d+m.length);i.push({type:"tag",content:g,range:b.create(A,y)}),d+=m.length,d=gi(u,d)}if(d0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function Mm(n,e,t,r){const i=[];if(n.length===0){const s=P.create(t,r),a=P.create(t,r+e.length);i.push({type:"text",content:e,range:b.create(s,a)})}else{let s=0;for(const o of n){const c=o.index,l=e.substring(s,c);l.length>0&&i.push({type:"text",content:e.substring(s,c),range:b.create(P.create(t,s+r),P.create(t,c+r))});let u=l.length+1;const d=o[1];if(i.push({type:"inline-tag",content:d,range:b.create(P.create(t,s+u+r),P.create(t,s+u+d.length+r))}),u+=d.length,o.length===4){u+=o[2].length;const f=o[3];i.push({type:"text",content:f,range:b.create(P.create(t,s+u+r),P.create(t,s+u+f.length+r))})}else i.push({type:"text",content:"",range:b.create(P.create(t,s+u+r),P.create(t,s+u+r))});s=c+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:b.create(P.create(t,s+r),P.create(t,s+r+a.length))})}return i}const Dm=/\S/,Fm=/\s*$/;function gi(n,e){const t=n.substring(e).match(Dm);return t?e+t.index:n.length}function Gm(n){const e=n.match(Fm);if(e&&typeof e.index=="number")return e.index}function Um(n){var e,t,r,i;const s=P.create(n.position.line,n.position.character);if(n.tokens.length===0)return new qa([],b.create(s,s));const a=[];for(;n.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(e.length===0)e=t.toString();else{const r=t.toString();e+=Ya(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{const i=r.toMarkdown(e);t+=Ya(t)+i}return t.trim()}}class Or{constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,r;return(r=(t=e==null?void 0:e.renderTag)===null||t===void 0?void 0:t.call(e,this))!==null&&r!==void 0?r:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const s=jm(this.name,t,e??{});if(typeof s=="string")return s}let r="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?r="*":(e==null?void 0:e.tag)==="bold"?r="**":(e==null?void 0:e.tag)==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} — ${t}`:this.content.inlines.length>1&&(i=`${i} +${t}`),this.inline?`{${i}}`:i}}function jm(n,e,t){var r,i;if(n==="linkplain"||n==="linkcode"||n==="link"){const s=e.indexOf(" ");let a=e;if(s>0){const c=gi(e,s);a=e.substring(c),e=e.substring(0,s)}return(n==="linkcode"||n==="link"&&t.link==="code")&&(a=`\`${a}\``),(i=(r=t.renderLink)===null||r===void 0?void 0:r.call(t,e,a))!==null&&i!==void 0?i:Hm(e,a)}}function Hm(n,e){try{return Ht.parse(n,!0),`[${e}](${n})`}catch{return n}}class yi{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let t="";for(let r=0;ri.range.start.line&&(t+=` +`)}return t}}class Al{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function Ya(n){return n.endsWith(` +`)?` +`:` + +`}class Km{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&Om(t))return $m(t).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,t,r){var i;const s=(i=this.findNameInPrecomputedScopes(e,t))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,t);if(s&&s.nameSegment){const a=s.nameSegment.range.start.line+1,o=s.nameSegment.range.start.character+1,c=s.documentUri.with({fragment:`L${a},${o}`});return`[${r}](${c.toString()})`}else return}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const i=Ue(e).precomputedScopes;if(!i)return;let s=e;do{const o=i.get(s).find(c=>c.name===t);if(o)return o;s=s.$container}while(s)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(i=>i.name===t)}}class zm{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return ym(e)?e.$comment:(t=Lu(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||t===void 0?void 0:t.text}}class qm{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Ym{constructor(){this.previousTokenSource=new fi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new fi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r){const i=new Wi,s={action:t,deferred:i,cancellationToken:r??X.None};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:i})=>{try{const s=await Promise.resolve().then(()=>t(i));r.resolve(s)}catch(s){Vi(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Xm{constructor(e){this.grammarElementIdMap=new Va,this.tokenTypeIdMap=new Va,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(t=>Object.assign({},t)),parserErrors:e.parserErrors.map(t=>Object.assign({},t)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,r=new Map;for(const i of vt(e))t.set(i,{});if(e.$cstNode)for(const i of Pr(e.$cstNode))r.set(i,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.dehydrateAstNode(o,t)):Ge(o)?a.push(this.dehydrateReference(o,t)):a.push(o)}else ae(s)?r[i]=this.dehydrateAstNode(s,t):Ge(s)?r[i]=this.dehydrateReference(s,t):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return go(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Gt(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,t)):mo(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const s of vt(e))t.set(s,{});let i;if(e.$cstNode)for(const s of Pr(e.$cstNode)){let a;"fullText"in s?(a=new Zc(s.fullText),i=a):"content"in s?a=new Ui:"tokenType"in s&&(a=this.hydrateCstLeafNode(s)),a&&(r.set(s,a),a.root=i)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.setParent(this.hydrateAstNode(o,t),r)):Ge(o)?a.push(this.hydrateReference(o,r,i,t)):a.push(o)}else ae(s)?r[i]=this.setParent(this.hydrateAstNode(s,t),r):Ge(s)?r[i]=this.hydrateReference(s,r,i,t):s!==void 0&&(r[i]=s);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){const i=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Gt(i))for(const s of e.content){const a=this.hydrateCstNode(s,t,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,i=e.length,s=e.startLine,a=e.startColumn,o=e.endLine,c=e.endColumn,l=e.hidden;return new oi(r,i,{start:{line:s,character:a},end:{line:o,character:c}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const t of vt(this.grammar))bu(t)&&this.grammarElementIdMap.set(t,e++)}}function Jt(n){return{documentation:{CommentProvider:e=>new zm(e),DocumentationProvider:e=>new Km(e)},parser:{AsyncParser:e=>new qm(e),GrammarConfig:e=>bd(e),LangiumParser:e=>Wp(e),CompletionParser:e=>Vp(e),ValueConverter:()=>new cl,TokenBuilder:()=>new ol,Lexer:e=>new wm(e),ParserErrorMessageProvider:()=>new nl},workspace:{AstNodeLocator:()=>new Im,AstNodeDescriptionProvider:e=>new km(e),ReferenceDescriptionProvider:e=>new Sm(e)},references:{Linker:e=>new om(e),NameProvider:()=>new lm,ScopeProvider:e=>new gm(e),ScopeComputation:e=>new dm(e),References:e=>new um(e)},serializer:{Hydrator:e=>new Xm(e),JsonSerializer:e=>new Tm(e)},validation:{DocumentValidator:e=>new vm(e),ValidationRegistry:e=>new Am(e)},shared:()=>n.shared}}function Qt(n){return{ServiceRegistry:()=>new Rm,workspace:{LangiumDocuments:e=>new am(e),LangiumDocumentFactory:e=>new sm(e),DocumentBuilder:e=>new Nm(e),IndexManager:e=>new Cm(e),WorkspaceManager:e=>new _m(e),FileSystemProvider:e=>n.fileSystemProvider(e),WorkspaceLock:()=>new Ym,ConfigurationProvider:e=>new xm(e)}}}var Xa;(function(n){n.merge=(e,t)=>tr(tr({},e),t)})(Xa||(Xa={}));function _e(n,e,t,r,i,s,a,o,c){const l=[n,e,t,r,i,s,a,o,c].reduce(tr,{});return vl(l)}const Ja=Symbol("isProxy");function vl(n,e){const t=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>Za(r,i,n,e||t),getOwnPropertyDescriptor:(r,i)=>(Za(r,i,n,e||t),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in n,ownKeys:()=>[...Reflect.ownKeys(n),Ja]});return t[Ja]=!0,t}const Qa=Symbol();function Za(n,e,t,r){if(e in n){if(n[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:n[e]});if(n[e]===Qa)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return n[e]}else if(e in t){const i=t[e];n[e]=Qa;try{n[e]=typeof i=="function"?i(r):vl(i,r)}catch(s){throw n[e]=s instanceof Error?s:void 0,s}return n[e]}else return}function tr(n,e){if(e){for(const[t,r]of Object.entries(e))if(r!==void 0){const i=n[t];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?n[t]=tr(i,r):n[t]=r}}return n}class Jm{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Zt={fileSystemProvider:()=>new Jm},Qm={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},Zm={AstReflection:()=>new Jo};function eg(){const n=_e(Qt(Zt),Zm),e=_e(Jt({shared:n}),Qm);return n.ServiceRegistry.register(e),e}function An(n){var e;const t=eg(),r=t.serializer.JsonSerializer.deserialize(n);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Ht.parse(`memory://${(e=r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var tg=Object.defineProperty,x=(n,e)=>tg(n,"name",{value:e,configurable:!0}),ng="Statement",rg="Architecture";function ig(n){return Me.isInstance(n,rg)}x(ig,"isArchitecture");var El="Branch";function sg(n){return Me.isInstance(n,El)}x(sg,"isBranch");var ag="Checkout",og="CherryPicking",kl="Commit";function cg(n){return Me.isInstance(n,kl)}x(cg,"isCommit");var lg="Common";function ug(n){return Me.isInstance(n,lg)}x(ug,"isCommon");var Sl="GitGraph";function dg(n){return Me.isInstance(n,Sl)}x(dg,"isGitGraph");var fg="Info";function hg(n){return Me.isInstance(n,fg)}x(hg,"isInfo");var Il="Merge";function pg(n){return Me.isInstance(n,Il)}x(pg,"isMerge");var mg="Packet";function gg(n){return Me.isInstance(n,mg)}x(gg,"isPacket");var yg="PacketBlock";function Tg(n){return Me.isInstance(n,yg)}x(Tg,"isPacketBlock");var Rg="Pie";function Ag(n){return Me.isInstance(n,Rg)}x(Ag,"isPie");var vg="PieSection";function Eg(n){return Me.isInstance(n,vg)}x(Eg,"isPieSection");var kg="Direction",kt,xl=(kt=class extends po{getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case El:case ag:case og:case kl:case Il:return this.isSubtype(ng,t);case kg:return this.isSubtype(Sl,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},x(kt,"MermaidAstReflection"),kt),Me=new xl,eo,Sg=x(()=>eo??(eo=An('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),to,Ig=x(()=>to??(to=An(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),no,xg=x(()=>no??(no=An('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),ro,Ng=x(()=>ro??(ro=An('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),io,Cg=x(()=>io??(io=An(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),_g={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},wg={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Lg={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},$g={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Og={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},vn={AstReflection:x(()=>new xl,"AstReflection")},bg={Grammar:x(()=>Sg(),"Grammar"),LanguageMetaData:x(()=>_g,"LanguageMetaData"),parser:{}},Pg={Grammar:x(()=>Ig(),"Grammar"),LanguageMetaData:x(()=>wg,"LanguageMetaData"),parser:{}},Mg={Grammar:x(()=>xg(),"Grammar"),LanguageMetaData:x(()=>Lg,"LanguageMetaData"),parser:{}},Dg={Grammar:x(()=>Ng(),"Grammar"),LanguageMetaData:x(()=>$g,"LanguageMetaData"),parser:{}},Fg={Grammar:x(()=>Cg(),"Grammar"),LanguageMetaData:x(()=>Og,"LanguageMetaData"),parser:{}},Gg=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Ug=/accTitle[\t ]*:([^\n\r]*)/,Bg=/title([\t ][^\n\r]*|)/,Vg={ACC_DESCR:Gg,ACC_TITLE:Ug,TITLE:Bg},St,Ki=(St=class extends cl{runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){const i=Vg[e.name];if(i===void 0)return;const s=i.exec(t);if(s!==null){if(s[1]!==void 0)return s[1].trim().replace(/[\t ]{2,}/gm," ");if(s[2]!==void 0)return s[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},x(St,"AbstractMermaidValueConverter"),St),It,zi=(It=class extends Ki{runCustomConverter(e,t,r){}},x(It,"CommonValueConverter"),It),xt,en=(xt=class extends ol{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const i=super.buildKeywordTokens(e,t,r);return i.forEach(s=>{this.keywords.has(s.name)&&s.PATTERN!==void 0&&(s.PATTERN=new RegExp(s.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},x(xt,"AbstractMermaidTokenBuilder"),xt),Nt;Nt=class extends en{},x(Nt,"CommonTokenBuilder");var Ct,Wg=(Ct=class extends en{constructor(){super(["gitGraph"])}},x(Ct,"GitGraphTokenBuilder"),Ct),Nl={parser:{TokenBuilder:x(()=>new Wg,"TokenBuilder"),ValueConverter:x(()=>new zi,"ValueConverter")}};function Cl(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Fg,Nl);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}x(Cl,"createGitGraphServices");var _t,jg=(_t=class extends en{constructor(){super(["info","showInfo"])}},x(_t,"InfoTokenBuilder"),_t),_l={parser:{TokenBuilder:x(()=>new jg,"TokenBuilder"),ValueConverter:x(()=>new zi,"ValueConverter")}};function wl(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),bg,_l);return e.ServiceRegistry.register(t),{shared:e,Info:t}}x(wl,"createInfoServices");var wt,Hg=(wt=class extends en{constructor(){super(["packet-beta"])}},x(wt,"PacketTokenBuilder"),wt),Ll={parser:{TokenBuilder:x(()=>new Hg,"TokenBuilder"),ValueConverter:x(()=>new zi,"ValueConverter")}};function $l(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Pg,Ll);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}x($l,"createPacketServices");var Lt,Kg=(Lt=class extends en{constructor(){super(["pie","showData"])}},x(Lt,"PieTokenBuilder"),Lt),$t,zg=($t=class extends Ki{runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},x($t,"PieValueConverter"),$t),Ol={parser:{TokenBuilder:x(()=>new Kg,"TokenBuilder"),ValueConverter:x(()=>new zg,"ValueConverter")}};function bl(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Mg,Ol);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}x(bl,"createPieServices");var Ot,qg=(Ot=class extends en{constructor(){super(["architecture"])}},x(Ot,"ArchitectureTokenBuilder"),Ot),bt,Yg=(bt=class extends Ki{runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return t.replace(/[[\]]/g,"").trim()}},x(bt,"ArchitectureValueConverter"),bt),Pl={parser:{TokenBuilder:x(()=>new qg,"TokenBuilder"),ValueConverter:x(()=>new Yg,"ValueConverter")}};function Ml(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Dg,Pl);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}x(Ml,"createArchitectureServices");var ct={},Xg={info:x(async()=>{const{createInfoServices:n}=await tn(async()=>{const{createInfoServices:t}=await Promise.resolve().then(()=>Zg);return{createInfoServices:t}},void 0),e=n().Info.parser.LangiumParser;ct.info=e},"info"),packet:x(async()=>{const{createPacketServices:n}=await tn(async()=>{const{createPacketServices:t}=await Promise.resolve().then(()=>ey);return{createPacketServices:t}},void 0),e=n().Packet.parser.LangiumParser;ct.packet=e},"packet"),pie:x(async()=>{const{createPieServices:n}=await tn(async()=>{const{createPieServices:t}=await Promise.resolve().then(()=>ty);return{createPieServices:t}},void 0),e=n().Pie.parser.LangiumParser;ct.pie=e},"pie"),architecture:x(async()=>{const{createArchitectureServices:n}=await tn(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(()=>ny);return{createArchitectureServices:t}},void 0),e=n().Architecture.parser.LangiumParser;ct.architecture=e},"architecture"),gitGraph:x(async()=>{const{createGitGraphServices:n}=await tn(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(()=>ry);return{createGitGraphServices:t}},void 0),e=n().GitGraph.parser.LangiumParser;ct.gitGraph=e},"gitGraph")};async function Jg(n,e){const t=Xg[n];if(!t)throw new Error(`Unknown diagram type: ${n}`);ct[n]||await t();const i=ct[n].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new Qg(i);return i.value}x(Jg,"parse");var Pt,Qg=(Pt=class extends Error{constructor(e){const t=e.lexerErrors.map(i=>i.message).join(` +`),r=e.parserErrors.map(i=>i.message).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}},x(Pt,"MermaidParseError"),Pt);const Zg=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:_l,createInfoServices:wl},Symbol.toStringTag,{value:"Module"})),ey=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:Ll,createPacketServices:$l},Symbol.toStringTag,{value:"Module"})),ty=Object.freeze(Object.defineProperty({__proto__:null,PieModule:Ol,createPieServices:bl},Symbol.toStringTag,{value:"Module"})),ny=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:Pl,createArchitectureServices:Ml},Symbol.toStringTag,{value:"Module"})),ry=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:Nl,createGitGraphServices:Cl},Symbol.toStringTag,{value:"Module"}));export{Jg as p}; diff --git a/pr-528/assets/chunks/gitGraphDiagram-JPZ3KUXI.BwzYD_Nw.js b/pr-528/assets/chunks/gitGraphDiagram-JPZ3KUXI.BwzYD_Nw.js new file mode 100644 index 000000000..6324443c4 --- /dev/null +++ b/pr-528/assets/chunks/gitGraphDiagram-JPZ3KUXI.BwzYD_Nw.js @@ -0,0 +1,65 @@ +import{p as Z}from"./chunk-RYO7GUH3.D7U7-9br.js";import{I as F}from"./chunk-6JKP7OK7.CM73knb6.js";import{B as U,_ as h,d as rr,D as er,E as tr,F as ar,l as w,s as nr,g as sr,b as or,c as cr,q as ir,r as dr,e as B,v as hr,j as lr,u as $r,G as fr}from"../app.CKrDwBa1.js";import{p as gr}from"./gitGraph-YCYPL57B.DhPOFTVl.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";import"./clone.BlcZCRmq.js";var u={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=U.gitGraph,z=h(()=>er({...yr,...tr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function j(){return ar({length:7})}h(j,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var pr=h(function(t){i.records.direction=t},"setDirection"),ur=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),xr=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;w.info("commit",r,a,s,e),w.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+j(),message:r,seq:i.records.seq++,type:s??u.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),w.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${j()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:u.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;w.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===u.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+j(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:u.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===u.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function A(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);A(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);A(t,r,e)}}t=N(t,e=>e.id),D(t)}h(D,"prettyPrintCommitHistory");var Cr=h(function(){w.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Er=h(function(){i.reset(),hr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){w.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:u,getConfig:z,setDirection:pr,setOptions:ur,getOptions:xr,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:sr,getAccDescription:or,setAccDescription:cr,setDiagramTitle:ir,getDiagramTitle:dr},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?u[t.type]:u.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?u[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);w.debug(r),Ir(r,X)},"parse")},S=rr(),b=S==null?void 0:S.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,p="LR",jr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],p="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return p==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=p==="TB"||p=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),Sr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Ar=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=Sr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Dr=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Dr(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===u.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===u.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===u.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===u.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===u.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==u.CHERRY_PICK&&(r.customId&&r.type===u.MERGE||r.type!==u.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),p==="TB"||p==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(p==="TB"||p==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,x=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` + ${s-c/2-k/2},${x+L} + ${s-c/2-k/2},${x-L} + ${a.posWithOffset-c/2-k},${x-y-L} + ${a.posWithOffset+c/2+k},${x-y-L} + ${a.posWithOffset+c/2+k},${x+y+L} + ${a.posWithOffset-c/2-k},${x+y+L}`),f.attr("cy",x).attr("cx",s-c/2+k/2).attr("r",1.5).attr("class","tag-hole"),p==="TB"||p==="BT"){const m=s+d;g.attr("class","tag-label-bkg").attr("points",` + ${a.x},${m+2} + ${a.x},${m-2} + ${a.x+R},${m-y-2} + ${a.x+R+c+4},${m-y-2} + ${a.x+R+c+4},${m+y+2} + ${a.x+R},${m+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Jr=h(t=>{switch(t.customType??t.type){case u.NORMAL:return"commit-normal";case u.REVERSE:return"commit-reverse";case u.HIGHLIGHT:return"commit-highlight";case u.MERGE:return"commit-merge";case u.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const c=s.get(n)??e;return r==="TB"?c.y+I:r==="BT"?(s.get(t.id)??e).y-I:c.x+I}}else return r==="TB"?P:r==="BT"?(s.get(t.id)??e).y-I:0;return 0},"calculatePosition"),Zr=h((t,r,a)=>{var c,o;const s=p==="BT"&&a?r:r+R,e=p==="TB"||p==="BT"?s:(c=C.get(t.branch))==null?void 0:c.pos,n=p==="TB"||p==="BT"?(o=C.get(t.branch))==null?void 0:o.pos:s;if(n===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:e,posWithOffset:s}},"getCommitPosition"),K=h((t,r,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let n=p==="TB"||p==="BT"?P:0;const c=[...r.keys()],o=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var x,m;const d=(x=r.get(f))==null?void 0:x.seq,y=(m=r.get(g))==null?void 0:m.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=c.sort($);p==="BT"&&(o&&Ar(l,r,n),l=l.reverse()),l.forEach(f=>{var y;const g=r.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);o&&(n=Qr(g,p,n,E));const d=Zr(g,n,o);if(a){const x=Jr(g),m=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,x,q,m),Vr(e,g,d,n),Xr(e,g,d,n)}p==="TB"||p==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=p==="BT"&&o?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fr=h((t,r,a,s,e)=>{const c=(p==="TB"||p==="BT"?a.xl.branch===c,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&o(l))},"shouldRerouteArrow"),H=h((t,r,a=0)=>{const s=t+Math.abs(t-r)/2;if(a>5)return s;if(W.every(c=>Math.abs(c-s)>=10))return W.push(s),s;const n=Math.abs(t-r);return H(t,r-n/5,a+1)},"findLane"),Ur=h((t,r,a,s)=>{var y,x,m,q,Y;const e=E.get(r.id),n=E.get(a.id);if(e===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const c=Fr(r,a,e,n,s);let o="",$="",l=0,f=0,g=(y=C.get(a.branch))==null?void 0:y.index;a.type===u.MERGE&&r.id!==a.parents[0]&&(g=(x=C.get(r.branch))==null?void 0:x.index);let d;if(c){o="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=e.yn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${$} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x+l} ${e.y} ${o} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):p==="BT"?(e.xn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${o} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):(e.yn.y&&(a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y===n.y&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),re=h((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const e=r.get(s);e.parents&&e.parents.length>0&&e.parents.forEach(n=>{Ur(a,r.get(n),e,r)})})},"drawArrows"),ee=h((t,r)=>{const a=t.append("g");r.forEach((s,e)=>{var x;const n=e%O,c=(x=C.get(s.name))==null?void 0:x.pos;if(c===void 0)throw new Error(`Position not found for branch ${s.name}`);const o=a.append("line");o.attr("x1",0),o.attr("y1",c),o.attr("x2",M),o.attr("y2",c),o.attr("class","branch branch"+n),p==="TB"?(o.attr("y1",P),o.attr("x1",c),o.attr("y2",M),o.attr("x2",c)):p==="BT"&&(o.attr("y1",M),o.attr("x1",c),o.attr("y2",P),o.attr("x2",c)),W.push(c);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(c-y.height/2-1)+")"),p==="TB"?(f.attr("x",c-y.width/2-10).attr("y",0),d.attr("transform","translate("+(c-y.width/2-5)+", 0)")):p==="BT"?(f.attr("x",c-y.width/2-10).attr("y",M),d.attr("transform","translate("+(c-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(c-y.height/2)+")")})},"drawBranches"),te=h(function(t,r,a,s,e){return C.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(p==="TB"||p==="BT"?s.width/2:0),r},"setBranchPosition"),ae=h(function(t,r,a,s){if(jr(),w.debug("in gitgraph renderer",t+` +`,"id:",r,a),!b)throw new Error("GitGraph config not found");const e=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const c=n.getBranchesAsObjArray();p=n.getDirection();const o=lr(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=J(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),x=y.insert("g").attr("class","label branch-label");(q=x.node())==null||q.appendChild(g);const m=g.getBBox();$=te(l.name,$,f,m,e),x.remove(),y.remove(),d.remove()}),K(o,G,!1),b.showBranches&&ee(o,c),re(o,G),K(o,G,!0),$r.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),fr(void 0,o,b.diagramPadding,b.useMaxWidth)},"draw"),ne={draw:ae},se=h(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(r=>` + .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; } + .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; } + .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; } + .label${r} { fill: ${t["git"+r]}; } + .arrow${r} { stroke: ${t["git"+r]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),oe=se,pe={parser:Wr,db:X,renderer:ne,styles:oe};export{pe as diagram}; diff --git a/pr-528/assets/chunks/graph.DDKaZ6Ct.js b/pr-528/assets/chunks/graph.DDKaZ6Ct.js new file mode 100644 index 000000000..fe127ac9a --- /dev/null +++ b/pr-528/assets/chunks/graph.DDKaZ6Ct.js @@ -0,0 +1 @@ +import{a as O,c as j,h as u,k as l,f as c,d as a,i as f,v as p,r as F}from"./baseUniq.HRNeWzar.js";import{aA as y,aB as P,aC as m,aD as E,aE as C}from"../app.CKrDwBa1.js";var M=y(function(d){return O(j(d,1,P,!0))}),A="\0",o="\0",L="";class D{constructor(e={}){this._isDirected=u(e,"directed")?e.directed:!0,this._isMultigraph=u(e,"multigraph")?e.multigraph:!1,this._isCompound=u(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=m(void 0),this._defaultEdgeLabelFn=m(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return E(e)||(e=m(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return l(this._nodes)}sources(){var e=this;return c(this.nodes(),function(t){return C(e._in[t])})}sinks(){var e=this;return c(this.nodes(),function(t){return C(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return a(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return u(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return u(this._nodes,e)}removeNode(e){var t=this;if(u(this._nodes,e)){var s=function(i){t.removeEdge(t._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],a(this.children(e),function(i){t.setParent(i)}),delete this._children[e]),a(l(this._in[e]),s),delete this._in[e],delete this._preds[e],a(l(this._out[e]),s),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(f(t))t=o;else{t+="";for(var s=t;!f(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}}children(e){if(f(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return l(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return l(t)}successors(e){var t=this._sucs[e];if(t)return l(t)}neighbors(e){var t=this.predecessors(e);if(t)return M(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;a(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),a(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&a(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return E(e)||(e=m(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return F(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,f(s)||(s=""+s);var h=g(this._isDirected,e,t,s);if(u(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!f(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var _=G(this._isDirected,e,t,s);return e=_.v,t=_.w,Object.freeze(_),this._edgeObjs[h]=_,N(this._preds[t],e),N(this._sucs[e],t),this._in[t][h]=_,this._out[e][h]=_,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?b(this._isDirected,arguments[0]):g(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?b(this._isDirected,arguments[0]):g(this._isDirected,e,t,s);return u(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?b(this._isDirected,arguments[0]):g(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],v(this._preds[t],e),v(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?c(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?c(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}D.prototype._nodeCount=0;D.prototype._edgeCount=0;function N(d,e){d[e]?d[e]++:d[e]=1}function v(d,e){--d[e]||delete d[e]}function g(d,e,t,s){var i=""+e,r=""+t;if(!d&&i>r){var n=i;i=r,r=n}return i+L+r+L+(f(s)?A:s)}function G(d,e,t,s){var i=""+e,r=""+t;if(!d&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function b(d,e){return g(d,e.v,e.w,e.name)}export{D as G}; diff --git a/pr-528/assets/chunks/infoDiagram-RZZSJVI2.DUMNBVuj.js b/pr-528/assets/chunks/infoDiagram-RZZSJVI2.DUMNBVuj.js new file mode 100644 index 000000000..16a893348 --- /dev/null +++ b/pr-528/assets/chunks/infoDiagram-RZZSJVI2.DUMNBVuj.js @@ -0,0 +1,2 @@ +import{_ as e,l as o,H as i,k as n,I as p}from"../app.CKrDwBa1.js";import{p as g}from"./gitGraph-YCYPL57B.DhPOFTVl.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";import"./clone.BlcZCRmq.js";var m={parse:e(async r=>{const a=await g("info",r);o.debug(a)},"parse")},v={version:p},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,s)=>{o.debug(`rendering info diagram +`+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),f={draw:l},D={parser:m,db:c,renderer:f};export{D as diagram}; diff --git a/pr-528/assets/chunks/init.Gi6I4Gst.js b/pr-528/assets/chunks/init.Gi6I4Gst.js new file mode 100644 index 000000000..d44de9416 --- /dev/null +++ b/pr-528/assets/chunks/init.Gi6I4Gst.js @@ -0,0 +1 @@ +function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i}; diff --git a/pr-528/assets/chunks/journeyDiagram-BLD6N6MZ.BsShe1e6.js b/pr-528/assets/chunks/journeyDiagram-BLD6N6MZ.BsShe1e6.js new file mode 100644 index 000000000..41cdba4e8 --- /dev/null +++ b/pr-528/assets/chunks/journeyDiagram-BLD6N6MZ.BsShe1e6.js @@ -0,0 +1,139 @@ +import{d as ft,f as gt,g as at,b as mt}from"./chunk-V35ELUW5.C6DQpogG.js";import{_ as i,d as A,q as xt,r as kt,s as _t,g as vt,c as bt,b as wt,v as Tt,j as W,k as St}from"../app.CKrDwBa1.js";import{d as tt}from"./arc.BNNkY6t3.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";var H=function(){var t=i(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],s=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:i(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:i(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:i(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}i(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}i(Q,"lex");for(var v,P,w,q,C={},j,M,D,N;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";N=[];for(j in S[P])this.terminals_[j]&&j>ut&&N.push("'"+this.terminals_[j]+"'");k.showPosition?G="Parse error on line "+(B+1)+`: +`+k.showPosition()+` +Expecting `+N.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(v==K?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:Y,expected:N})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+v);switch(w[0]){case 1:l.push(v),f.push(k.yytext),o.push(k.yylloc),l.push(w[1]),v=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if(M=this.productions_[w[1]][1],C.$=f[f.length-M],C._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},dt&&(C._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],f,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),f=f.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[w[1]][0]),f.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:i(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:i(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:i(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=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),l.length-1&&(this.yylineno-=l.length-1);var f=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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(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:i(function(r){this.unput(this.match.slice(r))},"less"),pastInput:i(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:i(function(r,a){var l,y,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),y=r[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var o in f)this[o]=f[o];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,l,y;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),o=0;oa[0].length)){if(a=l,y=o,this.options.backtrack_lexer){if(r=this.test_match(l,f[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,f[y]),r!==!1?r:!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:i(function(){var a=this.next();return a||this.lex()},"lex"),begin:i(function(a){this.conditionStack.push(a)},"begin"),popState:i(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(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:i(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:i(function(a){this.begin(a)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(a,l,y,f){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return g}();d.lexer=x;function m(){this.yy={}}return i(m,"Parser"),m.prototype=d,d.Parser=m,new m}();H.parser=H;var Mt=H,V="",U=[],R=[],F=[],$t=i(function(){U.length=0,R.length=0,V="",F.length=0,Tt()},"clear"),Et=i(function(t){V=t,U.push(t)},"addSection"),Pt=i(function(){return U},"getSections"),It=i(function(){let t=et();const e=100;let n=0;for(;!t&&n{n.people&&t.push(...n.people)}),[...new Set(t)].sort()},"updateActors"),Ct=i(function(t,e){const n=e.substr(1).split(":");let c=0,s=[];n.length===1?(c=Number(n[0]),s=[]):(c=Number(n[0]),s=n[1].split(","));const u=s.map(p=>p.trim()),h={section:V,type:V,people:u,task:t,score:c};F.push(h)},"addTask"),Vt=i(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};R.push(e)},"addTaskOrg"),et=i(function(){const t=i(function(n){return F[n].processed},"compileTask");let e=!0;for(const[n,c]of F.entries())t(n),e=e&&c.processed;return e},"compileTasks"),Rt=i(function(){return At()},"getActors"),rt={getConfig:i(()=>A().journey,"getConfig"),clear:$t,setDiagramTitle:xt,getDiagramTitle:kt,setAccTitle:_t,getAccTitle:vt,setAccDescription:bt,getAccDescription:wt,addSection:Et,getSections:Pt,getTasks:It,addTask:Ct,addTaskOrg:Vt,getActors:Rt},Ft=i(t=>`.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } +`,"getStyles"),Lt=Ft,Z=i(function(t,e){return ft(t,e)},"drawRect"),Bt=i(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(d){const x=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}i(u,"smile");function h(d){const x=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}i(h,"sad");function p(d){d.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i(p,"ambivalent"),e.score>3?u(s):e.score<3?h(s):p(s),c},"drawFace"),lt=i(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),n.class!==void 0&&n.attr("class",n.class),e.title!==void 0&&n.append("title").text(e.title),n},"drawCircle"),ot=i(function(t,e){return gt(t,e)},"drawText"),jt=i(function(t,e){function n(s,u,h,p,d){return s+","+u+" "+(s+h)+","+u+" "+(s+h)+","+(u+p-d)+" "+(s+h-d*1.2)+","+(u+p)+" "+s+","+(u+p)}i(n,"genPoints");const c=t.append("polygon");c.attr("points",n(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ot(t,e)},"drawLabel"),Nt=i(function(t,e,n){const c=t.append("g"),s=at();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,Z(c,s),ct(n)(e.text,c,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),st=-1,zt=i(function(t,e,n){const c=e.x+n.width/2,s=t.append("g");st++;const u=300+5*30;s.append("line").attr("id","task"+st).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",u).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(s,{cx:c,cy:300+(5-e.score)*30,score:e.score});const h=at();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=n.width,h.height=n.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,Z(s,h);let p=e.x+14;e.people.forEach(d=>{const x=e.actors[d].color,m={cx:p,cy:e.y,r:7,fill:x,stroke:"#000",title:d,pos:e.actors[d].position};lt(s,m),p+=10}),ct(n)(e.task,s,h.x,h.y,h.width,h.height,{class:"task"},n,e.colour)},"drawTask"),Ot=i(function(t,e){mt(t,e)},"drawBackgroundRect"),ct=function(){function t(s,u,h,p,d,x,m,g){const r=u.append("text").attr("x",h+d/2).attr("y",p+x/2+5).style("font-color",g).style("text-anchor","middle").text(s);c(r,m)}i(t,"byText");function e(s,u,h,p,d,x,m,g,r){const{taskFontSize:a,taskFontFamily:l}=g,y=s.split(//gi);for(let f=0;f{const s=$[c].color,u={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:$[c].position};L.drawCircle(t,u);const h={x:40,y:n+7,fill:"#666",text:c,textMargin:e.boxTextMargin|5};L.drawText(t,h),n+=20})}i(ht,"drawActorLegend");var z=A().journey,I=z.leftMargin,Gt=i(function(t,e,n,c){const s=A().journey,u=A().securityLevel;let h;u==="sandbox"&&(h=W("#i"+e));const p=u==="sandbox"?W(h.nodes()[0].contentDocument.body):W("body");T.init();const d=p.select("#"+e);L.initGraphics(d);const x=c.db.getTasks(),m=c.db.getDiagramTitle(),g=c.db.getActors();for(const o in $)delete $[o];let r=0;g.forEach(o=>{$[o]={color:s.actorColours[r%s.actorColours.length],position:r},r++}),ht(d),T.insert(0,0,I,Object.keys($).length*50),Wt(d,x,0);const a=T.getBounds();m&&d.append("text").text(m).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const l=a.stopy-a.starty+2*s.diagramMarginY,y=I+a.stopx+2*s.diagramMarginX;St(d,l,y,s.useMaxWidth),d.append("line").attr("x1",I).attr("y1",s.height*4).attr("x2",y-I-4).attr("y2",s.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const f=m?70:0;d.attr("viewBox",`${a.startx} -25 ${y} ${l+f}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",l+f+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:i(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:i(function(t,e,n,c){t[e]===void 0?t[e]=n:t[e]=c(n,t[e])},"updateVal"),updateBounds:i(function(t,e,n,c){const s=A().journey,u=this;let h=0;function p(d){return i(function(m){h++;const g=u.sequenceItems.length-h+1;u.updateVal(m,"starty",e-g*s.boxMargin,Math.min),u.updateVal(m,"stopy",c+g*s.boxMargin,Math.max),u.updateVal(T.data,"startx",t-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopx",n+g*s.boxMargin,Math.max),d!=="activation"&&(u.updateVal(m,"startx",t-g*s.boxMargin,Math.min),u.updateVal(m,"stopx",n+g*s.boxMargin,Math.max),u.updateVal(T.data,"starty",e-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopy",c+g*s.boxMargin,Math.max))},"updateItemBounds")}i(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:i(function(t,e,n,c){const s=Math.min(t,n),u=Math.max(t,n),h=Math.min(e,c),p=Math.max(e,c);this.updateVal(T.data,"startx",s,Math.min),this.updateVal(T.data,"starty",h,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",p,Math.max),this.updateBounds(s,h,u,p)},"insert"),bumpVerticalPos:i(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:i(function(){return this.verticalPos},"getVerticalPos"),getBounds:i(function(){return this.data},"getBounds")},X=z.sectionFills,it=z.sectionColours,Wt=i(function(t,e,n){const c=A().journey;let s="";const u=c.height*2+c.diagramMarginY,h=n+u;let p=0,d="#CCC",x="black",m=0;for(const[g,r]of e.entries()){if(s!==r.section){d=X[p%X.length],m=p%X.length,x=it[p%it.length];let l=0;const y=r.section;for(let o=g;o($[y]&&(l[y]=$[y]),l),{});r.x=g*c.taskMargin+g*c.width+I,r.y=h,r.width=c.diagramMarginX,r.height=c.diagramMarginY,r.colour=x,r.fill=d,r.num=m,r.actors=a,L.drawTask(t,r,c),T.insert(r.x,r.y,r.x+r.width+c.taskMargin,300+5*30)}},"drawTasks"),nt={setConf:qt,draw:Gt},Kt={parser:Mt,db:rt,renderer:nt,styles:Lt,init:i(t=>{nt.setConf(t.journey),rt.clear()},"init")};export{Kt as diagram}; diff --git a/pr-528/assets/chunks/json.WLb0uRtH.js b/pr-528/assets/chunks/json.WLb0uRtH.js new file mode 100644 index 000000000..26076cb43 --- /dev/null +++ b/pr-528/assets/chunks/json.WLb0uRtH.js @@ -0,0 +1 @@ +import"./graph.DDKaZ6Ct.js";import{i as o}from"./baseUniq.HRNeWzar.js";import{c as d}from"./clone.BlcZCRmq.js";import{m as t}from"./basePickBy.nUpO2mqN.js";function v(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:u(e),edges:p(e)};return o(e.graph())||(r.value=d(e.graph())),r}function u(e){return t(e.nodes(),function(r){var i=e.node(r),n=e.parent(r),a={v:r};return o(i)||(a.value=i),o(n)||(a.parent=n),a})}function p(e){return t(e.edges(),function(r){var i=e.edge(r),n={v:r.v,w:r.w};return o(r.name)||(n.name=r.name),o(i)||(n.value=i),n})}export{v as w}; diff --git a/pr-528/assets/chunks/katex.CvgdMzdh.js b/pr-528/assets/chunks/katex.CvgdMzdh.js new file mode 100644 index 000000000..b7fdcb9e7 --- /dev/null +++ b/pr-528/assets/chunks/katex.CvgdMzdh.js @@ -0,0 +1,261 @@ +class u0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new u0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class f0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new f0(t,u0.range(this,e))}}class M{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15":">","<":"<",'"':""","'":"'"},ba=/[&><"']/g;function ya(r){return String(r).replace(ba,e=>ga[e])}var pr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},xa=function(e){var t=pr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},wa=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},ka=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},q={contains:da,deflt:fa,escape:ya,hyphenate:va,getBaseElem:pr,isCharacterBox:xa,protocolFromUrl:ka},ze={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function Sa(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class ct{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in ze)if(ze.hasOwnProperty(t)){var a=ze[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:Sa(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new M("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=q.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class O0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[Ma[this.id]]}sub(){return y0[za[this.id]]}fracNum(){return y0[Aa[this.id]]}fracDen(){return y0[Ta[this.id]]}cramp(){return y0[Ba[this.id]]}text(){return y0[Da[this.id]]}isTight(){return this.size>=2}}var dt=0,Te=1,_0=2,T0=3,le=4,d0=5,ee=6,n0=7,y0=[new O0(dt,0,!1),new O0(Te,0,!0),new O0(_0,1,!1),new O0(T0,1,!0),new O0(le,2,!1),new O0(d0,2,!0),new O0(ee,3,!1),new O0(n0,3,!0)],Ma=[le,d0,le,d0,ee,n0,ee,n0],za=[d0,d0,d0,d0,n0,n0,n0,n0],Aa=[_0,T0,le,d0,ee,n0,ee,n0],Ta=[T0,T0,d0,d0,n0,n0,n0,n0],Ba=[Te,Te,T0,T0,d0,d0,n0,n0],Da=[dt,Te,_0,T0,_0,T0,_0,T0],R={DISPLAY:y0[dt],TEXT:y0[_0],SCRIPT:y0[le],SCRIPTSCRIPT:y0[ee]},at=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ca(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}var Ae=[];at.forEach(r=>r.blocks.forEach(e=>Ae.push(...e)));function vr(r){for(var e=0;e=Ae[e]&&r<=Ae[e+1])return!0;return!1}var Q0=80,Na=function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},qa=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ea=function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ra=function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},Ia=function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Oa=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Fa=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},Ha=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Na(t,Q0);break;case"sqrtSize1":n=qa(t,Q0);break;case"sqrtSize2":n=Ea(t,Q0);break;case"sqrtSize3":n=Ra(t,Q0);break;case"sqrtSize4":n=Ia(t,Q0);break;case"sqrtTall":n=Fa(t,Q0,a)}return n},La=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},It={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Pa=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class ue{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return q.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}}var x0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ve={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ot={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Ga(r,e){x0[r]=e}function ft(r,e,t){if(!x0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=x0[e][a];if(!n&&r[0]in Ot&&(a=Ot[r[0]].charCodeAt(0),n=x0[e][a]),!n&&t==="text"&&vr(a)&&(n=x0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var Ue={};function Va(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Ue[e]){var t=Ue[e]={cssEmPerMu:ve.quad[e]/18};for(var a in ve)ve.hasOwnProperty(a)&&(t[a]=ve[a][e])}return Ue[e]}var Ua=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ft=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ht=function(e,t){return t.size<2?e:Ua[e-1][t.size-1]};class A0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||A0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ft[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new A0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ht(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ft[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ht(A0.BASESIZE,e);return this.size===t&&this.textSize===A0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==A0.BASESIZE?["sizing","reset-size"+this.size,"size"+A0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Va(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}A0.BASESIZE=6;var nt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ya={ex:!0,em:!0,mu:!0},gr=function(e){return typeof e!="string"&&(e=e.unit),e in nt||e in Ya||e==="ex"},K=function(e,t){var a;if(e.unit in nt)a=nt[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new M("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},A=function(e){return+e.toFixed(4)+"em"},L0=function(e){return e.filter(t=>t).join(" ")},br=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},yr=function(e){var t=document.createElement(e);t.className=L0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s",t};class he{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,br.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return q.contains(this.classes,e)}toNode(){return yr.call(this,"span")}toMarkup(){return xr.call(this,"span")}}class pt{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,br.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return q.contains(this.classes,e)}toNode(){return yr.call(this,"a")}toMarkup(){return xr.call(this,"a")}}class Xa{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return q.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+q.escape(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=A(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=L0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=q.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+q.escape(a)+'"');var s=q.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}}class D0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n':''}}class it{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var ja={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Za={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$={math:{},text:{}};function i(r,e,t,a,n,s){$[r][n]={font:e,group:t,replace:a},s&&a&&($[r][a]=$[r][n])}var l="math",k="text",u="main",d="ams",W="accent-token",D="bin",i0="close",te="inner",E="mathord",_="op-token",h0="open",qe="punct",f="rel",q0="spacing",v="textord";i(l,u,f,"≡","\\equiv",!0);i(l,u,f,"≺","\\prec",!0);i(l,u,f,"≻","\\succ",!0);i(l,u,f,"∼","\\sim",!0);i(l,u,f,"⊥","\\perp");i(l,u,f,"⪯","\\preceq",!0);i(l,u,f,"⪰","\\succeq",!0);i(l,u,f,"≃","\\simeq",!0);i(l,u,f,"∣","\\mid",!0);i(l,u,f,"≪","\\ll",!0);i(l,u,f,"≫","\\gg",!0);i(l,u,f,"≍","\\asymp",!0);i(l,u,f,"∥","\\parallel");i(l,u,f,"⋈","\\bowtie",!0);i(l,u,f,"⌣","\\smile",!0);i(l,u,f,"⊑","\\sqsubseteq",!0);i(l,u,f,"⊒","\\sqsupseteq",!0);i(l,u,f,"≐","\\doteq",!0);i(l,u,f,"⌢","\\frown",!0);i(l,u,f,"∋","\\ni",!0);i(l,u,f,"∝","\\propto",!0);i(l,u,f,"⊢","\\vdash",!0);i(l,u,f,"⊣","\\dashv",!0);i(l,u,f,"∋","\\owns");i(l,u,qe,".","\\ldotp");i(l,u,qe,"⋅","\\cdotp");i(l,u,v,"#","\\#");i(k,u,v,"#","\\#");i(l,u,v,"&","\\&");i(k,u,v,"&","\\&");i(l,u,v,"ℵ","\\aleph",!0);i(l,u,v,"∀","\\forall",!0);i(l,u,v,"ℏ","\\hbar",!0);i(l,u,v,"∃","\\exists",!0);i(l,u,v,"∇","\\nabla",!0);i(l,u,v,"♭","\\flat",!0);i(l,u,v,"ℓ","\\ell",!0);i(l,u,v,"♮","\\natural",!0);i(l,u,v,"♣","\\clubsuit",!0);i(l,u,v,"℘","\\wp",!0);i(l,u,v,"♯","\\sharp",!0);i(l,u,v,"♢","\\diamondsuit",!0);i(l,u,v,"ℜ","\\Re",!0);i(l,u,v,"♡","\\heartsuit",!0);i(l,u,v,"ℑ","\\Im",!0);i(l,u,v,"♠","\\spadesuit",!0);i(l,u,v,"§","\\S",!0);i(k,u,v,"§","\\S");i(l,u,v,"¶","\\P",!0);i(k,u,v,"¶","\\P");i(l,u,v,"†","\\dag");i(k,u,v,"†","\\dag");i(k,u,v,"†","\\textdagger");i(l,u,v,"‡","\\ddag");i(k,u,v,"‡","\\ddag");i(k,u,v,"‡","\\textdaggerdbl");i(l,u,i0,"⎱","\\rmoustache",!0);i(l,u,h0,"⎰","\\lmoustache",!0);i(l,u,i0,"⟯","\\rgroup",!0);i(l,u,h0,"⟮","\\lgroup",!0);i(l,u,D,"∓","\\mp",!0);i(l,u,D,"⊖","\\ominus",!0);i(l,u,D,"⊎","\\uplus",!0);i(l,u,D,"⊓","\\sqcap",!0);i(l,u,D,"∗","\\ast");i(l,u,D,"⊔","\\sqcup",!0);i(l,u,D,"◯","\\bigcirc",!0);i(l,u,D,"∙","\\bullet",!0);i(l,u,D,"‡","\\ddagger");i(l,u,D,"≀","\\wr",!0);i(l,u,D,"⨿","\\amalg");i(l,u,D,"&","\\And");i(l,u,f,"⟵","\\longleftarrow",!0);i(l,u,f,"⇐","\\Leftarrow",!0);i(l,u,f,"⟸","\\Longleftarrow",!0);i(l,u,f,"⟶","\\longrightarrow",!0);i(l,u,f,"⇒","\\Rightarrow",!0);i(l,u,f,"⟹","\\Longrightarrow",!0);i(l,u,f,"↔","\\leftrightarrow",!0);i(l,u,f,"⟷","\\longleftrightarrow",!0);i(l,u,f,"⇔","\\Leftrightarrow",!0);i(l,u,f,"⟺","\\Longleftrightarrow",!0);i(l,u,f,"↦","\\mapsto",!0);i(l,u,f,"⟼","\\longmapsto",!0);i(l,u,f,"↗","\\nearrow",!0);i(l,u,f,"↩","\\hookleftarrow",!0);i(l,u,f,"↪","\\hookrightarrow",!0);i(l,u,f,"↘","\\searrow",!0);i(l,u,f,"↼","\\leftharpoonup",!0);i(l,u,f,"⇀","\\rightharpoonup",!0);i(l,u,f,"↙","\\swarrow",!0);i(l,u,f,"↽","\\leftharpoondown",!0);i(l,u,f,"⇁","\\rightharpoondown",!0);i(l,u,f,"↖","\\nwarrow",!0);i(l,u,f,"⇌","\\rightleftharpoons",!0);i(l,d,f,"≮","\\nless",!0);i(l,d,f,"","\\@nleqslant");i(l,d,f,"","\\@nleqq");i(l,d,f,"⪇","\\lneq",!0);i(l,d,f,"≨","\\lneqq",!0);i(l,d,f,"","\\@lvertneqq");i(l,d,f,"⋦","\\lnsim",!0);i(l,d,f,"⪉","\\lnapprox",!0);i(l,d,f,"⊀","\\nprec",!0);i(l,d,f,"⋠","\\npreceq",!0);i(l,d,f,"⋨","\\precnsim",!0);i(l,d,f,"⪹","\\precnapprox",!0);i(l,d,f,"≁","\\nsim",!0);i(l,d,f,"","\\@nshortmid");i(l,d,f,"∤","\\nmid",!0);i(l,d,f,"⊬","\\nvdash",!0);i(l,d,f,"⊭","\\nvDash",!0);i(l,d,f,"⋪","\\ntriangleleft");i(l,d,f,"⋬","\\ntrianglelefteq",!0);i(l,d,f,"⊊","\\subsetneq",!0);i(l,d,f,"","\\@varsubsetneq");i(l,d,f,"⫋","\\subsetneqq",!0);i(l,d,f,"","\\@varsubsetneqq");i(l,d,f,"≯","\\ngtr",!0);i(l,d,f,"","\\@ngeqslant");i(l,d,f,"","\\@ngeqq");i(l,d,f,"⪈","\\gneq",!0);i(l,d,f,"≩","\\gneqq",!0);i(l,d,f,"","\\@gvertneqq");i(l,d,f,"⋧","\\gnsim",!0);i(l,d,f,"⪊","\\gnapprox",!0);i(l,d,f,"⊁","\\nsucc",!0);i(l,d,f,"⋡","\\nsucceq",!0);i(l,d,f,"⋩","\\succnsim",!0);i(l,d,f,"⪺","\\succnapprox",!0);i(l,d,f,"≆","\\ncong",!0);i(l,d,f,"","\\@nshortparallel");i(l,d,f,"∦","\\nparallel",!0);i(l,d,f,"⊯","\\nVDash",!0);i(l,d,f,"⋫","\\ntriangleright");i(l,d,f,"⋭","\\ntrianglerighteq",!0);i(l,d,f,"","\\@nsupseteqq");i(l,d,f,"⊋","\\supsetneq",!0);i(l,d,f,"","\\@varsupsetneq");i(l,d,f,"⫌","\\supsetneqq",!0);i(l,d,f,"","\\@varsupsetneqq");i(l,d,f,"⊮","\\nVdash",!0);i(l,d,f,"⪵","\\precneqq",!0);i(l,d,f,"⪶","\\succneqq",!0);i(l,d,f,"","\\@nsubseteqq");i(l,d,D,"⊴","\\unlhd");i(l,d,D,"⊵","\\unrhd");i(l,d,f,"↚","\\nleftarrow",!0);i(l,d,f,"↛","\\nrightarrow",!0);i(l,d,f,"⇍","\\nLeftarrow",!0);i(l,d,f,"⇏","\\nRightarrow",!0);i(l,d,f,"↮","\\nleftrightarrow",!0);i(l,d,f,"⇎","\\nLeftrightarrow",!0);i(l,d,f,"△","\\vartriangle");i(l,d,v,"ℏ","\\hslash");i(l,d,v,"▽","\\triangledown");i(l,d,v,"◊","\\lozenge");i(l,d,v,"Ⓢ","\\circledS");i(l,d,v,"®","\\circledR");i(k,d,v,"®","\\circledR");i(l,d,v,"∡","\\measuredangle",!0);i(l,d,v,"∄","\\nexists");i(l,d,v,"℧","\\mho");i(l,d,v,"Ⅎ","\\Finv",!0);i(l,d,v,"⅁","\\Game",!0);i(l,d,v,"‵","\\backprime");i(l,d,v,"▲","\\blacktriangle");i(l,d,v,"▼","\\blacktriangledown");i(l,d,v,"■","\\blacksquare");i(l,d,v,"⧫","\\blacklozenge");i(l,d,v,"★","\\bigstar");i(l,d,v,"∢","\\sphericalangle",!0);i(l,d,v,"∁","\\complement",!0);i(l,d,v,"ð","\\eth",!0);i(k,u,v,"ð","ð");i(l,d,v,"╱","\\diagup");i(l,d,v,"╲","\\diagdown");i(l,d,v,"□","\\square");i(l,d,v,"□","\\Box");i(l,d,v,"◊","\\Diamond");i(l,d,v,"¥","\\yen",!0);i(k,d,v,"¥","\\yen",!0);i(l,d,v,"✓","\\checkmark",!0);i(k,d,v,"✓","\\checkmark");i(l,d,v,"ℶ","\\beth",!0);i(l,d,v,"ℸ","\\daleth",!0);i(l,d,v,"ℷ","\\gimel",!0);i(l,d,v,"ϝ","\\digamma",!0);i(l,d,v,"ϰ","\\varkappa");i(l,d,h0,"┌","\\@ulcorner",!0);i(l,d,i0,"┐","\\@urcorner",!0);i(l,d,h0,"└","\\@llcorner",!0);i(l,d,i0,"┘","\\@lrcorner",!0);i(l,d,f,"≦","\\leqq",!0);i(l,d,f,"⩽","\\leqslant",!0);i(l,d,f,"⪕","\\eqslantless",!0);i(l,d,f,"≲","\\lesssim",!0);i(l,d,f,"⪅","\\lessapprox",!0);i(l,d,f,"≊","\\approxeq",!0);i(l,d,D,"⋖","\\lessdot");i(l,d,f,"⋘","\\lll",!0);i(l,d,f,"≶","\\lessgtr",!0);i(l,d,f,"⋚","\\lesseqgtr",!0);i(l,d,f,"⪋","\\lesseqqgtr",!0);i(l,d,f,"≑","\\doteqdot");i(l,d,f,"≓","\\risingdotseq",!0);i(l,d,f,"≒","\\fallingdotseq",!0);i(l,d,f,"∽","\\backsim",!0);i(l,d,f,"⋍","\\backsimeq",!0);i(l,d,f,"⫅","\\subseteqq",!0);i(l,d,f,"⋐","\\Subset",!0);i(l,d,f,"⊏","\\sqsubset",!0);i(l,d,f,"≼","\\preccurlyeq",!0);i(l,d,f,"⋞","\\curlyeqprec",!0);i(l,d,f,"≾","\\precsim",!0);i(l,d,f,"⪷","\\precapprox",!0);i(l,d,f,"⊲","\\vartriangleleft");i(l,d,f,"⊴","\\trianglelefteq");i(l,d,f,"⊨","\\vDash",!0);i(l,d,f,"⊪","\\Vvdash",!0);i(l,d,f,"⌣","\\smallsmile");i(l,d,f,"⌢","\\smallfrown");i(l,d,f,"≏","\\bumpeq",!0);i(l,d,f,"≎","\\Bumpeq",!0);i(l,d,f,"≧","\\geqq",!0);i(l,d,f,"⩾","\\geqslant",!0);i(l,d,f,"⪖","\\eqslantgtr",!0);i(l,d,f,"≳","\\gtrsim",!0);i(l,d,f,"⪆","\\gtrapprox",!0);i(l,d,D,"⋗","\\gtrdot");i(l,d,f,"⋙","\\ggg",!0);i(l,d,f,"≷","\\gtrless",!0);i(l,d,f,"⋛","\\gtreqless",!0);i(l,d,f,"⪌","\\gtreqqless",!0);i(l,d,f,"≖","\\eqcirc",!0);i(l,d,f,"≗","\\circeq",!0);i(l,d,f,"≜","\\triangleq",!0);i(l,d,f,"∼","\\thicksim");i(l,d,f,"≈","\\thickapprox");i(l,d,f,"⫆","\\supseteqq",!0);i(l,d,f,"⋑","\\Supset",!0);i(l,d,f,"⊐","\\sqsupset",!0);i(l,d,f,"≽","\\succcurlyeq",!0);i(l,d,f,"⋟","\\curlyeqsucc",!0);i(l,d,f,"≿","\\succsim",!0);i(l,d,f,"⪸","\\succapprox",!0);i(l,d,f,"⊳","\\vartriangleright");i(l,d,f,"⊵","\\trianglerighteq");i(l,d,f,"⊩","\\Vdash",!0);i(l,d,f,"∣","\\shortmid");i(l,d,f,"∥","\\shortparallel");i(l,d,f,"≬","\\between",!0);i(l,d,f,"⋔","\\pitchfork",!0);i(l,d,f,"∝","\\varpropto");i(l,d,f,"◀","\\blacktriangleleft");i(l,d,f,"∴","\\therefore",!0);i(l,d,f,"∍","\\backepsilon");i(l,d,f,"▶","\\blacktriangleright");i(l,d,f,"∵","\\because",!0);i(l,d,f,"⋘","\\llless");i(l,d,f,"⋙","\\gggtr");i(l,d,D,"⊲","\\lhd");i(l,d,D,"⊳","\\rhd");i(l,d,f,"≂","\\eqsim",!0);i(l,u,f,"⋈","\\Join");i(l,d,f,"≑","\\Doteq",!0);i(l,d,D,"∔","\\dotplus",!0);i(l,d,D,"∖","\\smallsetminus");i(l,d,D,"⋒","\\Cap",!0);i(l,d,D,"⋓","\\Cup",!0);i(l,d,D,"⩞","\\doublebarwedge",!0);i(l,d,D,"⊟","\\boxminus",!0);i(l,d,D,"⊞","\\boxplus",!0);i(l,d,D,"⋇","\\divideontimes",!0);i(l,d,D,"⋉","\\ltimes",!0);i(l,d,D,"⋊","\\rtimes",!0);i(l,d,D,"⋋","\\leftthreetimes",!0);i(l,d,D,"⋌","\\rightthreetimes",!0);i(l,d,D,"⋏","\\curlywedge",!0);i(l,d,D,"⋎","\\curlyvee",!0);i(l,d,D,"⊝","\\circleddash",!0);i(l,d,D,"⊛","\\circledast",!0);i(l,d,D,"⋅","\\centerdot");i(l,d,D,"⊺","\\intercal",!0);i(l,d,D,"⋒","\\doublecap");i(l,d,D,"⋓","\\doublecup");i(l,d,D,"⊠","\\boxtimes",!0);i(l,d,f,"⇢","\\dashrightarrow",!0);i(l,d,f,"⇠","\\dashleftarrow",!0);i(l,d,f,"⇇","\\leftleftarrows",!0);i(l,d,f,"⇆","\\leftrightarrows",!0);i(l,d,f,"⇚","\\Lleftarrow",!0);i(l,d,f,"↞","\\twoheadleftarrow",!0);i(l,d,f,"↢","\\leftarrowtail",!0);i(l,d,f,"↫","\\looparrowleft",!0);i(l,d,f,"⇋","\\leftrightharpoons",!0);i(l,d,f,"↶","\\curvearrowleft",!0);i(l,d,f,"↺","\\circlearrowleft",!0);i(l,d,f,"↰","\\Lsh",!0);i(l,d,f,"⇈","\\upuparrows",!0);i(l,d,f,"↿","\\upharpoonleft",!0);i(l,d,f,"⇃","\\downharpoonleft",!0);i(l,u,f,"⊶","\\origof",!0);i(l,u,f,"⊷","\\imageof",!0);i(l,d,f,"⊸","\\multimap",!0);i(l,d,f,"↭","\\leftrightsquigarrow",!0);i(l,d,f,"⇉","\\rightrightarrows",!0);i(l,d,f,"⇄","\\rightleftarrows",!0);i(l,d,f,"↠","\\twoheadrightarrow",!0);i(l,d,f,"↣","\\rightarrowtail",!0);i(l,d,f,"↬","\\looparrowright",!0);i(l,d,f,"↷","\\curvearrowright",!0);i(l,d,f,"↻","\\circlearrowright",!0);i(l,d,f,"↱","\\Rsh",!0);i(l,d,f,"⇊","\\downdownarrows",!0);i(l,d,f,"↾","\\upharpoonright",!0);i(l,d,f,"⇂","\\downharpoonright",!0);i(l,d,f,"⇝","\\rightsquigarrow",!0);i(l,d,f,"⇝","\\leadsto");i(l,d,f,"⇛","\\Rrightarrow",!0);i(l,d,f,"↾","\\restriction");i(l,u,v,"‘","`");i(l,u,v,"$","\\$");i(k,u,v,"$","\\$");i(k,u,v,"$","\\textdollar");i(l,u,v,"%","\\%");i(k,u,v,"%","\\%");i(l,u,v,"_","\\_");i(k,u,v,"_","\\_");i(k,u,v,"_","\\textunderscore");i(l,u,v,"∠","\\angle",!0);i(l,u,v,"∞","\\infty",!0);i(l,u,v,"′","\\prime");i(l,u,v,"△","\\triangle");i(l,u,v,"Γ","\\Gamma",!0);i(l,u,v,"Δ","\\Delta",!0);i(l,u,v,"Θ","\\Theta",!0);i(l,u,v,"Λ","\\Lambda",!0);i(l,u,v,"Ξ","\\Xi",!0);i(l,u,v,"Π","\\Pi",!0);i(l,u,v,"Σ","\\Sigma",!0);i(l,u,v,"Υ","\\Upsilon",!0);i(l,u,v,"Φ","\\Phi",!0);i(l,u,v,"Ψ","\\Psi",!0);i(l,u,v,"Ω","\\Omega",!0);i(l,u,v,"A","Α");i(l,u,v,"B","Β");i(l,u,v,"E","Ε");i(l,u,v,"Z","Ζ");i(l,u,v,"H","Η");i(l,u,v,"I","Ι");i(l,u,v,"K","Κ");i(l,u,v,"M","Μ");i(l,u,v,"N","Ν");i(l,u,v,"O","Ο");i(l,u,v,"P","Ρ");i(l,u,v,"T","Τ");i(l,u,v,"X","Χ");i(l,u,v,"¬","\\neg",!0);i(l,u,v,"¬","\\lnot");i(l,u,v,"⊤","\\top");i(l,u,v,"⊥","\\bot");i(l,u,v,"∅","\\emptyset");i(l,d,v,"∅","\\varnothing");i(l,u,E,"α","\\alpha",!0);i(l,u,E,"β","\\beta",!0);i(l,u,E,"γ","\\gamma",!0);i(l,u,E,"δ","\\delta",!0);i(l,u,E,"ϵ","\\epsilon",!0);i(l,u,E,"ζ","\\zeta",!0);i(l,u,E,"η","\\eta",!0);i(l,u,E,"θ","\\theta",!0);i(l,u,E,"ι","\\iota",!0);i(l,u,E,"κ","\\kappa",!0);i(l,u,E,"λ","\\lambda",!0);i(l,u,E,"μ","\\mu",!0);i(l,u,E,"ν","\\nu",!0);i(l,u,E,"ξ","\\xi",!0);i(l,u,E,"ο","\\omicron",!0);i(l,u,E,"π","\\pi",!0);i(l,u,E,"ρ","\\rho",!0);i(l,u,E,"σ","\\sigma",!0);i(l,u,E,"τ","\\tau",!0);i(l,u,E,"υ","\\upsilon",!0);i(l,u,E,"ϕ","\\phi",!0);i(l,u,E,"χ","\\chi",!0);i(l,u,E,"ψ","\\psi",!0);i(l,u,E,"ω","\\omega",!0);i(l,u,E,"ε","\\varepsilon",!0);i(l,u,E,"ϑ","\\vartheta",!0);i(l,u,E,"ϖ","\\varpi",!0);i(l,u,E,"ϱ","\\varrho",!0);i(l,u,E,"ς","\\varsigma",!0);i(l,u,E,"φ","\\varphi",!0);i(l,u,D,"∗","*",!0);i(l,u,D,"+","+");i(l,u,D,"−","-",!0);i(l,u,D,"⋅","\\cdot",!0);i(l,u,D,"∘","\\circ",!0);i(l,u,D,"÷","\\div",!0);i(l,u,D,"±","\\pm",!0);i(l,u,D,"×","\\times",!0);i(l,u,D,"∩","\\cap",!0);i(l,u,D,"∪","\\cup",!0);i(l,u,D,"∖","\\setminus",!0);i(l,u,D,"∧","\\land");i(l,u,D,"∨","\\lor");i(l,u,D,"∧","\\wedge",!0);i(l,u,D,"∨","\\vee",!0);i(l,u,v,"√","\\surd");i(l,u,h0,"⟨","\\langle",!0);i(l,u,h0,"∣","\\lvert");i(l,u,h0,"∥","\\lVert");i(l,u,i0,"?","?");i(l,u,i0,"!","!");i(l,u,i0,"⟩","\\rangle",!0);i(l,u,i0,"∣","\\rvert");i(l,u,i0,"∥","\\rVert");i(l,u,f,"=","=");i(l,u,f,":",":");i(l,u,f,"≈","\\approx",!0);i(l,u,f,"≅","\\cong",!0);i(l,u,f,"≥","\\ge");i(l,u,f,"≥","\\geq",!0);i(l,u,f,"←","\\gets");i(l,u,f,">","\\gt",!0);i(l,u,f,"∈","\\in",!0);i(l,u,f,"","\\@not");i(l,u,f,"⊂","\\subset",!0);i(l,u,f,"⊃","\\supset",!0);i(l,u,f,"⊆","\\subseteq",!0);i(l,u,f,"⊇","\\supseteq",!0);i(l,d,f,"⊈","\\nsubseteq",!0);i(l,d,f,"⊉","\\nsupseteq",!0);i(l,u,f,"⊨","\\models");i(l,u,f,"←","\\leftarrow",!0);i(l,u,f,"≤","\\le");i(l,u,f,"≤","\\leq",!0);i(l,u,f,"<","\\lt",!0);i(l,u,f,"→","\\rightarrow",!0);i(l,u,f,"→","\\to");i(l,d,f,"≱","\\ngeq",!0);i(l,d,f,"≰","\\nleq",!0);i(l,u,q0," ","\\ ");i(l,u,q0," ","\\space");i(l,u,q0," ","\\nobreakspace");i(k,u,q0," ","\\ ");i(k,u,q0," "," ");i(k,u,q0," ","\\space");i(k,u,q0," ","\\nobreakspace");i(l,u,q0,null,"\\nobreak");i(l,u,q0,null,"\\allowbreak");i(l,u,qe,",",",");i(l,u,qe,";",";");i(l,d,D,"⊼","\\barwedge",!0);i(l,d,D,"⊻","\\veebar",!0);i(l,u,D,"⊙","\\odot",!0);i(l,u,D,"⊕","\\oplus",!0);i(l,u,D,"⊗","\\otimes",!0);i(l,u,v,"∂","\\partial",!0);i(l,u,D,"⊘","\\oslash",!0);i(l,d,D,"⊚","\\circledcirc",!0);i(l,d,D,"⊡","\\boxdot",!0);i(l,u,D,"△","\\bigtriangleup");i(l,u,D,"▽","\\bigtriangledown");i(l,u,D,"†","\\dagger");i(l,u,D,"⋄","\\diamond");i(l,u,D,"⋆","\\star");i(l,u,D,"◃","\\triangleleft");i(l,u,D,"▹","\\triangleright");i(l,u,h0,"{","\\{");i(k,u,v,"{","\\{");i(k,u,v,"{","\\textbraceleft");i(l,u,i0,"}","\\}");i(k,u,v,"}","\\}");i(k,u,v,"}","\\textbraceright");i(l,u,h0,"{","\\lbrace");i(l,u,i0,"}","\\rbrace");i(l,u,h0,"[","\\lbrack",!0);i(k,u,v,"[","\\lbrack",!0);i(l,u,i0,"]","\\rbrack",!0);i(k,u,v,"]","\\rbrack",!0);i(l,u,h0,"(","\\lparen",!0);i(l,u,i0,")","\\rparen",!0);i(k,u,v,"<","\\textless",!0);i(k,u,v,">","\\textgreater",!0);i(l,u,h0,"⌊","\\lfloor",!0);i(l,u,i0,"⌋","\\rfloor",!0);i(l,u,h0,"⌈","\\lceil",!0);i(l,u,i0,"⌉","\\rceil",!0);i(l,u,v,"\\","\\backslash");i(l,u,v,"∣","|");i(l,u,v,"∣","\\vert");i(k,u,v,"|","\\textbar",!0);i(l,u,v,"∥","\\|");i(l,u,v,"∥","\\Vert");i(k,u,v,"∥","\\textbardbl");i(k,u,v,"~","\\textasciitilde");i(k,u,v,"\\","\\textbackslash");i(k,u,v,"^","\\textasciicircum");i(l,u,f,"↑","\\uparrow",!0);i(l,u,f,"⇑","\\Uparrow",!0);i(l,u,f,"↓","\\downarrow",!0);i(l,u,f,"⇓","\\Downarrow",!0);i(l,u,f,"↕","\\updownarrow",!0);i(l,u,f,"⇕","\\Updownarrow",!0);i(l,u,_,"∐","\\coprod");i(l,u,_,"⋁","\\bigvee");i(l,u,_,"⋀","\\bigwedge");i(l,u,_,"⨄","\\biguplus");i(l,u,_,"⋂","\\bigcap");i(l,u,_,"⋃","\\bigcup");i(l,u,_,"∫","\\int");i(l,u,_,"∫","\\intop");i(l,u,_,"∬","\\iint");i(l,u,_,"∭","\\iiint");i(l,u,_,"∏","\\prod");i(l,u,_,"∑","\\sum");i(l,u,_,"⨂","\\bigotimes");i(l,u,_,"⨁","\\bigoplus");i(l,u,_,"⨀","\\bigodot");i(l,u,_,"∮","\\oint");i(l,u,_,"∯","\\oiint");i(l,u,_,"∰","\\oiiint");i(l,u,_,"⨆","\\bigsqcup");i(l,u,_,"∫","\\smallint");i(k,u,te,"…","\\textellipsis");i(l,u,te,"…","\\mathellipsis");i(k,u,te,"…","\\ldots",!0);i(l,u,te,"…","\\ldots",!0);i(l,u,te,"⋯","\\@cdots",!0);i(l,u,te,"⋱","\\ddots",!0);i(l,u,v,"⋮","\\varvdots");i(l,u,W,"ˊ","\\acute");i(l,u,W,"ˋ","\\grave");i(l,u,W,"¨","\\ddot");i(l,u,W,"~","\\tilde");i(l,u,W,"ˉ","\\bar");i(l,u,W,"˘","\\breve");i(l,u,W,"ˇ","\\check");i(l,u,W,"^","\\hat");i(l,u,W,"⃗","\\vec");i(l,u,W,"˙","\\dot");i(l,u,W,"˚","\\mathring");i(l,u,E,"","\\@imath");i(l,u,E,"","\\@jmath");i(l,u,v,"ı","ı");i(l,u,v,"ȷ","ȷ");i(k,u,v,"ı","\\i",!0);i(k,u,v,"ȷ","\\j",!0);i(k,u,v,"ß","\\ss",!0);i(k,u,v,"æ","\\ae",!0);i(k,u,v,"œ","\\oe",!0);i(k,u,v,"ø","\\o",!0);i(k,u,v,"Æ","\\AE",!0);i(k,u,v,"Œ","\\OE",!0);i(k,u,v,"Ø","\\O",!0);i(k,u,W,"ˊ","\\'");i(k,u,W,"ˋ","\\`");i(k,u,W,"ˆ","\\^");i(k,u,W,"˜","\\~");i(k,u,W,"ˉ","\\=");i(k,u,W,"˘","\\u");i(k,u,W,"˙","\\.");i(k,u,W,"¸","\\c");i(k,u,W,"˚","\\r");i(k,u,W,"ˇ","\\v");i(k,u,W,"¨",'\\"');i(k,u,W,"˝","\\H");i(k,u,W,"◯","\\textcircled");var wr={"--":!0,"---":!0,"``":!0,"''":!0};i(k,u,v,"–","--",!0);i(k,u,v,"–","\\textendash");i(k,u,v,"—","---",!0);i(k,u,v,"—","\\textemdash");i(k,u,v,"‘","`",!0);i(k,u,v,"‘","\\textquoteleft");i(k,u,v,"’","'",!0);i(k,u,v,"’","\\textquoteright");i(k,u,v,"“","``",!0);i(k,u,v,"“","\\textquotedblleft");i(k,u,v,"”","''",!0);i(k,u,v,"”","\\textquotedblright");i(l,u,v,"°","\\degree",!0);i(k,u,v,"°","\\degree");i(k,u,v,"°","\\textdegree",!0);i(l,u,v,"£","\\pounds");i(l,u,v,"£","\\mathsterling",!0);i(k,u,v,"£","\\pounds");i(k,u,v,"£","\\textsterling",!0);i(l,d,v,"✠","\\maltese");i(k,d,v,"✠","\\maltese");var Pt='0123456789/@."';for(var Ye=0;Ye0)return b0(s,p,n,t,o.concat(g));if(c){var y,w;if(c==="boldsymbol"){var x=Qa(s,n,t,o,a);y=x.fontName,w=[x.fontClass]}else h?(y=Mr[c].fontName,w=[c]):(y=xe(c,t.fontWeight,t.fontShape),w=[c,t.fontWeight,t.fontShape]);if(Ee(s,y,n).metrics)return b0(s,y,n,t,o.concat(w));if(wr.hasOwnProperty(s)&&y.slice(0,10)==="Typewriter"){for(var z=[],T=0;T{if(L0(r.classes)!==L0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},t1=r=>{for(var e=0;et&&(t=o.height),o.depth>a&&(a=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},l0=function(e,t,a,n){var s=new he(e,t,a,n);return vt(s),s},kr=(r,e,t,a)=>new he(r,e,t,a),r1=function(e,t,a){var n=l0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=A(n.height),n.maxFontSize=1,n},a1=function(e,t,a,n){var s=new pt(e,t,a,n);return vt(s),s},Sr=function(e){var t=new ue(e);return vt(t),t},n1=function(e,t){return e instanceof ue?l0([],[e],t):e},i1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,o=1;o{var t=l0(["mspace"],[],e),a=K(r,e);return t.style.marginRight=A(a),t},xe=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},Mr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},zr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},o1=function(e,t){var[a,n,s]=zr[e],o=new P0(a),h=new D0([o],{width:A(n),height:A(s),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=kr(["overlay"],[h],t);return c.height=s,c.style.height=A(s),c.style.width=A(n),c},b={fontMap:Mr,makeSymbol:b0,mathsym:Ja,makeSpan:l0,makeSvgSpan:kr,makeLineSpan:r1,makeAnchor:a1,makeFragment:Sr,wrapFragment:n1,makeVList:s1,makeOrd:_a,makeGlue:l1,staticSvg:o1,svgData:zr,tryCombineChars:t1},Z={number:3,unit:"mu"},X0={number:4,unit:"mu"},z0={number:5,unit:"mu"},u1={mord:{mop:Z,mbin:X0,mrel:z0,minner:Z},mop:{mord:Z,mop:Z,mrel:z0,minner:Z},mbin:{mord:X0,mop:X0,mopen:X0,minner:X0},mrel:{mord:z0,mop:z0,mopen:z0,minner:z0},mopen:{},mclose:{mop:Z,mbin:X0,mrel:z0,minner:Z},mpunct:{mord:Z,mop:Z,mrel:z0,mopen:Z,mclose:Z,mpunct:Z,minner:Z},minner:{mord:Z,mop:Z,mbin:X0,mrel:z0,mopen:Z,mpunct:Z,minner:Z}},h1={mord:{mop:Z},mop:{mord:Z,mop:Z},mbin:{},mrel:{},mopen:{},mclose:{mop:Z},mpunct:{},minner:{mop:Z}},Ar={},De={},Ce={};function B(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var C=T.classes[0],N=z.classes[0];C==="mbin"&&q.contains(c1,N)?T.classes[0]="mord":N==="mbin"&&q.contains(m1,C)&&(z.classes[0]="mord")},{node:y},w,x),Xt(s,(z,T)=>{var C=lt(T),N=lt(z),O=C&&N?z.hasClass("mtight")?h1[C][N]:u1[C][N]:null;if(O)return b.makeGlue(O,p)},{node:y},w,x),s},Xt=function r(e,t,a,n,s){n&&e.push(n);for(var o=0;ow=>{e.splice(y+1,0,w),o++})(o)}n&&e.pop()},Tr=function(e){return e instanceof ue||e instanceof pt||e instanceof he&&e.hasClass("enclosing")?e:null},p1=function r(e,t){var a=Tr(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},lt=function(e,t){return e?(t&&(e=p1(e,t)),f1[e.classes[0]]||null):null},oe=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return C0(t.concat(a))},P=function(e,t,a){if(!e)return C0();if(De[e.type]){var n=De[e.type](e,t);if(a&&t.size!==a.size){n=C0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new M("Got group of unknown type: '"+e.type+"'")};function we(r,e){var t=C0(["base"],r,e),a=C0(["strut"]);return a.style.height=A(t.height+t.depth),t.depth&&(a.style.verticalAlign=A(-t.depth)),t.children.unshift(a),t}function ot(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=t0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],o=[],h=0;h0&&(s.push(we(o,e)),o=[]),s.push(a[h]));o.length>0&&s.push(we(o,e));var p;t?(p=we(t0(t,e,!0)),p.classes=["tag"],s.push(p)):n&&s.push(n);var g=C0(["katex-html"],s);if(g.setAttribute("aria-hidden","true"),p){var y=p.children[0];y.style.height=A(g.height+g.depth),g.depth&&(y.style.verticalAlign=A(-g.depth))}return g}function Br(r){return new ue(r)}class c0{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=L0(this.classes));for(var a=0;a0&&(e+=' class ="'+q.escape(L0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class ie{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return q.escape(this.toText())}toText(){return this.text}}class v1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",A(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var S={MathNode:c0,TextNode:ie,SpaceNode:v1,newDocumentFragment:Br},v0=function(e,t,a){return $[t][e]&&$[t][e].replace&&e.charCodeAt(0)!==55349&&!(wr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=$[t][e].replace),new S.TextNode(e)},gt=function(e){return e.length===1?e[0]:new S.MathNode("mrow",e)},bt=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(q.contains(["\\imath","\\jmath"],s))return null;$[n][s]&&$[n][s].replace&&(s=$[n][s].replace);var o=b.fontMap[a].fontName;return ft(s,o,n)?b.fontMap[a].variant:null},o0=function(e,t,a){if(e.length===1){var n=X(e[0],t);return a&&n instanceof c0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],o,h=0;h0&&(y.text=y.text.slice(0,1)+"̸"+y.text.slice(1),s.pop())}}}s.push(c),o=c}return s},G0=function(e,t,a){return gt(o0(e,t,a))},X=function(e,t){if(!e)return new S.MathNode("mrow");if(Ce[e.type]){var a=Ce[e.type](e,t);return a}else throw new M("Got group of unknown type: '"+e.type+"'")};function $t(r,e,t,a,n){var s=o0(r,t),o;s.length===1&&s[0]instanceof c0&&q.contains(["mrow","mtable"],s[0].type)?o=s[0]:o=new S.MathNode("mrow",s);var h=new S.MathNode("annotation",[new S.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new S.MathNode("semantics",[o,h]),p=new S.MathNode("math",[c]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&p.setAttribute("display","block");var g=n?"katex":"katex-mathml";return b.makeSpan([g],[p])}var Dr=function(e){return new A0({style:e.displayMode?R.DISPLAY:R.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Cr=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=b.makeSpan(a,[e])}return e},g1=function(e,t,a){var n=Dr(a),s;if(a.output==="mathml")return $t(e,t,n,a.displayMode,!0);if(a.output==="html"){var o=ot(e,n);s=b.makeSpan(["katex"],[o])}else{var h=$t(e,t,n,a.displayMode,!1),c=ot(e,n);s=b.makeSpan(["katex"],[h,c])}return Cr(s,a)},b1=function(e,t,a){var n=Dr(a),s=ot(e,n),o=b.makeSpan(["katex"],[s]);return Cr(o,a)},y1={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},x1=function(e){var t=new S.MathNode("mo",[new S.TextNode(y1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},w1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},k1=function(e){return e.type==="ordgroup"?e.body.length:1},S1=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(q.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=e,g=k1(p.base),y,w,x;if(g>5)c==="widehat"||c==="widecheck"?(y=420,h=2364,x=.42,w=c+"4"):(y=312,h=2340,x=.34,w="tilde4");else{var z=[1,1,2,2,3,3][g];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][z],y=[0,239,300,360,420][z],x=[0,.24,.3,.3,.36,.42][z],w=c+z):(h=[0,600,1033,2339,2340][z],y=[0,260,286,306,312][z],x=[0,.26,.286,.3,.306,.34][z],w="tilde"+z)}var T=new P0(w),C=new D0([T],{width:"100%",height:A(x),viewBox:"0 0 "+h+" "+y,preserveAspectRatio:"none"});return{span:b.makeSvgSpan([],[C],t),minWidth:0,height:x}}else{var N=[],O=w1[c],[F,V,L]=O,U=L/1e3,G=F.length,j,Y;if(G===1){var M0=O[3];j=["hide-tail"],Y=[M0]}else if(G===2)j=["halfarrow-left","halfarrow-right"],Y=["xMinYMin","xMaxYMin"];else if(G===3)j=["brace-left","brace-center","brace-right"],Y=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+G+" children.");for(var r0=0;r00&&(n.style.minWidth=A(s)),n},M1=function(e,t,a,n,s){var o,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(o=b.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(o.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(t)&&p.push(new it({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&p.push(new it({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new D0(p,{width:"100%",height:A(h)});o=b.makeSvgSpan([],[g],s)}return o.height=h,o.style.height=A(h),o},N0={encloseSpan:M1,mathMLnode:x1,svgSpan:S1};function H(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function yt(r){var e=Re(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Re(r){return r&&(r.type==="atom"||Za.hasOwnProperty(r.type))?r:null}var xt=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=H(r.base,"accent"),t=a.base,r.base=t,n=Wa(P(r,e)),r.base=a):(a=H(r,"accent"),t=a.base);var s=P(t,e.havingCrampedStyle()),o=a.isShifty&&q.isCharacterBox(t),h=0;if(o){var c=q.getBaseElem(t),p=P(c,e.havingCrampedStyle());h=Lt(p).skew}var g=a.label==="\\c",y=g?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),w;if(a.isStretchy)w=N0.svgSpan(a,e),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:w,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+A(2*h)+")",marginLeft:A(2*h)}:void 0}]},e);else{var x,z;a.label==="\\vec"?(x=b.staticSvg("vec",e),z=b.svgData.vec[1]):(x=b.makeOrd({mode:a.mode,text:a.label},e,"textord"),x=Lt(x),x.italic=0,z=x.width,g&&(y+=x.depth)),w=b.makeSpan(["accent-body"],[x]);var T=a.label==="\\textcircled";T&&(w.classes.push("accent-full"),y=s.height);var C=h;T||(C-=z/2),w.style.left=A(C),a.label==="\\textcircled"&&(w.style.top=".2em"),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-y},{type:"elem",elem:w}]},e)}var N=b.makeSpan(["mord","accent"],[w],e);return n?(n.children[0]=N,n.height=Math.max(N.height,n.height),n.classes[0]="mord",n):N},Nr=(r,e)=>{var t=r.isStretchy?N0.mathMLnode(r.label):new S.MathNode("mo",[v0(r.label,r.mode)]),a=new S.MathNode("mover",[X(r.base,e),t]);return a.setAttribute("accent","true"),a},z1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=Ne(e[0]),a=!z1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:xt,mathmlBuilder:Nr});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:xt,mathmlBuilder:Nr});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=P(r.base,e),a=N0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=N0.mathMLnode(r.label),a=new S.MathNode("munder",[X(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var ke=r=>{var e=new S.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=b.wrapFragment(P(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var o;r.below&&(a=e.havingStyle(t.sub()),o=b.wrapFragment(P(r.below,a,e),e),o.classes.push(s+"-arrow-pad"));var h=N0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,p=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(p-=n.depth);var g;if(o){var y=-e.fontMetrics().axisHeight+o.height+.5*h.height+.111;g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c},{type:"elem",elem:o,shift:y}]},e)}else g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c}]},e);return g.children[0].children[0].children[1].classes.push("svg-align"),b.makeSpan(["mrel","x-arrow"],[g],e)},mathmlBuilder(r,e){var t=N0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=ke(X(r.body,e));if(r.below){var s=ke(X(r.below,e));a=new S.MathNode("munderover",[t,s,n])}else a=new S.MathNode("mover",[t,n])}else if(r.below){var o=ke(X(r.below,e));a=new S.MathNode("munder",[t,o])}else a=ke(),a=new S.MathNode("mover",[t,a]);return a}});var A1=b.makeSpan;function qr(r,e){var t=t0(r.body,e,!0);return A1([r.mclass],t,e)}function Er(r,e){var t,a=o0(r.body,e);return r.mclass==="minner"?t=new S.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new S.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new S.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:Q(n),isCharacterBox:q.isCharacterBox(n)}},htmlBuilder:qr,mathmlBuilder:Er});var Ie=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Ie(e[0]),body:Q(e[1]),isCharacterBox:q.isCharacterBox(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],o;a!=="\\stackrel"?o=Ie(n):o="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Q(n)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:q.isCharacterBox(c)}},htmlBuilder:qr,mathmlBuilder:Er});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Ie(e[0]),body:Q(e[0])}},htmlBuilder(r,e){var t=t0(r.body,e,!0),a=b.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=o0(r.body,e),a=new S.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var T1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Wt=()=>({type:"styling",body:[],mode:"math",style:"display"}),jt=r=>r.type==="textord"&&r.text==="@",B1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function D1(r,e,t){var a=T1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},o=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,o,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function C1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new M("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(p)>-1)for(var y=0;y<2;y++){for(var w=!0,x=c+1;xAV=|." after @',o[c]);var z=D1(p,g,r),T={type:"styling",body:[z],mode:"math",style:"display"};a.push(T),h=Wt()}s%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var C=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:C,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=b.wrapFragment(P(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=A(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new S.MathNode("mrow",[X(r.label,e)]);return t=new S.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new S.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=b.wrapFragment(P(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new S.MathNode("mrow",[X(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=H(e[0],"ordgroup"),n=a.body,s="",o=0;o=1114111)throw new M("\\@char with invalid code point "+s);return c<=65535?p=String.fromCharCode(c):(c-=65536,p=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:p}}});var Rr=(r,e)=>{var t=t0(r.body,e.withColor(r.color),!1);return b.makeFragment(t)},Ir=(r,e)=>{var t=o0(r.body,e.withColor(r.color)),a=new S.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=H(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:Q(n)}},htmlBuilder:Rr,mathmlBuilder:Ir});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=H(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Rr,mathmlBuilder:Ir});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&H(n,"size").value}},htmlBuilder(r,e){var t=b.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=A(K(r.size,e)))),t},mathmlBuilder(r,e){var t=new S.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",A(K(r.size,e)))),t}});var ut={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Or=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new M("Expected a control sequence",r);return e},N1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Fr=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(ut[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=ut[a.text]),H(e.parseFunction(),"internal");throw new M("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new M("Expected a control sequence",a);for(var s=0,o,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new M('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new M('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new M("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:h},t===ut[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Or(e.gullet.popToken());e.gullet.consumeSpaces();var n=N1(e);return Fr(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Or(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Fr(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var ne=function(e,t,a){var n=$.math[e]&&$.math[e].replace,s=ft(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},wt=function(e,t,a,n){var s=a.havingBaseStyle(t),o=b.makeSpan(n.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return o.height*=h,o.depth*=h,o.maxFontSize=s.sizeMultiplier,o},Hr=function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=A(s),e.height-=s,e.depth+=s},q1=function(e,t,a,n,s,o){var h=b.makeSymbol(e,"Main-Regular",s,n),c=wt(h,t,n,o);return a&&Hr(c,n,t),c},E1=function(e,t,a,n){return b.makeSymbol(e,"Size"+t+"-Regular",a,n)},Lr=function(e,t,a,n,s,o){var h=E1(e,t,s,n),c=wt(b.makeSpan(["delimsizing","size"+t],[h],n),R.TEXT,n,o);return a&&Hr(c,n,R.TEXT),c},je=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=b.makeSpan(["delimsizinginner",n],[b.makeSpan([],[b.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},Ze=function(e,t,a){var n=x0["Size4-Regular"][e.charCodeAt(0)]?x0["Size4-Regular"][e.charCodeAt(0)][4]:x0["Size1-Regular"][e.charCodeAt(0)][4],s=new P0("inner",La(e,Math.round(1e3*t))),o=new D0([s],{width:A(n),height:A(t),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=b.makeSvgSpan([],[o],a);return h.height=t,h.style.height=A(t),h.style.width=A(n),{type:"elem",elem:h}},ht=.008,Se={type:"kern",size:-1*ht},R1=["|","\\lvert","\\rvert","\\vert"],I1=["\\|","\\lVert","\\rVert","\\Vert"],Pr=function(e,t,a,n,s,o){var h,c,p,g,y="",w=0;h=p=g=e,c=null;var x="Size1-Regular";e==="\\uparrow"?p=g="⏐":e==="\\Uparrow"?p=g="‖":e==="\\downarrow"?h=p="⏐":e==="\\Downarrow"?h=p="‖":e==="\\updownarrow"?(h="\\uparrow",p="⏐",g="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",p="‖",g="\\Downarrow"):q.contains(R1,e)?(p="∣",y="vert",w=333):q.contains(I1,e)?(p="∥",y="doublevert",w=556):e==="["||e==="\\lbrack"?(h="⎡",p="⎢",g="⎣",x="Size4-Regular",y="lbrack",w=667):e==="]"||e==="\\rbrack"?(h="⎤",p="⎥",g="⎦",x="Size4-Regular",y="rbrack",w=667):e==="\\lfloor"||e==="⌊"?(p=h="⎢",g="⎣",x="Size4-Regular",y="lfloor",w=667):e==="\\lceil"||e==="⌈"?(h="⎡",p=g="⎢",x="Size4-Regular",y="lceil",w=667):e==="\\rfloor"||e==="⌋"?(p=h="⎥",g="⎦",x="Size4-Regular",y="rfloor",w=667):e==="\\rceil"||e==="⌉"?(h="⎤",p=g="⎥",x="Size4-Regular",y="rceil",w=667):e==="("||e==="\\lparen"?(h="⎛",p="⎜",g="⎝",x="Size4-Regular",y="lparen",w=875):e===")"||e==="\\rparen"?(h="⎞",p="⎟",g="⎠",x="Size4-Regular",y="rparen",w=875):e==="\\{"||e==="\\lbrace"?(h="⎧",c="⎨",g="⎩",p="⎪",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="⎫",c="⎬",g="⎭",p="⎪",x="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(h="⎧",g="⎩",p="⎪",x="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(h="⎫",g="⎭",p="⎪",x="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(h="⎧",g="⎭",p="⎪",x="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(h="⎫",g="⎩",p="⎪",x="Size4-Regular");var z=ne(h,x,s),T=z.height+z.depth,C=ne(p,x,s),N=C.height+C.depth,O=ne(g,x,s),F=O.height+O.depth,V=0,L=1;if(c!==null){var U=ne(c,x,s);V=U.height+U.depth,L=2}var G=T+F+V,j=Math.max(0,Math.ceil((t-G)/(L*N))),Y=G+j*L*N,M0=n.fontMetrics().axisHeight;a&&(M0*=n.sizeMultiplier);var r0=Y/2-M0,e0=[];if(y.length>0){var U0=Y-T-F,s0=Math.round(Y*1e3),g0=Pa(y,Math.round(U0*1e3)),E0=new P0(y,g0),W0=(w/1e3).toFixed(3)+"em",j0=(s0/1e3).toFixed(3)+"em",Le=new D0([E0],{width:W0,height:j0,viewBox:"0 0 "+w+" "+s0}),R0=b.makeSvgSpan([],[Le],n);R0.height=s0/1e3,R0.style.width=W0,R0.style.height=j0,e0.push({type:"elem",elem:R0})}else{if(e0.push(je(g,x,s)),e0.push(Se),c===null){var I0=Y-T-F+2*ht;e0.push(Ze(p,I0,n))}else{var m0=(Y-T-F-V)/2+2*ht;e0.push(Ze(p,m0,n)),e0.push(Se),e0.push(je(c,x,s)),e0.push(Se),e0.push(Ze(p,m0,n))}e0.push(Se),e0.push(je(h,x,s))}var ae=n.havingBaseStyle(R.TEXT),Pe=b.makeVList({positionType:"bottom",positionData:r0,children:e0},ae);return wt(b.makeSpan(["delimsizing","mult"],[Pe],ae),R.TEXT,n,o)},Ke=80,Je=.08,Qe=function(e,t,a,n,s){var o=Ha(e,n,a),h=new P0(e,o),c=new D0([h],{width:"400em",height:A(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return b.makeSvgSpan(["hide-tail"],[c],s)},O1=function(e,t){var a=t.havingBaseSizing(),n=Yr("\\surd",e*a.sizeMultiplier,Ur,a),s=a.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,p=0,g=0,y;return n.type==="small"?(g=1e3+1e3*o+Ke,e<1?s=1:e<1.4&&(s=.7),c=(1+o+Je)/s,p=(1+o)/s,h=Qe("sqrtMain",c,g,o,t),h.style.minWidth="0.853em",y=.833/s):n.type==="large"?(g=(1e3+Ke)*se[n.size],p=(se[n.size]+o)/s,c=(se[n.size]+o+Je)/s,h=Qe("sqrtSize"+n.size,c,g,o,t),h.style.minWidth="1.02em",y=1/s):(c=e+o+Je,p=e+o,g=Math.floor(1e3*e+o)+Ke,h=Qe("sqrtTall",c,g,o,t),h.style.minWidth="0.742em",y=1.056),h.height=p,h.style.height=A(c),{span:h,advanceWidth:y,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*s}},Gr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],F1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Vr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],se=[0,1.2,1.8,2.4,3],H1=function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),q.contains(Gr,e)||q.contains(Vr,e))return Lr(e,t,!1,a,n,s);if(q.contains(F1,e))return Pr(e,se[t],!1,a,n,s);throw new M("Illegal delimiter: '"+e+"'")},L1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],P1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],Ur=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],G1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Yr=function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),o=s;ot)return a[o]}return a[a.length-1]},Xr=function(e,t,a,n,s,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var h;q.contains(Vr,e)?h=L1:q.contains(Gr,e)?h=Ur:h=P1;var c=Yr(e,t,h,n);return c.type==="small"?q1(e,c.style,a,n,s,o):c.type==="large"?Lr(e,c.size,a,n,s,o):Pr(e,t,a,n,s,o)},V1=function(e,t,a,n,s,o){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,p=5/n.fontMetrics().ptPerEm,g=Math.max(t-h,a+h),y=Math.max(g/500*c,2*g-p);return Xr(e,y,!0,n,s,o)},B0={sqrtImage:O1,sizedDelim:H1,sizeToMaxHeight:se,customSizedDelim:Xr,leftRightDelim:V1},Zt={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},U1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Oe(r,e){var t=Re(r);if(t&&q.contains(U1,t.text))return t;throw t?new M("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new M("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=Oe(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Zt[r.funcName].size,mclass:Zt[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?b.makeSpan([r.mclass]):B0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(v0(r.delim,r.mode));var t=new S.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=A(B0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function Kt(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new M("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:Oe(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Oe(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=H(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{Kt(r);for(var t=t0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,o=0;o{Kt(r);var t=o0(r.body,e);if(r.left!=="."){var a=new S.MathNode("mo",[v0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new S.MathNode("mo",[v0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return gt(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Oe(e[0],r);if(!r.parser.leftrightDepth)throw new M("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=oe(e,[]);else{t=B0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?v0("|","text"):v0(r.delim,r.mode),a=new S.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var kt=(r,e)=>{var t=b.wrapFragment(P(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,o=0,h=q.isCharacterBox(r.body);if(a==="sout")s=b.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,o=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=K({number:.6,unit:"pt"},e),p=K({number:.35,unit:"ex"},e),g=e.havingBaseSizing();n=n/g.sizeMultiplier;var y=t.height+t.depth+c+p;t.style.paddingLeft=A(y/2+c);var w=Math.floor(1e3*y*n),x=Oa(w),z=new D0([new P0("phase",x)],{width:"400em",height:A(w/1e3),viewBox:"0 0 400000 "+w,preserveAspectRatio:"xMinYMin slice"});s=b.makeSvgSpan(["hide-tail"],[z],e),s.style.height=A(y),o=t.depth+c+p}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var T=0,C=0,N=0;/box/.test(a)?(N=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),T=e.fontMetrics().fboxsep+(a==="colorbox"?0:N),C=T):a==="angl"?(N=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),T=4*N,C=Math.max(0,.25-t.depth)):(T=h?.2:0,C=T),s=N0.encloseSpan(t,a,T,C,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=A(N)):a==="angl"&&N!==.049&&(s.style.borderTopWidth=A(N),s.style.borderRightWidth=A(N)),o=t.depth+C,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var O;if(r.backgroundColor)O=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:t,shift:0}]},e);else{var F=/cancel|phase/.test(a)?["svg-align"]:[];O=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:F}]},e)}return/cancel/.test(a)&&(O.height=t.height,O.depth=t.depth),/cancel/.test(a)&&!h?b.makeSpan(["mord","cancel-lap"],[O],e):b.makeSpan(["mord"],[O],e)},St=(r,e)=>{var t=0,a=new S.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[X(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=H(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:o}},htmlBuilder:kt,mathmlBuilder:St});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=H(e[0],"color-token").color,o=H(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:s,body:h}},htmlBuilder:kt,mathmlBuilder:St});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:kt,mathmlBuilder:St});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var $r={};function w0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new M("{"+r.envName+"} can be used only in display mode.")};function Mt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function V0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:o,colSeparationType:h,autoTag:c,singleRow:p,emptySingleRow:g,maxNumCols:y,leqno:w}=e;if(r.gullet.beginGroup(),p||r.gullet.macros.set("\\cr","\\\\\\relax"),!o){var x=r.gullet.expandMacroAsText("\\arraystretch");if(x==null)o=1;else if(o=parseFloat(x),!o||o<0)throw new M("Invalid \\arraystretch: "+x)}r.gullet.beginGroup();var z=[],T=[z],C=[],N=[],O=c!=null?[]:void 0;function F(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function V(){O&&(r.gullet.macros.get("\\df@tag")?(O.push(r.subparse([new f0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):O.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(F(),N.push(Jt(r));;){var L=r.parseExpression(!1,p?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),L={type:"ordgroup",mode:r.mode,body:L},t&&(L={type:"styling",mode:r.mode,style:t,body:[L]}),z.push(L);var U=r.fetch().text;if(U==="&"){if(y&&z.length===y){if(p||h)throw new M("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(U==="\\end"){V(),z.length===1&&L.type==="styling"&&L.body[0].body.length===0&&(T.length>1||!g)&&T.pop(),N.length0&&(F+=.25),p.push({pos:F,isDashed:fe[pe]})}for(V(o[0]),a=0;a0&&(r0+=O,Gfe))for(a=0;a=h)){var K0=void 0;(n>0||e.hskipBeforeAndAfter)&&(K0=q.deflt(m0.pregap,w),K0!==0&&(g0=b.makeSpan(["arraycolsep"],[]),g0.style.width=A(K0),s0.push(g0)));var J0=[];for(a=0;a0){for(var ma=b.makeLineSpan("hline",t,g),ca=b.makeLineSpan("hdashline",t,g),Ge=[{type:"elem",elem:c,shift:0}];p.length>0;){var Et=p.pop(),Rt=Et.pos-e0;Et.isDashed?Ge.push({type:"elem",elem:ca,shift:Rt}):Ge.push({type:"elem",elem:ma,shift:Rt})}c=b.makeVList({positionType:"individualShift",children:Ge},t)}if(W0.length===0)return b.makeSpan(["mord"],[c],t);var Ve=b.makeVList({positionType:"individualShift",children:W0},t);return Ve=b.makeSpan(["tag"],[Ve],t),b.makeFragment([c,Ve])},Y1={c:"center ",l:"left ",r:"right "},S0=function(e,t){for(var a=[],n=new S.MathNode("mtd",[],["mtr-glue"]),s=new S.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var z=e.cols,T="",C=!1,N=0,O=z.length;z[0].type==="separator"&&(w+="top ",N=1),z[z.length-1].type==="separator"&&(w+="bottom ",O-=1);for(var F=N;F0?"left ":"",w+=j[j.length-1].length>0?"right ":"";for(var Y=1;Y-1?"alignat":"align",s=e.envName==="split",o=V0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:Mt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var g="",y=0;y0&&x&&(C=1),a[z]={type:"align",align:T,pregap:C,postgap:0}}return o.colSeparationType=x?"align":"alignat",o};w0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Re(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(o){var h=yt(o),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new M("Unknown column alignment: "+c,o)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return V0(r.parser,s,zt(r.envName))},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new M("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=V0(r.parser,a,zt(r.envName)),o=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(o).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=V0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Re(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(o){var h=yt(o),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new M("Unknown column alignment: "+c,o)});if(n.length>1)throw new M("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=V0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new M("{subarray} can contain only one column");return s},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=V0(r.parser,e,zt(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:jr,htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){q.contains(["gather","gather*"],r.envName)&&Fe(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Mt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return V0(r.parser,e,"display")},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:jr,htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){Fe(r);var e={autoTag:Mt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return V0(r.parser,e,"display")},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return Fe(r),C1(r.parser)},htmlBuilder:k0,mathmlBuilder:S0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new M(r.funcName+" valid only within array environment")}});var Qt=$r;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new M("Invalid environment name",n);for(var s="",o=0;o{var t=r.font,a=e.withFont(t);return P(r.body,a)},Kr=(r,e)=>{var t=r.font,a=e.withFont(t);return X(r.body,a)},_t={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=Ne(e[0]),s=a;return s in _t&&(s=_t[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},htmlBuilder:Zr,mathmlBuilder:Kr});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=q.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Ie(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,o=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:s,font:h,body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:Zr,mathmlBuilder:Kr});var Jr=(r,e)=>{var t=e;return r==="display"?t=t.id>=R.SCRIPT.id?t.text():R.DISPLAY:r==="text"&&t.size===R.DISPLAY.size?t=R.TEXT:r==="script"?t=R.SCRIPT:r==="scriptscript"&&(t=R.SCRIPTSCRIPT),t},At=(r,e)=>{var t=Jr(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var o=P(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?z=3*w:z=7*w,T=e.fontMetrics().denom1):(y>0?(x=e.fontMetrics().num2,z=w):(x=e.fontMetrics().num3,z=3*w),T=e.fontMetrics().denom2);var C;if(g){var O=e.fontMetrics().axisHeight;x-o.depth-(O+.5*y){var t=new S.MathNode("mfrac",[X(r.numer,e),X(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=K(r.barSize,e);t.setAttribute("linethickness",A(a))}var n=Jr(r.size,e.style);if(n.size!==e.style.size){t=new S.MathNode("mstyle",[t]);var s=n.size===R.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var o=[];if(r.leftDelim!=null){var h=new S.MathNode("mo",[new S.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),o.push(h)}if(o.push(t),r.rightDelim!=null){var c=new S.MathNode("mo",[new S.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),o.push(c)}return gt(o)}return t};B({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],o,h=null,c=null,p="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,h="(",c=")";break;case"\\\\bracefrac":o=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":p="display";break;case"\\tfrac":case"\\tbinom":p="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:o,leftDelim:h,rightDelim:c,size:p,barSize:null}},htmlBuilder:At,mathmlBuilder:Tt});B({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var er=["display","text","script","scriptscript"],tr=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=Ne(e[0]),o=s.type==="atom"&&s.family==="open"?tr(s.text):null,h=Ne(e[1]),c=h.type==="atom"&&h.family==="close"?tr(h.text):null,p=H(e[2],"size"),g,y=null;p.isBlank?g=!0:(y=p.value,g=y.number>0);var w="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var z=H(x.body[0],"textord");w=er[Number(z.text)]}}else x=H(x,"textord"),w=er[Number(x.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:g,barSize:y,leftDelim:o,rightDelim:c,size:w}},htmlBuilder:At,mathmlBuilder:Tt});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:H(e[0],"size").value,token:n}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=wa(H(e[1],"infix").size),o=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:o,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:At,mathmlBuilder:Tt});var Qr=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?P(r.sup,e.havingStyle(t.sup()),e):P(r.sub,e.havingStyle(t.sub()),e),n=H(r.base,"horizBrace")):n=H(r,"horizBrace");var s=P(n.base,e.havingBaseStyle(R.DISPLAY)),o=N0.svgSpan(n,e),h;if(n.isOver?(h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=b.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=b.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},X1=(r,e)=>{var t=N0.mathMLnode(r.label);return new S.MathNode(r.isOver?"mover":"munder",[X(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:Qr,mathmlBuilder:X1});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=H(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:Q(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=t0(r.body,e,!1);return b.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=G0(r.body,e);return t instanceof c0||(t=new c0("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=H(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=H(e[0],"raw").string,o=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var p=s.split(","),g=0;g{var t=t0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=b.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},mathmlBuilder:(r,e)=>G0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:Q(e[0]),mathml:Q(e[1])}},htmlBuilder:(r,e)=>{var t=t0(r.html,e,!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>G0(r.mathml,e)});var _e=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new M("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!gr(a))throw new M("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},h="";if(t[0])for(var c=H(t[0],"raw").string,p=c.split(","),g=0;g{var t=K(r.height,e),a=0;r.totalheight.number>0&&(a=K(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=K(r.width,e));var s={height:A(t+a)};n>0&&(s.width=A(n)),a>0&&(s.verticalAlign=A(-a));var o=new Xa(r.src,r.alt,s);return o.height=t,o.depth=a,o},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=K(r.height,e),n=0;if(r.totalheight.number>0&&(n=K(r.totalheight,e)-a,t.setAttribute("valign",A(-n))),t.setAttribute("height",A(a+n)),r.width.number>0){var s=K(r.width,e);t.setAttribute("width",A(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=H(e[0],"size");if(t.settings.strict){var s=a[1]==="m",o=n.value.unit==="mu";s?(o||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return b.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=K(r.dimension,e);return new S.SpaceNode(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=b.makeSpan([],[P(r.body,e)]),t=b.makeSpan(["inner"],[t],e)):t=b.makeSpan(["inner"],[P(r.body,e)]);var a=b.makeSpan(["fix"],[]),n=b.makeSpan([r.alignment],[t,a],e),s=b.makeSpan(["strut"]);return s.style.height=A(n.height+n.depth),n.depth&&(s.style.verticalAlign=A(-n.depth)),n.children.unshift(s),n=b.makeSpan(["thinbox"],[n],e),b.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mpadded",[X(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",o=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new M("Mismatched "+r.funcName)}});var rr=(r,e)=>{switch(e.style.size){case R.DISPLAY.size:return r.display;case R.TEXT.size:return r.text;case R.SCRIPT.size:return r.script;case R.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:Q(e[0]),text:Q(e[1]),script:Q(e[2]),scriptscript:Q(e[3])}},htmlBuilder:(r,e)=>{var t=rr(r,e),a=t0(t,e,!1);return b.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=rr(r,e);return G0(t,e)}});var _r=(r,e,t,a,n,s,o)=>{r=b.makeSpan([],[r]);var h=t&&q.isCharacterBox(t),c,p;if(e){var g=P(e,a.havingStyle(n.sup()),a);p={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(t){var y=P(t,a.havingStyle(n.sub()),a);c={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var w;if(p&&c){var x=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+o;w=b.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var z=r.height-o;w=b.makeVList({positionType:"top",positionData:z,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(p){var T=r.depth+o;w=b.makeVList({positionType:"bottom",positionData:T,children:[{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var C=[w];if(c&&s!==0&&!h){var N=b.makeSpan(["mspace"],[],a);N.style.marginRight=A(s),C.unshift(N)}return b.makeSpan(["mop","op-limits"],C,a)},ea=["\\smallint"],re=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"op"),n=!0):s=H(r,"op");var o=e.style,h=!1;o.size===R.DISPLAY.size&&s.symbol&&!q.contains(ea,s.name)&&(h=!0);var c;if(s.symbol){var p=h?"Size2-Regular":"Size1-Regular",g="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(g=s.name.slice(1),s.name=g==="oiint"?"\\iint":"\\iiint"),c=b.makeSymbol(s.name,p,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),g.length>0){var y=c.italic,w=b.staticSvg(g+"Size"+(h?"2":"1"),e);c=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:w,shift:h?.08:0}]},e),s.name="\\"+g,c.classes.unshift("mop"),c.italic=y}}else if(s.body){var x=t0(s.body,e,!0);x.length===1&&x[0]instanceof p0?(c=x[0],c.classes[0]="mop"):c=b.makeSpan(["mop"],x,e)}else{for(var z=[],T=1;T{var t;if(r.symbol)t=new c0("mo",[v0(r.name,r.mode)]),q.contains(ea,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new c0("mo",o0(r.body,e));else{t=new c0("mi",[new ie(r.name.slice(1))]);var a=new c0("mo",[v0("⁡","text")]);r.parentIsSupSub?t=new c0("mrow",[t,a]):t=Br([t,a])}return t},$1={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=$1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:re,mathmlBuilder:me});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Q(a)}},htmlBuilder:re,mathmlBuilder:me});var W1={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:re,mathmlBuilder:me});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:re,mathmlBuilder:me});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=W1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:re,mathmlBuilder:me});var ta=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"operatorname"),n=!0):s=H(r,"operatorname");var o;if(s.body.length>0){for(var h=s.body.map(y=>{var w=y.text;return typeof w=="string"?{type:"textord",mode:y.mode,text:w}:y}),c=t0(h,e.withFont("mathrm"),!0),p=0;p{for(var t=o0(r.body,e.withFont("mathrm")),a=!0,n=0;ng.toText()).join("");t=[new S.TextNode(h)]}var c=new S.MathNode("mi",t);c.setAttribute("mathvariant","normal");var p=new S.MathNode("mo",[v0("⁡","text")]);return r.parentIsSupSub?new S.MathNode("mrow",[c,p]):S.newDocumentFragment([c,p])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:Q(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ta,mathmlBuilder:j1});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");$0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?b.makeFragment(t0(r.body,e,!1)):b.makeSpan(["mord"],t0(r.body,e,!0),e)},mathmlBuilder(r,e){return G0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle()),a=b.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return b.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("mover",[X(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:Q(a)}},htmlBuilder:(r,e)=>{var t=t0(r.body,e.withPhantom(),!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=o0(r.body,e);return new S.MathNode("mphantom",t)}});B({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan([],[P(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan(["inner"],[P(r.body,e.withPhantom())]),a=b.makeSpan(["fix"],[]);return b.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=H(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=P(r.body,e),a=K(r.dy,e);return b.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new S.MathNode("mpadded",[X(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=H(e[0],"size"),o=H(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&H(n,"size").value,width:s.value,height:o.value}},htmlBuilder(r,e){var t=b.makeSpan(["mord","rule"],[],e),a=K(r.width,e),n=K(r.height,e),s=r.shift?K(r.shift,e):0;return t.style.borderRightWidth=A(a),t.style.borderTopWidth=A(n),t.style.bottom=A(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=K(r.width,e),a=K(r.height,e),n=r.shift?K(r.shift,e):0,s=e.color&&e.getColor()||"black",o=new S.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",A(t)),o.setAttribute("height",A(a));var h=new S.MathNode("mpadded",[o]);return n>=0?h.setAttribute("height",A(n)):(h.setAttribute("height",A(n)),h.setAttribute("depth",A(-n))),h.setAttribute("voffset",A(n)),h}});function ra(r,e,t){for(var a=t0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return ra(r.body,t,e)};B({type:"sizing",names:ar,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:ar.indexOf(a)+1,body:s}},htmlBuilder:Z1,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=o0(r.body,t),n=new S.MathNode("mstyle",a);return n.setAttribute("mathsize",A(t.sizeMultiplier)),n}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,s=!1,o=t[0]&&H(t[0],"ordgroup");if(o)for(var h="",c=0;c{var t=b.makeSpan([],[P(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new S.MathNode("mpadded",[X(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=b.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+o&&(o=(o+y-t.height-t.depth)/2);var w=c.height-t.height-o-p;t.style.paddingLeft=A(g);var x=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+w)},{type:"elem",elem:c},{type:"kern",size:p}]},e);if(r.index){var z=e.havingStyle(R.SCRIPTSCRIPT),T=P(r.index,z,e),C=.6*(x.height-x.depth),N=b.makeVList({positionType:"shift",positionData:-C,children:[{type:"elem",elem:T}]},e),O=b.makeSpan(["root"],[N]);return b.makeSpan(["mord","sqrt"],[O,x],e)}else return b.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new S.MathNode("mroot",[X(t,e),X(a,e)]):new S.MathNode("msqrt",[X(t,e)])}});var nr={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:s}},htmlBuilder(r,e){var t=nr[r.style],a=e.havingStyle(t).withFont("");return ra(r.body,a,e)},mathmlBuilder(r,e){var t=nr[r.style],a=e.havingStyle(t),n=o0(r.body,a),s=new S.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=o[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var K1=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===R.DISPLAY.size||a.alwaysHandleSupSub);return n?re:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===R.DISPLAY.size||a.limits);return s?ta:null}else{if(a.type==="accent")return q.isCharacterBox(a.base)?xt:null;if(a.type==="horizBrace"){var o=!e.sub;return o===a.isOver?Qr:null}else return null}else return null};$0({type:"supsub",htmlBuilder(r,e){var t=K1(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,o=P(a,e),h,c,p=e.fontMetrics(),g=0,y=0,w=a&&q.isCharacterBox(a);if(n){var x=e.havingStyle(e.style.sup());h=P(n,x,e),w||(g=o.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(s){var z=e.havingStyle(e.style.sub());c=P(s,z,e),w||(y=o.depth+z.fontMetrics().subDrop*z.sizeMultiplier/e.sizeMultiplier)}var T;e.style===R.DISPLAY?T=p.sup1:e.style.cramped?T=p.sup3:T=p.sup2;var C=e.sizeMultiplier,N=A(.5/p.ptPerEm/C),O=null;if(c){var F=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(o instanceof p0||F)&&(O=A(-o.italic))}var V;if(h&&c){g=Math.max(g,T,h.depth+.25*p.xHeight),y=Math.max(y,p.sub2);var L=p.defaultRuleThickness,U=4*L;if(g-h.depth-(c.height-y)0&&(g+=G,y-=G)}var j=[{type:"elem",elem:c,shift:y,marginRight:N,marginLeft:O},{type:"elem",elem:h,shift:-g,marginRight:N}];V=b.makeVList({positionType:"individualShift",children:j},e)}else if(c){y=Math.max(y,p.sub1,c.height-.8*p.xHeight);var Y=[{type:"elem",elem:c,marginLeft:O,marginRight:N}];V=b.makeVList({positionType:"shift",positionData:y,children:Y},e)}else if(h)g=Math.max(g,T,h.depth+.25*p.xHeight),V=b.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:h,marginRight:N}]},e);else throw new Error("supsub must have either sup or sub.");var M0=lt(o,"right")||"mord";return b.makeSpan([M0],[o,b.makeSpan(["msupsub"],[V])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[X(r.base,e)];r.sub&&s.push(X(r.sub,e)),r.sup&&s.push(X(r.sup,e));var o;if(t)o=a?"mover":"munder";else if(r.sub)if(r.sup){var p=r.base;p&&p.type==="op"&&p.limits&&e.style===R.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(e.style===R.DISPLAY||p.limits)?o="munderover":o="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===R.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===R.DISPLAY)?o="munder":o="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===R.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===R.DISPLAY)?o="mover":o="msup"}return new S.MathNode(o,s)}});$0({type:"atom",htmlBuilder(r,e){return b.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new S.MathNode("mo",[v0(r.text,r.mode)]);if(r.family==="bin"){var a=bt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var aa={mi:"italic",mn:"normal",mtext:"normal"};$0({type:"mathord",htmlBuilder(r,e){return b.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new S.MathNode("mi",[v0(r.text,r.mode,e)]),a=bt(r,e)||"italic";return a!==aa[t.type]&&t.setAttribute("mathvariant",a),t}});$0({type:"textord",htmlBuilder(r,e){return b.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=v0(r.text,r.mode,e),a=bt(r,e)||"normal",n;return r.mode==="text"?n=new S.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new S.MathNode("mn",[t]):r.text==="\\prime"?n=new S.MathNode("mo",[t]):n=new S.MathNode("mi",[t]),a!==aa[n.type]&&n.setAttribute("mathvariant",a),n}});var et={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},tt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};$0({type:"spacing",htmlBuilder(r,e){if(tt.hasOwnProperty(r.text)){var t=tt[r.text].className||"";if(r.mode==="text"){var a=b.makeOrd(r,e,"textord");return a.classes.push(t),a}else return b.makeSpan(["mspace",t],[b.mathsym(r.text,r.mode,e)],e)}else{if(et.hasOwnProperty(r.text))return b.makeSpan(["mspace",et[r.text]],[],e);throw new M('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(tt.hasOwnProperty(r.text))t=new S.MathNode("mtext",[new S.TextNode(" ")]);else{if(et.hasOwnProperty(r.text))return new S.MathNode("mspace");throw new M('Unknown type of space "'+r.text+'"')}return t}});var ir=()=>{var r=new S.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};$0({type:"tag",mathmlBuilder(r,e){var t=new S.MathNode("mtable",[new S.MathNode("mtr",[ir(),new S.MathNode("mtd",[G0(r.body,e)]),ir(),new S.MathNode("mtd",[G0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var sr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},lr={"\\textbf":"textbf","\\textmd":"textmd"},J1={"\\textit":"textit","\\textup":"textup"},or=(r,e)=>{var t=r.font;if(t){if(sr[t])return e.withTextFontFamily(sr[t]);if(lr[t])return e.withTextFontWeight(lr[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(J1[t])};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:Q(n),font:a}},htmlBuilder(r,e){var t=or(r,e),a=t0(r.body,t,!0);return b.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=or(r,e);return G0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=b.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("munder",[X(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return b.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new S.MathNode("mpadded",[X(r.body,e)],["vcenter"])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new M("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=ur(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"␣":" "),H0=Ar,na=`[ \r + ]`,Q1="\\\\[a-zA-Z@]+",_1="\\\\[^\uD800-\uDFFF]",e4="("+Q1+")"+na+"*",t4=`\\\\( +|[ \r ]+ +?)[ \r ]*`,mt="[̀-ͯ]",r4=new RegExp(mt+"+$"),a4="("+na+"+)|"+(t4+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(mt+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(mt+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+e4)+("|"+_1+")");class hr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(a4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new f0("EOF",new u0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new M("Unexpected character: '"+e[t]+"'",new f0(e[t],new u0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new f0(n,new u0(this,t,this.tokenRegex.lastIndex))}}class n4{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new M("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var i4=Wr;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var mr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new M("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=mr[e.text],a==null||a>=t)throw new M("Invalid base-"+t+" digit "+e.text);for(var n;(n=mr[r.future().text])!=null&&n{var a=r.consumeArg().tokens;if(a.length!==1)throw new M("\\newcommand's first argument must be a macro name");var n=a[0].text,s=r.isDefined(n);if(s&&!e)throw new M("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!s&&!t)throw new M("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var o=0;if(a=r.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var h="",c=r.expandNextToken();c.text!=="]"&&c.text!=="EOF";)h+=c.text,c=r.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new M("Invalid number of arguments: "+h);o=parseInt(h),a=r.consumeArg().tokens}return r.macros.set(n,{tokens:a,numArgs:o}),""};m("\\newcommand",r=>Bt(r,!1,!0));m("\\renewcommand",r=>Bt(r,!0,!1));m("\\providecommand",r=>Bt(r,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),H0[t],$.math[t],$.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");m("ℬ","\\mathscr{B}");m("ℰ","\\mathscr{E}");m("ℱ","\\mathscr{F}");m("ℋ","\\mathscr{H}");m("ℐ","\\mathscr{I}");m("ℒ","\\mathscr{L}");m("ℳ","\\mathscr{M}");m("ℛ","\\mathscr{R}");m("ℭ","\\mathfrak{C}");m("ℌ","\\mathfrak{H}");m("ℨ","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("·","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");m("\\ne","\\neq");m("≠","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");m("∉","\\notin");m("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");m("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");m("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");m("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");m("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");m("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");m("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");m("⟂","\\perp");m("‼","\\mathclose{!\\mkern-0.8mu!}");m("∌","\\notni");m("⌜","\\ulcorner");m("⌝","\\urcorner");m("⌞","\\llcorner");m("⌟","\\lrcorner");m("©","\\copyright");m("®","\\textregistered");m("️","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");m("⋮","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var cr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in cr?e=cr[t]:(t.slice(0,4)==="\\not"||t in $.math&&q.contains(["bin","rel"],$.math[t].group))&&(e="\\dotsb"),e});var Dt={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Dt?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Dt&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Dt?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new M("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ia=A(x0["Main-Regular"][84][1]-.7*x0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ia+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ia+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("∷","\\dblcolon");m("∹","\\eqcolon");m("≔","\\coloneqq");m("≕","\\eqqcolon");m("⩴","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");m("\\nleqq","\\html@mathml{\\@nleqq}{≰}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");m("\\imath","\\html@mathml{\\@imath}{ı}");m("\\jmath","\\html@mathml{\\@jmath}{ȷ}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");m("⟦","\\llbracket");m("⟧","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");m("⦃","\\lBrace");m("⦄","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");m("⦵","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var sa=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=y=>w=>{r&&(w.macros.set("|",o),n.length&&w.macros.set("\\|",h));var x=y;if(!y&&n.length){var z=w.future();z.text==="|"&&(w.popToken(),x=!0)}return{tokens:x?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};m("\\bra@ket",sa(!1));m("\\bra@set",sa(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var la={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class s4{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new n4(i4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new hr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new f0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,o=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new M("Extra }",s)}else if(s.text==="EOF")throw new M("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((o===0||o===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new M("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new M("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new M("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...o[+c.text-1]);else throw new M("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new f0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var h=new hr(n,this.settings),c=[],p=h.lex();p.text!=="EOF";)c.push(p),p=h.lex();c.reverse();var g={tokens:c,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||H0.hasOwnProperty(e)||$.math.hasOwnProperty(e)||$.text.hasOwnProperty(e)||la.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:H0.hasOwnProperty(e)&&!H0[e].primitive}}var dr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Me=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),rt={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},fr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class He{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new s4(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new f0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(He.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&H0[n.text]&&H0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=$[this.mode][t].group,c=u0.range(e),p;if(ja.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:h,mode:this.mode,loc:c,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(vr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:u0.range(e),text:t};else return null;if(this.consume(),s)for(var y=0;ye}function F(n,e){var r={};return e=U(e),vn(n,function(i,t,a){jn(r,t,e(i,t,a))}),r}function x(n){return n&&n.length?pn(n,mn,re):void 0}function H(n,e){return n&&n.length?pn(n,U(e),An):void 0}function ie(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}function te(n,e){if(n!==e){var r=n!==void 0,i=n===null,t=n===n,a=en(n),o=e!==void 0,u=e===null,d=e===e,f=en(e);if(!u&&!f&&!a&&n>e||a&&o&&d&&!u&&!f||i&&o&&d||!r&&d||!t)return 1;if(!i&&!a&&!f&&n=u)return d;var f=r[i];return d*(f=="desc"?-1:1)}}return n.index-e.index}function oe(n,e,r){e.length?e=A(e,function(a){return wn(a)?function(o){return Sn(o,a.length===1?a[0]:a)}:a}):e=[mn];var i=-1;e=A(e,zn(U));var t=Bn(n,function(a,o,u){var d=A(e,function(f){return f(a)});return{criteria:d,index:++i,value:a}});return ie(t,function(a,o){return ae(a,o,r)})}function ue(n,e){return Gn(n,e,function(r,i){return On(n,i)})}var S=Jn(function(n,e){return n==null?{}:ue(n,e)}),de=Math.ceil,fe=Math.max;function se(n,e,r,i){for(var t=-1,a=fe(de((e-n)/(r||1)),0),o=Array(a);a--;)o[++t]=n,n+=r;return o}function ce(n){return function(e,r,i){return i&&typeof i!="number"&&W(e,r,i)&&(r=i=void 0),e=B(e),r===void 0?(r=e,e=0):r=B(r),i=i===void 0?e1&&W(n,e[0],e[1])?e=[]:r>2&&W(e[0],e[1],e[2])&&(e=[e[0]]),oe(n,Fn(e),[])}),he=0;function J(n){var e=++he;return Vn(n)+e}function le(n,e,r){for(var i=-1,t=n.length,a=e.length,o={};++i0;--u)if(o=e[u].dequeue(),o){i=i.concat(G(n,e,r,o,!0));break}}}return i}function G(n,e,r,i,t){var a=t?[]:void 0;return s(n.inEdges(i.v),function(o){var u=n.edge(o),d=n.node(o.v);t&&a.push({v:o.v,w:o.w}),d.out-=u,z(e,r,d)}),s(n.outEdges(i.v),function(o){var u=n.edge(o),d=o.w,f=n.node(d);f.in-=u,z(e,r,f)}),n.removeNode(i.v),a}function ke(n,e){var r=new k,i=0,t=0;s(n.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),s(n.edges(),function(u){var d=r.edge(u.v,u.w)||0,f=e(u),c=d+f;r.setEdge(u.v,u.w,c),t=Math.max(t,r.node(u.v).out+=f),i=Math.max(i,r.node(u.w).in+=f)});var a=L(t+i+3).map(function(){return new pe}),o=i+1;return s(r.nodes(),function(u){z(a,o,r.node(u))}),{graph:r,buckets:a,zeroIdx:o}}function z(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function xe(n){var e=n.graph().acyclicer==="greedy"?be(n,r(n)):Ee(n);s(e,function(i){var t=n.edge(i);n.removeEdge(i),t.forwardName=i.name,t.reversed=!0,n.setEdge(i.w,i.v,t,J("rev"))});function r(i){return function(t){return i.edge(t).weight}}}function Ee(n){var e=[],r={},i={};function t(a){m(i,a)||(i[a]=!0,r[a]=!0,s(n.outEdges(a),function(o){m(r,o.w)?e.push(o):t(o.w)}),delete r[a])}return s(n.nodes(),t),e}function ye(n){s(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,i)}})}function C(n,e,r,i){var t;do t=J(i);while(n.hasNode(t));return r.dummy=e,n.setNode(t,r),t}function Le(n){var e=new k().setGraph(n.graph());return s(n.nodes(),function(r){e.setNode(r,n.node(r))}),s(n.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},t=n.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+t.weight,minlen:Math.max(i.minlen,t.minlen)})}),e}function bn(n){var e=new k({multigraph:n.isMultigraph()}).setGraph(n.graph());return s(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),s(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function tn(n,e){var r=n.x,i=n.y,t=e.x-r,a=e.y-i,o=n.width/2,u=n.height/2;if(!t&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var d,f;return Math.abs(a)*o>Math.abs(t)*u?(a<0&&(u=-u),d=u*t/a,f=u):(t<0&&(o=-o),d=o,f=o*a/t),{x:r+d,y:i+f}}function V(n){var e=w(L(gn(n)+1),function(){return[]});return s(n.nodes(),function(r){var i=n.node(r),t=i.rank;g(t)||(e[t][i.order]=r)}),e}function Ne(n){var e=R(w(n.nodes(),function(r){return n.node(r).rank}));s(n.nodes(),function(r){var i=n.node(r);m(i,"rank")&&(i.rank-=e)})}function Ce(n){var e=R(w(n.nodes(),function(a){return n.node(a).rank})),r=[];s(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var i=0,t=n.graph().nodeRankFactor;s(r,function(a,o){g(a)&&o%t!==0?--i:i&&s(a,function(u){n.node(u).rank+=i})})}function an(n,e,r,i){var t={width:0,height:0};return arguments.length>=4&&(t.rank=r,t.order=i),C(n,"border",t,e)}function gn(n){return x(w(n.nodes(),function(e){var r=n.node(e).rank;if(!g(r))return r}))}function _e(n,e){var r={lhs:[],rhs:[]};return s(n,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Re(n,e){return e()}function Te(n){function e(r){var i=n.children(r),t=n.node(r);if(i.length&&s(i,e),m(t,"minRank")){t.borderLeft=[],t.borderRight=[];for(var a=t.minRank,o=t.maxRank+1;ao.lim&&(u=o,d=!0);var f=I(e.edges(),function(c){return d===dn(n,n.node(c.v),u)&&d!==dn(n,n.node(c.w),u)});return H(f,function(c){return T(e,c)})}function Rn(n,e,r,i){var t=r.v,a=r.w;n.removeEdge(t,a),n.setEdge(i.v,i.w,{}),Q(n),K(n,e),We(n,e)}function We(n,e){var r=X(n.nodes(),function(t){return!e.node(t).parent}),i=qe(n,r);i=i.slice(1),s(i,function(t){var a=n.node(t).parent,o=e.edge(t,a),u=!1;o||(o=e.edge(a,t),u=!0),e.node(t).rank=e.node(a).rank+(u?o.minlen:-o.minlen)})}function je(n,e,r){return n.hasEdge(e,r)}function dn(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function ze(n){switch(n.graph().ranker){case"network-simplex":fn(n);break;case"tight-tree":Xe(n);break;case"longest-path":Ue(n);break;default:fn(n)}}var Ue=Z;function Xe(n){Z(n),xn(n)}function fn(n){E(n)}function He(n){var e=C(n,"root",{},"_root"),r=Je(n),i=x(y(r))-1,t=2*i+1;n.graph().nestingRoot=e,s(n.edges(),function(o){n.edge(o).minlen*=t});var a=Ze(n)+1;s(n.children(),function(o){Tn(n,e,t,a,i,r,o)}),n.graph().nodeRankFactor=t}function Tn(n,e,r,i,t,a,o){var u=n.children(o);if(!u.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var d=an(n,"_bt"),f=an(n,"_bb"),c=n.node(o);n.setParent(d,o),c.borderTop=d,n.setParent(f,o),c.borderBottom=f,s(u,function(h){Tn(n,e,r,i,t,a,h);var l=n.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,b=l.borderTop?i:2*i,_=v!==p?1:t-a[o]+1;n.setEdge(d,v,{weight:b,minlen:_,nestingEdge:!0}),n.setEdge(p,f,{weight:b,minlen:_,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,d,{weight:0,minlen:t+a[o]})}function Je(n){var e={};function r(i,t){var a=n.children(i);a&&a.length&&s(a,function(o){r(o,t+1)}),e[i]=t}return s(n.children(),function(i){r(i,1)}),e}function Ze(n){return O(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Ke(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,s(n.edges(),function(r){var i=n.edge(r);i.nestingEdge&&n.removeEdge(r)})}function Qe(n,e,r){var i={},t;s(r,function(a){for(var o=n.parent(a),u,d;o;){if(u=n.parent(o),u?(d=i[u],i[u]=o):(d=t,t=o),d&&d!==o){e.setEdge(d,o);return}o=u}})}function nr(n,e,r){var i=er(n),t=new k({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(a){return n.node(a)});return s(n.nodes(),function(a){var o=n.node(a),u=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(t.setNode(a),t.setParent(a,u||i),s(n[r](a),function(d){var f=d.v===a?d.w:d.v,c=t.edge(f,a),h=g(c)?0:c.weight;t.setEdge(f,a,{weight:n.edge(d).weight+h})}),m(o,"minRank")&&t.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),t}function er(n){for(var e;n.hasNode(e=J("_root")););return e}function rr(n,e){for(var r=0,i=1;i0;)c%2&&(h+=u[c+1]),c=c-1>>1,u[c]+=f.weight;d+=f.weight*h})),d}function tr(n){var e={},r=I(n.nodes(),function(u){return!n.children(u).length}),i=x(w(r,function(u){return n.node(u).rank})),t=w(L(i+1),function(){return[]});function a(u){if(!m(e,u)){e[u]=!0;var d=n.node(u);t[d.rank].push(u),s(n.successors(u),a)}}var o=M(r,function(u){return n.node(u).rank});return s(o,a),t}function ar(n,e){return w(e,function(r){var i=n.inEdges(r);if(i.length){var t=O(i,function(a,o){var u=n.edge(o),d=n.node(o.v);return{sum:a.sum+u.weight*d.order,weight:a.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:t.sum/t.weight,weight:t.weight}}else return{v:r}})}function or(n,e){var r={};s(n,function(t,a){var o=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:a};g(t.barycenter)||(o.barycenter=t.barycenter,o.weight=t.weight)}),s(e.edges(),function(t){var a=r[t.v],o=r[t.w];!g(a)&&!g(o)&&(o.indegree++,a.out.push(r[t.w]))});var i=I(r,function(t){return!t.indegree});return ur(i)}function ur(n){var e=[];function r(a){return function(o){o.merged||(g(o.barycenter)||g(a.barycenter)||o.barycenter>=a.barycenter)&&dr(a,o)}}function i(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var t=n.pop();e.push(t),s(t.in.reverse(),r(t)),s(t.out,i(t))}return w(I(e,function(a){return!a.merged}),function(a){return S(a,["vs","i","barycenter","weight"])})}function dr(n,e){var r=0,i=0;n.weight&&(r+=n.barycenter*n.weight,i+=n.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/i,n.weight=i,n.i=Math.min(e.i,n.i),e.merged=!0}function fr(n,e){var r=_e(n,function(c){return m(c,"barycenter")}),i=r.lhs,t=M(r.rhs,function(c){return-c.i}),a=[],o=0,u=0,d=0;i.sort(sr(!!e)),d=sn(a,t,d),s(i,function(c){d+=c.vs.length,a.push(c.vs),o+=c.barycenter*c.weight,u+=c.weight,d=sn(a,t,d)});var f={vs:N(a)};return u&&(f.barycenter=o/u,f.weight=u),f}function sn(n,e,r){for(var i;e.length&&(i=P(e)).i<=r;)e.pop(),n.push(i.vs),r++;return r}function sr(n){return function(e,r){return e.barycenterr.barycenter?1:n?r.i-e.i:e.i-r.i}}function In(n,e,r,i){var t=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,d={};o&&(t=I(t,function(p){return p!==o&&p!==u}));var f=ar(n,t);s(f,function(p){if(n.children(p.v).length){var b=In(n,p.v,r,i);d[p.v]=b,m(b,"barycenter")&&hr(p,b)}});var c=or(f,r);cr(c,d);var h=fr(c,i);if(o&&(h.vs=N([o,h.vs,u]),n.predecessors(o).length)){var l=n.node(n.predecessors(o)[0]),v=n.node(n.predecessors(u)[0]);m(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function cr(n,e){s(n,function(r){r.vs=N(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function hr(n,e){g(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function lr(n){var e=gn(n),r=cn(n,L(1,e+1),"inEdges"),i=cn(n,L(e-1,-1,-1),"outEdges"),t=tr(n);hn(n,t);for(var a=Number.POSITIVE_INFINITY,o,u=0,d=0;d<4;++u,++d){vr(u%2?r:i,u%4>=2),t=V(n);var f=rr(n,t);fo||u>e[d].lim));for(f=d,d=i;(d=n.parent(d))!==f;)a.push(d);return{path:t.concat(a.reverse()),lca:f}}function wr(n){var e={},r=0;function i(t){var a=r;s(n.children(t),i),e[t]={low:a,lim:r++}}return s(n.children(),i),e}function br(n,e){var r={};function i(t,a){var o=0,u=0,d=t.length,f=P(a);return s(a,function(c,h){var l=kr(n,c),v=l?n.node(l).order:d;(l||c===f)&&(s(a.slice(u,h+1),function(p){s(n.predecessors(p),function(b){var _=n.node(b),nn=_.order;(nnf)&&Mn(r,l,c)})})}function t(a,o){var u=-1,d,f=0;return s(o,function(c,h){if(n.node(c).dummy==="border"){var l=n.predecessors(c);l.length&&(d=n.node(l[0]).order,i(o,f,h,u,d),f=h,u=d)}i(o,f,o.length,d,a.length)}),o}return O(e,t),r}function kr(n,e){if(n.node(e).dummy)return X(n.predecessors(e),function(r){return n.node(r).dummy})}function Mn(n,e,r){if(e>r){var i=e;e=r,r=i}var t=n[e];t||(n[e]=t={}),t[r]=!0}function xr(n,e,r){if(e>r){var i=e;e=r,r=i}return m(n[e],r)}function Er(n,e,r,i){var t={},a={},o={};return s(e,function(u){s(u,function(d,f){t[d]=d,a[d]=d,o[d]=f})}),s(e,function(u){var d=-1;s(u,function(f){var c=i(f);if(c.length){c=M(c,function(b){return o[b]});for(var h=(c.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=c[l];a[f]===f&&dt?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,s=u.length){if(o>>1;e(u[h],c)<0?o=h+1:s=h}while(o>>1;e(u[h],c)<=0?o=h+1:s=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function ln(n){return n===null?NaN:+n}const sn=_(F),dn=sn.right;_(ln).center;const gn=Math.sqrt(50),yn=Math.sqrt(10),Mn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=gn?10:f>=yn?5:f>=Mn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function jn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function Pn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var zn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=zn.exec(n)))throw new Error("invalid format: "+n);var t;return new B({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]})}D.prototype=B.prototype;function B(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+""}B.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){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Fn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Sn,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)=>Z(n*100,t),r:Z,s:Fn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rn(n){var t=n.grouping===void 0||n.thousands===void 0?J:jn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:Pn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var l=h.fill,p=h.align,y=h.sign,b=h.symbol,k=h.zero,S=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||l==="0"&&p==="=")&&(k=!0,l="0",p="=");var en=b==="$"?e:b==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=b==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=$n(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function s(h,l){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(l)/3)))*3,b=Math.pow(10,-y),k=Q[8+y/3];return function(S){return p(b*S)+k}}return{format:o,formatPrefix:s}}var $,tn,rn;En({thousands:",",grouping:[3],currency:["$",""]});function En(n){return $=Rn(n),tn=$.format,rn=$.formatPrefix,$}function Dn(n){return Math.max(0,-v(Math.abs(n)))}function Tn(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function In(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function Ln(n){return function(){return n}}function qn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:Ln(isNaN(t)?NaN:.5)}function Cn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Bn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?Gn:Bn,c=o=null,h}function h(l){return l==null||isNaN(l=+l)?f:(c||(c=u(n.map(r),t,e)))(r(a(l)))}return h.invert=function(l){return a(i((o||(o=u(t,n.map(r),I)))(l)))},h.domain=function(l){return arguments.length?(n=Array.from(l,qn),s()):n.slice()},h.range=function(l){return arguments.length?(t=Array.from(l),s()):t.slice()},h.rangeRound=function(l){return t=Array.from(l),e=bn,s()},h.clamp=function(l){return arguments.length?(a=l?!0:A,s()):a!==A},h.interpolate=function(l){return arguments.length?(e=l,s()):e},h.unknown=function(l){return arguments.length?(f=l,h):f},function(l,p){return r=l,i=p,s()}}function Xn(){return Vn()(A,A)}function Un(n,t,e,r){var i=wn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=Tn(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=In(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Dn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Yn(n){var t=n.domain;return n.ticks=function(e){var r=t();return pn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Un(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,s=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Zn(){var n=Xn();return n.copy=function(){return On(n,Zn())},cn.apply(n,arguments),Yn(n)}export{On as a,_ as b,Xn as c,Zn as l,wn as t}; diff --git a/pr-528/assets/chunks/mindmap-definition-OEB2RXX2.DCzKGaGW.js b/pr-528/assets/chunks/mindmap-definition-OEB2RXX2.DCzKGaGW.js new file mode 100644 index 000000000..8e7312d84 --- /dev/null +++ b/pr-528/assets/chunks/mindmap-definition-OEB2RXX2.DCzKGaGW.js @@ -0,0 +1,95 @@ +import{aH as at,aI as Nt,_ as S,l as z,j as mt,ae as Dt,a4 as Ot,d as ot,H as At,a8 as It,B as tt,i as et,al as Ct,am as Rt,an as xt}from"../app.CKrDwBa1.js";import{c as pt}from"./cytoscape.esm.otp_DSkq.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";var dt={exports:{}},it={exports:{}},nt={exports:{}},ut;function Mt(){return ut||(ut=1,function(I,w){(function(D,y){I.exports=y()})(at,function(){return function(f){var D={};function y(r){if(D[r])return D[r].exports;var t=D[r]={i:r,l:!1,exports:{}};return f[r].call(t.exports,t,t.exports,y),t.l=!0,t.exports}return y.m=f,y.c=D,y.i=function(r){return r},y.d=function(r,t,e){y.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},y.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return y.d(t,"a",t),t},y.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},y.p="",y(y.s=26)}([function(f,D,y){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,f.exports=r},function(f,D,y){var r=y(2),t=y(8),e=y(9);function i(g,a,v){r.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=a}i.prototype=Object.create(r.prototype);for(var o in r)i[o]=r[o];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,a){for(var v=this.getOtherEnd(g),n=a.getGraphManager().getRoot();;){if(v.getOwner()==a)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=t.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=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.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=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=i},function(f,D,y){function r(t){this.vGraphObject=t}f.exports=r},function(f,D,y){var r=y(2),t=y(10),e=y(13),i=y(0),o=y(16),g=y(4);function a(n,c,l,E){l==null&&E==null&&(E=c),r.call(this,E),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=E,this.edges=[],this.graphManager=n,l!=null&&c!=null?this.rect=new e(c.x,c.y,l.width,l.height):this.rect=new e}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(n){this.rect.width=n},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(n){this.rect.height=n},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(n,c){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=c.width,this.rect.height=c.height},a.prototype.setCenter=function(n,c){this.rect.x=n-this.rect.width/2,this.rect.y=c-this.rect.height/2},a.prototype.setLocation=function(n,c){this.rect.x=n,this.rect.y=c},a.prototype.moveBy=function(n,c){this.rect.x+=n,this.rect.y+=c},a.prototype.getEdgeListToNode=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(E.target==n){if(E.source!=l)throw"Incorrect edge source!";c.push(E)}}),c},a.prototype.getEdgesBetween=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(!(E.source==l||E.target==l))throw"Incorrect edge source and/or target";(E.target==n||E.source==n)&&c.push(E)}),c},a.prototype.getNeighborsList=function(){var n=new Set,c=this;return c.edges.forEach(function(l){if(l.source==c)n.add(l.target);else{if(l.target!=c)throw"Incorrect incidency!";n.add(l.source)}}),n},a.prototype.withChildren=function(){var n=new Set,c,l;if(n.add(this),this.child!=null)for(var E=this.child.getNodes(),T=0;Tc&&(this.rect.x-=(this.labelWidth-c)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(n){var c=this.rect.x;c>i.WORLD_BOUNDARY?c=i.WORLD_BOUNDARY:c<-i.WORLD_BOUNDARY&&(c=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var E=new g(c,l),T=n.inverseTransformPoint(E);this.setLocation(T.x,T.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=a},function(f,D,y){function r(t,e){t==null&&e==null?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},f.exports=r},function(f,D,y){var r=y(2),t=y(10),e=y(0),i=y(6),o=y(3),g=y(1),a=y(13),v=y(12),n=y(11);function c(E,T,m){r.call(this,m),this.estimatedSize=t.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=E,T!=null&&T instanceof i?this.graphManager=T:T!=null&&T instanceof Layout&&(this.graphManager=T.graphManager)}c.prototype=Object.create(r.prototype);for(var l in r)c[l]=r[l];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(E,T,m){if(T==null&&m==null){var L=E;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}else{var O=E;if(!(this.getNodes().indexOf(T)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(!(T.owner==m.owner&&T.owner==this))throw"Both owners must be this graph!";return T.owner!=m.owner?null:(O.source=T,O.target=m,O.isInterGraph=!1,this.getEdges().push(O),T.edges.push(O),m!=T&&m.edges.push(O),O)}},c.prototype.remove=function(E){var T=E;if(E instanceof o){if(T==null)throw"Node is null!";if(!(T.owner!=null&&T.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var m=T.edges.slice(),L,O=m.length,d=0;d-1&&h>-1))throw"Source and/or target doesn't know this edge!";L.source.edges.splice(s,1),L.target!=L.source&&L.target.edges.splice(h,1);var N=L.source.owner.getEdges().indexOf(L);if(N==-1)throw"Not in owner's edge list!";L.source.owner.getEdges().splice(N,1)}},c.prototype.updateLeftTop=function(){for(var E=t.MAX_VALUE,T=t.MAX_VALUE,m,L,O,d=this.getNodes(),N=d.length,s=0;sm&&(E=m),T>L&&(T=L)}return E==t.MAX_VALUE?null:(d[0].getParent().paddingLeft!=null?O=d[0].getParent().paddingLeft:O=this.margin,this.left=T-O,this.top=E-O,new v(this.left,this.top))},c.prototype.updateBounds=function(E){for(var T=t.MAX_VALUE,m=-t.MAX_VALUE,L=t.MAX_VALUE,O=-t.MAX_VALUE,d,N,s,h,u,p=this.nodes,A=p.length,C=0;Cd&&(T=d),ms&&(L=s),Od&&(T=d),ms&&(L=s),O=this.nodes.length){var A=0;m.forEach(function(C){C.owner==E&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},f.exports=c},function(f,D,y){var r,t=y(1);function e(i){r=y(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(i,o);return this.setRootGraph(g),this.rootGraph},e.prototype.add=function(i,o,g,a,v){if(g==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return i.parent=o,o.child=i,i}else{v=g,a=o,g=i;var n=a.getOwner(),c=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(c!=null&&c.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==c)return g.isInterGraph=!1,n.add(g,a,v);if(g.isInterGraph=!0,g.source=a,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},e.prototype.remove=function(i){if(i instanceof r){var o=i;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());for(var a,v=g.length,n=0;n=i.getRight()?o[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight()):i.getX()<=e.getX()&&i.getRight()>=e.getRight()&&(o[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight())),e.getY()<=i.getY()&&e.getBottom()>=i.getBottom()?o[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom()):i.getY()<=e.getY()&&i.getBottom()>=e.getBottom()&&(o[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom()));var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX()&&(v=1);var n=v*o[0],c=o[1]/v;o[0]n)return o[0]=g,o[1]=l,o[2]=v,o[3]=p,!1;if(av)return o[0]=c,o[1]=a,o[2]=h,o[3]=n,!1;if(gv?(o[0]=T,o[1]=m,x=!0):(o[0]=E,o[1]=l,x=!0):U===M&&(g>v?(o[0]=c,o[1]=l,x=!0):(o[0]=L,o[1]=m,x=!0)),-X===M?v>g?(o[2]=u,o[3]=p,_=!0):(o[2]=h,o[3]=s,_=!0):X===M&&(v>g?(o[2]=N,o[3]=s,_=!0):(o[2]=A,o[3]=p,_=!0)),x&&_)return!1;if(g>v?a>n?(G=this.getCardinalDirection(U,M,4),F=this.getCardinalDirection(X,M,2)):(G=this.getCardinalDirection(-U,M,3),F=this.getCardinalDirection(-X,M,1)):a>n?(G=this.getCardinalDirection(-U,M,1),F=this.getCardinalDirection(-X,M,3)):(G=this.getCardinalDirection(U,M,2),F=this.getCardinalDirection(X,M,4)),!x)switch(G){case 1:Y=l,b=g+-d/M,o[0]=b,o[1]=Y;break;case 2:b=L,Y=a+O*M,o[0]=b,o[1]=Y;break;case 3:Y=m,b=g+d/M,o[0]=b,o[1]=Y;break;case 4:b=T,Y=a+-O*M,o[0]=b,o[1]=Y;break}if(!_)switch(F){case 1:H=s,k=v+-R/M,o[2]=k,o[3]=H;break;case 2:k=A,H=n+C*M,o[2]=k,o[3]=H;break;case 3:H=p,k=v+R/M,o[2]=k,o[3]=H;break;case 4:k=u,H=n+-C*M,o[2]=k,o[3]=H;break}}return!1},t.getCardinalDirection=function(e,i,o){return e>i?o:1+o%4},t.getIntersection=function(e,i,o,g){if(g==null)return this.getIntersection2(e,i,o);var a=e.x,v=e.y,n=i.x,c=i.y,l=o.x,E=o.y,T=g.x,m=g.y,L=void 0,O=void 0,d=void 0,N=void 0,s=void 0,h=void 0,u=void 0,p=void 0,A=void 0;return d=c-v,s=a-n,u=n*v-a*c,N=m-E,h=l-T,p=T*E-l*m,A=d*h-N*s,A===0?null:(L=(s*p-h*u)/A,O=(N*u-d*p)/A,new r(L,O))},t.angleOfVector=function(e,i,o,g){var a=void 0;return e!==o?(a=Math.atan((g-i)/(o-e)),o0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},f.exports=r},function(f,D,y){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,f.exports=r},function(f,D,y){var r=function(){function a(v,n){for(var c=0;c"u"?"undefined":r(e);return e==null||i!="object"&&i!="function"},f.exports=t},function(f,D,y){function r(l){if(Array.isArray(l)){for(var E=0,T=Array(l.length);E0&&E;){for(d.push(s[0]);d.length>0&&E;){var h=d[0];d.splice(0,1),O.add(h);for(var u=h.getEdges(),L=0;L-1&&s.splice(R,1)}O=new Set,N=new Map}}return l},c.prototype.createDummyNodesForBendpoints=function(l){for(var E=[],T=l.source,m=this.graphManager.calcLowestCommonAncestor(l.source,l.target),L=0;L0){for(var m=this.edgeToDummyNodes.get(T),L=0;L=0&&E.splice(p,1);var A=N.getNeighborsList();A.forEach(function(x){if(T.indexOf(x)<0){var _=m.get(x),U=_-1;U==1&&h.push(x),m.set(x,U)}})}T=T.concat(h),(E.length==1||E.length==2)&&(L=!0,O=E[0])}return O},c.prototype.setGraphManager=function(l){this.graphManager=l},f.exports=c},function(f,D,y){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},f.exports=r},function(f,D,y){var r=y(4);function t(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(e){this.lworldExtX=e},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(e){this.lworldExtY=e},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},t.prototype.transformX=function(e){var i=0,o=this.lworldExtX;return o!=0&&(i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/o),i},t.prototype.transformY=function(e){var i=0,o=this.lworldExtY;return o!=0&&(i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/o),i},t.prototype.inverseTransformX=function(e){var i=0,o=this.ldeviceExtX;return o!=0&&(i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/o),i},t.prototype.inverseTransformY=function(e){var i=0,o=this.ldeviceExtY;return o!=0&&(i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/o),i},t.prototype.inverseTransformPoint=function(e){var i=new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},f.exports=t},function(f,D,y){function r(n){if(Array.isArray(n)){for(var c=0,l=Array(n.length);ce.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),c,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,E,T,m,L=this.getAllNodes(),O;if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),O=new Set,l=0;ld||O>d)&&(n.gravitationForceX=-this.gravityConstant*T,n.gravitationForceY=-this.gravityConstant*m)):(d=c.getEstimatedSize()*this.compoundGravityRangeFactor,(L>d||O>d)&&(n.gravitationForceX=-this.gravityConstant*T*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*m*this.compoundGravityConstant))},a.prototype.isConverged=function(){var n,c=!1;return this.totalIterations>this.maxIterations/3&&(c=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=L.length||d>=L[0].length)){for(var N=0;Na}}]),o}();f.exports=i},function(f,D,y){var r=function(){function i(o,g){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;t(this,i),this.sequence1=o,this.sequence2=g,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var c=0;c=0;o--){var g=this.listeners[o];g.event===e&&g.callback===i&&this.listeners.splice(o,1)}},t.emit=function(e,i){for(var o=0;og.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,a){for(var v=this.getChild().getNodes(),n,c=0;c0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),h=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(h),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),h={},u=0;u1){var x;for(x=0;xp&&(p=Math.floor(R.y)),C=Math.floor(R.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-R.x/2,n.WORLD_CENTER_Y-R.y/2))},d.radialLayout=function(s,h,u){var p=Math.max(this.maxDiagonalInTree(s),a.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(h,null,0,359,0,p);var A=L.calculateBounds(s),C=new O;C.setDeviceOrgX(A.getMinX()),C.setDeviceOrgY(A.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var R=0;R1;){var H=k[0];k.splice(0,1);var P=M.indexOf(H);P>=0&&M.splice(P,1),b--,G--}h!=null?Y=(M.indexOf(k[0])+1)%b:Y=0;for(var B=Math.abs(p-u)/G,$=Y;F!=G;$=++$%b){var K=M[$].getOtherEnd(s);if(K!=h){var Q=(u+F*B)%360,J=(Q+B)%360;d.branchRadialLayout(K,s,Q,J,A+C,C),F++}}},d.maxDiagonalInTree=function(s){for(var h=T.MIN_VALUE,u=0;uh&&(h=A)}return h},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var s=this,h={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),A=0;A"u"&&(h[x]=[]),h[x]=h[x].concat(C)}Object.keys(h).forEach(function(_){if(h[_].length>1){var U="DummyCompound_"+_;s.memberGroups[U]=h[_];var X=h[_][0].getParent(),M=new o(s.graphManager);M.id=U,M.paddingLeft=X.paddingLeft||0,M.paddingRight=X.paddingRight||0,M.paddingBottom=X.paddingBottom||0,M.paddingTop=X.paddingTop||0,s.idToDummyNode[U]=M;var G=s.getGraphManager().add(s.newGraph(),M),F=X.getChild();F.add(M);for(var b=0;b=0;s--){var h=this.compoundOrder[s],u=h.id,p=h.paddingLeft,A=h.paddingTop;this.adjustLocations(this.tiledMemberPack[u],h.rect.x,h.rect.y,p,A)}},d.prototype.repopulateZeroDegreeMembers=function(){var s=this,h=this.tiledZeroDegreePack;Object.keys(h).forEach(function(u){var p=s.idToDummyNode[u],A=p.paddingLeft,C=p.paddingTop;s.adjustLocations(h[u],p.rect.x,p.rect.y,A,C)})},d.prototype.getToBeTiled=function(s){var h=s.id;if(this.toBeTiled[h]!=null)return this.toBeTiled[h];var u=s.getChild();if(u==null)return this.toBeTiled[h]=!1,!1;for(var p=u.getNodes(),A=0;A0)return this.toBeTiled[h]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[h]=!1,!1}return this.toBeTiled[h]=!0,!0},d.prototype.getNodeDegree=function(s){s.id;for(var h=s.getEdges(),u=0,p=0;p_&&(_=X.rect.height)}u+=_+s.verticalPadding}},d.prototype.tileCompoundMembers=function(s,h){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var A=h[p];u.tiledMemberPack[p]=u.tileNodes(s[p],A.paddingLeft+A.paddingRight),A.rect.width=u.tiledMemberPack[p].width,A.rect.height=u.tiledMemberPack[p].height})},d.prototype.tileNodes=function(s,h){var u=a.TILING_PADDING_VERTICAL,p=a.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:h,verticalPadding:u,horizontalPadding:p};s.sort(function(x,_){return x.rect.width*x.rect.height>_.rect.width*_.rect.height?-1:x.rect.width*x.rect.height<_.rect.width*_.rect.height?1:0});for(var C=0;C0&&(R+=s.horizontalPadding),s.rowWidth[u]=R,s.width0&&(x+=s.verticalPadding);var _=0;x>s.rowHeight[u]&&(_=s.rowHeight[u],s.rowHeight[u]=x,_=s.rowHeight[u]-_),s.height+=_,s.rows[u].push(h)},d.prototype.getShortestRowIndex=function(s){for(var h=-1,u=Number.MAX_VALUE,p=0;pu&&(h=p,u=s.rowWidth[p]);return h},d.prototype.canAddHorizontal=function(s,h,u){var p=this.getShortestRowIndex(s);if(p<0)return!0;var A=s.rowWidth[p];if(A+s.horizontalPadding+h<=s.width)return!0;var C=0;s.rowHeight[p]0&&(C=u+s.verticalPadding-s.rowHeight[p]);var R;s.width-A>=h+s.horizontalPadding?R=(s.height+C)/(A+h+s.horizontalPadding):R=(s.height+C)/s.width,C=u+s.verticalPadding;var x;return s.widthC&&h!=u){p.splice(-1,1),s.rows[u].push(A),s.rowWidth[h]=s.rowWidth[h]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,x=0;xR&&(R=p[x].height);h>0&&(R+=s.verticalPadding);var _=s.rowHeight[h]+s.rowHeight[u];s.rowHeight[h]=R,s.rowHeight[u]0)for(var F=A;F<=C;F++)G[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(C0)for(var F=R;F<=x;F++)G[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var b=T.MAX_VALUE,Y,k,H=0;H0){var x;x=O.getGraphManager().add(O.newGraph(),u),this.processChildrenList(x,h,O)}}},l.prototype.stop=function(){return this.stopped=!0,this};var T=function(L){L("layout","cose-bilkent",l)};typeof cytoscape<"u"&&T(cytoscape),D.exports=T}])})})(dt);var St=dt.exports;const Gt=Nt(St);var st=function(){var I=S(function(O,d,N,s){for(N=N||{},s=O.length;s--;N[O[s]]=d);return N},"o"),w=[1,4],f=[1,13],D=[1,12],y=[1,15],r=[1,16],t=[1,20],e=[1,19],i=[6,7,8],o=[1,26],g=[1,24],a=[1,25],v=[6,7,11],n=[1,6,13,15,16,19,22],c=[1,33],l=[1,34],E=[1,6,7,11,13,15,16,19,22],T={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:S(function(d,N,s,h,u,p,A){var C=p.length-1;switch(u){case 6:case 7:return h;case 8:h.getLogger().trace("Stop NL ");break;case 9:h.getLogger().trace("Stop EOF ");break;case 11:h.getLogger().trace("Stop NL2 ");break;case 12:h.getLogger().trace("Stop EOF2 ");break;case 15:h.getLogger().info("Node: ",p[C].id),h.addNode(p[C-1].length,p[C].id,p[C].descr,p[C].type);break;case 16:h.getLogger().trace("Icon: ",p[C]),h.decorateNode({icon:p[C]});break;case 17:case 21:h.decorateNode({class:p[C]});break;case 18:h.getLogger().trace("SPACELIST");break;case 19:h.getLogger().trace("Node: ",p[C].id),h.addNode(0,p[C].id,p[C].descr,p[C].type);break;case 20:h.decorateNode({icon:p[C]});break;case 25:h.getLogger().trace("node found ..",p[C-2]),this.$={id:p[C-1],descr:p[C-1],type:h.getType(p[C-2],p[C])};break;case 26:this.$={id:p[C],descr:p[C],type:h.nodeType.DEFAULT};break;case 27:h.getLogger().trace("node found ..",p[C-3]),this.$={id:p[C-3],descr:p[C-1],type:h.getType(p[C-2],p[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:w},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:w},{6:f,7:[1,10],9:9,12:11,13:D,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(i,[2,3]),{1:[2,2]},I(i,[2,4]),I(i,[2,5]),{1:[2,6],6:f,12:21,13:D,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:f,9:22,12:11,13:D,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:o,7:g,10:23,11:a},I(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:t,22:e}),I(v,[2,18]),I(v,[2,19]),I(v,[2,20]),I(v,[2,21]),I(v,[2,23]),I(v,[2,24]),I(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:g,10:32,11:a},{1:[2,7],6:f,12:21,13:D,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(n,[2,14],{7:c,11:l}),I(E,[2,8]),I(E,[2,9]),I(E,[2,10]),I(v,[2,15]),I(v,[2,16]),I(v,[2,17]),{20:[1,35]},{21:[1,36]},I(n,[2,13],{7:c,11:l}),I(E,[2,11]),I(E,[2,12]),{21:[1,37]},I(v,[2,25]),I(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:S(function(d,N){if(N.recoverable)this.trace(d);else{var s=new Error(d);throw s.hash=N,s}},"parseError"),parse:S(function(d){var N=this,s=[0],h=[],u=[null],p=[],A=this.table,C="",R=0,x=0,_=2,U=1,X=p.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);M.setInput(d,G.yy),G.yy.lexer=M,G.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var b=M.yylloc;p.push(b);var Y=M.options&&M.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function k(V){s.length=s.length-2*V,u.length=u.length-V,p.length=p.length-V}S(k,"popStack");function H(){var V;return V=h.pop()||M.lex()||U,typeof V!="number"&&(V instanceof Array&&(h=V,V=h.pop()),V=N.symbols_[V]||V),V}S(H,"lex");for(var P,B,$,K,Q={},J,j,gt,q;;){if(B=s[s.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=H()),$=A[B]&&A[B][P]),typeof $>"u"||!$.length||!$[0]){var rt="";q=[];for(J in A[B])this.terminals_[J]&&J>_&&q.push("'"+this.terminals_[J]+"'");M.showPosition?rt="Parse error on line "+(R+1)+`: +`+M.showPosition()+` +Expecting `+q.join(", ")+", got '"+(this.terminals_[P]||P)+"'":rt="Parse error on line "+(R+1)+": Unexpected "+(P==U?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(rt,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:b,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+P);switch($[0]){case 1:s.push(P),u.push(M.yytext),p.push(M.yylloc),s.push($[1]),P=null,x=M.yyleng,C=M.yytext,R=M.yylineno,b=M.yylloc;break;case 2:if(j=this.productions_[$[1]][1],Q.$=u[u.length-j],Q._$={first_line:p[p.length-(j||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(j||1)].first_column,last_column:p[p.length-1].last_column},Y&&(Q._$.range=[p[p.length-(j||1)].range[0],p[p.length-1].range[1]]),K=this.performAction.apply(Q,[C,x,R,G.yy,$[1],u,p].concat(X)),typeof K<"u")return K;j&&(s=s.slice(0,-1*j*2),u=u.slice(0,-1*j),p=p.slice(0,-1*j)),s.push(this.productions_[$[1]][0]),u.push(Q.$),p.push(Q._$),gt=A[s[s.length-2]][s[s.length-1]],s.push(gt);break;case 3:return!0}}return!0},"parse")},m=function(){var O={EOF:1,parseError:S(function(N,s){if(this.yy.parser)this.yy.parser.parseError(N,s);else throw new Error(N)},"parseError"),setInput:S(function(d,N){return this.yy=N||this.yy||{},this._input=d,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:S(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var N=d.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:S(function(d){var N=d.length,s=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var h=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),s.length-1&&(this.yylineno-=s.length-1);var u=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:s?(s.length===h.length?this.yylloc.first_column:0)+h[h.length-s.length].length-s[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:S(function(){return this._more=!0,this},"more"),reject:S(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:S(function(d){this.unput(this.match.slice(d))},"less"),pastInput:S(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:S(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:S(function(){var d=this.pastInput(),N=new Array(d.length+1).join("-");return d+this.upcomingInput()+` +`+N+"^"},"showPosition"),test_match:S(function(d,N){var s,h,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),h=d[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,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(d[0].length),this.matched+=d[0],s=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var p in u)this[p]=u[p];return!1}return!1},"test_match"),next:S(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,N,s,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),p=0;pN[0].length)){if(N=s,h=p,this.options.backtrack_lexer){if(d=this.test_match(s,u[p]),d!==!1)return d;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(d=this.test_match(N,u[h]),d!==!1?d:!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:S(function(){var N=this.next();return N||this.lex()},"lex"),begin:S(function(N){this.conditionStack.push(N)},"begin"),popState:S(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:S(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:S(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:S(function(N){this.begin(N)},"pushState"),stateStackSize:S(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:S(function(N,s,h,u){switch(h){case 0:return N.getLogger().trace("Found comment",s.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:N.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return N.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:N.getLogger().trace("end icon"),this.popState();break;case 10:return N.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return N.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return N.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return N.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:N.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return N.getLogger().trace("description:",s.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),N.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),N.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),N.getLogger().trace("node end ...",s.yytext),"NODE_DEND";case 30:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),N.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),N.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";case 35:return N.getLogger().trace("Long description:",s.yytext),20;case 36:return N.getLogger().trace("Long description:",s.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return O}();T.lexer=m;function L(){this.yy={}}return S(L,"Parser"),L.prototype=T,T.Parser=L,new L}();st.parser=st;var _t=st,Z=[],vt=0,ht={},Ft=S(()=>{Z=[],vt=0,ht={}},"clear"),bt=S(function(I){for(let w=Z.length-1;w>=0;w--)if(Z[w].levelZ.length>0?Z[0]:null,"getMindmap"),Pt=S((I,w,f,D)=>{var i,o;z.info("addNode",I,w,f,D);const y=ot();let r=((i=y.mindmap)==null?void 0:i.padding)??tt.mindmap.padding;switch(D){case W.ROUNDED_RECT:case W.RECT:case W.HEXAGON:r*=2}const t={id:vt++,nodeId:et(w,y),level:I,descr:et(f,y),type:D,children:[],width:((o=y.mindmap)==null?void 0:o.maxNodeWidth)??tt.mindmap.maxNodeWidth,padding:r},e=bt(I);if(e)e.children.push(t),Z.push(t);else if(Z.length===0)Z.push(t);else throw new Error('There can be only one root. No parent could be found for ("'+t.descr+'")')},"addNode"),W={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Yt=S((I,w)=>{switch(z.debug("In get type",I,w),I){case"[":return W.RECT;case"(":return w===")"?W.ROUNDED_RECT:W.CLOUD;case"((":return W.CIRCLE;case")":return W.CLOUD;case"))":return W.BANG;case"{{":return W.HEXAGON;default:return W.DEFAULT}},"getType"),Xt=S((I,w)=>{ht[I]=w},"setElementForId"),kt=S(I=>{if(!I)return;const w=ot(),f=Z[Z.length-1];I.icon&&(f.icon=et(I.icon,w)),I.class&&(f.class=et(I.class,w))},"decorateNode"),Ht=S(I=>{switch(I){case W.DEFAULT:return"no-border";case W.RECT:return"rect";case W.ROUNDED_RECT:return"rounded-rect";case W.CIRCLE:return"circle";case W.CLOUD:return"cloud";case W.BANG:return"bang";case W.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),$t=S(()=>z,"getLogger"),Wt=S(I=>ht[I],"getElementById"),Bt={clear:Ft,addNode:Pt,getMindmap:Ut,nodeType:W,getType:Yt,setElementForId:Xt,decorateNode:kt,type2Str:Ht,getLogger:$t,getElementById:Wt},Vt=Bt,Zt=12,Qt=S(function(I,w,f,D){w.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("d",`M0 ${f.height-5} v${-f.height+2*5} q0,-5 5,-5 h${f.width-2*5} q5,0 5,5 v${f.height-5} H0 Z`),w.append("line").attr("class","node-line-"+D).attr("x1",0).attr("y1",f.height).attr("x2",f.width).attr("y2",f.height)},"defaultBkg"),jt=S(function(I,w,f){w.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("height",f.height).attr("width",f.width)},"rectBkg"),zt=S(function(I,w,f){const D=f.width,y=f.height,r=.15*D,t=.25*D,e=.35*D,i=.2*D;w.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("d",`M0 0 a${r},${r} 0 0,1 ${D*.25},${-1*D*.1} + a${e},${e} 1 0,1 ${D*.4},${-1*D*.1} + a${t},${t} 1 0,1 ${D*.35},${1*D*.2} + + a${r},${r} 1 0,1 ${D*.15},${1*y*.35} + a${i},${i} 1 0,1 ${-1*D*.15},${1*y*.65} + + a${t},${r} 1 0,1 ${-1*D*.25},${D*.15} + a${e},${e} 1 0,1 ${-1*D*.5},0 + a${r},${r} 1 0,1 ${-1*D*.25},${-1*D*.15} + + a${r},${r} 1 0,1 ${-1*D*.1},${-1*y*.35} + a${i},${i} 1 0,1 ${D*.1},${-1*y*.65} + + H0 V0 Z`)},"cloudBkg"),Kt=S(function(I,w,f){const D=f.width,y=f.height,r=.15*D;w.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("d",`M0 0 a${r},${r} 1 0,0 ${D*.25},${-1*y*.1} + a${r},${r} 1 0,0 ${D*.25},0 + a${r},${r} 1 0,0 ${D*.25},0 + a${r},${r} 1 0,0 ${D*.25},${1*y*.1} + + a${r},${r} 1 0,0 ${D*.15},${1*y*.33} + a${r*.8},${r*.8} 1 0,0 0,${1*y*.34} + a${r},${r} 1 0,0 ${-1*D*.15},${1*y*.33} + + a${r},${r} 1 0,0 ${-1*D*.25},${y*.15} + a${r},${r} 1 0,0 ${-1*D*.25},0 + a${r},${r} 1 0,0 ${-1*D*.25},0 + a${r},${r} 1 0,0 ${-1*D*.25},${-1*y*.15} + + a${r},${r} 1 0,0 ${-1*D*.1},${-1*y*.33} + a${r*.8},${r*.8} 1 0,0 0,${-1*y*.34} + a${r},${r} 1 0,0 ${D*.1},${-1*y*.33} + + H0 V0 Z`)},"bangBkg"),Jt=S(function(I,w,f){w.append("circle").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("r",f.width/2)},"circleBkg");function yt(I,w,f,D,y){return I.insert("polygon",":first-child").attr("points",D.map(function(r){return r.x+","+r.y}).join(" ")).attr("transform","translate("+(y.width-w)/2+", "+f+")")}S(yt,"insertPolygonShape");var qt=S(function(I,w,f){const D=f.height,r=D/4,t=f.width-f.padding+2*r,e=[{x:r,y:0},{x:t-r,y:0},{x:t,y:-D/2},{x:t-r,y:-D},{x:r,y:-D},{x:0,y:-D/2}];yt(w,t,D,e,f)},"hexagonBkg"),te=S(function(I,w,f){w.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("height",f.height).attr("rx",f.padding).attr("ry",f.padding).attr("width",f.width)},"roundedRectBkg"),ee=S(async function(I,w,f,D,y){const r=y.htmlLabels,t=D%(Zt-1),e=w.append("g");f.section=t;let i="section-"+t;t<0&&(i+=" section-root"),e.attr("class",(f.class?f.class+" ":"")+"mindmap-node "+i);const o=e.append("g"),g=e.append("g"),a=f.descr.replace(/()/g,` +`);await Dt(g,a,{useHtmlLabels:r,width:f.width,classes:"mindmap-node-label"},y),r||g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const v=g.node().getBBox(),[n]=Ot(y.fontSize);if(f.height=v.height+n*1.1*.5+f.padding,f.width=v.width+2*f.padding,f.icon)if(f.type===I.nodeType.CIRCLE)f.height+=50,f.width+=50,e.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+t+" "+f.icon),g.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const c=f.height;f.height=Math.max(c,60);const l=Math.abs(f.height-c);e.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+l/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+t+" "+f.icon),g.attr("transform","translate("+(25+f.width/2)+", "+(l/2+f.padding/2)+")")}else if(r){const c=(f.width-v.width)/2,l=(f.height-v.height)/2;g.attr("transform","translate("+c+", "+l+")")}else{const c=f.width/2,l=f.padding/2;g.attr("transform","translate("+c+", "+l+")")}switch(f.type){case I.nodeType.DEFAULT:Qt(I,o,f,t);break;case I.nodeType.ROUNDED_RECT:te(I,o,f,t);break;case I.nodeType.RECT:jt(I,o,f,t);break;case I.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),Jt(I,o,f,t);break;case I.nodeType.CLOUD:zt(I,o,f,t);break;case I.nodeType.BANG:Kt(I,o,f,t);break;case I.nodeType.HEXAGON:qt(I,o,f,t);break}return I.setElementForId(f.id,e),f.height},"drawNode"),re=S(function(I,w){const f=I.getElementById(w.id),D=w.x||0,y=w.y||0;f.attr("transform","translate("+D+","+y+")")},"positionNode");pt.use(Gt);async function lt(I,w,f,D,y){await ee(I,w,f,D,y),f.children&&await Promise.all(f.children.map((r,t)=>lt(I,w,r,D<0?t:D,y)))}S(lt,"drawNodes");function Et(I,w){w.edges().map((f,D)=>{const y=f.data();if(f[0]._private.bodyBounds){const r=f[0]._private.rscratch;z.trace("Edge: ",D,y),I.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+y.section+" edge-depth-"+y.depth)}})}S(Et,"drawEdges");function ct(I,w,f,D){w.add({group:"nodes",data:{id:I.id.toString(),labelText:I.descr,height:I.height,width:I.width,level:D,nodeId:I.id,padding:I.padding,type:I.type},position:{x:I.x,y:I.y}}),I.children&&I.children.forEach(y=>{ct(y,w,f,D+1),w.add({group:"edges",data:{id:`${I.id}_${y.id}`,source:I.id,target:y.id,depth:D,section:y.section}})})}S(ct,"addNodes");function Lt(I,w){return new Promise(f=>{const D=mt("body").append("div").attr("id","cy").attr("style","display:none"),y=pt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});D.remove(),ct(I,y,w,0),y.nodes().forEach(function(r){r.layoutDimensions=()=>{const t=r.data();return{w:t.width,h:t.height}}}),y.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),y.ready(r=>{z.info("Ready",r),f(y)})})}S(Lt,"layoutMindmap");function Tt(I,w){w.nodes().map((f,D)=>{const y=f.data();y.x=f.position().x,y.y=f.position().y,re(I,y);const r=I.getElementById(y.nodeId);z.info("Id:",D,"Position: (",f.position().x,", ",f.position().y,")",y),r.attr("transform",`translate(${f.position().x-y.width/2}, ${f.position().y-y.height/2})`),r.attr("attr",`apa-${D})`)})}S(Tt,"positionNodes");var ie=S(async(I,w,f,D)=>{var a,v;z.debug(`Rendering mindmap diagram +`+I);const y=D.db,r=y.getMindmap();if(!r)return;const t=ot();t.htmlLabels=!1;const e=At(w),i=e.append("g");i.attr("class","mindmap-edges");const o=e.append("g");o.attr("class","mindmap-nodes"),await lt(y,o,r,-1,t);const g=await Lt(r,t);Et(i,g),Tt(y,g),It(void 0,e,((a=t.mindmap)==null?void 0:a.padding)??tt.mindmap.padding,((v=t.mindmap)==null?void 0:v.useMaxWidth)??tt.mindmap.useMaxWidth)},"draw"),ne={draw:ie},se=S(I=>{let w="";for(let f=0;f` + .edge { + stroke-width: 3; + } + ${se(I)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${I.git0}; + } + .section-root text { + fill: ${I.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),oe=ae,ue={db:Vt,renderer:ne,parser:_t,styles:oe};export{ue as diagram}; diff --git a/pr-528/assets/chunks/ordinal.BYWQX77i.js b/pr-528/assets/chunks/ordinal.BYWQX77i.js new file mode 100644 index 000000000..1f7977b7f --- /dev/null +++ b/pr-528/assets/chunks/ordinal.BYWQX77i.js @@ -0,0 +1 @@ +import{i as a}from"./init.Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o}; diff --git a/pr-528/assets/chunks/pieDiagram-X7YZ5ZEZ.Ctc6e2Ef.js b/pr-528/assets/chunks/pieDiagram-X7YZ5ZEZ.Ctc6e2Ef.js new file mode 100644 index 000000000..fef8258f4 --- /dev/null +++ b/pr-528/assets/chunks/pieDiagram-X7YZ5ZEZ.Ctc6e2Ef.js @@ -0,0 +1,30 @@ +import{p as U}from"./chunk-RYO7GUH3.D7U7-9br.js";import{W as y,N as z,aG as j,B as q,q as H,r as Z,s as J,g as K,c as Q,b as X,_ as p,l as G,v as Y,d as tt,D as et,H as at,a4 as rt,k as nt}from"../app.CKrDwBa1.js";import{p as it}from"./gitGraph-YCYPL57B.DhPOFTVl.js";import{d as P}from"./arc.BNNkY6t3.js";import{o as st}from"./ordinal.BYWQX77i.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";import"./clone.BlcZCRmq.js";import"./init.Gi6I4Gst.js";function ot(t,a){return at?1:a>=t?0:NaN}function lt(t){return t}function ct(){var t=lt,a=ot,m=null,o=y(0),g=y(z),x=y(0);function i(e){var r,l=(e=j(e)).length,c,A,h=0,u=new Array(l),n=new Array(l),v=+o.apply(this,arguments),w=Math.min(z,Math.max(-z,g.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r0&&(h+=d);for(a!=null?u.sort(function(S,D){return a(n[S],n[D])}):m!=null&&u.sort(function(S,D){return m(e[S],e[D])}),r=0,A=h?(w-l*$)/h:0;r0?d*A:0)+$,n[c]={data:e[c],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:y(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:y(+e),i):o},i.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:y(+e),i):g},i.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:y(+e),i):x},i}var R=q.pie,W={sections:new Map,showData:!1,config:R},b=W.sections,F=W.showData,ut=structuredClone(R),pt=p(()=>structuredClone(ut),"getConfig"),gt=p(()=>{b=new Map,F=W.showData,Y()},"clear"),dt=p(({label:t,value:a})=>{b.has(t)||(b.set(t,a),G.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=p(()=>b,"getSections"),mt=p(t=>{F=t},"setShowData"),ht=p(()=>F,"getShowData"),I={getConfig:pt,clear:gt,setDiagramTitle:H,getDiagramTitle:Z,setAccTitle:J,getAccTitle:K,setAccDescription:Q,getAccDescription:X,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=p((t,a)=>{U(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:p(async t=>{const a=await it("pie",t);G.debug(a),vt(a,I)},"parse")},yt=p(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),xt=yt,At=p(t=>{const a=[...t.entries()].map(o=>({label:o[0],value:o[1]})).sort((o,g)=>g.value-o.value);return ct().value(o=>o.value)(a)},"createPieArcs"),wt=p((t,a,m,o)=>{G.debug(`rendering pie chart +`+t);const g=o.db,x=tt(),i=et(g.getConfig(),x.pie),e=40,r=18,l=4,c=450,A=c,h=at(a),u=h.append("g");u.attr("transform","translate("+A/2+","+c/2+")");const{themeVariables:n}=x;let[v]=rt(n.pieOuterStrokeWidth);v??(v=2);const w=i.textPosition,f=Math.min(A,c)/2-e,T=P().innerRadius(0).outerRadius(f),$=P().innerRadius(f*w).outerRadius(f*w);u.append("circle").attr("cx",0).attr("cy",0).attr("r",f+v/2).attr("class","pieOuterCircle");const d=g.getSections(),S=At(d),D=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12],C=st(D);u.selectAll("mySlices").data(S).enter().append("path").attr("d",T).attr("fill",s=>C(s.data.label)).attr("class","pieCircle");let N=0;d.forEach(s=>{N+=s}),u.selectAll("mySlices").data(S).enter().append("text").text(s=>(s.data.value/N*100).toFixed(0)+"%").attr("transform",s=>"translate("+$.centroid(s)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(g.getDiagramTitle()).attr("x",0).attr("y",-(c-50)/2).attr("class","pieTitleText");const M=u.selectAll(".legend").data(C.domain()).enter().append("g").attr("class","legend").attr("transform",(s,k)=>{const E=r+l,_=E*C.domain().length/2,B=12*r,V=k*E-_;return"translate("+B+","+V+")"});M.append("rect").attr("width",r).attr("height",r).style("fill",C).style("stroke",C),M.data(S).append("text").attr("x",r+l).attr("y",r-l).text(s=>{const{label:k,value:E}=s.data;return g.getShowData()?`${k} [${E}]`:k});const L=Math.max(...M.selectAll("text").nodes().map(s=>(s==null?void 0:s.getBoundingClientRect().width)??0)),O=A+e+r+l+L;h.attr("viewBox",`0 0 ${O} ${c}`),nt(h,c,O,i.useMaxWidth)},"draw"),Dt={draw:wt},Nt={parser:St,db:I,renderer:Dt,styles:xt};export{Nt as diagram}; diff --git a/pr-528/assets/chunks/quadrantDiagram-F36EZAVT.BLIXBUvX.js b/pr-528/assets/chunks/quadrantDiagram-F36EZAVT.BLIXBUvX.js new file mode 100644 index 000000000..52c69bd03 --- /dev/null +++ b/pr-528/assets/chunks/quadrantDiagram-F36EZAVT.BLIXBUvX.js @@ -0,0 +1,7 @@ +import{_ as o,$ as _e,B as D,l as At,d as wt,i as Ae,r as ie,s as ke,g as Fe,q as Pe,b as ve,c as Ce,v as Le,j as zt,k as Ee}from"../app.CKrDwBa1.js";import{l as ee}from"./linear.CWPBtVa2.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./init.Gi6I4Gst.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],O=[1,14],Y=[1,23],G=[1,18],yt=[1,19],Tt=[1,20],dt=[1,21],Ft=[1,22],ut=[1,24],xt=[1,25],ft=[1,26],gt=[1,27],i=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],H=[1,62],X=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],$=[1,91],tt=[1,92],et=[1,99],it=[1,93],at=[1,96],nt=[1,94],st=[1,95],rt=[1,97],ot=[1,98],Pt=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,_,e,pt){var s=e.length-1;switch(_){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:c,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:d,5:T,10:q,12:m,13:b,14:x,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,101]},t(a,[2,29],{10:Pt}),t(Kt,[2,27],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:88,16:89,23:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:105},t(R,[2,26]),t(a,[2,50],{10:Pt}),t(Kt,[2,28],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],_=[null],e=[],pt=this.table,s="",mt=0,Zt=0,qe=2,Jt=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);E.setInput(r,K.yy),K.yy.lexer=E,K.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Lt=E.yylloc;e.push(Lt);var be=E.options&&E.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){g.length=g.length-2*B,_.length=_.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=f.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(f=B,B=f.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,Z,N,Et,lt={},bt,M,te,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?N=this.defaultActions[Z]:((w===null||typeof w>"u")&&(w=$t()),N=pt[Z]&&pt[Z][w]),typeof N>"u"||!N.length||!N[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");E.showPosition?Dt="Parse error on line "+(mt+1)+`: +`+E.showPosition()+` +Expecting `+St.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(w==Jt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Dt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Lt,expected:St})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+w);switch(N[0]){case 1:g.push(w),_.push(E.yytext),e.push(E.yylloc),g.push(N[1]),w=null,Zt=E.yyleng,s=E.yytext,mt=E.yylineno,Lt=E.yylloc;break;case 2:if(M=this.productions_[N[1]][1],lt.$=_[_.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},be&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Zt,mt,K.yy,N[1],_,e].concat(me)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),_=_.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[N[1]][0]),_.push(lt.$),e.push(lt._$),te=pt[g[g.length-2]][g[g.length-1]],g.push(te);break;case 3:return!0}}return!0},"parse")},Te=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=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),g.length-1&&(this.yylineno-=g.length-1);var _=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:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:o(function(r,l){var g,f,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),f=r[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in _)this[e]=_[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,g,f;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),e=0;e<_.length;e++)if(g=this._input.match(this.rules[_[e]]),g&&(!l||g[0].length>l[0].length)){if(l=g,f=e,this.options.backtrack_lexer){if(r=this.test_match(g,_[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,_[f]),r!==!1?r:!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:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,g,f,_){switch(f){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;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 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return j}();vt.lexer=Te;function qt(){this.yy={}}return o(qt,"Parser"),qt.prototype=vt,vt.Parser=qt,new qt}();Vt.parser=Vt;var De=Vt,V=_e(),ht,ze=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,u,c,h,p,y,S,a,A,d,T,q,m,b,x,O,Y,G;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=D.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((u=D.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=D.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((h=D.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((p=D.quadrantChart)==null?void 0:p.quadrantPadding)||5,xAxisLabelPadding:((y=D.quadrantChart)==null?void 0:y.xAxisLabelPadding)||5,yAxisLabelPadding:((S=D.quadrantChart)==null?void 0:S.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=D.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((A=D.quadrantChart)==null?void 0:A.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=D.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((T=D.quadrantChart)==null?void 0:T.quadrantTextTopPadding)||5,pointTextPadding:((q=D.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((m=D.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((b=D.quadrantChart)==null?void 0:b.pointRadius)||5,xAxisPosition:((x=D.quadrantChart)==null?void 0:x.xAxisPosition)||"top",yAxisPosition:((O=D.quadrantChart)==null?void 0:O.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=D.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((G=D.quadrantChart)==null?void 0:G.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,u){this.classes.set(n,u)}setConfig(n){At.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){At.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,u,c,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&u?p:0,bottom:n==="bottom"&&u?p:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?S:0,right:this.config.yAxisPosition==="right"&&c?S:0},A=this.config.titleFontSize+this.config.titlePadding*2,d={top:h?A:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-d.top,x=m/2,O=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:d,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:x,quadrantHeight:b,quadrantHalfHeight:O}}}getAxisLabels(n,u,c,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:S,quadrantHeight:a,quadrantLeft:A,quadrantHalfWidth:d,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,x=[];return this.data.xAxisLeftText&&u&&x.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&x.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+d+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&x.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+a-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&x.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+S-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),x}getQuadrants(n){const{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=u,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant4Fill}];for(const a of S)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return S}getQuadrantPoints(n){const{quadrantSpace:u}=n,{quadrantHeight:c,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=u,S=ee().domain([0,1]).range([h,y+h]),a=ee().domain([0,1]).range([c+p,p]);return this.data.points.map(d=>{const T=this.classes.get(d.className);return T&&(d={...T,...d}),{x:S(d.x),y:a(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:S(d.x),y:a(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(n){const u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:a,quadrantWidth:A}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a,x2:y+A+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+A,y1:a+u,x2:y+A,y2:a+p-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a+p,x2:y+A+u,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+u,x2:y,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:a+u,x2:y+S,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+u,y1:a+h,x2:y+A-u,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,u,c);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,u,p),borderLines:this.getBorders(p),title:this.getTitle(c)}}},o(ht,"QuadrantBuilder"),ht),ct,_t=(ct=class extends Error{constructor(n,u,c){super(`value for ${n} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},o(ct,"InvalidStyleError"),ct);function It(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(It,"validateHexCode");function ae(t){return!/^\d+$/.test(t)}o(ae,"validateNumber");function ne(t){return!/^\d+px$/.test(t)}o(ne,"validateSizeInPixels");var Ve=wt();function Q(t){return Ae(t.trim(),Ve)}o(Q,"textSanitizer");var z=new ze;function se(t){z.setData({quadrant1Text:Q(t.text)})}o(se,"setQuadrant1Text");function re(t){z.setData({quadrant2Text:Q(t.text)})}o(re,"setQuadrant2Text");function oe(t){z.setData({quadrant3Text:Q(t.text)})}o(oe,"setQuadrant3Text");function le(t){z.setData({quadrant4Text:Q(t.text)})}o(le,"setQuadrant4Text");function he(t){z.setData({xAxisLeftText:Q(t.text)})}o(he,"setXAxisLeftText");function ce(t){z.setData({xAxisRightText:Q(t.text)})}o(ce,"setXAxisRightText");function de(t){z.setData({yAxisTopText:Q(t.text)})}o(de,"setYAxisTopText");function ue(t){z.setData({yAxisBottomText:Q(t.text)})}o(ue,"setYAxisBottomText");function kt(t){const n={};for(const u of t){const[c,h]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ae(h))throw new _t(c,h,"number");n.radius=parseInt(h)}else if(c==="color"){if(It(h))throw new _t(c,h,"hex code");n.color=h}else if(c==="stroke-color"){if(It(h))throw new _t(c,h,"hex code");n.strokeColor=h}else if(c==="stroke-width"){if(ne(h))throw new _t(c,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${c} is not supported.`)}return n}o(kt,"parseStyles");function xe(t,n,u,c,h){const p=kt(h);z.addPoints([{x:u,y:c,text:Q(t.text),className:n,...p}])}o(xe,"addPoint");function fe(t,n){z.addClass(t,kt(n))}o(fe,"addClass");function ge(t){z.setConfig({chartWidth:t})}o(ge,"setWidth");function pe(t){z.setConfig({chartHeight:t})}o(pe,"setHeight");function ye(){const t=wt(),{themeVariables:n,quadrantChart:u}=t;return u&&z.setConfig(u),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:ie()}),z.build()}o(ye,"getQuadrantData");var Ie=o(function(){z.clear(),Le()},"clear"),we={setWidth:ge,setHeight:pe,setQuadrant1Text:se,setQuadrant2Text:re,setQuadrant3Text:oe,setQuadrant4Text:le,setXAxisLeftText:he,setXAxisRightText:ce,setYAxisTopText:de,setYAxisBottomText:ue,parseStyles:kt,addPoint:xe,addClass:fe,getQuadrantData:ye,clear:Ie,setAccTitle:ke,getAccTitle:Fe,setDiagramTitle:Pe,getDiagramTitle:ie,getAccDescription:ve,setAccDescription:Ce},Be=o((t,n,u,c)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const S=wt();At.debug(`Rendering quadrant chart +`+t);const a=S.securityLevel;let A;a==="sandbox"&&(A=zt("#i"+n));const T=(a==="sandbox"?zt(A.nodes()[0].contentDocument.body):zt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=((xt=S.quadrantChart)==null?void 0:xt.chartWidth)??500,b=((ft=S.quadrantChart)==null?void 0:ft.chartHeight)??500;Ee(T,b,m,((gt=S.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),T.attr("viewBox","0 0 "+m+" "+b),c.db.setHeight(b),c.db.setWidth(m);const x=c.db.getQuadrantData(),O=q.append("g").attr("class","quadrants"),Y=q.append("g").attr("class","border"),G=q.append("g").attr("class","data-points"),yt=q.append("g").attr("class","labels"),Tt=q.append("g").attr("class","title");x.title&&Tt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",p(x.title.verticalPos)).attr("transform",y(x.title)).text(x.title.text),x.borderLines&&Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const dt=O.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");dt.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),dt.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const ut=G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");ut.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),ut.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Re={draw:Be},He={parser:De,db:we,renderer:Re,styles:o(()=>"","styles")};export{He as diagram}; diff --git a/pr-528/assets/chunks/requirementDiagram-JG2LMPGF.CxMVymv-.js b/pr-528/assets/chunks/requirementDiagram-JG2LMPGF.CxMVymv-.js new file mode 100644 index 000000000..d270144d5 --- /dev/null +++ b/pr-528/assets/chunks/requirementDiagram-JG2LMPGF.CxMVymv-.js @@ -0,0 +1,52 @@ +import{_ as r,d as ve,s as Fe,g as De,c as Pe,b as Ye,l as xe,v as Ue,j as ce,k as Be,a0 as Qe,e as Te}from"../app.CKrDwBa1.js";import{G as He}from"./graph.DDKaZ6Ct.js";import{l as We}from"./layout.PWtEKM9a.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";var he=function(){var e=r(function($,i,a,l){for(a=a||{},l=$.length;l--;a[$[l]]=i);return a},"o"),t=[1,3],c=[1,4],d=[1,5],u=[1,6],p=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],y=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],I=[1,25],b=[1,26],w=[1,27],q=[1,20],v=[1,28],A=[1,29],F=[62,63],pe=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],fe=[1,47],ye=[1,48],_e=[1,49],ge=[1,50],Ee=[1,51],Re=[1,52],me=[1,53],O=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],j=[1,69],X=[1,70],J=[1,67],Z=[1,68],S=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:r(function(i,a,l,n,f,s,K){var E=s.length-1;switch(f){case 4:this.$=s[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[E-3],s[E-4]);break;case 14:n.setNewReqId(s[E-2]);break;case 15:n.setNewReqText(s[E-2]);break;case 16:n.setNewReqRisk(s[E-2]);break;case 17:n.setNewReqVerifyMethod(s[E-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[E-3]);break;case 34:n.setNewElementType(s[E-2]);break;case 35:n.setNewElementDocRef(s[E-2]);break;case 38:n.addRelationship(s[E-2],s[E],s[E-4]);break;case 39:n.addRelationship(s[E-2],s[E-4],s[E]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:t,9:c,11:d,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:c,11:d,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(p,[2,6]),{3:12,4:2,6:t,9:c,11:d,13:u},{1:[2,2]},{4:17,5:y,7:13,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},e(p,[2,4]),e(p,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:y,7:31,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:32,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:33,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:34,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:35,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(pe,[2,49]),e(pe,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{52:54,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:66,47:J,49:Z},{23:71,62:v,63:A},{23:72,62:v,63:A},e(S,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(S,[2,19]),e(S,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:X,46:80,47:J,49:Z},e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{23:81,62:v,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(S,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(S,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:110,47:J,49:Z},{5:j,30:X,46:111,47:J,49:Z},e(S,[2,14]),e(S,[2,15]),e(S,[2,16]),e(S,[2,17]),e(S,[2,34]),e(S,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:r(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:r(function(i){var a=this,l=[0],n=[],f=[null],s=[],K=this.table,E="",te=0,Ie=0,Le=2,be=1,Oe=s.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);m.setInput(i,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var ae=m.yylloc;s.push(ae);var Ce=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(N){l.length=l.length-2*N,f.length=f.length-N,s.length=s.length-N}r(Me,"popStack");function Se(){var N;return N=n.pop()||m.lex()||be,typeof N!="number"&&(N instanceof Array&&(n=N,N=n.pop()),N=a.symbols_[N]||N),N}r(Se,"lex");for(var k,M,x,le,H={},ie,V,ke,re;;){if(M=l[l.length-1],this.defaultActions[M]?x=this.defaultActions[M]:((k===null||typeof k>"u")&&(k=Se()),x=K[M]&&K[M][k]),typeof x>"u"||!x.length||!x[0]){var oe="";re=[];for(ie in K[M])this.terminals_[ie]&&ie>Le&&re.push("'"+this.terminals_[ie]+"'");m.showPosition?oe="Parse error on line "+(te+1)+`: +`+m.showPosition()+` +Expecting `+re.join(", ")+", got '"+(this.terminals_[k]||k)+"'":oe="Parse error on line "+(te+1)+": Unexpected "+(k==be?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(oe,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:ae,expected:re})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+k);switch(x[0]){case 1:l.push(k),f.push(m.yytext),s.push(m.yylloc),l.push(x[1]),k=null,Ie=m.yyleng,E=m.yytext,te=m.yylineno,ae=m.yylloc;break;case 2:if(V=this.productions_[x[1]][1],H.$=f[f.length-V],H._$={first_line:s[s.length-(V||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(V||1)].first_column,last_column:s[s.length-1].last_column},Ce&&(H._$.range=[s[s.length-(V||1)].range[0],s[s.length-1].range[1]]),le=this.performAction.apply(H,[E,Ie,te,C.yy,x[1],f,s].concat(Oe)),typeof le<"u")return le;V&&(l=l.slice(0,-1*V*2),f=f.slice(0,-1*V),s=s.slice(0,-1*V)),l.push(this.productions_[x[1]][0]),f.push(H.$),s.push(H._$),ke=K[l[l.length-2]][l[l.length-1]],l.push(ke);break;case 3:return!0}}return!0},"parse")},$e=function(){var $={EOF:1,parseError:r(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:r(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:r(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),l.length-1&&(this.yylineno-=l.length-1);var f=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:l?(l.length===n.length?this.yylloc.first_column:0)+n[n.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:r(function(i,a){var l,n,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),n=i[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+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var s in f)this[s]=f[s];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,l,n;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),s=0;sa[0].length)){if(a=l,n=s,this.options.backtrack_lexer){if(i=this.test_match(l,f[s]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,f[n]),i!==!1?i:!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:r(function(){var a=this.next();return a||this.lex()},"lex"),begin:r(function(a){this.conditionStack.push(a)},"begin"),popState:r(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:r(function(a){this.begin(a)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(a,l,n,f){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return l.yytext=l.yytext.trim(),62}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return $}();ne.lexer=$e;function ee(){this.yy={}}return r(ee,"Parser"),ee.prototype=ne,ne.Parser=ee,new ee}();he.parser=he;var Ke=he,de=[],T={},G=new Map,L={},z=new Map,Ge={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},ze={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},je={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Xe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Je=r((e,t)=>(G.has(e)||G.set(e,{name:e,type:t,id:T.id,text:T.text,risk:T.risk,verifyMethod:T.verifyMethod}),T={},G.get(e)),"addRequirement"),Ze=r(()=>G,"getRequirements"),et=r(e=>{T!==void 0&&(T.id=e)},"setNewReqId"),tt=r(e=>{T!==void 0&&(T.text=e)},"setNewReqText"),it=r(e=>{T!==void 0&&(T.risk=e)},"setNewReqRisk"),rt=r(e=>{T!==void 0&&(T.verifyMethod=e)},"setNewReqVerifyMethod"),nt=r(e=>(z.has(e)||(z.set(e,{name:e,type:L.type,docRef:L.docRef}),xe.info("Added new requirement: ",e)),L={},z.get(e)),"addElement"),st=r(()=>z,"getElements"),at=r(e=>{L!==void 0&&(L.type=e)},"setNewElementType"),lt=r(e=>{L!==void 0&&(L.docRef=e)},"setNewElementDocRef"),ot=r((e,t,c)=>{de.push({type:e,src:t,dst:c})},"addRelationship"),ct=r(()=>de,"getRelationships"),ht=r(()=>{de=[],T={},G=new Map,L={},z=new Map,Ue()},"clear"),ut={RequirementType:Ge,RiskLevel:ze,VerifyType:je,Relationships:Xe,getConfig:r(()=>ve().req,"getConfig"),addRequirement:Je,getRequirements:Ze,setNewReqId:et,setNewReqText:tt,setNewReqRisk:it,setNewReqVerifyMethod:rt,setAccTitle:Fe,getAccTitle:De,setAccDescription:Pe,getAccDescription:Ye,addElement:nt,getElements:st,setNewElementType:at,setNewElementDocRef:lt,addRelationship:ot,getRelationships:ct,clear:ht},dt=r(e=>` + + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + +`,"getStyles"),pt=dt,ue={CONTAINS:"contains",ARROW:"arrow"},ft=r((e,t)=>{let c=e.append("defs").append("marker").attr("id",ue.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");c.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),c.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),c.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",ue.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0 + L${t.line_height},${t.line_height/2} + M${t.line_height},${t.line_height/2} + L0,${t.line_height}`).attr("stroke-width",1)},"insertLineEndings"),we={ReqMarkers:ue,insertLineEndings:ft},_={},Ne=0,Ae=r((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",_.rect_min_width+"px").attr("height",_.rect_min_height+"px"),"newRectNode"),qe=r((e,t,c)=>{let d=_.rect_min_width/2,u=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",d).attr("y",_.rect_padding).attr("dominant-baseline","hanging"),p=0;c.forEach(g=>{p==0?u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",0).text(g):u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",_.line_height*.75).text(g),p++});let y=1.5*_.rect_padding,h=p*_.line_height*.75,o=y+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",_.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:u,y:o}},"newTitleNode"),Ve=r((e,t,c,d)=>{let u=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",_.rect_padding).attr("y",d).attr("dominant-baseline","hanging"),p=0;const y=30;let h=[];return c.forEach(o=>{let g=o.length;for(;g>y&&p<3;){let R=o.substring(0,y);o=o.substring(y,o.length),g=o.length,h[h.length]=R,p++}if(p==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;p=0}),h.forEach(o=>{u.append("tspan").attr("x",_.rect_padding).attr("dy",_.line_height).text(o)}),u},"newBodyNode"),yt=r((e,t,c,d)=>{const u=t.node().getTotalLength(),p=t.node().getPointAtLength(u*.5),y="rel"+Ne;Ne++;const o=e.append("text").attr("class","req relationshipLabel").attr("id",y).attr("x",p.x).attr("y",p.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d).node().getBBox();e.insert("rect","#"+y).attr("class","req reqLabelBox").attr("x",p.x-o.width/2).attr("y",p.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),_t=r(function(e,t,c,d,u){const p=c.edge(W(t.src),W(t.dst)),y=Qe().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+d).attr("class","er relationshipLine").attr("d",y(p.points)).attr("fill","none");t.type==u.db.Relationships.CONTAINS?h.attr("marker-start","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+we.ReqMarkers.ARROW+"_line_ending)")),yt(e,h,_,`<<${t.type}>>`)},"drawRelationshipFromLayout"),gt=r((e,t,c)=>{e.forEach((d,u)=>{u=W(u),xe.info("Added new requirement: ",u);const p=c.append("g").attr("id",u),y="req-"+u,h=Ae(p,y);let o=[],g=qe(p,u+"_title",[`<<${d.type}>>`,`${d.name}`]);o.push(g.titleNode);let R=Ve(p,u+"_body",[`Id: ${d.id}`,`Text: ${d.text}`,`Risk: ${d.risk}`,`Verification: ${d.verifyMethod}`],g.y);o.push(R);const I=h.node().getBBox();t.setNode(u,{width:I.width,height:I.height,shape:"rect",id:u})})},"drawReqs"),Et=r((e,t,c)=>{e.forEach((d,u)=>{const p=W(u),y=c.append("g").attr("id",p),h="element-"+p,o=Ae(y,h);let g=[],R=qe(y,h+"_title",["<>",`${u}`]);g.push(R.titleNode);let I=Ve(y,h+"_body",[`Type: ${d.type||"Not Specified"}`,`Doc Ref: ${d.docRef||"None"}`],R.y);g.push(I);const b=o.node().getBBox();t.setNode(p,{width:b.width,height:b.height,shape:"rect",id:p})})},"drawElements"),Rt=r((e,t)=>(e.forEach(function(c){let d=W(c.src),u=W(c.dst);t.setEdge(d,u,{relationship:c})}),e),"addRelationships"),mt=r(function(e,t){t.nodes().forEach(function(c){c!==void 0&&t.node(c)!==void 0&&(e.select("#"+c),e.select("#"+c).attr("transform","translate("+(t.node(c).x-t.node(c).width/2)+","+(t.node(c).y-t.node(c).height/2)+" )"))})},"adjustEntities"),W=r(e=>e.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),It=r((e,t,c,d)=>{_=ve().requirement;const u=_.securityLevel;let p;u==="sandbox"&&(p=ce("#i"+t));const h=(u==="sandbox"?ce(p.nodes()[0].contentDocument.body):ce("body")).select(`[id='${t}']`);we.insertLineEndings(h,_);const o=new He({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:_.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let g=d.db.getRequirements(),R=d.db.getElements(),I=d.db.getRelationships();gt(g,o,h),Et(R,o,h),Rt(I,o),We(o),mt(h,o),I.forEach(function(A){_t(h,A,o,t,d)});const b=_.rect_padding,w=h.node().getBBox(),q=w.width+b*2,v=w.height+b*2;Be(h,v,q,_.useMaxWidth),h.attr("viewBox",`${w.x-b} ${w.y-b} ${q} ${v}`)},"draw"),bt={draw:It},At={parser:Ke,db:ut,renderer:bt,styles:pt};export{At as diagram}; diff --git a/pr-528/assets/chunks/rollkit-bitcoin-1.DCy-Y3gh.js b/pr-528/assets/chunks/rollkit-bitcoin-1.DCy-Y3gh.js new file mode 100644 index 000000000..a46d44734 --- /dev/null +++ b/pr-528/assets/chunks/rollkit-bitcoin-1.DCy-Y3gh.js @@ -0,0 +1 @@ +const i="/docs-preview/pr-528/bitcoin-rollkit/rollkit-bitcoin-1.png";export{i as _}; diff --git a/pr-528/assets/chunks/rosm.sMFJ_kYE.js b/pr-528/assets/chunks/rosm.sMFJ_kYE.js new file mode 100644 index 000000000..02fa940cb --- /dev/null +++ b/pr-528/assets/chunks/rosm.sMFJ_kYE.js @@ -0,0 +1 @@ +const e="https://rpc.rosm.rollkit.dev",c="https://api.rosm.rollkit.dev",s="rosm",n="Rollkit Cosmwasm Testnet",o={coinDenom:"ROSM",coinMinimalDenom:"urosm",coinDecimals:6},r={bech32PrefixAccAddr:"wasm",bech32PrefixAccPub:"wasmpub",bech32PrefixValAddr:"wasmvaloper",bech32PrefixValPub:"wasmvaloperpub",bech32PrefixConsAddr:"wasmvalcons",bech32PrefixConsPub:"wasmvalconspub"},i={coinType:118},a=[{coinDenom:"ROSM",coinMinimalDenom:"urosm",coinDecimals:6}],t=[{coinDenom:"ROSM",coinMinimalDenom:"urosm",coinDecimals:6}],m={low:.05,average:.125,high:.2},l=["stargate","no-legacy-stdTx","ibc-transfer"],u={rpc:e,rest:c,chainId:s,chainName:n,stakeCurrency:o,bech32Config:r,bip44:i,currencies:a,feeCurrencies:t,gasPriceStep:m,features:l};export{r as bech32Config,i as bip44,s as chainId,n as chainName,a as currencies,u as default,l as features,t as feeCurrencies,m as gasPriceStep,c as rest,e as rpc,o as stakeCurrency}; diff --git a/pr-528/assets/chunks/sankeyDiagram-ATFNWWW6.eM5AvVxt.js b/pr-528/assets/chunks/sankeyDiagram-ATFNWWW6.eM5AvVxt.js new file mode 100644 index 000000000..4b370bab7 --- /dev/null +++ b/pr-528/assets/chunks/sankeyDiagram-ATFNWWW6.eM5AvVxt.js @@ -0,0 +1,8 @@ +import{_ as m,d as lt,g as _t,s as xt,b as vt,c as bt,r as wt,q as St,v as Lt,e as Et,p as At,j as H,a8 as Tt}from"../app.CKrDwBa1.js";import{o as Mt}from"./ordinal.BYWQX77i.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./init.Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function jt(t){return t.index}function zt(t){return t.nodes}function $t(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,p,_=jt,s=mt,o,l,x=zt,v=$t,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=p=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function j({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),R(f);for(let u=0;u0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,V=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,V+=q}if(!(V>0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,F=1e-6,Rt=rt-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,p=this._y1,_=i-t,s=a-e,o=d-t,l=p-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>F)if(!(Math.abs(l*_-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-p,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),j=C/N,R=C/T;Math.abs(j-1)>F&&(this._+="L"+(t+j*o)+","+(e+j*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var p=i*Math.cos(a),_=i*Math.sin(a),s=t+p,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>F&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Ft(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Vt,h=Ft,d=null;function p(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return p.source=function(_){return arguments.length?(e=_,p):e},p.target=function(_){return arguments.length?(i=_,p):i},p.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),p):a},p.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),p):h},p.context=function(_){return arguments.length?(d=_??null,p):d},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=m(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:m(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:m(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:m(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,j=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}m(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||j,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}m(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: +`+S.showPosition()+` +Expecting `+k.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==j?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:k})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(I[0]){case 1:l.push(A),v.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=v[v.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],v,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),v.push(f.$),y.push(f._$),r=b[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var _={EOF:1,parseError:m(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:m(function(s,o){return this.yy=o||this.yy||{},this._input=s,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:m(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:m(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=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:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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:m(function(s){this.unput(this.match.slice(s))},"less"),pastInput:m(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+o+"^"},"showPosition"),test_match:m(function(s,o){var l,x,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),x=s[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,x;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),y=0;yo[0].length)){if(o=l,x=y,this.options.backtrack_lexer){if(s=this.test_match(l,v[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,v[x]),s!==!1?s:!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:m(function(){var o=this.next();return o||this.lex()},"lex"),begin:m(function(o){this.conditionStack.push(o)},"begin"),popState:m(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(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:m(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:m(function(o){this.begin(o)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:m(function(o,l,x,v){switch(x){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return _}();h.lexer=d;function p(){this.yy={}}return m(p,"Parser"),p.prototype=h,h.Parser=p,new p}();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=m(()=>{J=[],tt=[],Z=new Map,Lt()},"clear"),W,Jt=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},m(W,"SankeyLink"),W),te=m((t,e,i)=>{J.push(new Jt(t,e,i))},"addLink"),U,ee=(U=class{constructor(e){this.ID=e}},m(U,"SankeyNode"),U),ne=m(t=>{t=Et.sanitizeText(t,lt());let e=Z.get(t);return e===void 0&&(e=new ee(t),Z.set(t,e),tt.push(e)),e},"findOrCreateNode"),ie=m(()=>tt,"getNodes"),se=m(()=>J,"getLinks"),re=m(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:m(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:se,getGraph:re,addLink:te,findOrCreateNode:ne,getAccTitle:_t,setAccTitle:xt,getAccDescription:vt,setAccDescription:bt,getDiagramTitle:wt,setDiagramTitle:St,clear:Zt},$,gt=($=class{static next(e){return new $(e+ ++$.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},m($,"Uid"),$.count=0,$),ae={left:Ct,right:Ot,center:Dt,justify:mt},le=m(function(t,e,i,a){const{securityLevel:h,sankey:d}=lt(),p=At.sankey;let _;h==="sandbox"&&(_=H("#i"+e));const s=h==="sandbox"?H(_.nodes()[0].contentDocument.body):H("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):H(`[id="${e}"]`),l=(d==null?void 0:d.width)??p.width,x=(d==null?void 0:d.height)??p.width,v=(d==null?void 0:d.useMaxWidth)??p.useMaxWidth,y=(d==null?void 0:d.nodeAlignment)??p.nodeAlignment,b=(d==null?void 0:d.prefix)??p.prefix,M=(d==null?void 0:d.suffix)??p.suffix,T=(d==null?void 0:d.showValues)??p.showValues,N=a.db.getGraph(),C=ae[y];Bt().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,x]])(N);const S=Mt(It);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=gt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>S(g.id));const P=m(({id:g,value:E})=>T?`${g} +${b}${Math.round(E*100)/100}${M}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",g=>g.x0(g.y1+g.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",g=>g.x0(E.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let D;switch(O){case"gradient":D=m(g=>g.uid,"coloring");break;case"source":D=m(g=>S(g.source.id),"coloring");break;case"target":D=m(g=>S(g.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Kt()).attr("stroke",D).attr("stroke-width",g=>Math.max(1,g.width)),Tt(void 0,o,0,v)},"draw"),ce={draw:le},ue=m(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),he=K.parse.bind(K);K.parse=t=>he(ue(t));var me={parser:K,db:oe,renderer:ce};export{me as diagram}; diff --git a/pr-528/assets/chunks/sequenceDiagram-WK7YDQ3N.DyLD_NeW.js b/pr-528/assets/chunks/sequenceDiagram-WK7YDQ3N.DyLD_NeW.js new file mode 100644 index 000000000..daee7754d --- /dev/null +++ b/pr-528/assets/chunks/sequenceDiagram-WK7YDQ3N.DyLD_NeW.js @@ -0,0 +1,122 @@ +import{g as St,a as Kt,d as Se,b as Me,c as Re,e as De}from"./chunk-V35ELUW5.C6DQpogG.js";import{I as Ce}from"./chunk-6JKP7OK7.CM73knb6.js";import{_ as d,g as Oe,r as Be,q as Ve,d as at,s as se,c as Ye,b as Fe,e as _,a1 as lt,a2 as wt,u as F,l as J,v as We,i as Mt,a as qe,j as kt,k as ze,m as ae,a3 as ie,E as Ft,a4 as ne,a5 as He}from"../app.CKrDwBa1.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";var Wt=function(){var t=d(function(pt,I,L,A){for(L=L||{},A=pt.length;A--;L[pt[A]]=I);return L},"o"),e=[1,2],o=[1,3],r=[1,4],a=[2,4],i=[1,9],c=[1,11],h=[1,13],p=[1,14],s=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],w=[1,27],k=[1,28],V=[1,29],M=[1,30],Y=[1,31],C=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],q=[1,39],R=[1,41],Q=[1,42],G=[1,43],j=[1,44],rt=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],it=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Jt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(I,L,A,b,D,l,mt){var u=l.length-1;switch(D){case 3:return b.apply(l[u]),l[u];case 4:case 9:this.$=[];break;case 5:case 10:l[u-1].push(l[u]),this.$=l[u-1];break;case 6:case 7:case 11:case 12:this.$=l[u];break;case 8:case 13:this.$=[];break;case 15:l[u].type="createParticipant",this.$=l[u];break;case 16:l[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[u-2])}),l[u-1].push({type:"boxEnd",boxText:l[u-2]}),this.$=l[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-2]),sequenceIndexStep:Number(l[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-1].actor};break;case 29:b.setDiagramTitle(l[u].substring(6)),this.$=l[u].substring(6);break;case 30:b.setDiagramTitle(l[u].substring(7)),this.$=l[u].substring(7);break;case 31:this.$=l[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[u].trim(),b.setAccDescription(this.$);break;case 34:l[u-1].unshift({type:"loopStart",loopText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.LOOP_START}),l[u-1].push({type:"loopEnd",loopText:l[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[u-1];break;case 35:l[u-1].unshift({type:"rectStart",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_START}),l[u-1].push({type:"rectEnd",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[u-1];break;case 36:l[u-1].unshift({type:"optStart",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_START}),l[u-1].push({type:"optEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[u-1];break;case 37:l[u-1].unshift({type:"altStart",altText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.ALT_START}),l[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[u-1];break;case 38:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 39:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 40:l[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.CRITICAL_START}),l[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[u-1];break;case 41:l[u-1].unshift({type:"breakStart",breakText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_START}),l[u-1].push({type:"breakEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[u-1];break;case 43:this.$=l[u-3].concat([{type:"option",optionText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[u]]);break;case 45:this.$=l[u-3].concat([{type:"and",parText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.PAR_AND},l[u]]);break;case 47:this.$=l[u-3].concat([{type:"else",altText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.ALT_ELSE},l[u]]);break;case 48:l[u-3].draw="participant",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 49:l[u-1].draw="participant",l[u-1].type="addParticipant",this.$=l[u-1];break;case 50:l[u-3].draw="actor",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 51:l[u-1].draw="actor",l[u-1].type="addParticipant",this.$=l[u-1];break;case 52:l[u-1].type="destroyParticipant",this.$=l[u-1];break;case 53:this.$=[l[u-1],{type:"addNote",placement:l[u-2],actor:l[u-1].actor,text:l[u]}];break;case 54:l[u-2]=[].concat(l[u-1],l[u-1]).slice(0,2),l[u-2][0]=l[u-2][0].actor,l[u-2][1]=l[u-2][1].actor,this.$=[l[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[u-2].slice(0,2),text:l[u]}];break;case 55:this.$=[l[u-1],{type:"addLinks",actor:l[u-1].actor,text:l[u]}];break;case 56:this.$=[l[u-1],{type:"addALink",actor:l[u-1].actor,text:l[u]}];break;case 57:this.$=[l[u-1],{type:"addProperties",actor:l[u-1].actor,text:l[u]}];break;case 58:this.$=[l[u-1],{type:"addDetails",actor:l[u-1].actor,text:l[u]}];break;case 61:this.$=[l[u-2],l[u]];break;case 62:this.$=l[u];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor}];break;case 66:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-4].actor}];break;case 67:this.$=[l[u-3],l[u-1],{type:"addMessage",from:l[u-3].actor,to:l[u-1].actor,signalType:l[u-2],msg:l[u]}];break;case 68:this.$={type:"addParticipant",actor:l[u]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:o,6:r},{1:[3]},{3:5,4:e,5:o,6:r},{3:6,4:e,5:o,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:K,52:U,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(P,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t($,a,{7:99}),t($,a,{7:100}),t($,a,{7:101}),t(it,a,{40:102,7:103}),t(N,a,{42:104,7:105}),t(N,a,{7:105,42:106}),t(Jt,a,{45:107,7:108}),t($,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:K,52:U,53:q},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,133],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,134],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,135]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,49:[1,136],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,137]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,48:[1,138],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,47:[1,141],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,142],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(P,[2,10]),{12:151,50:K,52:U,53:q},t(P,[2,12]),t(P,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(P,[2,11]),t(it,a,{7:103,40:160}),t(N,a,{7:105,42:161}),t(Jt,a,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(I,L){if(L.recoverable)this.trace(I);else{var A=new Error(I);throw A.hash=L,A}},"parseError"),parse:d(function(I){var L=this,A=[0],b=[],D=[null],l=[],mt=this.table,u="",Lt=0,Zt=0,Pe=2,Qt=1,Ae=l.slice.call(arguments,1),W=Object.create(this.lexer),ut={yy:{}};for(var Ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ot)&&(ut.yy[Ot]=this.yy[Ot]);W.setInput(I,ut.yy),ut.yy.lexer=W,ut.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Bt=W.yylloc;l.push(Bt);var ke=W.options&&W.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(tt){A.length=A.length-2*tt,D.length=D.length-tt,l.length=l.length-tt}d(Ne,"popStack");function jt(){var tt;return tt=b.pop()||W.lex()||Qt,typeof tt!="number"&&(tt instanceof Array&&(b=tt,tt=b.pop()),tt=L.symbols_[tt]||tt),tt}d(jt,"lex");for(var X,gt,st,Vt,yt={},Pt,ht,$t,At;;){if(gt=A[A.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((X===null||typeof X>"u")&&(X=jt()),st=mt[gt]&&mt[gt][X]),typeof st>"u"||!st.length||!st[0]){var Yt="";At=[];for(Pt in mt[gt])this.terminals_[Pt]&&Pt>Pe&&At.push("'"+this.terminals_[Pt]+"'");W.showPosition?Yt="Parse error on line "+(Lt+1)+`: +`+W.showPosition()+` +Expecting `+At.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error on line "+(Lt+1)+": Unexpected "+(X==Qt?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Yt,{text:W.match,token:this.terminals_[X]||X,line:W.yylineno,loc:Bt,expected:At})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+X);switch(st[0]){case 1:A.push(X),D.push(W.yytext),l.push(W.yylloc),A.push(st[1]),X=null,Zt=W.yyleng,u=W.yytext,Lt=W.yylineno,Bt=W.yylloc;break;case 2:if(ht=this.productions_[st[1]][1],yt.$=D[D.length-ht],yt._$={first_line:l[l.length-(ht||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ht||1)].first_column,last_column:l[l.length-1].last_column},ke&&(yt._$.range=[l[l.length-(ht||1)].range[0],l[l.length-1].range[1]]),Vt=this.performAction.apply(yt,[u,Zt,Lt,ut.yy,st[1],D,l].concat(Ae)),typeof Vt<"u")return Vt;ht&&(A=A.slice(0,-1*ht*2),D=D.slice(0,-1*ht),l=l.slice(0,-1*ht)),A.push(this.productions_[st[1]][0]),D.push(yt.$),l.push(yt._$),$t=mt[A[A.length-2]][A[A.length-1]],A.push($t);break;case 3:return!0}}return!0},"parse")},Le=function(){var pt={EOF:1,parseError:d(function(L,A){if(this.yy.parser)this.yy.parser.parseError(L,A);else throw new Error(L)},"parseError"),setInput:d(function(I,L){return this.yy=L||this.yy||{},this._input=I,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 I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:d(function(I){var L=I.length,A=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;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),A.length-1&&(this.yylineno-=A.length-1);var D=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:A?(A.length===b.length?this.yylloc.first_column:0)+b[b.length-A.length].length-A[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-L]),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(I){this.unput(this.match.slice(I))},"less"),pastInput:d(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:d(function(I,L){var A,b,D;if(this.options.backtrack_lexer&&(D={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&&(D.yylloc.range=this.yylloc.range.slice(0))),b=I[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+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,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(I[0].length),this.matched+=I[0],A=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var l in D)this[l]=D[l];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,L,A,b;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),l=0;lL[0].length)){if(L=A,b=l,this.options.backtrack_lexer){if(I=this.test_match(A,D[l]),I!==!1)return I;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(I=this.test_match(L,D[b]),I!==!1?I:!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 L=this.next();return L||this.lex()},"lex"),begin:d(function(L){this.conditionStack.push(L)},"begin"),popState:d(function(){var L=this.conditionStack.length-1;return L>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(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:d(function(L){this.begin(L)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(L,A,b,D){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return A.yytext=A.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return pt}();Ct.lexer=Le;function _t(){this.yy={}}return d(_t,"Parser"),_t.prototype=Ct,Ct.Parser=_t,new _t}();Wt.parser=Wt;var Ke=Wt,v=new Ce(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),Ue=d(function(t){v.records.boxes.push({name:t.text,wrap:t.wrap??xt(),fill:t.color,actorKeys:[]}),v.records.currentBox=v.records.boxes.slice(-1)[0]},"addBox"),qt=d(function(t,e,o,r){let a=v.records.currentBox;const i=v.records.actors.get(t);if(i){if(v.records.currentBox&&i.box&&v.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${v.records.currentBox.name}' at the same time.`);if(a=i.box?i.box:v.records.currentBox,i.box=a,i&&e===i.name&&o==null)return}if((o==null?void 0:o.text)==null&&(o={text:e,type:r}),(r==null||o.text==null)&&(o={text:e,type:r}),v.records.actors.set(t,{box:a,name:e,description:o.text,wrap:o.wrap??xt(),prevActor:v.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),v.records.prevActor){const c=v.records.actors.get(v.records.prevActor);c&&(c.nextActor=t)}v.records.currentBox&&v.records.currentBox.actorKeys.push(t),v.records.prevActor=t},"addActor"),Ge=d(t=>{let e,o=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return v.records.messages.push({from:t,to:e,message:(o==null?void 0:o.text)??"",wrap:(o==null?void 0:o.wrap)??xt(),type:r,activate:a}),!0},"addSignal"),Je=d(function(){return v.records.boxes.length>0},"hasAtLeastOneBox"),Ze=d(function(){return v.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),Qe=d(function(){return v.records.messages},"getMessages"),je=d(function(){return v.records.boxes},"getBoxes"),$e=d(function(){return v.records.actors},"getActors"),t0=d(function(){return v.records.createdActors},"getCreatedActors"),e0=d(function(){return v.records.destroyedActors},"getDestroyedActors"),It=d(function(t){return v.records.actors.get(t)},"getActor"),r0=d(function(){return[...v.records.actors.keys()]},"getActorKeys"),s0=d(function(){v.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),a0=d(function(){v.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),i0=d(()=>v.records.sequenceNumbersEnabled,"showSequenceNumbers"),n0=d(function(t){v.records.wrapEnabled=t},"setWrap"),oe=d(t=>{if(t===void 0)return{};t=t.trim();const e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),xt=d(()=>{var t;return v.records.wrapEnabled!==void 0?v.records.wrapEnabled:((t=at().sequence)==null?void 0:t.wrap)??!1},"autoWrap"),o0=d(function(){v.reset(),We()},"clear"),c0=d(function(t){const e=t.trim(),{wrap:o,cleanedText:r}=oe(e),a={text:r,wrap:o};return J.debug(`parseMessage: ${JSON.stringify(a)}`),a},"parseMessage"),l0=d(function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let o=e!=null&&e[1]?e[1].trim():"transparent",r=e!=null&&e[2]?e[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",o)||(o="transparent",r=t.trim());else{const c=new Option().style;c.color=o,c.color!==o&&(o="transparent",r=t.trim())}const{wrap:a,cleanedText:i}=oe(r);return{text:i?Mt(i,at()):void 0,color:o,wrap:a}},"parseBoxData"),vt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},d0={FILLED:0,OPEN:1},h0={LEFTOF:0,RIGHTOF:1,OVER:2},ce=d(function(t,e,o){const r={actor:t,placement:e,message:o.text,wrap:o.wrap??xt()},a=[].concat(t,t);v.records.notes.push(r),v.records.messages.push({from:a[0],to:a[1],message:o.text,wrap:o.wrap??xt(),type:vt.NOTE,placement:e})},"addNote"),le=d(function(t,e){const o=It(t);try{let r=Mt(e.text,at());r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const a=JSON.parse(r);Rt(o,a)}catch(r){J.error("error while parsing actor link text",r)}},"addLinks"),p0=d(function(t,e){const o=It(t);try{const r={};let a=Mt(e.text,at());const i=a.indexOf("@");a=a.replace(/&/g,"&"),a=a.replace(/=/g,"=");const c=a.slice(0,i-1).trim(),h=a.slice(i+1).trim();r[c]=h,Rt(o,r)}catch(r){J.error("error while parsing actor link text",r)}},"addALink");function Rt(t,e){if(t.links==null)t.links=e;else for(const o in e)t.links[o]=e[o]}d(Rt,"insertLinks");var de=d(function(t,e){const o=It(t);try{const r=Mt(e.text,at()),a=JSON.parse(r);Ut(o,a)}catch(r){J.error("error while parsing actor properties text",r)}},"addProperties");function Ut(t,e){if(t.properties==null)t.properties=e;else for(const o in e)t.properties[o]=e[o]}d(Ut,"insertProperties");function he(){v.records.currentBox=void 0}d(he,"boxEnd");var pe=d(function(t,e){const o=It(t),r=document.getElementById(e.text);try{const a=r.innerHTML,i=JSON.parse(a);i.properties&&Ut(o,i.properties),i.links&&Rt(o,i.links)}catch(a){J.error("error while parsing actor details text",a)}},"addDetails"),u0=d(function(t,e){if((t==null?void 0:t.properties)!==void 0)return t.properties[e]},"getActorProperty"),ue=d(function(t){if(Array.isArray(t))t.forEach(function(e){ue(e)});else switch(t.type){case"sequenceIndex":v.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(v.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");v.records.lastCreated=t.actor,qt(t.actor,t.actor,t.description,t.draw),v.records.createdActors.set(t.actor,v.records.messages.length);break;case"destroyParticipant":v.records.lastDestroyed=t.actor,v.records.destroyedActors.set(t.actor,v.records.messages.length);break;case"activeStart":O(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":O(t.actor,void 0,void 0,t.signalType);break;case"addNote":ce(t.actor,t.placement,t.text);break;case"addLinks":le(t.actor,t.text);break;case"addALink":p0(t.actor,t.text);break;case"addProperties":de(t.actor,t.text);break;case"addDetails":pe(t.actor,t.text);break;case"addMessage":if(v.records.lastCreated){if(t.to!==v.records.lastCreated)throw new Error("The created participant "+v.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");v.records.lastCreated=void 0}else if(v.records.lastDestroyed){if(t.to!==v.records.lastDestroyed&&t.from!==v.records.lastDestroyed)throw new Error("The destroyed participant "+v.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");v.records.lastDestroyed=void 0}O(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":Ue(t.boxData);break;case"boxEnd":he();break;case"loopStart":O(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":O(void 0,void 0,void 0,t.signalType);break;case"rectStart":O(void 0,void 0,t.color,t.signalType);break;case"rectEnd":O(void 0,void 0,void 0,t.signalType);break;case"optStart":O(void 0,void 0,t.optText,t.signalType);break;case"optEnd":O(void 0,void 0,void 0,t.signalType);break;case"altStart":O(void 0,void 0,t.altText,t.signalType);break;case"else":O(void 0,void 0,t.altText,t.signalType);break;case"altEnd":O(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":se(t.text);break;case"parStart":O(void 0,void 0,t.parText,t.signalType);break;case"and":O(void 0,void 0,t.parText,t.signalType);break;case"parEnd":O(void 0,void 0,void 0,t.signalType);break;case"criticalStart":O(void 0,void 0,t.criticalText,t.signalType);break;case"option":O(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":O(void 0,void 0,void 0,t.signalType);break;case"breakStart":O(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":O(void 0,void 0,void 0,t.signalType);break}},"apply"),te={addActor:qt,addMessage:Xe,addSignal:O,addLinks:le,addDetails:pe,addProperties:de,autoWrap:xt,setWrap:n0,enableSequenceNumbers:s0,disableSequenceNumbers:a0,showSequenceNumbers:i0,getMessages:Qe,getActors:$e,getCreatedActors:t0,getDestroyedActors:e0,getActor:It,getActorKeys:r0,getActorProperty:u0,getAccTitle:Oe,getBoxes:je,getDiagramTitle:Be,setDiagramTitle:Ve,getConfig:d(()=>at().sequence,"getConfig"),clear:o0,parseMessage:c0,parseBoxData:l0,LINETYPE:vt,ARROWTYPE:d0,PLACEMENT:h0,addNote:ce,setAccTitle:se,apply:ue,setAccDescription:Ye,getAccDescription:Fe,hasAtLeastOneBox:Je,hasAtLeastOneBoxWithTitle:Ze},g0=d(t=>`.actor { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + + text.actor > tspan { + fill: ${t.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${t.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${t.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${t.signalColor}; + } + + #arrowhead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .sequenceNumber { + fill: ${t.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${t.signalColor}; + } + + #crosshead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .messageText { + fill: ${t.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${t.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${t.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${t.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation1 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation2 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${t.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + .actor-man circle, line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + stroke-width: 2px; + } +`,"getStyles"),f0=g0,ft=18*2,ge="actor-top",fe="actor-bottom",x0="actor-box",ee="actor-man",Gt=d(function(t,e){return Se(t,e)},"drawRect"),T0=d(function(t,e,o,r,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const i=e.links,c=e.actorCnt,h=e.rectData;var p="none";a&&(p="block !important");const s=t.append("g");s.attr("id","actor"+c+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",p);var f="";h.class!==void 0&&(f=" "+h.class);let E=h.width>o?h.width:o;const g=s.append("rect");if(g.attr("class","actorPopupMenuPanel"+f),g.attr("x",h.x),g.attr("y",h.height),g.attr("fill",h.fill),g.attr("stroke",h.stroke),g.attr("width",E),g.attr("height",h.height),g.attr("rx",h.rx),g.attr("ry",h.ry),i!=null){var T=20;for(let k in i){var m=s.append("a"),w=ae(i[k]);m.attr("xlink:href",w),m.attr("target","_blank"),D0(r)(k,m,h.x+10,h.height+T,E,20,{class:"actor"},r),T+=30}}return g.attr("height",T),{height:h.height+T,width:E}},"drawPopup"),y0=d(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Nt=d(async function(t,e,o=null){let r=t.append("foreignObject");const a=await ie(e.text,Ft()),c=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(r.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const h=t.node().firstChild;h.setAttribute("height",c.height+2*e.textMargin);const p=h.getBBox();r.attr("x",Math.round(p.x+p.width/2-c.width/2)).attr("y",Math.round(p.y+p.height/2-c.height/2))}else if(o){let{startx:h,stopx:p,starty:s}=o;if(h>p){const f=h;h=p,p=f}r.attr("x",Math.round(h+Math.abs(h-p)/2-c.width/2)),e.class==="loopText"?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-c.height))}return[r]},"drawKatex"),bt=d(function(t,e){let o=0,r=0;const a=e.text.split(_.lineBreakRegex),[i,c]=ne(e.fontSize);let h=[],p=0,s=d(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=d(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":s=d(()=>Math.round(e.y+(o+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":s=d(()=>Math.round(e.y+(o+r+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[f,E]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&i!==void 0&&(p=f*i);const g=t.append("text");g.attr("x",e.x),g.attr("y",s()),e.anchor!==void 0&&g.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&g.style("font-family",e.fontFamily),c!==void 0&&g.style("font-size",c),e.fontWeight!==void 0&&g.style("font-weight",e.fontWeight),e.fill!==void 0&&g.attr("fill",e.fill),e.class!==void 0&&g.attr("class",e.class),e.dy!==void 0?g.attr("dy",e.dy):p!==0&&g.attr("dy",p);const T=E||He;if(e.tspan){const m=g.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(T)}else g.text(T);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(g._groups||g)[0][0].getBBox().height,o=r),h.push(g)}return h},"drawText"),xe=d(function(t,e){function o(a,i,c,h,p){return a+","+i+" "+(a+c)+","+i+" "+(a+c)+","+(i+h-p)+" "+(a+c-p*1.2)+","+(i+h)+" "+a+","+(i+h)}d(o,"genPoints");const r=t.append("polygon");return r.attr("points",o(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,bt(t,e),r},"drawLabel"),ct=-1,Te=d((t,e,o,r)=>{t.select&&o.forEach(a=>{const i=e.get(a),c=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?c.attr("y2",i.stopy+i.height/2):r.mirrorActors&&c.attr("y2",i.stopy)})},"fixLifeLineHeights"),E0=d(function(t,e,o,r){var T,m;const a=r?e.stopy:e.starty,i=e.x+e.width/2,c=a+e.height,h=t.append("g").lower();var p=h;r||(ct++,Object.keys(e.links||{}).length&&!o.forceMenus&&p.attr("onclick",y0(`actor${ct}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+ct).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),p=h.append("g"),e.actorCnt=ct,e.links!=null&&p.attr("id","root-"+ct));const s=St();var f="actor";(T=e.properties)!=null&&T.class?f=e.properties.class:s.fill="#eaeaea",r?f+=` ${fe}`:f+=` ${ge}`,s.x=e.x,s.y=a,s.width=e.width,s.height=e.height,s.class=f,s.rx=3,s.ry=3,s.name=e.name;const E=Gt(p,s);if(e.rectData=s,(m=e.properties)!=null&&m.icon){const w=e.properties.icon.trim();w.charAt(0)==="@"?Re(p,s.x+s.width-20,s.y+10,w.substr(1)):De(p,s.x+s.width-20,s.y+10,w)}Xt(o,lt(e.description))(e.description,p,s.x,s.y,s.width,s.height,{class:`actor ${x0}`},o);let g=e.height;if(E.node){const w=E.node().getBBox();e.height=w.height,g=w.height}return g},"drawActorTypeParticipant"),b0=d(function(t,e,o,r){const a=r?e.stopy:e.starty,i=e.x+e.width/2,c=a+80,h=t.append("g").lower();r||(ct++,h.append("line").attr("id","actor"+ct).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=ct);const p=t.append("g");let s=ee;r?s+=` ${fe}`:s+=` ${ge}`,p.attr("class",s),p.attr("name",e.name);const f=St();f.x=e.x,f.y=a,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,p.append("line").attr("id","actor-man-torso"+ct).attr("x1",i).attr("y1",a+25).attr("x2",i).attr("y2",a+45),p.append("line").attr("id","actor-man-arms"+ct).attr("x1",i-ft/2).attr("y1",a+33).attr("x2",i+ft/2).attr("y2",a+33),p.append("line").attr("x1",i-ft/2).attr("y1",a+60).attr("x2",i).attr("y2",a+45),p.append("line").attr("x1",i).attr("y1",a+45).attr("x2",i+ft/2-2).attr("y2",a+60);const E=p.append("circle");E.attr("cx",e.x+e.width/2),E.attr("cy",a+10),E.attr("r",15),E.attr("width",e.width),E.attr("height",e.height);const g=p.node().getBBox();return e.height=g.height,Xt(o,lt(e.description))(e.description,p,f.x,f.y+35,f.width,f.height,{class:`actor ${ee}`},o),e.height},"drawActorTypeActor"),m0=d(async function(t,e,o,r){switch(e.type){case"actor":return await b0(t,e,o,r);case"participant":return await E0(t,e,o,r)}},"drawActor"),v0=d(function(t,e,o){const a=t.append("g");ye(a,e),e.name&&Xt(o)(e.name,a,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},o),a.lower()},"drawBox"),w0=d(function(t){return t.append("g")},"anchorElement"),I0=d(function(t,e,o,r,a){const i=St(),c=e.anchored;i.x=e.startx,i.y=e.starty,i.class="activation"+a%3,i.width=e.stopx-e.startx,i.height=o-e.starty,Gt(c,i)},"drawActivation"),_0=d(async function(t,e,o,r){const{boxMargin:a,boxTextMargin:i,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:p,messageFontSize:s,messageFontWeight:f}=r,E=t.append("g"),g=d(function(w,k,V,M){return E.append("line").attr("x1",w).attr("y1",k).attr("x2",V).attr("y2",M).attr("class","loopLine")},"drawLoopLine");g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(w){g(e.startx,w.y,e.stopx,w.y).style("stroke-dasharray","3, 3")});let T=Kt();T.text=o,T.x=e.startx,T.y=e.starty,T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.anchor="middle",T.valign="middle",T.tspan=!1,T.width=h||50,T.height=c||20,T.textMargin=i,T.class="labelText",xe(E,T),T=Ee(),T.text=e.title,T.x=e.startx+h/2+(e.stopx-e.startx)/2,T.y=e.starty+a+i,T.anchor="middle",T.valign="middle",T.textMargin=i,T.class="loopText",T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.wrap=!0;let m=lt(T.text)?await Nt(E,T,e):bt(E,T);if(e.sectionTitles!==void 0){for(const[w,k]of Object.entries(e.sectionTitles))if(k.message){T.text=k.message,T.x=e.startx+(e.stopx-e.startx)/2,T.y=e.sections[w].y+a+i,T.class="loopText",T.anchor="middle",T.valign="middle",T.tspan=!1,T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.wrap=e.wrap,lt(T.text)?(e.starty=e.sections[w].y,await Nt(E,T,e)):bt(E,T);let V=Math.round(m.map(M=>(M._groups||M)[0][0].getBBox().height).reduce((M,Y)=>M+Y));e.sections[w].height+=V-(a+i)}}return e.height=Math.round(e.stopy-e.starty),E},"drawLoop"),ye=d(function(t,e){Me(t,e)},"drawBackgroundRect"),L0=d(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),P0=d(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),A0=d(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),k0=d(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),N0=d(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),S0=d(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),M0=d(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Ee=d(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),R0=d(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Xt=function(){function t(i,c,h,p,s,f,E){const g=c.append("text").attr("x",h+s/2).attr("y",p+f/2+5).style("text-anchor","middle").text(i);a(g,E)}d(t,"byText");function e(i,c,h,p,s,f,E,g){const{actorFontSize:T,actorFontFamily:m,actorFontWeight:w}=g,[k,V]=ne(T),M=i.split(_.lineBreakRegex);for(let Y=0;Yt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:d(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:d(function(t){this.boxes.push(t)},"addBox"),addActor:d(function(t){this.actors.push(t)},"addActor"),addLoop:d(function(t){this.loops.push(t)},"addLoop"),addMessage:d(function(t){this.messages.push(t)},"addMessage"),addNote:d(function(t){this.notes.push(t)},"addNote"),lastActor:d(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:d(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:d(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:d(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:d(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ve(at())},"init"),updateVal:d(function(t,e,o,r){t[e]===void 0?t[e]=o:t[e]=r(o,t[e])},"updateVal"),updateBounds:d(function(t,e,o,r){const a=this;let i=0;function c(h){return d(function(s){i++;const f=a.sequenceItems.length-i+1;a.updateVal(s,"starty",e-f*n.boxMargin,Math.min),a.updateVal(s,"stopy",r+f*n.boxMargin,Math.max),a.updateVal(x.data,"startx",t-f*n.boxMargin,Math.min),a.updateVal(x.data,"stopx",o+f*n.boxMargin,Math.max),h!=="activation"&&(a.updateVal(s,"startx",t-f*n.boxMargin,Math.min),a.updateVal(s,"stopx",o+f*n.boxMargin,Math.max),a.updateVal(x.data,"starty",e-f*n.boxMargin,Math.min),a.updateVal(x.data,"stopy",r+f*n.boxMargin,Math.max))},"updateItemBounds")}d(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:d(function(t,e,o,r){const a=_.getMin(t,o),i=_.getMax(t,o),c=_.getMin(e,r),h=_.getMax(e,r);this.updateVal(x.data,"startx",a,Math.min),this.updateVal(x.data,"starty",c,Math.min),this.updateVal(x.data,"stopx",i,Math.max),this.updateVal(x.data,"stopy",h,Math.max),this.updateBounds(a,c,i,h)},"insert"),newActivation:d(function(t,e,o){const r=o.get(t.from),a=Dt(t.from).length||0,i=r.x+r.width/2+(a-1)*n.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+n.activationWidth,stopy:void 0,actor:t.from,anchored:B.anchorElement(e)})},"newActivation"),endActivation:d(function(t){const e=this.activations.map(function(o){return o.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:d(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:d(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:d(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:x.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:d(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:d(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:d(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=_.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:d(function(){return this.verticalPos},"getVerticalPos"),getBounds:d(function(){return{bounds:this.data,models:this.models}},"getBounds")},C0=d(async function(t,e){x.bumpVerticalPos(n.boxMargin),e.height=n.boxMargin,e.starty=x.getVerticalPos();const o=St();o.x=e.startx,o.y=e.starty,o.width=e.width||n.width,o.class="note";const r=t.append("g"),a=B.drawRect(r,o),i=Kt();i.x=e.startx,i.y=e.starty,i.width=o.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=n.noteFontFamily,i.fontSize=n.noteFontSize,i.fontWeight=n.noteFontWeight,i.anchor=n.noteAlign,i.textMargin=n.noteMargin,i.valign="center";const c=lt(i.text)?await Nt(r,i):bt(r,i),h=Math.round(c.map(p=>(p._groups||p)[0][0].getBBox().height).reduce((p,s)=>p+s));a.attr("height",h+2*n.noteMargin),e.height+=h+2*n.noteMargin,x.bumpVerticalPos(h+2*n.noteMargin),e.stopy=e.starty+h+2*n.noteMargin,e.stopx=e.startx+o.width,x.insert(e.startx,e.starty,e.stopx,e.stopy),x.models.addNote(e)},"drawNote"),Tt=d(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Et=d(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),zt=d(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function be(t,e){x.bumpVerticalPos(10);const{startx:o,stopx:r,message:a}=e,i=_.splitBreaks(a).length,c=lt(a),h=c?await wt(a,at()):F.calculateTextDimensions(a,Tt(n));if(!c){const E=h.height/i;e.height+=E,x.bumpVerticalPos(E)}let p,s=h.height-10;const f=h.width;if(o===r){p=x.getVerticalPos()+s,n.rightAngles||(s+=n.boxMargin,p=x.getVerticalPos()+s),s+=30;const E=_.getMax(f/2,n.width/2);x.insert(o-E,x.getVerticalPos()-10+s,r+E,x.getVerticalPos()+30+s)}else s+=n.boxMargin,p=x.getVerticalPos()+s,x.insert(o,p-10,r,p);return x.bumpVerticalPos(s),e.height+=s,e.stopy=e.starty+e.height,x.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),p}d(be,"boundMessage");var O0=d(async function(t,e,o,r){const{startx:a,stopx:i,starty:c,message:h,type:p,sequenceIndex:s,sequenceVisible:f}=e,E=F.calculateTextDimensions(h,Tt(n)),g=Kt();g.x=a,g.y=c+10,g.width=i-a,g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=n.messageFontFamily,g.fontSize=n.messageFontSize,g.fontWeight=n.messageFontWeight,g.anchor=n.messageAlign,g.valign="center",g.textMargin=n.wrapPadding,g.tspan=!1,lt(g.text)?await Nt(t,g,{startx:a,stopx:i,starty:o}):bt(t,g);const T=E.width;let m;a===i?n.rightAngles?m=t.append("path").attr("d",`M ${a},${o} H ${a+_.getMax(n.width/2,T/2)} V ${o+25} H ${a}`):m=t.append("path").attr("d","M "+a+","+o+" C "+(a+60)+","+(o-10)+" "+(a+60)+","+(o+30)+" "+a+","+(o+20)):(m=t.append("line"),m.attr("x1",a),m.attr("y1",o),m.attr("x2",i),m.attr("y2",o)),p===r.db.LINETYPE.DOTTED||p===r.db.LINETYPE.DOTTED_CROSS||p===r.db.LINETYPE.DOTTED_POINT||p===r.db.LINETYPE.DOTTED_OPEN||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let w="";n.arrowMarkerAbsolute&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\("),w=w.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(p===r.db.LINETYPE.SOLID||p===r.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+w+"#arrowhead)"),(p===r.db.LINETYPE.BIDIRECTIONAL_SOLID||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+w+"#arrowhead)"),m.attr("marker-end","url("+w+"#arrowhead)")),(p===r.db.LINETYPE.SOLID_POINT||p===r.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+w+"#filled-head)"),(p===r.db.LINETYPE.SOLID_CROSS||p===r.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+w+"#crosshead)"),(f||n.showSequenceNumbers)&&(m.attr("marker-start","url("+w+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),B0=d(function(t,e,o,r,a,i,c){let h=0,p=0,s,f=0;for(const E of r){const g=e.get(E),T=g.box;s&&s!=T&&(c||x.models.addBox(s),p+=n.boxMargin+s.margin),T&&T!=s&&(c||(T.x=h+p,T.y=a),p+=T.margin),g.width=g.width||n.width,g.height=_.getMax(g.height||n.height,n.height),g.margin=g.margin||n.actorMargin,f=_.getMax(f,g.height),o.get(g.name)&&(p+=g.width/2),g.x=h+p,g.starty=x.getVerticalPos(),x.insert(g.x,a,g.x+g.width,g.height),h+=g.width+p,g.box&&(g.box.width=h+T.margin-g.box.x),p=g.margin,s=g.box,x.models.addActor(g)}s&&!c&&x.models.addBox(s),x.bumpVerticalPos(f)},"addActorRenderingData"),Ht=d(async function(t,e,o,r){if(r){let a=0;x.bumpVerticalPos(n.boxMargin*2);for(const i of o){const c=e.get(i);c.stopy||(c.stopy=x.getVerticalPos());const h=await B.drawActor(t,c,n,!0);a=_.getMax(a,h)}x.bumpVerticalPos(a+n.boxMargin)}else for(const a of o){const i=e.get(a);await B.drawActor(t,i,n,!1)}},"drawActors"),me=d(function(t,e,o,r){let a=0,i=0;for(const c of o){const h=e.get(c),p=Y0(h),s=B.drawPopup(t,h,p,n,n.forceMenus,r);s.height>a&&(a=s.height),s.width+h.x>i&&(i=s.width+h.x)}return{maxHeight:a,maxWidth:i}},"drawActorsPopup"),ve=d(function(t){qe(n,t),t.fontFamily&&(n.actorFontFamily=n.noteFontFamily=n.messageFontFamily=t.fontFamily),t.fontSize&&(n.actorFontSize=n.noteFontSize=n.messageFontSize=t.fontSize),t.fontWeight&&(n.actorFontWeight=n.noteFontWeight=n.messageFontWeight=t.fontWeight)},"setConf"),Dt=d(function(t){return x.activations.filter(function(e){return e.actor===t})},"actorActivations"),re=d(function(t,e){const o=e.get(t),r=Dt(t),a=r.reduce(function(c,h){return _.getMin(c,h.startx)},o.x+o.width/2-1),i=r.reduce(function(c,h){return _.getMax(c,h.stopx)},o.x+o.width/2+1);return[a,i]},"activationBounds");function nt(t,e,o,r,a){x.bumpVerticalPos(o);let i=r;if(e.id&&e.message&&t[e.id]){const c=t[e.id].width,h=Tt(n);e.message=F.wrapLabel(`[${e.message}]`,c-2*n.wrapPadding,h),e.width=c,e.wrap=!0;const p=F.calculateTextDimensions(e.message,h),s=_.getMax(p.height,n.labelBoxHeight);i=r+s,J.debug(`${s} - ${e.message}`)}a(e),x.bumpVerticalPos(i)}d(nt,"adjustLoopHeightForWrap");function we(t,e,o,r,a,i,c){function h(s,f){s.x{y.add(P.from),y.add(P.to)}),m=m.filter(P=>y.has(P))}B0(s,f,E,m,0,w,!1);const C=await q0(w,f,Y,r);B.insertArrowHead(s),B.insertArrowCrossHead(s),B.insertArrowFilledHead(s),B.insertSequenceNumber(s);function z(y,P){const $=x.endActivation(y);$.starty+18>P&&($.starty=P-6,P+=12),B.drawActivation(s,$,P,n,Dt(y.from).length),x.insert($.startx,P-10,$.stopx,P)}d(z,"activeEnd");let H=1,Z=1;const et=[],K=[];let U=0;for(const y of w){let P,$,it;switch(y.type){case r.db.LINETYPE.NOTE:x.resetVerticalPos(),$=y.noteModel,await C0(s,$);break;case r.db.LINETYPE.ACTIVE_START:x.newActivation(y,s,f);break;case r.db.LINETYPE.ACTIVE_END:z(y,x.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.LOOP_END:P=x.endLoop(),await B.drawLoop(s,P,"loop",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.RECT_START:nt(C,y,n.boxMargin,n.boxMargin,N=>x.newLoop(void 0,N.message));break;case r.db.LINETYPE.RECT_END:P=x.endLoop(),K.push(P),x.models.addLoop(P),x.bumpVerticalPos(P.stopy-x.getVerticalPos());break;case r.db.LINETYPE.OPT_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.OPT_END:P=x.endLoop(),await B.drawLoop(s,P,"opt",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.ALT_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.ALT_ELSE:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.ALT_END:P=x.endLoop(),await B.drawLoop(s,P,"alt",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N)),x.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.PAR_END:P=x.endLoop(),await B.drawLoop(s,P,"par",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.AUTONUMBER:H=y.message.start||H,Z=y.message.step||Z,y.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.CRITICAL_OPTION:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.CRITICAL_END:P=x.endLoop(),await B.drawLoop(s,P,"critical",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.BREAK_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.BREAK_END:P=x.endLoop(),await B.drawLoop(s,P,"break",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;default:try{it=y.msgModel,it.starty=x.getVerticalPos(),it.sequenceIndex=H,it.sequenceVisible=r.db.showSequenceNumbers();const N=await be(s,it);we(y,it,N,U,f,E,g),et.push({messageModel:it,lineStartY:N}),x.models.addMessage(it)}catch(N){J.error("error while drawing message",N)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(y.type)&&(H=H+Z),U++}J.debug("createdActors",E),J.debug("destroyedActors",g),await Ht(s,f,m,!1);for(const y of et)await O0(s,y.messageModel,y.lineStartY,r);n.mirrorActors&&await Ht(s,f,m,!0),K.forEach(y=>B.drawBackgroundRect(s,y)),Te(s,f,m,n);for(const y of x.models.boxes)y.height=x.getVerticalPos()-y.y,x.insert(y.x,y.y,y.x+y.width,y.height),y.startx=y.x,y.starty=y.y,y.stopx=y.startx+y.width,y.stopy=y.starty+y.height,y.stroke="rgb(0,0,0, 0.5)",B.drawBox(s,y,n);V&&x.bumpVerticalPos(n.boxMargin);const q=me(s,f,m,p),{bounds:R}=x.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let Q=R.stopy-R.starty;Q{const c=Tt(n);let h=i.actorKeys.reduce((f,E)=>f+=t.get(E).width+(t.get(E).margin||0),0);h-=2*n.boxTextMargin,i.wrap&&(i.name=F.wrapLabel(i.name,h-2*n.wrapPadding,c));const p=F.calculateTextDimensions(i.name,c);a=_.getMax(p.height,a);const s=_.getMax(h,p.width+2*n.wrapPadding);if(i.margin=n.boxTextMargin,hi.textMaxHeight=a),_.getMax(r,n.height)}d(_e,"calculateActorMargins");var F0=d(async function(t,e,o){const r=e.get(t.from),a=e.get(t.to),i=r.x,c=a.x,h=t.wrap&&t.message;let p=lt(t.message)?await wt(t.message,at()):F.calculateTextDimensions(h?F.wrapLabel(t.message,n.width,Et(n)):t.message,Et(n));const s={width:h?n.width:_.getMax(n.width,p.width+2*n.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.db.PLACEMENT.RIGHTOF?(s.width=h?_.getMax(n.width,p.width):_.getMax(r.width/2+a.width/2,p.width+2*n.noteMargin),s.startx=i+(r.width+n.actorMargin)/2):t.placement===o.db.PLACEMENT.LEFTOF?(s.width=h?_.getMax(n.width,p.width+2*n.noteMargin):_.getMax(r.width/2+a.width/2,p.width+2*n.noteMargin),s.startx=i-s.width+(r.width-n.actorMargin)/2):t.to===t.from?(p=F.calculateTextDimensions(h?F.wrapLabel(t.message,_.getMax(n.width,r.width),Et(n)):t.message,Et(n)),s.width=h?_.getMax(n.width,r.width):_.getMax(r.width,n.width,p.width+2*n.noteMargin),s.startx=i+(r.width-s.width)/2):(s.width=Math.abs(i+r.width/2-(c+a.width/2))+n.actorMargin,s.startx=i2,E=d(w=>h?-w:w,"adjustValue");t.from===t.to?s=p:(t.activate&&!f&&(s+=E(n.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(s+=E(3)),[o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(p-=E(3)));const g=[r,a,i,c],T=Math.abs(p-s);t.wrap&&t.message&&(t.message=F.wrapLabel(t.message,_.getMax(T+2*n.wrapPadding,n.width),Tt(n)));const m=F.calculateTextDimensions(t.message,Tt(n));return{width:_.getMax(t.wrap?0:m.width+2*n.wrapPadding,T+2*n.wrapPadding,n.width),height:0,startx:p,stopx:s,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),q0=d(async function(t,e,o,r){const a={},i=[];let c,h,p;for(const s of t){switch(s.id=F.random({length:10}),s.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:s.message&&(c=i.pop(),a[c.id]=c,a[s.id]=c,i.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=i.pop(),a[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const E=e.get(s.from?s.from:s.to.actor),g=Dt(s.from?s.from:s.to.actor).length,T=E.x+E.width/2+(g-1)*n.activationWidth/2,m={startx:T,stopx:T+n.activationWidth,actor:s.from,enabled:!0};x.activations.push(m)}break;case r.db.LINETYPE.ACTIVE_END:{const E=x.activations.map(g=>g.actor).lastIndexOf(s.from);x.activations.splice(E,1).splice(0,1)}break}s.placement!==void 0?(h=await F0(s,e,r),s.noteModel=h,i.forEach(E=>{c=E,c.from=_.getMin(c.from,h.startx),c.to=_.getMax(c.to,h.startx+h.width),c.width=_.getMax(c.width,Math.abs(c.from-c.to))-n.labelBoxWidth})):(p=W0(s,e,r),s.msgModel=p,p.startx&&p.stopx&&i.length>0&&i.forEach(E=>{if(c=E,p.startx===p.stopx){const g=e.get(s.from),T=e.get(s.to);c.from=_.getMin(g.x-p.width/2,g.x-g.width/2,c.from),c.to=_.getMax(T.x+p.width/2,T.x+g.width/2,c.to),c.width=_.getMax(c.width,Math.abs(c.to-c.from))-n.labelBoxWidth}else c.from=_.getMin(p.startx,c.from),c.to=_.getMax(p.stopx,c.to),c.width=_.getMax(c.width,p.width)-n.labelBoxWidth}))}return x.activations=[],J.debug("Loop type widths:",a),a},"calculateLoopBounds"),z0={bounds:x,drawActors:Ht,drawActorsPopup:me,setConf:ve,draw:V0},J0={parser:Ke,db:te,renderer:z0,styles:f0,init:d(({wrap:t})=>{te.setWrap(t)},"init")};export{J0 as diagram}; diff --git a/pr-528/assets/chunks/stateDiagram-4JV6CC6H.B0BJhnfC.js b/pr-528/assets/chunks/stateDiagram-4JV6CC6H.B0BJhnfC.js new file mode 100644 index 000000000..ac97250f8 --- /dev/null +++ b/pr-528/assets/chunks/stateDiagram-4JV6CC6H.B0BJhnfC.js @@ -0,0 +1 @@ +import{s as W,a as N,b as P}from"./chunk-5RIWM3LS.jgRW-DO2.js";import{_ as u,d as t,j as H,l as S,k as C,e as z,a0 as U,a6 as F,u as O}from"../app.CKrDwBa1.js";import{G as J}from"./graph.DDKaZ6Ct.js";import{l as X}from"./layout.PWtEKM9a.js";import"./chunk-4LC2V6XN.Cfx7Swlc.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";import"./baseUniq.HRNeWzar.js";import"./basePickBy.nUpO2mqN.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(p,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),c=Math.max(x.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let c=Math.max(x,p);c===p&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,x>p&&(l=(p-c)/2+o),Math.abs(a-B.x)p&&(l=a-(x-p)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),x<=p&&s.attr("x",a+(c-n)/2-x/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
    ");p=p.replace(/\n/g,"
    ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const c=g.append("tspan");if(c.text(x),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(F),p=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:x}=O.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",x+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,x+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,x)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",x+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",x-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const p=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,p,a,o);const x=b.padding,c=s.node().getBBox(),l=c.width+x*2,B=c.height+x*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,p)=>{const a=new J({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},yt={parser:W,db:N,renderer:ot,styles:P,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()},"init")};export{yt as diagram}; diff --git a/pr-528/assets/chunks/stateDiagram-v2-7KT6RKTD.CAA0WbwX.js b/pr-528/assets/chunks/stateDiagram-v2-7KT6RKTD.CAA0WbwX.js new file mode 100644 index 000000000..7473be188 --- /dev/null +++ b/pr-528/assets/chunks/stateDiagram-v2-7KT6RKTD.CAA0WbwX.js @@ -0,0 +1 @@ +import{s as e,a as t,c as r,b as s}from"./chunk-5RIWM3LS.jgRW-DO2.js";import{_ as i}from"../app.CKrDwBa1.js";import"./chunk-4LC2V6XN.Cfx7Swlc.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";var p={parser:e,db:t,renderer:r,styles:s,init:i(a=>{a.state||(a.state={}),a.state.arrowMarkerAbsolute=a.arrowMarkerAbsolute,t.clear()},"init")};export{p as diagram}; diff --git a/pr-528/assets/chunks/theme.Ds20UUID.js b/pr-528/assets/chunks/theme.Ds20UUID.js new file mode 100644 index 000000000..9afb6d4b4 --- /dev/null +++ b/pr-528/assets/chunks/theme.Ds20UUID.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.2WiG7WtP.js","assets/chunks/framework.B8-VHxRu.js"])))=>i.map(i=>d[i]); +import{d as m,o as a,c as u,r as c,n as M,a as z,t as I,b as k,w as p,e as h,T as ue,_ as g,u as Be,i as Ee,f as De,g as de,h as y,j as d,k as r,l as K,m as ae,p as T,q as F,s as Y,v as j,x as ve,y as pe,z as Fe,A as Oe,B as W,F as w,C as H,D as ye,E as Q,G as _,H as E,I as Pe,J as Z,K as U,L as x,M as Ge,N as Le,O as re,P as Ve,Q as Se,R as ee,S as Ue,U as je,V as ze,W as Te,X as Ne,Y as Ke,Z as We,$ as qe,a0 as Re,a1 as Je,a2 as Xe}from"./framework.B8-VHxRu.js";const Ye=m({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(s){return(e,t)=>(a(),u("span",{class:M(["VPBadge",e.type])},[c(e.$slots,"default",{},()=>[z(I(e.text),1)])],2))}}),Qe={key:0,class:"VPBackdrop"},Ze=m({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(s){return(e,t)=>(a(),k(ue,{name:"fade"},{default:p(()=>[e.show?(a(),u("div",Qe)):h("",!0)]),_:1}))}}),xe=g(Ze,[["__scopeId","data-v-54a304ca"]]),L=Be;function et(s,e){let t,o=!1;return()=>{t&&clearTimeout(t),o?t=setTimeout(s,e):(s(),(o=!0)&&setTimeout(()=>o=!1,e))}}function ie(s){return/^\//.test(s)?s:`/${s}`}function fe(s){const{pathname:e,search:t,hash:o,protocol:n}=new URL(s,"http://a.com");if(Ee(s)||s.startsWith("#")||!n.startsWith("http")||!De(e))return s;const{site:i}=L(),l=e.endsWith("/")||e.endsWith(".html")?s:s.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${o}`);return de(l)}function R({correspondingLink:s=!1}={}){const{site:e,localeIndex:t,page:o,theme:n,hash:i}=L(),l=y(()=>{var v,$;return{label:(v=e.value.locales[t.value])==null?void 0:v.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:y(()=>Object.entries(e.value.locales).flatMap(([v,$])=>l.value.label===$.label?[]:{text:$.label,link:tt($.link||(v==="root"?"/":`/${v}/`),n.value.i18nRouting!==!1&&s,o.value.relativePath.slice(l.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:l}}function tt(s,e,t,o){return e?s.replace(/\/$/,"")+ie(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,o?".html":"")):s}const nt={class:"NotFound"},ot={class:"code"},st={class:"title"},at={class:"quote"},rt={class:"action"},it=["href","aria-label"],lt=m({__name:"NotFound",setup(s){const{theme:e}=L(),{currentLang:t}=R();return(o,n)=>{var i,l,f,v,$;return a(),u("div",nt,[d("p",ot,I(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),d("h1",st,I(((l=r(e).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),n[0]||(n[0]=d("div",{class:"divider"},null,-1)),d("blockquote",at,I(((f=r(e).notFound)==null?void 0:f.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",rt,[d("a",{class:"link",href:r(de)(r(t).link),"aria-label":((v=r(e).notFound)==null?void 0:v.linkLabel)??"go to home"},I((($=r(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,it)])])}}}),ct=g(lt,[["__scopeId","data-v-6ff51ddd"]]);function Me(s,e){if(Array.isArray(s))return J(s);if(s==null)return[];e=ie(e);const t=Object.keys(s).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(ie(n))),o=t?s[t]:[];return Array.isArray(o)?J(o):J(o.items,o.base)}function ut(s){const e=[];let t=0;for(const o in s){const n=s[o];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function dt(s){const e=[];function t(o){for(const n of o)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(s),e}function le(s,e){return Array.isArray(e)?e.some(t=>le(s,t)):K(s,e.link)?!0:e.items?le(s,e.items):!1}function J(s,e){return[...s].map(t=>{const o={...t},n=o.base||e;return n&&o.link&&(o.link=n+o.link),o.items&&(o.items=J(o.items,n)),o})}function O(){const{frontmatter:s,page:e,theme:t}=L(),o=ae("(min-width: 960px)"),n=T(!1),i=y(()=>{const C=t.value.sidebar,S=e.value.relativePath;return C?Me(C,S):[]}),l=T(i.value);F(i,(C,S)=>{JSON.stringify(C)!==JSON.stringify(S)&&(l.value=i.value)});const f=y(()=>s.value.sidebar!==!1&&l.value.length>0&&s.value.layout!=="home"),v=y(()=>$?s.value.aside==null?t.value.aside==="left":s.value.aside==="left":!1),$=y(()=>s.value.layout==="home"?!1:s.value.aside!=null?!!s.value.aside:t.value.aside!==!1),V=y(()=>f.value&&o.value),b=y(()=>f.value?ut(l.value):[]);function P(){n.value=!0}function N(){n.value=!1}function A(){n.value?N():P()}return{isOpen:n,sidebar:l,sidebarGroups:b,hasSidebar:f,hasAside:$,leftAside:v,isSidebarEnabled:V,open:P,close:N,toggle:A}}function vt(s,e){let t;Y(()=>{t=s.value?document.activeElement:void 0}),j(()=>{window.addEventListener("keyup",o)}),ve(()=>{window.removeEventListener("keyup",o)});function o(n){n.key==="Escape"&&s.value&&(e(),t==null||t.focus())}}function pt(s){const{page:e,hash:t}=L(),o=T(!1),n=y(()=>s.value.collapsed!=null),i=y(()=>!!s.value.link),l=T(!1),f=()=>{l.value=K(e.value.relativePath,s.value.link)};F([e,s,t],f),j(f);const v=y(()=>l.value?!0:s.value.items?le(e.value.relativePath,s.value.items):!1),$=y(()=>!!(s.value.items&&s.value.items.length));Y(()=>{o.value=!!(n.value&&s.value.collapsed)}),pe(()=>{(l.value||v.value)&&(o.value=!1)});function V(){n.value&&(o.value=!o.value)}return{collapsed:o,collapsible:n,isLink:i,isActiveLink:l,hasActiveLink:v,hasChildren:$,toggle:V}}function ft(){const{hasSidebar:s}=O(),e=ae("(min-width: 960px)"),t=ae("(min-width: 1280px)");return{isAsideEnabled:y(()=>!t.value&&!e.value?!1:s.value?t.value:e.value)}}const ce=[];function Ie(s){return typeof s.outline=="object"&&!Array.isArray(s.outline)&&s.outline.label||s.outlineTitle||"On this page"}function he(s){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const o=Number(t.tagName[1]);return{element:t,title:ht(t),link:"#"+t.id,level:o}});return mt(e,s)}function ht(s){let e="";for(const t of s.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function mt(s,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[o,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return bt(s,o,n)}function _t(s,e){const{isAsideEnabled:t}=ft(),o=et(i,100);let n=null;j(()=>{requestAnimationFrame(i),window.addEventListener("scroll",o)}),Fe(()=>{l(location.hash)}),ve(()=>{window.removeEventListener("scroll",o)});function i(){if(!t.value)return;const f=window.scrollY,v=window.innerHeight,$=document.body.offsetHeight,V=Math.abs(f+v-$)<1,b=ce.map(({element:N,link:A})=>({link:A,top:kt(N)})).filter(({top:N})=>!Number.isNaN(N)).sort((N,A)=>N.top-A.top);if(!b.length){l(null);return}if(f<1){l(null);return}if(V){l(b[b.length-1].link);return}let P=null;for(const{link:N,top:A}of b){if(A>f+Oe()+4)break;P=N}l(P)}function l(f){n&&n.classList.remove("active"),f==null?n=null:n=s.value.querySelector(`a[href="${decodeURIComponent(f)}"]`);const v=n;v?(v.classList.add("active"),e.value.style.top=v.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function kt(s){let e=0;for(;s!==document.body;){if(s===null)return NaN;e+=s.offsetTop,s=s.offsetParent}return e}function bt(s,e,t){ce.length=0;const o=[],n=[];return s.forEach(i=>{const l={...i,children:[]};let f=n[n.length-1];for(;f&&f.level>=l.level;)n.pop(),f=n[n.length-1];if(l.element.classList.contains("ignore-header")||f&&"shouldIgnore"in f){n.push({level:l.level,shouldIgnore:!0});return}l.level>t||l.level{const n=W("VPDocOutlineItem",!0);return a(),u("ul",{class:M(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),u(w,null,H(t.headers,({children:i,link:l,title:f})=>(a(),u("li",null,[d("a",{class:"outline-link",href:l,onClick:e,title:f},I(f),9,gt),i!=null&&i.length?(a(),k(n,{key:0,headers:i},null,8,["headers"])):h("",!0)]))),256))],2)}}}),we=g($t,[["__scopeId","data-v-53c99d69"]]),yt={class:"content"},Pt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Lt=m({__name:"VPDocAsideOutline",setup(s){const{frontmatter:e,theme:t}=L(),o=ye([]);Q(()=>{o.value=he(e.value.outline??t.value.outline)});const n=T(),i=T();return _t(n,i),(l,f)=>(a(),u("nav",{"aria-labelledby":"doc-outline-aria-label",class:M(["VPDocAsideOutline",{"has-outline":o.value.length>0}]),ref_key:"container",ref:n},[d("div",yt,[d("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),d("div",Pt,I(r(Ie)(r(t))),1),_(we,{headers:o.value,root:!0},null,8,["headers"])])],2))}}),Vt=g(Lt,[["__scopeId","data-v-f610f197"]]),St={class:"VPDocAsideCarbonAds"},Tt=m({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(s){const e=()=>null;return(t,o)=>(a(),u("div",St,[_(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Nt={class:"VPDocAside"},Mt=m({__name:"VPDocAside",setup(s){const{theme:e}=L();return(t,o)=>(a(),u("div",Nt,[c(t.$slots,"aside-top",{},void 0,!0),c(t.$slots,"aside-outline-before",{},void 0,!0),_(Vt),c(t.$slots,"aside-outline-after",{},void 0,!0),o[0]||(o[0]=d("div",{class:"spacer"},null,-1)),c(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),k(Tt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):h("",!0),c(t.$slots,"aside-ads-after",{},void 0,!0),c(t.$slots,"aside-bottom",{},void 0,!0)]))}}),It=g(Mt,[["__scopeId","data-v-cb998dce"]]);function wt(){const{theme:s,page:e}=L();return y(()=>{const{text:t="Edit this page",pattern:o=""}=s.value.editLink||{};let n;return typeof o=="function"?n=o(e.value):n=o.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function At(){const{page:s,theme:e,frontmatter:t}=L();return y(()=>{var $,V,b,P,N,A,C,S;const o=Me(e.value.sidebar,s.value.relativePath),n=dt(o),i=Ct(n,B=>B.link.replace(/[?#].*$/,"")),l=i.findIndex(B=>K(s.value.relativePath,B.link)),f=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,v=((V=e.value.docFooter)==null?void 0:V.next)===!1&&!t.value.next||t.value.next===!1;return{prev:f?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((b=i[l-1])==null?void 0:b.docFooterText)??((P=i[l-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((N=i[l-1])==null?void 0:N.link)},next:v?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((A=i[l+1])==null?void 0:A.docFooterText)??((C=i[l+1])==null?void 0:C.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=i[l+1])==null?void 0:S.link)}}})}function Ct(s,e){const t=new Set;return s.filter(o=>{const n=e(o);return t.has(n)?!1:t.add(n)})}const D=m({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(s){const e=s,t=y(()=>e.tag??(e.href?"a":"span")),o=y(()=>e.href&&Pe.test(e.href)||e.target==="_blank");return(n,i)=>(a(),k(E(t.value),{class:M(["VPLink",{link:n.href,"vp-external-link-icon":o.value,"no-icon":n.noIcon}]),href:n.href?r(fe)(n.href):void 0,target:n.target??(o.value?"_blank":void 0),rel:n.rel??(o.value?"noreferrer":void 0)},{default:p(()=>[c(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Ht={class:"VPLastUpdated"},Bt=["datetime"],Et=m({__name:"VPDocFooterLastUpdated",setup(s){const{theme:e,page:t,lang:o}=L(),n=y(()=>new Date(t.value.lastUpdated)),i=y(()=>n.value.toISOString()),l=T("");return j(()=>{Y(()=>{var f,v,$;l.value=new Intl.DateTimeFormat((v=(f=e.value.lastUpdated)==null?void 0:f.formatOptions)!=null&&v.forceLocale?o.value:void 0,(($=e.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(f,v)=>{var $;return a(),u("p",Ht,[z(I((($=r(e).lastUpdated)==null?void 0:$.text)||r(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:i.value},I(l.value),9,Bt)])}}}),Dt=g(Et,[["__scopeId","data-v-1bb0c8a8"]]),Ft={key:0,class:"VPDocFooter"},Ot={key:0,class:"edit-info"},Gt={key:0,class:"edit-link"},Ut={key:1,class:"last-updated"},jt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},zt={class:"pager"},Kt=["innerHTML"],Wt=["innerHTML"],qt={class:"pager"},Rt=["innerHTML"],Jt=["innerHTML"],Xt=m({__name:"VPDocFooter",setup(s){const{theme:e,page:t,frontmatter:o}=L(),n=wt(),i=At(),l=y(()=>e.value.editLink&&o.value.editLink!==!1),f=y(()=>t.value.lastUpdated),v=y(()=>l.value||f.value||i.value.prev||i.value.next);return($,V)=>{var b,P,N,A;return v.value?(a(),u("footer",Ft,[c($.$slots,"doc-footer-before",{},void 0,!0),l.value||f.value?(a(),u("div",Ot,[l.value?(a(),u("div",Gt,[_(D,{class:"edit-link-button",href:r(n).url,"no-icon":!0},{default:p(()=>[V[0]||(V[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),z(" "+I(r(n).text),1)]),_:1},8,["href"])])):h("",!0),f.value?(a(),u("div",Ut,[_(Dt)])):h("",!0)])):h("",!0),(b=r(i).prev)!=null&&b.link||(P=r(i).next)!=null&&P.link?(a(),u("nav",jt,[V[1]||(V[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",zt,[(N=r(i).prev)!=null&&N.link?(a(),k(D,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:p(()=>{var C;return[d("span",{class:"desc",innerHTML:((C=r(e).docFooter)==null?void 0:C.prev)||"Previous page"},null,8,Kt),d("span",{class:"title",innerHTML:r(i).prev.text},null,8,Wt)]}),_:1},8,["href"])):h("",!0)]),d("div",qt,[(A=r(i).next)!=null&&A.link?(a(),k(D,{key:0,class:"pager-link next",href:r(i).next.link},{default:p(()=>{var C;return[d("span",{class:"desc",innerHTML:((C=r(e).docFooter)==null?void 0:C.next)||"Next page"},null,8,Rt),d("span",{class:"title",innerHTML:r(i).next.text},null,8,Jt)]}),_:1},8,["href"])):h("",!0)])])):h("",!0)])):h("",!0)}}}),Yt=g(Xt,[["__scopeId","data-v-1bcd8184"]]),Qt={class:"container"},Zt={class:"aside-container"},xt={class:"aside-content"},en={class:"content"},tn={class:"content-container"},nn={class:"main"},on=m({__name:"VPDoc",setup(s){const{theme:e}=L(),t=Z(),{hasSidebar:o,hasAside:n,leftAside:i}=O(),l=y(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(f,v)=>{const $=W("Content");return a(),u("div",{class:M(["VPDoc",{"has-sidebar":r(o),"has-aside":r(n)}])},[c(f.$slots,"doc-top",{},void 0,!0),d("div",Qt,[r(n)?(a(),u("div",{key:0,class:M(["aside",{"left-aside":r(i)}])},[v[0]||(v[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Zt,[d("div",xt,[_(It,null,{"aside-top":p(()=>[c(f.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":p(()=>[c(f.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":p(()=>[c(f.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":p(()=>[c(f.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":p(()=>[c(f.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":p(()=>[c(f.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):h("",!0),d("div",en,[d("div",tn,[c(f.$slots,"doc-before",{},void 0,!0),d("main",nn,[_($,{class:M(["vp-doc",[l.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),_(Yt,null,{"doc-footer-before":p(()=>[c(f.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(f.$slots,"doc-after",{},void 0,!0)])])]),c(f.$slots,"doc-bottom",{},void 0,!0)],2)}}}),sn=g(on,[["__scopeId","data-v-e6f2a212"]]),an=m({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(s){const e=s,t=y(()=>e.href&&Pe.test(e.href)),o=y(()=>e.tag||(e.href?"a":"button"));return(n,i)=>(a(),k(E(o.value),{class:M(["VPButton",[n.size,n.theme]]),href:n.href?r(fe)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:p(()=>[z(I(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),rn=g(an,[["__scopeId","data-v-93dc4167"]]),ln=["src","alt"],cn=m({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(s){return(e,t)=>{const o=W("VPImage",!0);return e.image?(a(),u(w,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),u("img",U({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(de)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,ln)):(a(),u(w,{key:1},[_(o,U({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),_(o,U({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):h("",!0)}}}),X=g(cn,[["__scopeId","data-v-ab19afbb"]]),un={class:"container"},dn={class:"main"},vn={key:0,class:"name"},pn=["innerHTML"],fn=["innerHTML"],hn=["innerHTML"],mn={key:0,class:"actions"},_n={key:0,class:"image"},kn={class:"image-container"},bn=m({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(s){const e=x("hero-image-slot-exists");return(t,o)=>(a(),u("div",{class:M(["VPHero",{"has-image":t.image||r(e)}])},[d("div",un,[d("div",dn,[c(t.$slots,"home-hero-info-before",{},void 0,!0),c(t.$slots,"home-hero-info",{},()=>[t.name?(a(),u("h1",vn,[d("span",{innerHTML:t.name,class:"clip"},null,8,pn)])):h("",!0),t.text?(a(),u("p",{key:1,innerHTML:t.text,class:"text"},null,8,fn)):h("",!0),t.tagline?(a(),u("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,hn)):h("",!0)],!0),c(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),u("div",mn,[(a(!0),u(w,null,H(t.actions,n=>(a(),u("div",{key:n.link,class:"action"},[_(rn,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):h("",!0),c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),u("div",_n,[d("div",kn,[o[0]||(o[0]=d("div",{class:"image-bg"},null,-1)),c(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(X,{key:0,class:"image-src",image:t.image},null,8,["image"])):h("",!0)],!0)])])):h("",!0)])],2))}}),gn=g(bn,[["__scopeId","data-v-b10c5094"]]),$n=m({__name:"VPHomeHero",setup(s){const{frontmatter:e}=L();return(t,o)=>r(e).hero?(a(),k(gn,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":p(()=>[c(t.$slots,"home-hero-info-before")]),"home-hero-info":p(()=>[c(t.$slots,"home-hero-info")]),"home-hero-info-after":p(()=>[c(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":p(()=>[c(t.$slots,"home-hero-actions-after")]),"home-hero-image":p(()=>[c(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):h("",!0)}}),yn={class:"box"},Pn={key:0,class:"icon"},Ln=["innerHTML"],Vn=["innerHTML"],Sn=["innerHTML"],Tn={key:4,class:"link-text"},Nn={class:"link-text-value"},Mn=m({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(s){return(e,t)=>(a(),k(D,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:p(()=>[d("article",yn,[typeof e.icon=="object"&&e.icon.wrap?(a(),u("div",Pn,[_(X,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(X,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),u("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Ln)):h("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Vn),e.details?(a(),u("p",{key:3,class:"details",innerHTML:e.details},null,8,Sn)):h("",!0),e.linkText?(a(),u("div",Tn,[d("p",Nn,[z(I(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):h("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),In=g(Mn,[["__scopeId","data-v-bd37d1a2"]]),wn={key:0,class:"VPFeatures"},An={class:"container"},Cn={class:"items"},Hn=m({__name:"VPFeatures",props:{features:{}},setup(s){const e=s,t=y(()=>{const o=e.features.length;if(o){if(o===2)return"grid-2";if(o===3)return"grid-3";if(o%3===0)return"grid-6";if(o>3)return"grid-4"}else return});return(o,n)=>o.features?(a(),u("div",wn,[d("div",An,[d("div",Cn,[(a(!0),u(w,null,H(o.features,i=>(a(),u("div",{key:i.title,class:M(["item",[t.value]])},[_(In,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):h("",!0)}}),Bn=g(Hn,[["__scopeId","data-v-b1eea84a"]]),En=m({__name:"VPHomeFeatures",setup(s){const{frontmatter:e}=L();return(t,o)=>r(e).features?(a(),k(Bn,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):h("",!0)}}),Dn=m({__name:"VPHomeContent",setup(s){const{width:e}=Ge({initialWidth:0,includeScrollbar:!1});return(t,o)=>(a(),u("div",{class:"vp-doc container",style:Le(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[c(t.$slots,"default",{},void 0,!0)],4))}}),Fn=g(Dn,[["__scopeId","data-v-c141a4bd"]]),On={class:"VPHome"},Gn=m({__name:"VPHome",setup(s){const{frontmatter:e}=L();return(t,o)=>{const n=W("Content");return a(),u("div",On,[c(t.$slots,"home-hero-before",{},void 0,!0),_($n,null,{"home-hero-info-before":p(()=>[c(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":p(()=>[c(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":p(()=>[c(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":p(()=>[c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":p(()=>[c(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(t.$slots,"home-hero-after",{},void 0,!0),c(t.$slots,"home-features-before",{},void 0,!0),_(En),c(t.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),k(Fn,{key:0},{default:p(()=>[_(n)]),_:1})):(a(),k(n,{key:1}))])}}}),Un=g(Gn,[["__scopeId","data-v-07b1ad08"]]),jn={},zn={class:"VPPage"};function Kn(s,e){const t=W("Content");return a(),u("div",zn,[c(s.$slots,"page-top"),_(t),c(s.$slots,"page-bottom")])}const Wn=g(jn,[["render",Kn]]),qn=m({__name:"VPContent",setup(s){const{page:e,frontmatter:t}=L(),{hasSidebar:o}=O();return(n,i)=>(a(),u("div",{class:M(["VPContent",{"has-sidebar":r(o),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?c(n.$slots,"not-found",{key:0},()=>[_(ct)],!0):r(t).layout==="page"?(a(),k(Wn,{key:1},{"page-top":p(()=>[c(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":p(()=>[c(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),k(Un,{key:2},{"home-hero-before":p(()=>[c(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":p(()=>[c(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":p(()=>[c(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":p(()=>[c(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":p(()=>[c(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":p(()=>[c(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":p(()=>[c(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":p(()=>[c(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":p(()=>[c(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),k(E(r(t).layout),{key:3})):(a(),k(sn,{key:4},{"doc-top":p(()=>[c(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":p(()=>[c(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":p(()=>[c(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":p(()=>[c(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":p(()=>[c(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":p(()=>[c(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":p(()=>[c(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":p(()=>[c(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":p(()=>[c(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":p(()=>[c(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":p(()=>[c(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Rn=g(qn,[["__scopeId","data-v-9a6c75ad"]]),Jn={class:"container"},Xn=["innerHTML"],Yn=["innerHTML"],Qn=m({__name:"VPFooter",setup(s){const{theme:e,frontmatter:t}=L(),{hasSidebar:o}=O();return(n,i)=>r(e).footer&&r(t).footer!==!1?(a(),u("footer",{key:0,class:M(["VPFooter",{"has-sidebar":r(o)}])},[d("div",Jn,[r(e).footer.message?(a(),u("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,Xn)):h("",!0),r(e).footer.copyright?(a(),u("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,Yn)):h("",!0)])],2)):h("",!0)}}),Zn=g(Qn,[["__scopeId","data-v-566314d4"]]);function xn(){const{theme:s,frontmatter:e}=L(),t=ye([]),o=y(()=>t.value.length>0);return Q(()=>{t.value=he(e.value.outline??s.value.outline)}),{headers:t,hasLocalNav:o}}const eo={class:"menu-text"},to={class:"header"},no={class:"outline"},oo=m({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(s){const e=s,{theme:t}=L(),o=T(!1),n=T(0),i=T(),l=T();function f(b){var P;(P=i.value)!=null&&P.contains(b.target)||(o.value=!1)}F(o,b=>{if(b){document.addEventListener("click",f);return}document.removeEventListener("click",f)}),re("Escape",()=>{o.value=!1}),Q(()=>{o.value=!1});function v(){o.value=!o.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(b){b.target.classList.contains("outline-link")&&(l.value&&(l.value.style.transition="none"),Ve(()=>{o.value=!1}))}function V(){o.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(b,P)=>(a(),u("div",{class:"VPLocalNavOutlineDropdown",style:Le({"--vp-vh":n.value+"px"}),ref_key:"main",ref:i},[b.headers.length>0?(a(),u("button",{key:0,onClick:v,class:M({open:o.value})},[d("span",eo,I(r(Ie)(r(t))),1),P[0]||(P[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(a(),u("button",{key:1,onClick:V},I(r(t).returnToTopLabel||"Return to top"),1)),_(ue,{name:"flyout"},{default:p(()=>[o.value?(a(),u("div",{key:0,ref_key:"items",ref:l,class:"items",onClick:$},[d("div",to,[d("a",{class:"top-link",href:"#",onClick:V},I(r(t).returnToTopLabel||"Return to top"),1)]),d("div",no,[_(we,{headers:b.headers},null,8,["headers"])])],512)):h("",!0)]),_:1})],4))}}),so=g(oo,[["__scopeId","data-v-883964e0"]]),ao={class:"container"},ro=["aria-expanded"],io={class:"menu-text"},lo=m({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(s){const{theme:e,frontmatter:t}=L(),{hasSidebar:o}=O(),{headers:n}=xn(),{y:i}=Se(),l=T(0);j(()=>{l.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),Q(()=>{n.value=he(t.value.outline??e.value.outline)});const f=y(()=>n.value.length===0),v=y(()=>f.value&&!o.value),$=y(()=>({VPLocalNav:!0,"has-sidebar":o.value,empty:f.value,fixed:v.value}));return(V,b)=>r(t).layout!=="home"&&(!v.value||r(i)>=l.value)?(a(),u("div",{key:0,class:M($.value)},[d("div",ao,[r(o)?(a(),u("button",{key:0,class:"menu","aria-expanded":V.open,"aria-controls":"VPSidebarNav",onClick:b[0]||(b[0]=P=>V.$emit("open-menu"))},[b[1]||(b[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",io,I(r(e).sidebarMenuLabel||"Menu"),1)],8,ro)):h("",!0),_(so,{headers:r(n),navHeight:l.value},null,8,["headers","navHeight"])])],2)):h("",!0)}}),co=g(lo,[["__scopeId","data-v-2488c25a"]]);function uo(){const s=T(!1);function e(){s.value=!0,window.addEventListener("resize",n)}function t(){s.value=!1,window.removeEventListener("resize",n)}function o(){s.value?t():e()}function n(){window.outerWidth>=768&&t()}const i=Z();return F(()=>i.path,t),{isScreenOpen:s,openScreen:e,closeScreen:t,toggleScreen:o}}const vo={},po={class:"VPSwitch",type:"button",role:"switch"},fo={class:"check"},ho={key:0,class:"icon"};function mo(s,e){return a(),u("button",po,[d("span",fo,[s.$slots.default?(a(),u("span",ho,[c(s.$slots,"default",{},void 0,!0)])):h("",!0)])])}const _o=g(vo,[["render",mo],["__scopeId","data-v-b4ccac88"]]),ko=m({__name:"VPSwitchAppearance",setup(s){const{isDark:e,theme:t}=L(),o=x("toggle-appearance",()=>{e.value=!e.value}),n=T("");return pe(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,l)=>(a(),k(_o,{title:n.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(o)},{default:p(()=>l[0]||(l[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1},8,["title","aria-checked","onClick"]))}}),me=g(ko,[["__scopeId","data-v-be9742d9"]]),bo={key:0,class:"VPNavBarAppearance"},go=m({__name:"VPNavBarAppearance",setup(s){const{site:e}=L();return(t,o)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",bo,[_(me)])):h("",!0)}}),$o=g(go,[["__scopeId","data-v-3f90c1a5"]]),_e=T();let Ae=!1,se=0;function yo(s){const e=T(!1);if(ee){!Ae&&Po(),se++;const t=F(_e,o=>{var n,i,l;o===s.el.value||(n=s.el.value)!=null&&n.contains(o)?(e.value=!0,(i=s.onFocus)==null||i.call(s)):(e.value=!1,(l=s.onBlur)==null||l.call(s))});ve(()=>{t(),se--,se||Lo()})}return Ue(e)}function Po(){document.addEventListener("focusin",Ce),Ae=!0,_e.value=document.activeElement}function Lo(){document.removeEventListener("focusin",Ce)}function Ce(){_e.value=document.activeElement}const Vo={class:"VPMenuLink"},So=["innerHTML"],To=m({__name:"VPMenuLink",props:{item:{}},setup(s){const{page:e}=L();return(t,o)=>(a(),u("div",Vo,[_(D,{class:M({active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,So)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),te=g(To,[["__scopeId","data-v-7eeeb2dc"]]),No={class:"VPMenuGroup"},Mo={key:0,class:"title"},Io=m({__name:"VPMenuGroup",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",No,[e.text?(a(),u("p",Mo,I(e.text),1)):h("",!0),(a(!0),u(w,null,H(e.items,o=>(a(),u(w,null,["link"in o?(a(),k(te,{key:0,item:o},null,8,["item"])):h("",!0)],64))),256))]))}}),wo=g(Io,[["__scopeId","data-v-a6b0397c"]]),Ao={class:"VPMenu"},Co={key:0,class:"items"},Ho=m({__name:"VPMenu",props:{items:{}},setup(s){return(e,t)=>(a(),u("div",Ao,[e.items?(a(),u("div",Co,[(a(!0),u(w,null,H(e.items,o=>(a(),u(w,{key:JSON.stringify(o)},["link"in o?(a(),k(te,{key:0,item:o},null,8,["item"])):"component"in o?(a(),k(E(o.component),U({key:1,ref_for:!0},o.props),null,16)):(a(),k(wo,{key:2,text:o.text,items:o.items},null,8,["text","items"]))],64))),128))])):h("",!0),c(e.$slots,"default",{},void 0,!0)]))}}),Bo=g(Ho,[["__scopeId","data-v-20ed86d6"]]),Eo=["aria-expanded","aria-label"],Do={key:0,class:"text"},Fo=["innerHTML"],Oo={key:1,class:"vpi-more-horizontal icon"},Go={class:"menu"},Uo=m({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(s){const e=T(!1),t=T();yo({el:t,onBlur:o});function o(){e.value=!1}return(n,i)=>(a(),u("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=l=>e.value=!0),onMouseleave:i[2]||(i[2]=l=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:i[0]||(i[0]=l=>e.value=!e.value)},[n.button||n.icon?(a(),u("span",Do,[n.icon?(a(),u("span",{key:0,class:M([n.icon,"option-icon"])},null,2)):h("",!0),n.button?(a(),u("span",{key:1,innerHTML:n.button},null,8,Fo)):h("",!0),i[3]||(i[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(a(),u("span",Oo))],8,Eo),d("div",Go,[_(Bo,{items:n.items},{default:p(()=>[c(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),ke=g(Uo,[["__scopeId","data-v-bfe7971f"]]),jo=["href","aria-label","innerHTML"],zo=m({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(s){const e=s,t=T();j(async()=>{var i;await Ve();const n=(i=t.value)==null?void 0:i.children[0];n instanceof HTMLElement&&n.className.startsWith("vpi-social-")&&(getComputedStyle(n).maskImage||getComputedStyle(n).webkitMaskImage)==="none"&&n.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const o=y(()=>typeof e.icon=="object"?e.icon.svg:``);return(n,i)=>(a(),u("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:n.link,"aria-label":n.ariaLabel??(typeof n.icon=="string"?n.icon:""),target:"_blank",rel:"noopener",innerHTML:o.value},null,8,jo))}}),Ko=g(zo,[["__scopeId","data-v-60a9a2d3"]]),Wo={class:"VPSocialLinks"},qo=m({__name:"VPSocialLinks",props:{links:{}},setup(s){return(e,t)=>(a(),u("div",Wo,[(a(!0),u(w,null,H(e.links,({link:o,icon:n,ariaLabel:i})=>(a(),k(Ko,{key:o,icon:n,link:o,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),be=g(qo,[["__scopeId","data-v-e71e869c"]]),Ro={key:0,class:"group translations"},Jo={class:"trans-title"},Xo={key:1,class:"group"},Yo={class:"item appearance"},Qo={class:"label"},Zo={class:"appearance-action"},xo={key:2,class:"group"},es={class:"item social-links"},ts=m({__name:"VPNavBarExtra",setup(s){const{site:e,theme:t}=L(),{localeLinks:o,currentLang:n}=R({correspondingLink:!0}),i=y(()=>o.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(l,f)=>i.value?(a(),k(ke,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:p(()=>[r(o).length&&r(n).label?(a(),u("div",Ro,[d("p",Jo,I(r(n).label),1),(a(!0),u(w,null,H(r(o),v=>(a(),k(te,{key:v.link,item:v},null,8,["item"]))),128))])):h("",!0),r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",Xo,[d("div",Yo,[d("p",Qo,I(r(t).darkModeSwitchLabel||"Appearance"),1),d("div",Zo,[_(me)])])])):h("",!0),r(t).socialLinks?(a(),u("div",xo,[d("div",es,[_(be,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):h("",!0)]),_:1})):h("",!0)}}),ns=g(ts,[["__scopeId","data-v-f953d92f"]]),os=["aria-expanded"],ss=m({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(s){return(e,t)=>(a(),u("button",{type:"button",class:M(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=o=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,os))}}),as=g(ss,[["__scopeId","data-v-6bee1efd"]]),rs=["innerHTML"],is=m({__name:"VPNavBarMenuLink",props:{item:{}},setup(s){const{page:e}=L();return(t,o)=>(a(),k(D,{class:M({VPNavBarMenuLink:!0,active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,rs)]),_:1},8,["class","href","target","rel","no-icon"]))}}),ls=g(is,[["__scopeId","data-v-815115f5"]]),cs=m({__name:"VPNavBarMenuGroup",props:{item:{}},setup(s){const e=s,{page:t}=L(),o=i=>"component"in i?!1:"link"in i?K(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(o),n=y(()=>o(e.item));return(i,l)=>(a(),k(ke,{class:M({VPNavBarMenuGroup:!0,active:r(K)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||n.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),us={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},ds=m({__name:"VPNavBarMenu",setup(s){const{theme:e}=L();return(t,o)=>r(e).nav?(a(),u("nav",us,[o[0]||(o[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(a(!0),u(w,null,H(r(e).nav,n=>(a(),u(w,{key:JSON.stringify(n)},["link"in n?(a(),k(ls,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),U({key:1,ref_for:!0},n.props),null,16)):(a(),k(cs,{key:2,item:n},null,8,["item"]))],64))),128))])):h("",!0)}}),vs=g(ds,[["__scopeId","data-v-afb2845e"]]);function ps(s){const{localeIndex:e,theme:t}=L();function o(n){var A,C,S;const i=n.split("."),l=(A=t.value.search)==null?void 0:A.options,f=l&&typeof l=="object",v=f&&((S=(C=l.locales)==null?void 0:C[e.value])==null?void 0:S.translations)||null,$=f&&l.translations||null;let V=v,b=$,P=s;const N=i.pop();for(const B of i){let G=null;const q=P==null?void 0:P[B];q&&(G=P=q);const ne=b==null?void 0:b[B];ne&&(G=b=ne);const oe=V==null?void 0:V[B];oe&&(G=V=oe),q||(P=G),ne||(b=G),oe||(V=G)}return(V==null?void 0:V[N])??(b==null?void 0:b[N])??(P==null?void 0:P[N])??""}return o}const fs=["aria-label"],hs={class:"DocSearch-Button-Container"},ms={class:"DocSearch-Button-Placeholder"},ge=m({__name:"VPNavBarSearchButton",setup(s){const t=ps({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(o,n)=>(a(),u("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[d("span",hs,[n[0]||(n[0]=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),d("span",ms,I(r(t)("button.buttonText")),1)]),n[1]||(n[1]=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,fs))}}),_s={class:"VPNavBarSearch"},ks={id:"local-search"},bs={key:1,id:"docsearch"},gs=m({__name:"VPNavBarSearch",setup(s){const e=je(()=>ze(()=>import("./VPLocalSearchBox.2WiG7WtP.js"),__vite__mapDeps([0,1]))),t=()=>null,{theme:o}=L(),n=T(!1),i=T(!1);j(()=>{});function l(){n.value||(n.value=!0,setTimeout(f,16))}function f(){const b=new Event("keydown");b.key="k",b.metaKey=!0,window.dispatchEvent(b),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||f()},16)}function v(b){const P=b.target,N=P.tagName;return P.isContentEditable||N==="INPUT"||N==="SELECT"||N==="TEXTAREA"}const $=T(!1);re("k",b=>{(b.ctrlKey||b.metaKey)&&(b.preventDefault(),$.value=!0)}),re("/",b=>{v(b)||(b.preventDefault(),$.value=!0)});const V="local";return(b,P)=>{var N;return a(),u("div",_s,[r(V)==="local"?(a(),u(w,{key:0},[$.value?(a(),k(r(e),{key:0,onClose:P[0]||(P[0]=A=>$.value=!1)})):h("",!0),d("div",ks,[_(ge,{onClick:P[1]||(P[1]=A=>$.value=!0)})])],64)):r(V)==="algolia"?(a(),u(w,{key:1},[n.value?(a(),k(r(t),{key:0,algolia:((N=r(o).search)==null?void 0:N.options)??r(o).algolia,onVnodeBeforeMount:P[2]||(P[2]=A=>i.value=!0)},null,8,["algolia"])):h("",!0),i.value?h("",!0):(a(),u("div",bs,[_(ge,{onClick:l})]))],64)):h("",!0)])}}}),$s=m({__name:"VPNavBarSocialLinks",setup(s){const{theme:e}=L();return(t,o)=>r(e).socialLinks?(a(),k(be,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):h("",!0)}}),ys=g($s,[["__scopeId","data-v-ef6192dc"]]),Ps=["href","rel","target"],Ls=["innerHTML"],Vs={key:2},Ss=m({__name:"VPNavBarTitle",setup(s){const{site:e,theme:t}=L(),{hasSidebar:o}=O(),{currentLang:n}=R(),i=y(()=>{var v;return typeof t.value.logoLink=="string"?t.value.logoLink:(v=t.value.logoLink)==null?void 0:v.link}),l=y(()=>{var v;return typeof t.value.logoLink=="string"||(v=t.value.logoLink)==null?void 0:v.rel}),f=y(()=>{var v;return typeof t.value.logoLink=="string"||(v=t.value.logoLink)==null?void 0:v.target});return(v,$)=>(a(),u("div",{class:M(["VPNavBarTitle",{"has-sidebar":r(o)}])},[d("a",{class:"title",href:i.value??r(fe)(r(n).link),rel:l.value,target:f.value},[c(v.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),k(X,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):h("",!0),r(t).siteTitle?(a(),u("span",{key:1,innerHTML:r(t).siteTitle},null,8,Ls)):r(t).siteTitle===void 0?(a(),u("span",Vs,I(r(e).title),1)):h("",!0),c(v.$slots,"nav-bar-title-after",{},void 0,!0)],8,Ps)],2))}}),Ts=g(Ss,[["__scopeId","data-v-9f43907a"]]),Ns={class:"items"},Ms={class:"title"},Is=m({__name:"VPNavBarTranslations",setup(s){const{theme:e}=L(),{localeLinks:t,currentLang:o}=R({correspondingLink:!0});return(n,i)=>r(t).length&&r(o).label?(a(),k(ke,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:p(()=>[d("div",Ns,[d("p",Ms,I(r(o).label),1),(a(!0),u(w,null,H(r(t),l=>(a(),k(te,{key:l.link,item:l},null,8,["item"]))),128))])]),_:1},8,["label"])):h("",!0)}}),ws=g(Is,[["__scopeId","data-v-acee064b"]]),As={class:"wrapper"},Cs={class:"container"},Hs={class:"title"},Bs={class:"content"},Es={class:"content-body"},Ds=m({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(s){const e=s,{y:t}=Se(),{hasSidebar:o}=O(),{frontmatter:n}=L(),i=T({});return pe(()=>{i.value={"has-sidebar":o.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(l,f)=>(a(),u("div",{class:M(["VPNavBar",i.value])},[d("div",As,[d("div",Cs,[d("div",Hs,[_(Ts,null,{"nav-bar-title-before":p(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":p(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Bs,[d("div",Es,[c(l.$slots,"nav-bar-content-before",{},void 0,!0),_(gs,{class:"search"}),_(vs,{class:"menu"}),_(ws,{class:"translations"}),_($o,{class:"appearance"}),_(ys,{class:"social-links"}),_(ns,{class:"extra"}),c(l.$slots,"nav-bar-content-after",{},void 0,!0),_(as,{class:"hamburger",active:l.isScreenOpen,onClick:f[0]||(f[0]=v=>l.$emit("toggle-screen"))},null,8,["active"])])])])]),f[1]||(f[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),Fs=g(Ds,[["__scopeId","data-v-9fd4d1dd"]]),Os={key:0,class:"VPNavScreenAppearance"},Gs={class:"text"},Us=m({__name:"VPNavScreenAppearance",setup(s){const{site:e,theme:t}=L();return(o,n)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",Os,[d("p",Gs,I(r(t).darkModeSwitchLabel||"Appearance"),1),_(me)])):h("",!0)}}),js=g(Us,[["__scopeId","data-v-a3e2920d"]]),zs=["innerHTML"],Ks=m({__name:"VPNavScreenMenuLink",props:{item:{}},setup(s){const e=x("close-screen");return(t,o)=>(a(),k(D,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:r(e)},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,zs)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ws=g(Ks,[["__scopeId","data-v-fa963d97"]]),qs=["innerHTML"],Rs=m({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(s){const e=x("close-screen");return(t,o)=>(a(),k(D,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:r(e)},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,qs)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),He=g(Rs,[["__scopeId","data-v-e04f3e85"]]),Js={class:"VPNavScreenMenuGroupSection"},Xs={key:0,class:"title"},Ys=m({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",Js,[e.text?(a(),u("p",Xs,I(e.text),1)):h("",!0),(a(!0),u(w,null,H(e.items,o=>(a(),k(He,{key:o.text,item:o},null,8,["item"]))),128))]))}}),Qs=g(Ys,[["__scopeId","data-v-f60dbfa7"]]),Zs=["aria-controls","aria-expanded"],xs=["innerHTML"],ea=["id"],ta={key:0,class:"item"},na={key:1,class:"item"},oa={key:2,class:"group"},sa=m({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(s){const e=s,t=T(!1),o=y(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(i,l)=>(a(),u("div",{class:M(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":o.value,"aria-expanded":t.value,onClick:n},[d("span",{class:"button-text",innerHTML:i.text},null,8,xs),l[0]||(l[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,Zs),d("div",{id:o.value,class:"items"},[(a(!0),u(w,null,H(i.items,f=>(a(),u(w,{key:JSON.stringify(f)},["link"in f?(a(),u("div",ta,[_(He,{item:f},null,8,["item"])])):"component"in f?(a(),u("div",na,[(a(),k(E(f.component),U({ref_for:!0},f.props,{"screen-menu":""}),null,16))])):(a(),u("div",oa,[_(Qs,{text:f.text,items:f.items},null,8,["text","items"])]))],64))),128))],8,ea)],2))}}),aa=g(sa,[["__scopeId","data-v-d99bfeec"]]),ra={key:0,class:"VPNavScreenMenu"},ia=m({__name:"VPNavScreenMenu",setup(s){const{theme:e}=L();return(t,o)=>r(e).nav?(a(),u("nav",ra,[(a(!0),u(w,null,H(r(e).nav,n=>(a(),u(w,{key:JSON.stringify(n)},["link"in n?(a(),k(Ws,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),U({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(aa,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):h("",!0)}}),la=m({__name:"VPNavScreenSocialLinks",setup(s){const{theme:e}=L();return(t,o)=>r(e).socialLinks?(a(),k(be,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):h("",!0)}}),ca={class:"list"},ua=m({__name:"VPNavScreenTranslations",setup(s){const{localeLinks:e,currentLang:t}=R({correspondingLink:!0}),o=T(!1);function n(){o.value=!o.value}return(i,l)=>r(e).length&&r(t).label?(a(),u("div",{key:0,class:M(["VPNavScreenTranslations",{open:o.value}])},[d("button",{class:"title",onClick:n},[l[0]||(l[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),z(" "+I(r(t).label)+" ",1),l[1]||(l[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",ca,[(a(!0),u(w,null,H(r(e),f=>(a(),u("li",{key:f.link,class:"item"},[_(D,{class:"link",href:f.link},{default:p(()=>[z(I(f.text),1)]),_:2},1032,["href"])]))),128))])],2)):h("",!0)}}),da=g(ua,[["__scopeId","data-v-516e4bc3"]]),va={class:"container"},pa=m({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(s){const e=T(null),t=Te(ee?document.body:null);return(o,n)=>(a(),k(ue,{name:"fade",onEnter:n[0]||(n[0]=i=>t.value=!0),onAfterLeave:n[1]||(n[1]=i=>t.value=!1)},{default:p(()=>[o.open?(a(),u("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",va,[c(o.$slots,"nav-screen-content-before",{},void 0,!0),_(ia,{class:"menu"}),_(da,{class:"translations"}),_(js,{class:"appearance"}),_(la,{class:"social-links"}),c(o.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):h("",!0)]),_:3}))}}),fa=g(pa,[["__scopeId","data-v-2dd6d0c7"]]),ha={key:0,class:"VPNav"},ma=m({__name:"VPNav",setup(s){const{isScreenOpen:e,closeScreen:t,toggleScreen:o}=uo(),{frontmatter:n}=L(),i=y(()=>n.value.navbar!==!1);return Ne("close-screen",t),Y(()=>{ee&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(l,f)=>i.value?(a(),u("header",ha,[_(Fs,{"is-screen-open":r(e),onToggleScreen:r(o)},{"nav-bar-title-before":p(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":p(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":p(()=>[c(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":p(()=>[c(l.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),_(fa,{open:r(e)},{"nav-screen-content-before":p(()=>[c(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":p(()=>[c(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):h("",!0)}}),_a=g(ma,[["__scopeId","data-v-7ad780c2"]]),ka=["role","tabindex"],ba={key:1,class:"items"},ga=m({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(s){const e=s,{collapsed:t,collapsible:o,isLink:n,isActiveLink:i,hasActiveLink:l,hasChildren:f,toggle:v}=pt(y(()=>e.item)),$=y(()=>f.value?"section":"div"),V=y(()=>n.value?"a":"div"),b=y(()=>f.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=y(()=>n.value?void 0:"button"),N=y(()=>[[`level-${e.depth}`],{collapsible:o.value},{collapsed:t.value},{"is-link":n.value},{"is-active":i.value},{"has-active":l.value}]);function A(S){"key"in S&&S.key!=="Enter"||!e.item.link&&v()}function C(){e.item.link&&v()}return(S,B)=>{const G=W("VPSidebarItem",!0);return a(),k(E($.value),{class:M(["VPSidebarItem",N.value])},{default:p(()=>[S.item.text?(a(),u("div",U({key:0,class:"item",role:P.value},Ke(S.item.items?{click:A,keydown:A}:{},!0),{tabindex:S.item.items&&0}),[B[1]||(B[1]=d("div",{class:"indicator"},null,-1)),S.item.link?(a(),k(D,{key:0,tag:V.value,class:"link",href:S.item.link,rel:S.item.rel,target:S.item.target},{default:p(()=>[(a(),k(E(b.value),{class:"text",innerHTML:S.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(E(b.value),{key:1,class:"text",innerHTML:S.item.text},null,8,["innerHTML"])),S.item.collapsed!=null&&S.item.items&&S.item.items.length?(a(),u("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:C,onKeydown:We(C,["enter"]),tabindex:"0"},B[0]||(B[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):h("",!0)],16,ka)):h("",!0),S.item.items&&S.item.items.length?(a(),u("div",ba,[S.depth<5?(a(!0),u(w,{key:0},H(S.item.items,q=>(a(),k(G,{key:q.text,item:q,depth:S.depth+1},null,8,["item","depth"]))),128)):h("",!0)])):h("",!0)]),_:1},8,["class"])}}}),$a=g(ga,[["__scopeId","data-v-edd2eed8"]]),ya=m({__name:"VPSidebarGroup",props:{items:{}},setup(s){const e=T(!0);let t=null;return j(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),qe(()=>{t!=null&&(clearTimeout(t),t=null)}),(o,n)=>(a(!0),u(w,null,H(o.items,i=>(a(),u("div",{key:i.text,class:M(["group",{"no-transition":e.value}])},[_($a,{item:i,depth:0},null,8,["item"])],2))),128))}}),Pa=g(ya,[["__scopeId","data-v-51288d80"]]),La={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Va=m({__name:"VPSidebar",props:{open:{type:Boolean}},setup(s){const{sidebarGroups:e,hasSidebar:t}=O(),o=s,n=T(null),i=Te(ee?document.body:null);F([o,n],()=>{var f;o.open?(i.value=!0,(f=n.value)==null||f.focus()):i.value=!1},{immediate:!0,flush:"post"});const l=T(0);return F(e,()=>{l.value+=1},{deep:!0}),(f,v)=>r(t)?(a(),u("aside",{key:0,class:M(["VPSidebar",{open:f.open}]),ref_key:"navEl",ref:n,onClick:v[0]||(v[0]=Re(()=>{},["stop"]))},[v[2]||(v[2]=d("div",{class:"curtain"},null,-1)),d("nav",La,[v[1]||(v[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),c(f.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k(Pa,{items:r(e),key:l.value},null,8,["items"])),c(f.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):h("",!0)}}),Sa=g(Va,[["__scopeId","data-v-42c4c606"]]),Ta=m({__name:"VPSkipLink",setup(s){const e=Z(),t=T();F(()=>e.path,()=>t.value.focus());function o({target:n}){const i=document.getElementById(decodeURIComponent(n.hash).slice(1));if(i){const l=()=>{i.removeAttribute("tabindex"),i.removeEventListener("blur",l)};i.setAttribute("tabindex","-1"),i.addEventListener("blur",l),i.focus(),window.scrollTo(0,0)}}return(n,i)=>(a(),u(w,null,[d("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o}," Skip to content ")],64))}}),Na=g(Ta,[["__scopeId","data-v-c8291ffa"]]),Ma=m({__name:"Layout",setup(s){const{isOpen:e,open:t,close:o}=O(),n=Z();F(()=>n.path,o),vt(e,o);const{frontmatter:i}=L(),l=Je(),f=y(()=>!!l["home-hero-image"]);return Ne("hero-image-slot-exists",f),(v,$)=>{const V=W("Content");return r(i).layout!==!1?(a(),u("div",{key:0,class:M(["Layout",r(i).pageClass])},[c(v.$slots,"layout-top",{},void 0,!0),_(Na),_(xe,{class:"backdrop",show:r(e),onClick:r(o)},null,8,["show","onClick"]),_(_a,null,{"nav-bar-title-before":p(()=>[c(v.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":p(()=>[c(v.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":p(()=>[c(v.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":p(()=>[c(v.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":p(()=>[c(v.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":p(()=>[c(v.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),_(co,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),_(Sa,{open:r(e)},{"sidebar-nav-before":p(()=>[c(v.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":p(()=>[c(v.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),_(Rn,null,{"page-top":p(()=>[c(v.$slots,"page-top",{},void 0,!0)]),"page-bottom":p(()=>[c(v.$slots,"page-bottom",{},void 0,!0)]),"not-found":p(()=>[c(v.$slots,"not-found",{},void 0,!0)]),"home-hero-before":p(()=>[c(v.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":p(()=>[c(v.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":p(()=>[c(v.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":p(()=>[c(v.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":p(()=>[c(v.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":p(()=>[c(v.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":p(()=>[c(v.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":p(()=>[c(v.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":p(()=>[c(v.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":p(()=>[c(v.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":p(()=>[c(v.$slots,"doc-before",{},void 0,!0)]),"doc-after":p(()=>[c(v.$slots,"doc-after",{},void 0,!0)]),"doc-top":p(()=>[c(v.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":p(()=>[c(v.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":p(()=>[c(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":p(()=>[c(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":p(()=>[c(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":p(()=>[c(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":p(()=>[c(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":p(()=>[c(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),_(Zn),c(v.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(V,{key:1}))}}}),Ia=g(Ma,[["__scopeId","data-v-d8b57b2d"]]),$e={Layout:Ia,enhanceApp:({app:s})=>{s.component("Badge",Ye)}},Aa={extends:$e,Layout:()=>Xe($e.Layout,null,{}),enhanceApp({app:s,router:e,siteData:t}){}};export{Aa as R,ps as c,L as u}; diff --git a/pr-528/assets/chunks/timeline-definition-3ZMEY6HS.CUUEMNH4.js b/pr-528/assets/chunks/timeline-definition-3ZMEY6HS.CUUEMNH4.js new file mode 100644 index 000000000..b6146d793 --- /dev/null +++ b/pr-528/assets/chunks/timeline-definition-3ZMEY6HS.CUUEMNH4.js @@ -0,0 +1,61 @@ +import{_ as s,aj as xt,ak as kt,v as vt,j as q,d as _t,l as T,a8 as bt,al as wt,am as St,an as Et}from"../app.CKrDwBa1.js";import{d as nt}from"./arc.BNNkY6t3.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";var X=function(){var n=s(function(f,i,a,d){for(a=a||{},d=f.length;d--;a[f[d]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],h=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,d,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var d=new Error(i);throw d.hash=a,d}},"parseError"),parse:s(function(i){var a=this,d=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,P=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),E={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(E.yy[b]=this.yy[b]);v.setInput(i,E.yy),E.yy.lexer=v,E.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var L=v.yylloc;o.push(L);var A=v.options&&v.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(I){d.length=d.length-2*I,y.length=y.length-I,o.length=o.length-I}s(R,"popStack");function F(){var I;return I=u.pop()||v.lex()||J,typeof I!="number"&&(I instanceof Array&&(u=I,I=u.pop()),I=a.symbols_[I]||I),I}s(F,"lex");for(var w,C,N,K,z={},j,$,et,G;;){if(C=d[d.length-1],this.defaultActions[C]?N=this.defaultActions[C]:((w===null||typeof w>"u")&&(w=F()),N=S[C]&&S[C][w]),typeof N>"u"||!N.length||!N[0]){var Q="";G=[];for(j in S[C])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`: +`+v.showPosition()+` +Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:L,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+w);switch(N[0]){case 1:d.push(w),y.push(v.yytext),o.push(v.yylloc),d.push(N[1]),w=null,P=v.yyleng,k=v.yytext,M=v.yylineno,L=v.yylloc;break;case 2:if($=this.productions_[N[1]][1],z.$=y[y.length-$],z._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},A&&(z._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(z,[k,P,M,E.yy,N[1],y,o].concat(O)),typeof K<"u")return K;$&&(d=d.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),d.push(this.productions_[N[1]][0]),y.push(z.$),o.push(z._$),et=S[d[d.length-2]][d[d.length-1]],d.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,d){if(this.yy.parser)this.yy.parser.parseError(a,d);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,d=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var y=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:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:s(function(i,a){var d,u,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),u=i[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],d=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var o in y)this[o]=y[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,d,u;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),o=0;oa[0].length)){if(a=d,u=o,this.options.backtrack_lexer){if(i=this.test_match(d,y[o]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,y[u]),i!==!1?i:!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:s(function(){var a=this.next();return a||this.lex()},"lex"),begin:s(function(a){this.conditionStack.push(a)},"begin"),popState:s(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,d,u,y){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f}();p.lexer=x;function _(){this.yy={}}return s(_,"Parser"),_.prototype=p,p.Parser=_,new _}();X.parser=X;var Tt=X,at={};xt(at,{addEvent:()=>yt,addSection:()=>ht,addTask:()=>pt,addTaskOrg:()=>gt,clear:()=>ct,default:()=>It,getCommonDb:()=>ot,getSections:()=>dt,getTasks:()=>ut});var V="",lt=0,Y=[],U=[],W=[],ot=s(()=>kt,"getCommonDb"),ct=s(function(){Y.length=0,U.length=0,V="",W.length=0,vt()},"clear"),ht=s(function(n){V=n,Y.push(n)},"addSection"),dt=s(function(){return Y},"getSections"),ut=s(function(){let n=rt();const t=100;let e=0;for(;!n&&ee.id===lt-1).events.push(n)},"addEvent"),gt=s(function(n){const t={section:V,type:V,description:n,task:n,classes:[]};U.push(t)},"addTaskOrg"),rt=s(function(){const n=s(function(e){return W[e].processed},"compileTask");let t=!0;for(const[e,l]of W.entries())n(e),t=t&&l.processed;return t},"compileTasks"),It={clear:ct,getCommonDb:ot,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt},Nt=12,Z=s(function(n,t){const e=n.append("rect");return 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),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Lt=s(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=n.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(m){const p=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(h,"smile");function c(m){const p=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(c,"sad");function g(m){m.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(g,"ambivalent"),t.score>3?h(r):t.score<3?c(r):g(r),l},"drawFace"),Mt=s(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ft=s(function(n,t){const e=t.text.replace(//gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const r=l.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(e),l},"drawText"),$t=s(function(n,t){function e(r,h,c,g,m){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+g-m)+" "+(r+c-m*1.2)+","+(h+g)+" "+r+","+(h+g)}s(e,"genPoints");const l=n.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},"drawLabel"),Pt=s(function(n,t,e){const l=n.append("g"),r=D();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=e.width,r.height=e.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,Z(l,r),mt(e)(t.text,l,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),it=-1,At=s(function(n,t,e){const l=t.x+e.width/2,r=n.append("g");it++;const h=300+5*30;r.append("line").attr("id","task"+it).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(r,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=D();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,Z(r,c),mt(e)(t.task,r,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),Ct=s(function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ht=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),D=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt=function(){function n(r,h,c,g,m,p,x,_){const f=h.append("text").attr("x",c+m/2).attr("y",g+p/2+5).style("font-color",_).style("text-anchor","middle").text(r);l(f,x)}s(n,"byText");function t(r,h,c,g,m,p,x,_,f){const{taskFontSize:i,taskFontFamily:a}=_,d=r.split(//gi);for(let u=0;u)/).reverse(),r,h=[],c=1.1,g=e.attr("y"),m=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",m+"em");for(let x=0;xt||r==="
    ")&&(h.pop(),p.text(h.join(" ").trim()),r==="
    "?h=[""]:h=[r],p=e.append("tspan").attr("x",0).attr("y",g).attr("dy",c+"em").text(r))})}s(tt,"wrap");var Ft=s(function(n,t,e,l){var _;const r=e%Nt-1,h=n.append("g");t.section=r,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+r));const c=h.append("g"),g=h.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),x=(_=l.fontSize)!=null&&_.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+x*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Vt(c,t,r,l),t},"drawNode"),zt=s(function(n,t,e){var g;const l=n.append("g"),h=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),c=(g=e.fontSize)!=null&&g.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),Vt=s(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:Z,drawCircle:Mt,drawSection:Pt,drawText:ft,drawLabel:$t,drawTask:At,drawBackgroundRect:Ct,getTextObj:Ht,getNoteRect:D,initGraphics:Rt,drawNode:Ft,getVirtualNodeHeight:zt},Wt=s(function(n,t,e,l){var O,v;const r=_t(),h=r.leftMargin??50;T.debug("timeline",l.db);const c=r.securityLevel;let g;c==="sandbox"&&(g=q("#i"+t));const p=(c==="sandbox"?q(g.nodes()[0].contentDocument.body):q("body")).select("#"+t);p.append("g");const x=l.db.getTasks(),_=l.db.getCommonDb().getDiagramTitle();T.debug("task",x),H.initGraphics(p);const f=l.db.getSections();T.debug("sections",f);let i=0,a=0,d=0,u=0,y=50+h,o=50;u=50;let S=0,k=!0;f.forEach(function(E){const b={number:S,descr:E,section:S,width:150,padding:20,maxHeight:i},L=H.getVirtualNodeHeight(p,b,r);T.debug("sectionHeight before draw",L),i=Math.max(i,L+20)});let M=0,P=0;T.debug("tasks.length",x.length);for(const[E,b]of x.entries()){const L={number:E,descr:b,section:b.section,width:150,padding:20,maxHeight:a},A=H.getVirtualNodeHeight(p,L,r);T.debug("taskHeight before draw",A),a=Math.max(a,A+20),M=Math.max(M,b.events.length);let R=0;for(const F of b.events){const w={descr:F,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};R+=H.getVirtualNodeHeight(p,w,r)}P=Math.max(P,R)}T.debug("maxSectionHeight before draw",i),T.debug("maxTaskHeight before draw",a),f&&f.length>0?f.forEach(E=>{const b=x.filter(F=>F.section===E),L={number:S,descr:E,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:i};T.debug("sectionNode",L);const A=p.append("g"),R=H.drawNode(A,L,S,r);T.debug("sectionNode output",R),A.attr("transform",`translate(${y}, ${u})`),o+=i+50,b.length>0&&st(p,b,S,y,o,a,r,M,P,i,!1),y+=200*Math.max(b.length,1),o=u,S++}):(k=!1,st(p,x,S,y,o,a,r,M,P,i,!0));const B=p.node().getBBox();T.debug("bounds",B),_&&p.append("text").text(_).attr("x",B.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=k?i+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",h).attr("y1",d).attr("x2",B.width+3*h).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),bt(void 0,p,((O=r.timeline)==null?void 0:O.padding)??50,((v=r.timeline)==null?void 0:v.useMaxWidth)??!1)},"draw"),st=s(function(n,t,e,l,r,h,c,g,m,p,x){var _;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};T.debug("taskNode",i);const a=n.append("g").attr("class","taskWrapper"),u=H.drawNode(a,i,e,c).height;if(T.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${r})`),h=Math.max(h,u),f.events){const y=n.append("g").attr("class","lineWrapper");let o=h;r+=100,o=o+Bt(n,f.events,e,l,r,c),r-=100,y.append("line").attr("x1",l+190/2).attr("y1",r+h).attr("x2",l+190/2).attr("y2",r+h+(x?h:p)+m+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,x&&!((_=c.timeline)!=null&&_.disableMulticolor)&&e++}r=r-10},"drawTasks"),Bt=s(function(n,t,e,l,r,h){let c=0;const g=r;r=r+100;for(const m of t){const p={descr:m,section:e,number:e,width:150,padding:20,maxHeight:50};T.debug("eventNode",p);const x=n.append("g").attr("class","eventWrapper"),f=H.drawNode(x,p,e,h).height;c=c+f,x.attr("transform",`translate(${l}, ${r})`),r=r+10+f}return r=g,c},"drawEvents"),Ot={setConf:s(()=>{},"setConf"),draw:Wt},jt=s(n=>{let t="";for(let e=0;e` + .edge { + stroke-width: 3; + } + ${jt(n)} + .section-root rect, .section-root path, .section-root circle { + fill: ${n.git0}; + } + .section-root text { + fill: ${n.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),qt=Gt,Qt={db:at,renderer:Ot,parser:Tt,styles:qt};export{Qt as diagram}; diff --git a/pr-528/assets/chunks/virtual_mermaid-config.DDnGl6nM.js b/pr-528/assets/chunks/virtual_mermaid-config.DDnGl6nM.js new file mode 100644 index 000000000..effcb9650 --- /dev/null +++ b/pr-528/assets/chunks/virtual_mermaid-config.DDnGl6nM.js @@ -0,0 +1 @@ +const e={securityLevel:"loose",startOnLoad:!1};export{e as default}; diff --git a/pr-528/assets/chunks/xychartDiagram-KECQ2H5Q.CcbTCv_H.js b/pr-528/assets/chunks/xychartDiagram-KECQ2H5Q.CcbTCv_H.js new file mode 100644 index 000000000..df3e55918 --- /dev/null +++ b/pr-528/assets/chunks/xychartDiagram-KECQ2H5Q.CcbTCv_H.js @@ -0,0 +1,7 @@ +import{_ as a,aF as ui,l as Ft,a0 as Bt,$ as gi,E as At,D as Xt,B as xi,i as di,r as Nt,s as pi,g as fi,q as mi,b as yi,c as bi,v as Ai,H as wi,k as Ci}from"../app.CKrDwBa1.js";import{i as Si}from"./init.Gi6I4Gst.js";import{o as _i}from"./ordinal.BYWQX77i.js";import{l as Wt}from"./linear.CWPBtVa2.js";import"./framework.B8-VHxRu.js";import"./theme.Ds20UUID.js";function ki(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(T.yylloc={});var gt=T.yylloc;r.push(gt);var li=T.options&&T.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(L){g.length=g.length-2*L,A.length=A.length-L,r.length=r.length-L}a(ci,"popStack");function Mt(){var L;return L=x.pop()||T.lex()||It,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=c.symbols_[L]||L),L}a(Mt,"lex");for(var P,O,M,xt,z={},at,V,Vt,rt;;){if(O=g[g.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((P===null||typeof P>"u")&&(P=Mt()),M=Z[O]&&Z[O][P]),typeof M>"u"||!M.length||!M[0]){var dt="";rt=[];for(at in Z[O])this.terminals_[at]&&at>oi&&rt.push("'"+this.terminals_[at]+"'");T.showPosition?dt="Parse error on line "+(nt+1)+`: +`+T.showPosition()+` +Expecting `+rt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":dt="Parse error on line "+(nt+1)+": Unexpected "+(P==It?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(dt,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:gt,expected:rt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+P);switch(M[0]){case 1:g.push(P),A.push(T.yytext),r.push(T.yylloc),g.push(M[1]),P=null,Et=T.yyleng,d=T.yytext,nt=T.yylineno,gt=T.yylloc;break;case 2:if(V=this.productions_[M[1]][1],z.$=A[A.length-V],z._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},li&&(z._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),xt=this.performAction.apply(z,[d,Et,nt,W.yy,M[1],A,r].concat(hi)),typeof xt<"u")return xt;V&&(g=g.slice(0,-1*V*2),A=A.slice(0,-1*V),r=r.slice(0,-1*V)),g.push(this.productions_[M[1]][0]),A.push(z.$),r.push(z._$),Vt=Z[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},ri=function(){var B={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,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:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,A;if(this.options.backtrack_lexer&&(A={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&&(A.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in A)this[r]=A[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),r=0;rc[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,A[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,A[x]),h!==!1?h:!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:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,A){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();ct.lexer=ri;function st(){this.yy={}}return a(st,"Parser"),st.prototype=ct,ct.Parser=st,new st}();ft.parser=ft;var Ri=ft;function mt(e){return e.type==="bar"}a(mt,"isBarPlot");function wt(e){return e.type==="band"}a(wt,"isBandAxisData");function F(e){return e.type==="linear"}a(F,"isLinearAxisData");var X,Yt=(X=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=ui(n,1,o),f=u?u.width:o.length*i,p=u?u.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,p)}return n.remove(),s}},a(X,"TextDimensionCalculatorWithFont"),X),Ot=.7,zt=.2,N,Ht=(N=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(N,"BaseAxis"),N),Y,Ti=(Y=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=pt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Ft.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Y,"BandAxis"),Y),H,Di=(H=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=Wt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Wt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(H,"LinearAxis"),H);function yt(e,t,i,s){const n=new Yt(s);return wt(e)?new Ti(t,i,e.categories,e.title,n):new Di(t,i,[e.min,e.max],e.title,n)}a(yt,"getAxis");var U,vi=(U=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(U,"ChartTitle"),U);function Ut(e,t,i,s){const n=new Yt(s);return new vi(n,e,t,i)}a(Ut,"getChartTitleComponent");var $,Pi=($=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Bt().y(s=>s[0]).x(s=>s[1])(t):i=Bt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a($,"LinePlot"),$),q,Li=(q=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(q,"BarPlot"),q),G,Ei=(G=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Pi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Li(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(G,"BasePlot"),G);function $t(e,t,i){return new Ei(e,t,i)}a($t,"getPlotComponent");var j,Ii=(j=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ut(t,i,s,n),plot:$t(t,i,s),xAxis:yt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:yt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:o,height:u});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(p=>mt(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:u,height:f});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,n=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,o=s+p.height,t>0&&(u+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(k=>mt(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(j,"Orchestrator"),j),Q,Mi=(Q=class{static build(t,i,s,n){return new Ii(t,i,s,n).getDrawableElement()}},a(Q,"XYChartBuilder"),Q),J=0,qt,tt=_t(),it=St(),b=kt(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1;function St(){const e=gi(),t=At();return Xt(e.xyChart,t.themeVariables.xyChart)}a(St,"getChartDefaultThemeConfig");function _t(){const e=At();return Xt(xi.xyChart,e.xyChart)}a(_t,"getChartDefaultConfig");function kt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(kt,"getChartDefaultData");function ht(e){const t=At();return di(e.trim(),t)}a(ht,"textSanitizer");function Gt(e){qt=e}a(Gt,"setTmpSVGG");function jt(e){e==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}a(jt,"setOrientation");function Qt(e){b.xAxis.title=ht(e.text)}a(Qt,"setXAxisTitle");function Rt(e,t){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:t},ot=!0}a(Rt,"setXAxisRangeData");function Kt(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map(t=>ht(t.text))},ot=!0}a(Kt,"setXAxisBand");function Zt(e){b.yAxis.title=ht(e.text)}a(Zt,"setYAxisTitle");function Jt(e,t){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:t},Ct=!0}a(Jt,"setYAxisRangeData");function ti(e){const t=Math.min(...e),i=Math.max(...e),s=F(b.yAxis)?b.yAxis.min:1/0,n=F(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ti,"setYAxisRangeFromPlotData");function Tt(e){let t=[];if(e.length===0)return t;if(!ot){const i=F(b.xAxis)?b.xAxis.min:1/0,s=F(b.xAxis)?b.xAxis.max:-1/0;Rt(Math.min(i,1),Math.max(s,e.length))}if(Ct||ti(e),wt(b.xAxis)&&(t=b.xAxis.categories.map((i,s)=>[i,e[s]])),F(b.xAxis)){const i=b.xAxis.min,s=b.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,f)=>[u,e[f]])}return t}a(Tt,"transformDataWithoutCategory");function Dt(e){return bt[e===0?0:e%bt.length]}a(Dt,"getPlotColorFromPalette");function ii(e,t){const i=Tt(t);b.plots.push({type:"line",strokeFill:Dt(J),strokeWidth:2,data:i}),J++}a(ii,"setLineData");function ei(e,t){const i=Tt(t);b.plots.push({type:"bar",fill:Dt(J),data:i}),J++}a(ei,"setBarData");function si(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=Nt(),Mi.build(tt,b,it,qt)}a(si,"getDrawableElem");function ni(){return it}a(ni,"getChartThemeConfig");function ai(){return tt}a(ai,"getChartConfig");var Vi=a(function(){Ai(),J=0,tt=_t(),b=kt(),it=St(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1},"clear"),Bi={getDrawableElem:si,clear:Vi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:mi,getDiagramTitle:Nt,getAccDescription:yi,setAccDescription:bi,setOrientation:jt,setXAxisTitle:Qt,setXAxisRangeData:Rt,setXAxisBand:Kt,setYAxisTitle:Zt,setYAxisRangeData:Jt,setLineData:ii,setBarData:ei,setTmpSVGG:Gt,getChartThemeConfig:ni,getChartConfig:ai},Wi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig();function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function p(m){return m==="left"?"start":m==="right"?"end":"middle"}a(p,"getTextAnchor");function k(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(k,"getTextTransformation"),Ft.debug(`Rendering xychart chart +`+e);const R=wi(t),w=R.append("g").attr("class","main"),y=w.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");Ci(R,u.height,u.width,!0),R.attr("viewBox",`0 0 ${u.width} ${u.height}`),y.attr("fill",o.backgroundColor),n.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),S={};function v(m){let _=w,l="";for(const[E]of m.entries()){let K=w;E>0&&S[l]&&(K=S[l]),l+=m[E],_=S[l],_||(_=S[l]=K.append("g").attr("class",m[E]))}return _}a(v,"getGroup");for(const m of D){if(m.data.length===0)continue;const _=v(m.groupTexts);switch(m.type){case"rect":_.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break;case"text":_.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>p(l.horizontalPos)).attr("transform",l=>k(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:Wi},Ui={parser:Ri,db:Bi,renderer:Oi};export{Ui as diagram}; diff --git a/pr-528/assets/custom-network.Ccp3HLJp.png b/pr-528/assets/custom-network.Ccp3HLJp.png new file mode 100644 index 000000000..63ad8c82d Binary files /dev/null and b/pr-528/assets/custom-network.Ccp3HLJp.png differ diff --git a/pr-528/assets/faucet.BrSlg9f5.png b/pr-528/assets/faucet.BrSlg9f5.png new file mode 100644 index 000000000..04d157f21 Binary files /dev/null and b/pr-528/assets/faucet.BrSlg9f5.png differ diff --git a/pr-528/assets/guides_block-times.md.ZtYvVHR2.js b/pr-528/assets/guides_block-times.md.ZtYvVHR2.js new file mode 100644 index 000000000..d90d63d7a --- /dev/null +++ b/pr-528/assets/guides_block-times.md.ZtYvVHR2.js @@ -0,0 +1,3 @@ +import{_ as i,c as a,a3 as e,o as t}from"./chunks/framework.B8-VHxRu.js";const r=JSON.parse('{"title":"How to change speed of block production","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to change speed of block production | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/block-times.md","filePath":"guides/block-times.md","lastUpdated":1733420866000}'),l={name:"guides/block-times.md"};function n(o,s,p,h,d,k){return t(),a("div",null,s[0]||(s[0]=[e(`

    How to change speed of block production

    If you have gone through both the quick start tutorial and the Full and sequencer node rollup setup already, you're now ready to experiment with faster block times.

    In your rollkit start [args...] command, you will need to add a flag and then the argument for block time.

    The flag is:

    bash
    --rollkit.block_time 1s

    Where 1s can be adjusted to the speed of your choosing.

    Here is an example:

    bash
    # start the chain
    +rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.block_time 1s // [!code ++]

    In the above example, we've changed it to one second blocks. Alternatively, you could slow your rollup down to 30 seconds:

    bash
    --rollkit.block_time 30s

    Or speed it up even more, to sub-second block times (100 milliseconds):

    bash
    --rollkit.block_time 100ms
    `,12)]))}const g=i(l,[["render",n]]);export{r as __pageData,g as default}; diff --git a/pr-528/assets/guides_block-times.md.ZtYvVHR2.lean.js b/pr-528/assets/guides_block-times.md.ZtYvVHR2.lean.js new file mode 100644 index 000000000..d90d63d7a --- /dev/null +++ b/pr-528/assets/guides_block-times.md.ZtYvVHR2.lean.js @@ -0,0 +1,3 @@ +import{_ as i,c as a,a3 as e,o as t}from"./chunks/framework.B8-VHxRu.js";const r=JSON.parse('{"title":"How to change speed of block production","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to change speed of block production | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/block-times.md","filePath":"guides/block-times.md","lastUpdated":1733420866000}'),l={name:"guides/block-times.md"};function n(o,s,p,h,d,k){return t(),a("div",null,s[0]||(s[0]=[e(`

    How to change speed of block production

    If you have gone through both the quick start tutorial and the Full and sequencer node rollup setup already, you're now ready to experiment with faster block times.

    In your rollkit start [args...] command, you will need to add a flag and then the argument for block time.

    The flag is:

    bash
    --rollkit.block_time 1s

    Where 1s can be adjusted to the speed of your choosing.

    Here is an example:

    bash
    # start the chain
    +rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.block_time 1s // [!code ++]

    In the above example, we've changed it to one second blocks. Alternatively, you could slow your rollup down to 30 seconds:

    bash
    --rollkit.block_time 30s

    Or speed it up even more, to sub-second block times (100 milliseconds):

    bash
    --rollkit.block_time 100ms
    `,12)]))}const g=i(l,[["render",n]]);export{r as __pageData,g as default}; diff --git a/pr-528/assets/guides_cometbft-to-rollkit.md.DP9f6eId.js b/pr-528/assets/guides_cometbft-to-rollkit.md.DP9f6eId.js new file mode 100644 index 000000000..9d6c123c5 --- /dev/null +++ b/pr-528/assets/guides_cometbft-to-rollkit.md.DP9f6eId.js @@ -0,0 +1 @@ +/* empty css */import{c as l}from"./chunks/constants.C1G_zmdY.js";import{c as e,a3 as a,j as t,t as o,k as s,o as n}from"./chunks/framework.B8-VHxRu.js";const r={class:"language-bash vp-adaptive-theme"},p={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},h={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},F=JSON.parse('{"title":"How to Turn Your CometBFT App into a Rollkit App","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Turn Your CometBFT App into a Rollkit App | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/cometbft-to-rollkit.md","filePath":"guides/cometbft-to-rollkit.md","lastUpdated":1733420866000}'),k={name:"guides/cometbft-to-rollkit.md"},b=Object.assign(k,{setup(u){return(c,i)=>(n(),e("div",null,[i[5]||(i[5]=a('

    How to Turn Your CometBFT App into a Rollkit App

    This guide will walk you through the process of turning your existing CometBFT app into a Rollkit app. By integrating Rollkit into your CometBFT-based blockchain, you can leverage enhanced modularity and data availability features.

    This guide assumes you have a CometBFT app set up and Ignite CLI installed.

    Install Rollkit

    You need to install Rollkit in your CometBFT app. Open a terminal in the directory where your app is located and run the following command:

    ',5)),t("div",r,[i[3]||(i[3]=t("button",{title:"Copy Code",class:"copy"},null,-1)),i[4]||(i[4]=t("span",{class:"lang"},"bash",-1)),t("pre",p,[t("code",null,[t("span",h,[i[0]||(i[0]=t("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"ignite",-1)),i[1]||(i[1]=t("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," app",-1)),i[2]||(i[2]=t("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install",-1)),t("span",d," github.com/ignite/apps/rollkit@"+o(s(l).rollkitIgniteAppVersion),1)])])])]),i[6]||(i[6]=a('

    Add Rollkit Features to Your CometBFT App

    Now that Rollkit is installed, you can add Rollkit features to your existing blockchain app. Run the following command to integrate Rollkit:

    bash
    ignite rollkit add

    Initialize Rollkit

    To prepare your app for Rollkit, you'll need to initialize it.

    Run the following command to initialize Rollkit:

    bash
    ignite rollkit init

    Initialize Rollkit CLI Configuration

    Next, you'll need to initialize the Rollkit CLI configuration by generating the rollkit.toml file. This file is crucial for Rollkit to understand the structure of your rollup.

    To create the rollkit.toml configuration, use this command:

    bash
    rollkit toml init

    This command sets up the rollkit.toml file, where you can further customize configuration parameters as needed.

    Start Your Rollkit App

    Once everything is configured, you can start your Rollkit-enabled CometBFT app or (simply rollkit app). Use the following command to start your blockchain:

    bash
    rollkit start --rollkit.aggregator <insert your flags>

    Summary

    By following this guide, you've successfully converted your CometBFT app into a Rollkit app.

    To learn more about how to config your DA, Sequencing, and Execution, please check out those tutorial sections.

    ',18))]))}});export{F as __pageData,b as default}; diff --git a/pr-528/assets/guides_cometbft-to-rollkit.md.DP9f6eId.lean.js b/pr-528/assets/guides_cometbft-to-rollkit.md.DP9f6eId.lean.js new file mode 100644 index 000000000..9d6c123c5 --- /dev/null +++ b/pr-528/assets/guides_cometbft-to-rollkit.md.DP9f6eId.lean.js @@ -0,0 +1 @@ +/* empty css */import{c as l}from"./chunks/constants.C1G_zmdY.js";import{c as e,a3 as a,j as t,t as o,k as s,o as n}from"./chunks/framework.B8-VHxRu.js";const r={class:"language-bash vp-adaptive-theme"},p={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},h={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},F=JSON.parse('{"title":"How to Turn Your CometBFT App into a Rollkit App","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Turn Your CometBFT App into a Rollkit App | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/cometbft-to-rollkit.md","filePath":"guides/cometbft-to-rollkit.md","lastUpdated":1733420866000}'),k={name:"guides/cometbft-to-rollkit.md"},b=Object.assign(k,{setup(u){return(c,i)=>(n(),e("div",null,[i[5]||(i[5]=a('

    How to Turn Your CometBFT App into a Rollkit App

    This guide will walk you through the process of turning your existing CometBFT app into a Rollkit app. By integrating Rollkit into your CometBFT-based blockchain, you can leverage enhanced modularity and data availability features.

    This guide assumes you have a CometBFT app set up and Ignite CLI installed.

    Install Rollkit

    You need to install Rollkit in your CometBFT app. Open a terminal in the directory where your app is located and run the following command:

    ',5)),t("div",r,[i[3]||(i[3]=t("button",{title:"Copy Code",class:"copy"},null,-1)),i[4]||(i[4]=t("span",{class:"lang"},"bash",-1)),t("pre",p,[t("code",null,[t("span",h,[i[0]||(i[0]=t("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"ignite",-1)),i[1]||(i[1]=t("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," app",-1)),i[2]||(i[2]=t("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install",-1)),t("span",d," github.com/ignite/apps/rollkit@"+o(s(l).rollkitIgniteAppVersion),1)])])])]),i[6]||(i[6]=a('

    Add Rollkit Features to Your CometBFT App

    Now that Rollkit is installed, you can add Rollkit features to your existing blockchain app. Run the following command to integrate Rollkit:

    bash
    ignite rollkit add

    Initialize Rollkit

    To prepare your app for Rollkit, you'll need to initialize it.

    Run the following command to initialize Rollkit:

    bash
    ignite rollkit init

    Initialize Rollkit CLI Configuration

    Next, you'll need to initialize the Rollkit CLI configuration by generating the rollkit.toml file. This file is crucial for Rollkit to understand the structure of your rollup.

    To create the rollkit.toml configuration, use this command:

    bash
    rollkit toml init

    This command sets up the rollkit.toml file, where you can further customize configuration parameters as needed.

    Start Your Rollkit App

    Once everything is configured, you can start your Rollkit-enabled CometBFT app or (simply rollkit app). Use the following command to start your blockchain:

    bash
    rollkit start --rollkit.aggregator <insert your flags>

    Summary

    By following this guide, you've successfully converted your CometBFT app into a Rollkit app.

    To learn more about how to config your DA, Sequencing, and Execution, please check out those tutorial sections.

    ',18))]))}});export{F as __pageData,b as default}; diff --git a/pr-528/assets/guides_create-genesis.md.7ARA_dEB.js b/pr-528/assets/guides_create-genesis.md.7ARA_dEB.js new file mode 100644 index 000000000..23c7ba46f --- /dev/null +++ b/pr-528/assets/guides_create-genesis.md.7ARA_dEB.js @@ -0,0 +1,10 @@ +import{_ as s,c as a,a3 as e,o as t}from"./chunks/framework.B8-VHxRu.js";const g=JSON.parse('{"title":"How to create a genesis for your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to create a genesis for your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/create-genesis.md","filePath":"guides/create-genesis.md","lastUpdated":1733420866000}'),n={name:"guides/create-genesis.md"};function h(l,i,p,k,r,o){return t(),a("div",null,i[0]||(i[0]=[e(`

    How to create a genesis for your rollup

    This guide will walk you through the process of setting up a genesis for your rollup. Follow the steps below to initialize your rollup chain, add a genesis account, and start the chain.

    0. Pre-requisities

    For this guide you need to have a chain directory where you have created and built your chain.

    If you don't have a chain directory yet, you can initialize a simple ignite chain by following this guide

    TIP

    This guide will use the simple ignite chain created in linked guide. Make sure to update any relevant variables to match your chain.

    1. Setting variables

    First, set the necessary variables for your chain in the terminal, here is an example:

    sh
    VALIDATOR_NAME=validator1
    +CHAIN_ID=gm
    +KEY_NAME=rollup-key
    +CHAINFLAG="--chain-id \${CHAIN_ID}"
    +TOKEN_AMOUNT="10000000000000000000000000stake"
    +STAKING_AMOUNT="1000000000stake"

    2. Rebuild your chain

    Ensure that rollkit.toml is present in the root of your rollup directory (if not, follow a Guide to set it up) and run the following command to (re)generate an entrypoint binary out of the code:

    sh
    rollkit rebuild

    This (re)creates an entrypoint binary in the root of your rollup directory. which is used to run all the operations on the rollup chain.

    Ensure that the chain configuration directory is set correctly in the rollkit.toml file.

    For example:

    sh
    [chain]
    +  config_dir = "/Users/you/.gm"

    TIP

    You can always recreate the rollkit.toml file by deleting it and re-running the following command:

    sh
    rollkit toml init

    3. Resetting existing genesis/chain data

    Reset any existing chain data:

    sh
    rollkit tendermint unsafe-reset-all

    Reset any existing genesis data:

    sh
    rm -rf $HOME/.$CHAIN_ID/config/gentx
    +rm $HOME/.$CHAIN_ID/config/genesis.json

    4. Initializing the validator

    Initialize the validator with the chain ID you set:

    sh
    rollkit init $VALIDATOR_NAME --chain-id $CHAIN_ID

    5. Adding a key to keyring backend

    Add a key to the keyring-backend:

    sh
    rollkit keys add $KEY_NAME --keyring-backend test

    6. Adding a genesis account

    Add a genesis account with the specified token amount:

    sh
    rollkit genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test

    7. Setting the staking amount in the genesis transaction

    Set the staking amount in the genesis transaction:

    sh
    rollkit genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test

    8. Collecting genesis transactions

    Collect the genesis transactions:

    sh
    rollkit genesis collect-gentxs

    9. Configuring the genesis file

    Copy the centralized sequencer address into genesis.json:

    sh
    ADDRESS=$(jq -r '.address' ~/.$CHAIN_ID/config/priv_validator_key.json)
    +PUB_KEY=$(jq -r '.pub_key' ~/.$CHAIN_ID/config/priv_validator_key.json)
    +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.$CHAIN_ID/config/genesis.json > temp.json && mv temp.json ~/.$CHAIN_ID/config/genesis.json

    10. Starting the chain

    Finally, start the chain with your start command.

    For example, start the simple ignite chain with the following command:

    sh
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id $CHAIN_ID

    Summary

    By following these steps, you will set up the genesis for your rollup, initialize the validator, add a genesis account, and started the chain. This guide provides a basic framework for configuring and starting your rollup using the Rollkit CLI. Make sure rollkit.toml is present in the root of your rollup directory, and use the rollkit command for all operations.

    `,46)]))}const c=s(n,[["render",h]]);export{g as __pageData,c as default}; diff --git a/pr-528/assets/guides_create-genesis.md.7ARA_dEB.lean.js b/pr-528/assets/guides_create-genesis.md.7ARA_dEB.lean.js new file mode 100644 index 000000000..23c7ba46f --- /dev/null +++ b/pr-528/assets/guides_create-genesis.md.7ARA_dEB.lean.js @@ -0,0 +1,10 @@ +import{_ as s,c as a,a3 as e,o as t}from"./chunks/framework.B8-VHxRu.js";const g=JSON.parse('{"title":"How to create a genesis for your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to create a genesis for your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/create-genesis.md","filePath":"guides/create-genesis.md","lastUpdated":1733420866000}'),n={name:"guides/create-genesis.md"};function h(l,i,p,k,r,o){return t(),a("div",null,i[0]||(i[0]=[e(`

    How to create a genesis for your rollup

    This guide will walk you through the process of setting up a genesis for your rollup. Follow the steps below to initialize your rollup chain, add a genesis account, and start the chain.

    0. Pre-requisities

    For this guide you need to have a chain directory where you have created and built your chain.

    If you don't have a chain directory yet, you can initialize a simple ignite chain by following this guide

    TIP

    This guide will use the simple ignite chain created in linked guide. Make sure to update any relevant variables to match your chain.

    1. Setting variables

    First, set the necessary variables for your chain in the terminal, here is an example:

    sh
    VALIDATOR_NAME=validator1
    +CHAIN_ID=gm
    +KEY_NAME=rollup-key
    +CHAINFLAG="--chain-id \${CHAIN_ID}"
    +TOKEN_AMOUNT="10000000000000000000000000stake"
    +STAKING_AMOUNT="1000000000stake"

    2. Rebuild your chain

    Ensure that rollkit.toml is present in the root of your rollup directory (if not, follow a Guide to set it up) and run the following command to (re)generate an entrypoint binary out of the code:

    sh
    rollkit rebuild

    This (re)creates an entrypoint binary in the root of your rollup directory. which is used to run all the operations on the rollup chain.

    Ensure that the chain configuration directory is set correctly in the rollkit.toml file.

    For example:

    sh
    [chain]
    +  config_dir = "/Users/you/.gm"

    TIP

    You can always recreate the rollkit.toml file by deleting it and re-running the following command:

    sh
    rollkit toml init

    3. Resetting existing genesis/chain data

    Reset any existing chain data:

    sh
    rollkit tendermint unsafe-reset-all

    Reset any existing genesis data:

    sh
    rm -rf $HOME/.$CHAIN_ID/config/gentx
    +rm $HOME/.$CHAIN_ID/config/genesis.json

    4. Initializing the validator

    Initialize the validator with the chain ID you set:

    sh
    rollkit init $VALIDATOR_NAME --chain-id $CHAIN_ID

    5. Adding a key to keyring backend

    Add a key to the keyring-backend:

    sh
    rollkit keys add $KEY_NAME --keyring-backend test

    6. Adding a genesis account

    Add a genesis account with the specified token amount:

    sh
    rollkit genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test

    7. Setting the staking amount in the genesis transaction

    Set the staking amount in the genesis transaction:

    sh
    rollkit genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test

    8. Collecting genesis transactions

    Collect the genesis transactions:

    sh
    rollkit genesis collect-gentxs

    9. Configuring the genesis file

    Copy the centralized sequencer address into genesis.json:

    sh
    ADDRESS=$(jq -r '.address' ~/.$CHAIN_ID/config/priv_validator_key.json)
    +PUB_KEY=$(jq -r '.pub_key' ~/.$CHAIN_ID/config/priv_validator_key.json)
    +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.$CHAIN_ID/config/genesis.json > temp.json && mv temp.json ~/.$CHAIN_ID/config/genesis.json

    10. Starting the chain

    Finally, start the chain with your start command.

    For example, start the simple ignite chain with the following command:

    sh
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id $CHAIN_ID

    Summary

    By following these steps, you will set up the genesis for your rollup, initialize the validator, add a genesis account, and started the chain. This guide provides a basic framework for configuring and starting your rollup using the Rollkit CLI. Make sure rollkit.toml is present in the root of your rollup directory, and use the rollkit command for all operations.

    `,46)]))}const c=s(n,[["render",h]]);export{g as __pageData,c as default}; diff --git a/pr-528/assets/guides_cw-orch.md.BbD81cbc.js b/pr-528/assets/guides_cw-orch.md.BbD81cbc.js new file mode 100644 index 000000000..d1a1025ad --- /dev/null +++ b/pr-528/assets/guides_cw-orch.md.BbD81cbc.js @@ -0,0 +1,91 @@ +import{_ as i,c as a,a3 as t,o as n}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"Speed up your development with cw-orchestrator","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Speed up your development with cw-orchestrator | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/cw-orch.md","filePath":"guides/cw-orch.md","lastUpdated":1733420866000}'),e={name:"guides/cw-orch.md"};function h(l,s,k,p,r,d){return n(),a("div",null,s[0]||(s[0]=[t(`

    Speed up your development with cw-orchestrator

    Introduction

    cw-orchestrator is the most advanced scripting, testing, and deployment framework for CosmWasm smart-contracts. It makes it easy to write cross-environment compatible code for cw-multi-test, Test Tube, Starship (alpha), and live networks, significantly reducing code duplication and test-writing time.

    Get ready to change the way you interact with contracts and simplify you smart-contracts journey. The following steps will allow you to integrate cw-orch and write clean code such as:

    rust
    counter.upload()?;
    +counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
    +counter.increment()?;
    +let count = counter.get_count()?;
    +assert_eq!(count.count, 1);

    In this quick-start guide, we will review the necessary steps in order to integrate cw-orch into a simple contract crate. We review integration of rust-workspaces (multiple contracts) at the end of this page.

    NOTE: Quicker than the quick start

    If you're moving quicker than everybody else, we suggest looking at a before-after review of this example integration. This will help you catch the additions you need to make to your contract to be able to interact with it using cw-orchestrator.

    NOTE: If you want to go more in depth, browse the full cw-orch documentation.

    Summary

    Single Contract Integration

    Throughout this example, we will be using cw-orch to interact with a simple counter contract. All the steps below apply to any smart contract, no matter the complexity.

    Adding cw-orch to your Cargo.toml file

    To use cw-orchestrator, you need to add cw-orch to your contract's TOML file. Run the command below in your contract's directory:

    shell
    cargo add cw-orch

    Alternatively, you can add it manually in your Cargo.toml file as shown below:

    toml
    [dependencies]
    +cw-orch = {version = "0.21.2" } # Latest version at time of writing

    Creating an Interface

    When using a single contract, we advise creating an interface.rs file inside your contract's directory. You then need to add this module to your lib.rs file. In order for this interface code to not land in your WASM smart-contracts you need to target-flag it like so:

    rust
    #[cfg(not(target_arch = "wasm32"))]
    +mod interface;

    Then, inside that interface.rs file, you can define the interface for your contract:

    rust
    use cw_orch::{interface, prelude::*};
    +use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
    +pub const CONTRACT_ID: &str = "counter_contract";
    +#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg, id = CONTRACT_ID)]
    +pub struct CounterContract;
    +impl<Chain: CwEnv> Uploadable for CounterContract<Chain> {
    +    /// Return the path to the wasm file corresponding to the contract
    +    fn wasm(&self) -> WasmPath {
    +        artifacts_dir_from_workspace!()
    +            .find_wasm_path("counter_contract")
    +            .unwrap()
    +    }
    +    /// Returns a CosmWasm contract wrapper
    +    fn wrapper(&self) -> Box<dyn MockContract<Empty>> {
    +        Box::new(
    +            ContractWrapper::new_with_empty(
    +                crate::contract::execute,
    +                crate::contract::instantiate,
    +                crate::contract::query,
    +            )
    +            .with_migrate(crate::contract::migrate),
    +        )
    +    }
    +}

    Learn more about the content of the interface creation specifics in the cw-orch documentation

    NOTE: It can be useful to re-export this struct to simplify usage (in lib.rs):

    rust
    #[cfg(not(target_arch = "wasm32"))]
    +pub use crate::interface::CounterContract;

    Interaction helpers

    cw-orchestrator provides a additional macros that simplify contract calls and queries. The macro implements functions on the interface for each variant of the contract's ExecuteMsg and QueryMsg.

    Enabling this functionality is very straightforward. Find your ExecuteMsg and QueryMsg definitions (in msg.rs in our example) and add the ExecuteFns and QueryFns derive macros to them like below:

    rust
    #[cw_serde]
    +#[derive(cw_orch::ExecuteFns)] // Function generation
    +/// Execute methods for counter
    +pub enum ExecuteMsg {
    +    /// Increment count by one
    +    Increment {},
    +    /// Reset count
    +    Reset {
    +        /// Count value after reset
    +        count: i32,
    +    },
    +}
    +#[cw_serde]
    +#[derive(cw_orch::QueryFns)] // Function generation
    +#[derive(QueryResponses)]
    +/// Query methods for counter
    +pub enum QueryMsg {
    +    /// GetCount returns the current count as a json-encoded number
    +    #[returns(GetCountResponse)]
    +    GetCount {},
    +}
    +// Custom response for the query
    +#[cw_serde]
    +/// Response from get_count query
    +pub struct GetCountResponse {
    +    /// Current count in the state
    +    pub count: i32,
    +}

    Find out more about the interaction helpers in the cw-orch documentation

    NOTE: Again, it can be useful to re-export these generated traits to simplify usage (in lib.rs):

    rust
    pub use crate::msg::{ExecuteMsgFns as CounterExecuteMsgFns, QueryMsgFns as CounterQueryMsgFns};

    Using the integration

    Now that all the setup is done, you can use your contract in tests, integration-tests or scripts.

    Start by importing your crate in [dependencies] or [dev-dependencies]:

    toml
    counter-contract = { path = "../counter-contract" }

    You can now use:

    rust
    use counter_contract::{
    +    msg::InstantiateMsg, CounterContract, CounterExecuteMsgFns, CounterQueryMsgFns,
    +};
    +use cw_orch::{anyhow, prelude::*, tokio};
    +use tokio::runtime::Runtime;
    +const LOCAL_MNEMONIC: &str = "clip hire initial neck maid actor venue client foam budget lock catalog sweet steak waste crater broccoli pipe steak sister coyote moment obvious choose";
    +pub fn main() -> anyhow::Result<()> {
    +    std::env::set_var("LOCAL_MNEMONIC", LOCAL_MNEMONIC);
    +    dotenv::dotenv().ok(); // Used to load the \`.env\` file if any
    +    pretty_env_logger::init(); // Used to log contract and chain interactions
    +    let rt = Runtime::new()?;
    +    let network = networks::LOCAL_JUNO;
    +    let chain = DaemonBuilder::default()
    +        .handle(rt.handle())
    +        .chain(network)
    +        .build()?;
    +    let counter = CounterContract::new(chain);
    +    counter.upload()?;
    +    counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
    +    counter.increment()?;
    +    let count = counter.get_count()?;
    +    assert_eq!(count.count, 1);
    +    Ok(())
    +}

    Integration in a workspace

    In this paragraph, we will use the cw-plus repository as an example. You can review:

    Handling dependencies and features

    When using workspaces, you need to add cw-orch to all crates that include ExecuteMsg and QueryMsg used in your contracts and derive the ExecuteFns and QueryFns on them.

    Refer above to Interaction helpers for more details on how to do that.

    For instance, for the cw20_base contract, you need to execute those 2 steps on the cw20-base contract (where the QueryMsg are defined) as well as on the cw20 package (where the ExecuteMsg are defined).

    Creating an interface crate

    When using a workspace, we advise you to create a new crate inside your workspace for defining your contract's interfaces. In order to do that, use:

    shell
    cargo new interface --lib
    +cargo add cw-orch --package interface

    Add the interface package to your workspace Cargo.toml file

    toml
    [workspace]
    +members = ["packages/*", "contracts/*", "interface"]

    Inside this interface crate, we advise to integrate all your contracts 1 by 1 in separate files. Here is the structure of the cw-plus integration for reference:

    bash
    interface (interface collection)
    +├── Cargo.toml
    +└── src
    +    ├── cw1_subkeys.rs
    +    ├── cw1_whitelist.rs
    +    ├── cw20_base.rs
    +    ├── cw20_ics20.rs
    +    └── ..

    When importing your crates to get the messages types, you can use the following command in the interface folder.

    shell
    cargo add cw20-base --path ../contracts/cw20-base/
    +cargo add cw20 --path ../packages/cw20

    Integrating single contracts

    Now that you workspace is setup, you can integrate with single contracts using the above section

    More examples and scripts

    You can find more example interactions on the counter-contract example directly in the cw-orchestrator repo:

    FINAL ADVICE: Learn more and explore our full cw-orch documentation !.

    `,58)]))}const g=i(e,[["render",h]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/guides_cw-orch.md.BbD81cbc.lean.js b/pr-528/assets/guides_cw-orch.md.BbD81cbc.lean.js new file mode 100644 index 000000000..d1a1025ad --- /dev/null +++ b/pr-528/assets/guides_cw-orch.md.BbD81cbc.lean.js @@ -0,0 +1,91 @@ +import{_ as i,c as a,a3 as t,o as n}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"Speed up your development with cw-orchestrator","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Speed up your development with cw-orchestrator | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/cw-orch.md","filePath":"guides/cw-orch.md","lastUpdated":1733420866000}'),e={name:"guides/cw-orch.md"};function h(l,s,k,p,r,d){return n(),a("div",null,s[0]||(s[0]=[t(`

    Speed up your development with cw-orchestrator

    Introduction

    cw-orchestrator is the most advanced scripting, testing, and deployment framework for CosmWasm smart-contracts. It makes it easy to write cross-environment compatible code for cw-multi-test, Test Tube, Starship (alpha), and live networks, significantly reducing code duplication and test-writing time.

    Get ready to change the way you interact with contracts and simplify you smart-contracts journey. The following steps will allow you to integrate cw-orch and write clean code such as:

    rust
    counter.upload()?;
    +counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
    +counter.increment()?;
    +let count = counter.get_count()?;
    +assert_eq!(count.count, 1);

    In this quick-start guide, we will review the necessary steps in order to integrate cw-orch into a simple contract crate. We review integration of rust-workspaces (multiple contracts) at the end of this page.

    NOTE: Quicker than the quick start

    If you're moving quicker than everybody else, we suggest looking at a before-after review of this example integration. This will help you catch the additions you need to make to your contract to be able to interact with it using cw-orchestrator.

    NOTE: If you want to go more in depth, browse the full cw-orch documentation.

    Summary

    Single Contract Integration

    Throughout this example, we will be using cw-orch to interact with a simple counter contract. All the steps below apply to any smart contract, no matter the complexity.

    Adding cw-orch to your Cargo.toml file

    To use cw-orchestrator, you need to add cw-orch to your contract's TOML file. Run the command below in your contract's directory:

    shell
    cargo add cw-orch

    Alternatively, you can add it manually in your Cargo.toml file as shown below:

    toml
    [dependencies]
    +cw-orch = {version = "0.21.2" } # Latest version at time of writing

    Creating an Interface

    When using a single contract, we advise creating an interface.rs file inside your contract's directory. You then need to add this module to your lib.rs file. In order for this interface code to not land in your WASM smart-contracts you need to target-flag it like so:

    rust
    #[cfg(not(target_arch = "wasm32"))]
    +mod interface;

    Then, inside that interface.rs file, you can define the interface for your contract:

    rust
    use cw_orch::{interface, prelude::*};
    +use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
    +pub const CONTRACT_ID: &str = "counter_contract";
    +#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg, id = CONTRACT_ID)]
    +pub struct CounterContract;
    +impl<Chain: CwEnv> Uploadable for CounterContract<Chain> {
    +    /// Return the path to the wasm file corresponding to the contract
    +    fn wasm(&self) -> WasmPath {
    +        artifacts_dir_from_workspace!()
    +            .find_wasm_path("counter_contract")
    +            .unwrap()
    +    }
    +    /// Returns a CosmWasm contract wrapper
    +    fn wrapper(&self) -> Box<dyn MockContract<Empty>> {
    +        Box::new(
    +            ContractWrapper::new_with_empty(
    +                crate::contract::execute,
    +                crate::contract::instantiate,
    +                crate::contract::query,
    +            )
    +            .with_migrate(crate::contract::migrate),
    +        )
    +    }
    +}

    Learn more about the content of the interface creation specifics in the cw-orch documentation

    NOTE: It can be useful to re-export this struct to simplify usage (in lib.rs):

    rust
    #[cfg(not(target_arch = "wasm32"))]
    +pub use crate::interface::CounterContract;

    Interaction helpers

    cw-orchestrator provides a additional macros that simplify contract calls and queries. The macro implements functions on the interface for each variant of the contract's ExecuteMsg and QueryMsg.

    Enabling this functionality is very straightforward. Find your ExecuteMsg and QueryMsg definitions (in msg.rs in our example) and add the ExecuteFns and QueryFns derive macros to them like below:

    rust
    #[cw_serde]
    +#[derive(cw_orch::ExecuteFns)] // Function generation
    +/// Execute methods for counter
    +pub enum ExecuteMsg {
    +    /// Increment count by one
    +    Increment {},
    +    /// Reset count
    +    Reset {
    +        /// Count value after reset
    +        count: i32,
    +    },
    +}
    +#[cw_serde]
    +#[derive(cw_orch::QueryFns)] // Function generation
    +#[derive(QueryResponses)]
    +/// Query methods for counter
    +pub enum QueryMsg {
    +    /// GetCount returns the current count as a json-encoded number
    +    #[returns(GetCountResponse)]
    +    GetCount {},
    +}
    +// Custom response for the query
    +#[cw_serde]
    +/// Response from get_count query
    +pub struct GetCountResponse {
    +    /// Current count in the state
    +    pub count: i32,
    +}

    Find out more about the interaction helpers in the cw-orch documentation

    NOTE: Again, it can be useful to re-export these generated traits to simplify usage (in lib.rs):

    rust
    pub use crate::msg::{ExecuteMsgFns as CounterExecuteMsgFns, QueryMsgFns as CounterQueryMsgFns};

    Using the integration

    Now that all the setup is done, you can use your contract in tests, integration-tests or scripts.

    Start by importing your crate in [dependencies] or [dev-dependencies]:

    toml
    counter-contract = { path = "../counter-contract" }

    You can now use:

    rust
    use counter_contract::{
    +    msg::InstantiateMsg, CounterContract, CounterExecuteMsgFns, CounterQueryMsgFns,
    +};
    +use cw_orch::{anyhow, prelude::*, tokio};
    +use tokio::runtime::Runtime;
    +const LOCAL_MNEMONIC: &str = "clip hire initial neck maid actor venue client foam budget lock catalog sweet steak waste crater broccoli pipe steak sister coyote moment obvious choose";
    +pub fn main() -> anyhow::Result<()> {
    +    std::env::set_var("LOCAL_MNEMONIC", LOCAL_MNEMONIC);
    +    dotenv::dotenv().ok(); // Used to load the \`.env\` file if any
    +    pretty_env_logger::init(); // Used to log contract and chain interactions
    +    let rt = Runtime::new()?;
    +    let network = networks::LOCAL_JUNO;
    +    let chain = DaemonBuilder::default()
    +        .handle(rt.handle())
    +        .chain(network)
    +        .build()?;
    +    let counter = CounterContract::new(chain);
    +    counter.upload()?;
    +    counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
    +    counter.increment()?;
    +    let count = counter.get_count()?;
    +    assert_eq!(count.count, 1);
    +    Ok(())
    +}

    Integration in a workspace

    In this paragraph, we will use the cw-plus repository as an example. You can review:

    Handling dependencies and features

    When using workspaces, you need to add cw-orch to all crates that include ExecuteMsg and QueryMsg used in your contracts and derive the ExecuteFns and QueryFns on them.

    Refer above to Interaction helpers for more details on how to do that.

    For instance, for the cw20_base contract, you need to execute those 2 steps on the cw20-base contract (where the QueryMsg are defined) as well as on the cw20 package (where the ExecuteMsg are defined).

    Creating an interface crate

    When using a workspace, we advise you to create a new crate inside your workspace for defining your contract's interfaces. In order to do that, use:

    shell
    cargo new interface --lib
    +cargo add cw-orch --package interface

    Add the interface package to your workspace Cargo.toml file

    toml
    [workspace]
    +members = ["packages/*", "contracts/*", "interface"]

    Inside this interface crate, we advise to integrate all your contracts 1 by 1 in separate files. Here is the structure of the cw-plus integration for reference:

    bash
    interface (interface collection)
    +├── Cargo.toml
    +└── src
    +    ├── cw1_subkeys.rs
    +    ├── cw1_whitelist.rs
    +    ├── cw20_base.rs
    +    ├── cw20_ics20.rs
    +    └── ..

    When importing your crates to get the messages types, you can use the following command in the interface folder.

    shell
    cargo add cw20-base --path ../contracts/cw20-base/
    +cargo add cw20 --path ../packages/cw20

    Integrating single contracts

    Now that you workspace is setup, you can integrate with single contracts using the above section

    More examples and scripts

    You can find more example interactions on the counter-contract example directly in the cw-orchestrator repo:

    FINAL ADVICE: Learn more and explore our full cw-orch documentation !.

    `,58)]))}const g=i(e,[["render",h]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/guides_da-block-time.md.CcLl9c93.js b/pr-528/assets/guides_da-block-time.md.CcLl9c93.js new file mode 100644 index 000000000..ddb366f09 --- /dev/null +++ b/pr-528/assets/guides_da-block-time.md.CcLl9c93.js @@ -0,0 +1,2 @@ +import{_ as s,c as a,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const r=JSON.parse('{"title":"How to configure DA chain block syncing time","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure DA chain block syncing time | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/da-block-time.md","filePath":"guides/da-block-time.md","lastUpdated":1733420866000}'),n={name:"guides/da-block-time.md"};function l(o,i,h,k,p,c){return e(),a("div",null,i[0]||(i[0]=[t(`

    How to configure DA chain block syncing time

    The --rollkit.da_block_time flag is used to configure the time in seconds that the rollup will wait for a block to be synced from the DA chain.

    bash
    --rollkit.da_block_time duration

    An example command would look like this:

    bash
    rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.da_block_time=30s // [!code ++]
    `,5)]))}const g=s(n,[["render",l]]);export{r as __pageData,g as default}; diff --git a/pr-528/assets/guides_da-block-time.md.CcLl9c93.lean.js b/pr-528/assets/guides_da-block-time.md.CcLl9c93.lean.js new file mode 100644 index 000000000..ddb366f09 --- /dev/null +++ b/pr-528/assets/guides_da-block-time.md.CcLl9c93.lean.js @@ -0,0 +1,2 @@ +import{_ as s,c as a,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const r=JSON.parse('{"title":"How to configure DA chain block syncing time","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure DA chain block syncing time | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/da-block-time.md","filePath":"guides/da-block-time.md","lastUpdated":1733420866000}'),n={name:"guides/da-block-time.md"};function l(o,i,h,k,p,c){return e(),a("div",null,i[0]||(i[0]=[t(`

    How to configure DA chain block syncing time

    The --rollkit.da_block_time flag is used to configure the time in seconds that the rollup will wait for a block to be synced from the DA chain.

    bash
    --rollkit.da_block_time duration

    An example command would look like this:

    bash
    rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.da_block_time=30s // [!code ++]
    `,5)]))}const g=s(n,[["render",l]]);export{r as __pageData,g as default}; diff --git a/pr-528/assets/guides_full-node.md.B9sXEJu3.js b/pr-528/assets/guides_full-node.md.B9sXEJu3.js new file mode 100644 index 000000000..ddf7f417b --- /dev/null +++ b/pr-528/assets/guides_full-node.md.B9sXEJu3.js @@ -0,0 +1,14 @@ +import{_ as i,c as a,a3 as e,o as t}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"Rollup Full Node Setup Guide","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollup Full Node Setup Guide | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/full-node.md","filePath":"guides/full-node.md","lastUpdated":1733420866000}'),n={name:"guides/full-node.md"};function l(o,s,h,p,d,r){return t(),a("div",null,s[0]||(s[0]=[e(`

    Rollup Full Node Setup Guide

    Introduction

    This guide covers how to set up a full node to run alongside a sequencer node in a Rollkit-based blockchain network. A full node maintains a complete copy of the blockchain and helps validate transactions, improving the network's decentralization and security.

    Prerequisites

    Before starting, ensure you have:

    • A local Data Availability (DA) network node running on port 7980.
    • A Rollkit sequencer node running and posting blocks to the DA network.
    • The Rollkit CLI installed on your system.

    Setting Up Your Full Node

    Initialize Chain Config and Copy Genesis File

    First, update the config_dir in the rollkit.toml file:

    bash
    [chain]
    +  config_dir = "/root/.yourrollupd" // [!code --]
    +  config_dir = "/root/.yourrollupd_fn" // [!code ++]

    Let's set a terminal variable for the chain ID.

    sh
    CHAIN_ID=gm

    Initialize the chain config for the full node, lets call it FullNode and set the chain ID to your rollup chain ID:

    bash
    rollkit init FullNode --chain-id=$CHAIN_ID

    Copy the genesis file from the sequencer node:

    bash
    cp $HOME/.$CHAIN_ID/config/genesis.json $HOME/.\${CHAIN_ID}_fn/config/genesis.json

    Set Up P2P Connection to Sequencer Node

    Identify the sequencer node's P2P address from its logs. It will look similar to:

    1:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh

    Create an environment variable with the P2P address:

    bash
    export P2P_ID="12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh"

    Start the Full Node

    We are now ready to run our full node. If we are running the full node on the same machine as the sequencer, we need to make sure we update the ports to avoid conflicts.

    Make sure to include these flags with your start command:

    sh
      --rpc.laddr tcp://127.0.0.1:46657 \\
    +  --grpc.address 127.0.0.1:9390 \\
    +  --p2p.laddr "0.0.0.0:46656" \\
    +  --api.address tcp://localhost:1318

    Run your full node with the following command:

    bash
    rollkit start --rollkit.aggregator=false \\
    +  --rollkit.da_address http://127.0.0.1:7980 \\
    +  --p2p.seeds $P2P_ID@127.0.0.1:26656 \\
    +  --minimum-gas-prices 0stake \\
    +  --rpc.laddr tcp://127.0.0.1:46657 \\
    +  --grpc.address 127.0.0.1:9390 \\
    +  --p2p.laddr "0.0.0.0:46656" \\
    +  --api.address tcp://localhost:1318

    Key points about this command:

    • --rollkit.aggregator=false indicates this is not an aggregator node.
    • The ports and addresses are different from the sequencer node to avoid conflicts. Not everything may be necessary for your setup.
    • We use the P2P_ID environment variable to set the seed node.

    Verifying Full Node Operation

    After starting your full node, you should see output similar to:

    2:33PM DBG indexed transactions height=1 module=txindex num_txs=0
    +2:33PM INF block marked as DA included blockHash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC blockHeight=5532 module=BlockManager

    This output indicates that your full node is successfully connecting to the network and processing blocks.

    TIP

    If your rollup uses EVM as an execution layar and you see an error like datadir already used by another process, it means you have to remove all the state from rollup data directory (/root/.yourrollup_fn/data/) and specify a different data directory for the EVM client.

    Conclusion

    You've now set up a full node running alongside your Rollkit sequencer.

    `,36)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default}; diff --git a/pr-528/assets/guides_full-node.md.B9sXEJu3.lean.js b/pr-528/assets/guides_full-node.md.B9sXEJu3.lean.js new file mode 100644 index 000000000..ddf7f417b --- /dev/null +++ b/pr-528/assets/guides_full-node.md.B9sXEJu3.lean.js @@ -0,0 +1,14 @@ +import{_ as i,c as a,a3 as e,o as t}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"Rollup Full Node Setup Guide","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollup Full Node Setup Guide | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/full-node.md","filePath":"guides/full-node.md","lastUpdated":1733420866000}'),n={name:"guides/full-node.md"};function l(o,s,h,p,d,r){return t(),a("div",null,s[0]||(s[0]=[e(`

    Rollup Full Node Setup Guide

    Introduction

    This guide covers how to set up a full node to run alongside a sequencer node in a Rollkit-based blockchain network. A full node maintains a complete copy of the blockchain and helps validate transactions, improving the network's decentralization and security.

    Prerequisites

    Before starting, ensure you have:

    • A local Data Availability (DA) network node running on port 7980.
    • A Rollkit sequencer node running and posting blocks to the DA network.
    • The Rollkit CLI installed on your system.

    Setting Up Your Full Node

    Initialize Chain Config and Copy Genesis File

    First, update the config_dir in the rollkit.toml file:

    bash
    [chain]
    +  config_dir = "/root/.yourrollupd" // [!code --]
    +  config_dir = "/root/.yourrollupd_fn" // [!code ++]

    Let's set a terminal variable for the chain ID.

    sh
    CHAIN_ID=gm

    Initialize the chain config for the full node, lets call it FullNode and set the chain ID to your rollup chain ID:

    bash
    rollkit init FullNode --chain-id=$CHAIN_ID

    Copy the genesis file from the sequencer node:

    bash
    cp $HOME/.$CHAIN_ID/config/genesis.json $HOME/.\${CHAIN_ID}_fn/config/genesis.json

    Set Up P2P Connection to Sequencer Node

    Identify the sequencer node's P2P address from its logs. It will look similar to:

    1:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh

    Create an environment variable with the P2P address:

    bash
    export P2P_ID="12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh"

    Start the Full Node

    We are now ready to run our full node. If we are running the full node on the same machine as the sequencer, we need to make sure we update the ports to avoid conflicts.

    Make sure to include these flags with your start command:

    sh
      --rpc.laddr tcp://127.0.0.1:46657 \\
    +  --grpc.address 127.0.0.1:9390 \\
    +  --p2p.laddr "0.0.0.0:46656" \\
    +  --api.address tcp://localhost:1318

    Run your full node with the following command:

    bash
    rollkit start --rollkit.aggregator=false \\
    +  --rollkit.da_address http://127.0.0.1:7980 \\
    +  --p2p.seeds $P2P_ID@127.0.0.1:26656 \\
    +  --minimum-gas-prices 0stake \\
    +  --rpc.laddr tcp://127.0.0.1:46657 \\
    +  --grpc.address 127.0.0.1:9390 \\
    +  --p2p.laddr "0.0.0.0:46656" \\
    +  --api.address tcp://localhost:1318

    Key points about this command:

    • --rollkit.aggregator=false indicates this is not an aggregator node.
    • The ports and addresses are different from the sequencer node to avoid conflicts. Not everything may be necessary for your setup.
    • We use the P2P_ID environment variable to set the seed node.

    Verifying Full Node Operation

    After starting your full node, you should see output similar to:

    2:33PM DBG indexed transactions height=1 module=txindex num_txs=0
    +2:33PM INF block marked as DA included blockHash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC blockHeight=5532 module=BlockManager

    This output indicates that your full node is successfully connecting to the network and processing blocks.

    TIP

    If your rollup uses EVM as an execution layar and you see an error like datadir already used by another process, it means you have to remove all the state from rollup data directory (/root/.yourrollup_fn/data/) and specify a different data directory for the EVM client.

    Conclusion

    You've now set up a full node running alongside your Rollkit sequencer.

    `,36)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default}; diff --git a/pr-528/assets/guides_gas-price.md.CkEYB_xd.js b/pr-528/assets/guides_gas-price.md.CkEYB_xd.js new file mode 100644 index 000000000..e5b7adf8a --- /dev/null +++ b/pr-528/assets/guides_gas-price.md.CkEYB_xd.js @@ -0,0 +1 @@ +import{_ as s,c as a,a3 as i,o as t}from"./chunks/framework.B8-VHxRu.js";const g=JSON.parse('{"title":"How to configure gas price","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure gas price | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/gas-price.md","filePath":"guides/gas-price.md","lastUpdated":1733420866000}'),o={name:"guides/gas-price.md"};function n(l,e,r,p,c,h){return t(),a("div",null,e[0]||(e[0]=[i('

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    rollkit start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    rollkit start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    ',11)]))}const u=s(o,[["render",n]]);export{g as __pageData,u as default}; diff --git a/pr-528/assets/guides_gas-price.md.CkEYB_xd.lean.js b/pr-528/assets/guides_gas-price.md.CkEYB_xd.lean.js new file mode 100644 index 000000000..e5b7adf8a --- /dev/null +++ b/pr-528/assets/guides_gas-price.md.CkEYB_xd.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,a3 as i,o as t}from"./chunks/framework.B8-VHxRu.js";const g=JSON.parse('{"title":"How to configure gas price","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure gas price | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/gas-price.md","filePath":"guides/gas-price.md","lastUpdated":1733420866000}'),o={name:"guides/gas-price.md"};function n(l,e,r,p,c,h){return t(),a("div",null,e[0]||(e[0]=[i('

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    rollkit start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    rollkit start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    ',11)]))}const u=s(o,[["render",n]]);export{g as __pageData,u as default}; diff --git a/pr-528/assets/guides_ibc-connection.md.CtgAqtY-.js b/pr-528/assets/guides_ibc-connection.md.CtgAqtY-.js new file mode 100644 index 000000000..5a63dacc3 --- /dev/null +++ b/pr-528/assets/guides_ibc-connection.md.CtgAqtY-.js @@ -0,0 +1,107 @@ +import{_ as i,c as a,a3 as t,o as n}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"IBC connection tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"IBC connection tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/ibc-connection.md","filePath":"guides/ibc-connection.md","lastUpdated":1733420866000}'),h={name:"guides/ibc-connection.md"};function l(e,s,k,p,o,r){return n(),a("div",null,s[0]||(s[0]=[t(`

    IBC connection tutorial

    In this tutorial, we'll learn how to use an Inter-Blockchain Communication (IBC) Protocol relayer to create an IBC connection between a GM world rollup and an Osmosis local testnet.

    Disclaimer

    This initial version of IBC has high trust assumptions where receiving chains only verify the signature of the single rollup node. For use in production, it's recommended to wait for trust-minimized IBC support which includes state proofs and conditional clients. Learn more about how conditional clients work in ibc-go issue 5112 and a tracking issue for state proofs in rollkit issue 1632.

    💻 Pre-requisites

    Software requirements

    • Docker running on your machine
    • Go version ≥ 1.21.0
    • Ignite version ≥ v28.2.0

    Run a GM rollup chain

    Before you can create an IBC connection, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.13.1

    WARNING

    You will need to use Ignite v28.2.0, which you can install with:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    Scaffold the GM chain:

    bash
    cd $HOME
    +ignite scaffold chain gm --address-prefix gm

    Change into the gm directory and install Rollkit with IBC compatibility:

    bash
    cd gm
    +go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.6-rollkit-v0.13.3-no-fraud-proofs
    +go mod tidy
    +go mod download

    Now download the script to run the GM chain:

    bash
    wget https://rollkit.dev/gm/init-local.sh

    Run the GM rollup:

    bash
    bash init-local.sh

    Run your local-osmosis-testnet

    Install Osmosis binary

    bash
    cd $HOME
    +git clone https://github.com/osmosis-labs/osmosis
    +cd osmosis
    +git checkout v21.0.1
    +make install

    Run local-osmosis-testnet

    You also need to start local-osmosis-testnet in a separate terminal by downloading and running this script:

    bash
    wget https://rollkit.dev/ibc/init-osmosis-local.sh

    Run the script:

    bash
    bash init-osmosis-local.sh

    This will start your local Osmosis testnet, we'll create IBC connection between this testnet and GM chain in the next step.

    NOTE: Here, the key's name from init-osmosis-local.sh is mykey and osmosis-relay but you can modify this script to change the name of your key.

    TIP

    We're using the --rpc.addr [ip:port] flag to point to port 46657, which is the custom port to avoid conflicts with other running chains.

    Funds

    The following private key has funds on your Osmosis chain:

    bash
    Keyname: osmosis-relay
    +Address: osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll
    +Mnemonic: "milk verify alley price trust come maple will suit hood clay exotic"

    The following private key has funds on your GM rollup chain:

    bash
    Keyname: gm-relay
    +Address: gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
    +Mnemonic: "milk verify alley price trust come maple will suit hood clay exotic"

    Setup relayer, create IBC connection and start relaying packets

    A relayer is like a middleman for blockchains in the IBC protocol. Instead of directly talking to each other, blockchains communicate through relayers. These relayers keep an eye on the paths that are open between different blockchains. When there's something new or changed, the relayer makes sure the message gets sent to the right place on the other blockchain.

    Apart from just passing messages, a relayer can also set up new paths between blockchains. This involves creating clients, connections, and channels, which are like communication channels between the blockchains. So, in simpler terms, a relayer makes sure blockchains can talk to each other smoothly.

    Install relayer

    bash
    cd $HOME
    +git clone https://github.com/cosmos/relayer
    +cd relayer
    +git checkout v2.4.2
    +make install

    Verify your rly version with rly version:

    bash
    rly version

    It should return:

    bash
    version: 2.4.2
    +commit: 259b1278264180a2aefc2085f1b55753849c4815
    +cosmos-sdk: v0.47.5
    +go: go1.21.4 darwin/arm64

    Setup relayer config

    Firstly, generate an empty config file with this command:

    bash
    rly config init

    Afterward, replace the content of the file at $HOME/.relayer/config/config.yaml with the following configuration using any text editor you prefer.

    yaml
    global:
    +    api-listen-addr: :5183
    +    timeout: 10s
    +    memo: ""
    +    light-cache-size: 20
    +chains:
    +    osmo-local:
    +        type: cosmos
    +        value:
    +            key-directory: /root/.relayer/keys/osmosis-testnet-1
    +            key: default
    +            chain-id: osmosis-testnet-1
    +            rpc-addr: http://localhost:46657 
    +            account-prefix: osmo
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.1uosmo
    +            min-gas-amount: 100000
    +            max-gas-amount: 1000000
    +            debug: true
    +            timeout: 20s
    +            block-timeout: ""
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ""
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +    gm-local:
    +        type: cosmos
    +        value:
    +            key-directory: /root/.relayer/keys/test
    +            key: default
    +            chain-id: gm
    +            rpc-addr: http://localhost:36657
    +            account-prefix: gm
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.1stake
    +            min-gas-amount: 100000
    +            max-gas-amount: 1000000
    +            debug: true
    +            timeout: 20s
    +            block-timeout: ""
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ""
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +paths: {}

    Create relayer account

    Add keys for each chain with this command

    The mnemonic-words are the mnemonics you received when initializing the local node. Ensure that each wallet has tokens to start relaying.

    bash
    rly keys restore osmo-local default "milk verify alley price trust come maple will suit hood clay exotic"
    +rly keys restore gm-local default "milk verify alley price trust come maple will suit hood clay exotic"

    Create IBC channel

    Create a new blank path to be used in generating a new path (connection and client) between two chains

    bash
    rly paths new osmosis-testnet-1 gm osmo-gm

    and then you can create channel with this command

    bash
    rly transact link osmo-gm

    This is a triple whammy; it creates a client, connection, and channel all in one command.

    Alternatively, you may create them one by one using these commands:

    bash
    rly transact clients osmo-local gm-local osmo-gm
    +rly transact connection osmo-gm
    +rly transact channel osmo-gm --src-port transfer --dst-port transfer --order unordered --version ics20-1

    At the end, it should return something like this :

    bash
    2024-02-15T09:22:04.062649Z info Connection handshake termination candidate {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0", "termination_client_id": "07-tendermint-0", "observed_client_id": "07-tendermint-0", "termination_counterparty_client_id": "07-tendermint-0", "observed_counterparty_client_id": "07-tendermint-0"}
    +2024-02-15T09:22:04.062667Z info Found termination condition for connection handshake {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0"}
    +2024-02-15T09:22:04.069040Z info Starting event processor for channel handshake {"src_chain_id": "osmosis-testnet-1", "src_port_id": "transfer", "dst_chain_id": "gm", "dst_port_id": "transfer"}
    +2024-02-15T09:22:04.070364Z info Chain is in sync {"chain_name": "gm-local", "chain_id": "gm"}
    +2024-02-15T09:22:04.070389Z info Chain is in sync {"chain_name": "osmo-local", "chain_id": "osmosis-testnet-1"}
    +2024-02-15T09:22:10.310493Z info Successful transaction {"provider_type": "cosmos", "chain_id": "osmosis-testnet-1", "gas_used": 165662, "fees": "24023uosmo", "fee_payer": "osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll", "height": 12, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenInit"], "tx_hash": "D7E7E6EC0299C120C0E32167C11F0B60921EF88CC6524345BCEB3B266EF727AA"}
    +2024-02-15T09:22:15.293348Z info Successful transaction {"provider_type": "cosmos", "chain_id": "gm", "gas_used": 171590, "fees": "6510stake", "fee_payer": "gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy", "height": 61, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenTry"], "tx_hash": "DE5F15D2CEB85278FA916185A01FBA5DA604563462893288EC7A8745FB597B96"}
    +2024-02-15T09:22:18.300397Z info Successful transaction {"provider_type": "cosmos", "chain_id": "osmosis-testnet-1", "gas_used": 126689, "fees": "18177uosmo", "fee_payer": "osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll", "height": 14, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenAck"], "tx_hash": "CB1FA1D3309513FC6C8599606DEFE75164F4CAE2ABD101D78133B287862A5ACA"}
    +2024-02-15T09:22:19.078583Z info Successfully created new channel {"chain_name": "osmo-local", "chain_id": "osmosis-testnet-1", "channel_id": "channel-0", "connection_id": "connection-0", "port_id": "transfer"}
    +2024-02-15T09:22:23.296353Z info Successful transaction {"provider_type": "cosmos", "chain_id": "gm", "gas_used": 124972, "fees": "4762stake", "fee_payer": "gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy", "height": 69, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenConfirm"], "tx_hash": "B917289EC7566B57B2D0EC759F2E703DBD652F9044362E78C05C4F6DF8FD7AC7"}
    +2024-02-15T09:22:24.080924Z info Successfully created new channel {"chain_name": "gm-local", "chain_id": "gm", "channel_id": "channel-0", "connection_id": "connection-0", "port_id": "transfer"}[!code focus]
    +2024-02-15T09:22:24.080992Z info Channel handshake termination candidate {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0", "termination_port_id": "transfer", "observed_port_id": "transfer", "termination_counterparty_port_id": "transfer", "observed_counterparty_port_id": "transfer"}//[!code focus]
    +2024-02-15T09:22:24.080998Z info Found termination condition for channel handshake {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0"}//[!code focus]

    TIP

    Notice your channel_id, you need to specify it when you make the IBC transfer transaction in next step!

    Start relaying packets

    After completing all these steps, you can start relaying with:

    bash
    rly start

    IBC transfer of tokens between osmosis-testnet-1 and gm is now possible.

    Transfer token from rollup chain to osmosis-local

    Make an ibc-transfer transaction. This tx will transfer 1000000stake from gm-key to receiver address in your local-osmosis chain.

    Set your keys and channel ID as variables:

    bash
    OSMO_KEY=osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll
    +GM_KEY=gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
    +CHANNEL_ID=channel-0
    bash
    gmd tx ibc-transfer transfer transfer $CHANNEL_ID $OSMO_KEY 42069stake --node tcp://localhost:36657 --chain-id gm --from gm-key --keyring-backend test --fees 5000stake

    Then check the balance of the receiver address to see if the token has been relayed or not.

    bash
    osmosisd query bank balances $OSMO_KEY --node tcp://localhost:46657 --chain-id osmosis-testnet-1

    The balances query command should return something like this:

    bash
    balances:
    +- amount: "42069"
    +  denom: ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878
    +- amount: "100000000999876914"
    +  denom: uosmo
    +- amount: "100000000000000"
    +  denom: utest
    +pagination:
    +  next_key: null
    +  total: "0"

    TIP

    ibc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273 is corresponding IBC denom in osmosis-testnet for native denom stake in GM chain. Your hash will be different than this and specific to your channel.

    Transfer token back from osmosis-local to rollup chain

    Set your channel hash from the last step like this:

    bash
    IBC_DENOM_STRING=youribc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273

    Make an ibc-transfer transaction:

    bash
    osmosisd tx ibc-transfer transfer transfer $CHANNEL_ID $GM_KEY 42069$IBC_DENOM_STRING --node tcp://localhost:46657 --chain-id osmosis-testnet-1 --from osmosis-relay --fees 500uosmo

    And then check the balances of the receiver address to see if the token has been relayed or not:

    bash
    gmd query bank balances $GM_KEY --node tcp://localhost:36657

    The balances query command should return something like this, which is close to the original balance, minus some gas fees:

    bash
    gmd query bank balances $GM_KEY --node tcp://localhost:36657
    +balances:
    +- amount: "9999999999999999999897679"
    +  denom: stake
    +pagination:
    +  total: "1"
    `,87)]))}const g=i(h,[["render",l]]);export{d as __pageData,g as default}; diff --git a/pr-528/assets/guides_ibc-connection.md.CtgAqtY-.lean.js b/pr-528/assets/guides_ibc-connection.md.CtgAqtY-.lean.js new file mode 100644 index 000000000..5a63dacc3 --- /dev/null +++ b/pr-528/assets/guides_ibc-connection.md.CtgAqtY-.lean.js @@ -0,0 +1,107 @@ +import{_ as i,c as a,a3 as t,o as n}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"IBC connection tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"IBC connection tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/ibc-connection.md","filePath":"guides/ibc-connection.md","lastUpdated":1733420866000}'),h={name:"guides/ibc-connection.md"};function l(e,s,k,p,o,r){return n(),a("div",null,s[0]||(s[0]=[t(`

    IBC connection tutorial

    In this tutorial, we'll learn how to use an Inter-Blockchain Communication (IBC) Protocol relayer to create an IBC connection between a GM world rollup and an Osmosis local testnet.

    Disclaimer

    This initial version of IBC has high trust assumptions where receiving chains only verify the signature of the single rollup node. For use in production, it's recommended to wait for trust-minimized IBC support which includes state proofs and conditional clients. Learn more about how conditional clients work in ibc-go issue 5112 and a tracking issue for state proofs in rollkit issue 1632.

    💻 Pre-requisites

    Software requirements

    • Docker running on your machine
    • Go version ≥ 1.21.0
    • Ignite version ≥ v28.2.0

    Run a GM rollup chain

    Before you can create an IBC connection, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.13.1

    WARNING

    You will need to use Ignite v28.2.0, which you can install with:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    Scaffold the GM chain:

    bash
    cd $HOME
    +ignite scaffold chain gm --address-prefix gm

    Change into the gm directory and install Rollkit with IBC compatibility:

    bash
    cd gm
    +go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.6-rollkit-v0.13.3-no-fraud-proofs
    +go mod tidy
    +go mod download

    Now download the script to run the GM chain:

    bash
    wget https://rollkit.dev/gm/init-local.sh

    Run the GM rollup:

    bash
    bash init-local.sh

    Run your local-osmosis-testnet

    Install Osmosis binary

    bash
    cd $HOME
    +git clone https://github.com/osmosis-labs/osmosis
    +cd osmosis
    +git checkout v21.0.1
    +make install

    Run local-osmosis-testnet

    You also need to start local-osmosis-testnet in a separate terminal by downloading and running this script:

    bash
    wget https://rollkit.dev/ibc/init-osmosis-local.sh

    Run the script:

    bash
    bash init-osmosis-local.sh

    This will start your local Osmosis testnet, we'll create IBC connection between this testnet and GM chain in the next step.

    NOTE: Here, the key's name from init-osmosis-local.sh is mykey and osmosis-relay but you can modify this script to change the name of your key.

    TIP

    We're using the --rpc.addr [ip:port] flag to point to port 46657, which is the custom port to avoid conflicts with other running chains.

    Funds

    The following private key has funds on your Osmosis chain:

    bash
    Keyname: osmosis-relay
    +Address: osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll
    +Mnemonic: "milk verify alley price trust come maple will suit hood clay exotic"

    The following private key has funds on your GM rollup chain:

    bash
    Keyname: gm-relay
    +Address: gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
    +Mnemonic: "milk verify alley price trust come maple will suit hood clay exotic"

    Setup relayer, create IBC connection and start relaying packets

    A relayer is like a middleman for blockchains in the IBC protocol. Instead of directly talking to each other, blockchains communicate through relayers. These relayers keep an eye on the paths that are open between different blockchains. When there's something new or changed, the relayer makes sure the message gets sent to the right place on the other blockchain.

    Apart from just passing messages, a relayer can also set up new paths between blockchains. This involves creating clients, connections, and channels, which are like communication channels between the blockchains. So, in simpler terms, a relayer makes sure blockchains can talk to each other smoothly.

    Install relayer

    bash
    cd $HOME
    +git clone https://github.com/cosmos/relayer
    +cd relayer
    +git checkout v2.4.2
    +make install

    Verify your rly version with rly version:

    bash
    rly version

    It should return:

    bash
    version: 2.4.2
    +commit: 259b1278264180a2aefc2085f1b55753849c4815
    +cosmos-sdk: v0.47.5
    +go: go1.21.4 darwin/arm64

    Setup relayer config

    Firstly, generate an empty config file with this command:

    bash
    rly config init

    Afterward, replace the content of the file at $HOME/.relayer/config/config.yaml with the following configuration using any text editor you prefer.

    yaml
    global:
    +    api-listen-addr: :5183
    +    timeout: 10s
    +    memo: ""
    +    light-cache-size: 20
    +chains:
    +    osmo-local:
    +        type: cosmos
    +        value:
    +            key-directory: /root/.relayer/keys/osmosis-testnet-1
    +            key: default
    +            chain-id: osmosis-testnet-1
    +            rpc-addr: http://localhost:46657 
    +            account-prefix: osmo
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.1uosmo
    +            min-gas-amount: 100000
    +            max-gas-amount: 1000000
    +            debug: true
    +            timeout: 20s
    +            block-timeout: ""
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ""
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +    gm-local:
    +        type: cosmos
    +        value:
    +            key-directory: /root/.relayer/keys/test
    +            key: default
    +            chain-id: gm
    +            rpc-addr: http://localhost:36657
    +            account-prefix: gm
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.1stake
    +            min-gas-amount: 100000
    +            max-gas-amount: 1000000
    +            debug: true
    +            timeout: 20s
    +            block-timeout: ""
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ""
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +paths: {}

    Create relayer account

    Add keys for each chain with this command

    The mnemonic-words are the mnemonics you received when initializing the local node. Ensure that each wallet has tokens to start relaying.

    bash
    rly keys restore osmo-local default "milk verify alley price trust come maple will suit hood clay exotic"
    +rly keys restore gm-local default "milk verify alley price trust come maple will suit hood clay exotic"

    Create IBC channel

    Create a new blank path to be used in generating a new path (connection and client) between two chains

    bash
    rly paths new osmosis-testnet-1 gm osmo-gm

    and then you can create channel with this command

    bash
    rly transact link osmo-gm

    This is a triple whammy; it creates a client, connection, and channel all in one command.

    Alternatively, you may create them one by one using these commands:

    bash
    rly transact clients osmo-local gm-local osmo-gm
    +rly transact connection osmo-gm
    +rly transact channel osmo-gm --src-port transfer --dst-port transfer --order unordered --version ics20-1

    At the end, it should return something like this :

    bash
    2024-02-15T09:22:04.062649Z info Connection handshake termination candidate {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0", "termination_client_id": "07-tendermint-0", "observed_client_id": "07-tendermint-0", "termination_counterparty_client_id": "07-tendermint-0", "observed_counterparty_client_id": "07-tendermint-0"}
    +2024-02-15T09:22:04.062667Z info Found termination condition for connection handshake {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0"}
    +2024-02-15T09:22:04.069040Z info Starting event processor for channel handshake {"src_chain_id": "osmosis-testnet-1", "src_port_id": "transfer", "dst_chain_id": "gm", "dst_port_id": "transfer"}
    +2024-02-15T09:22:04.070364Z info Chain is in sync {"chain_name": "gm-local", "chain_id": "gm"}
    +2024-02-15T09:22:04.070389Z info Chain is in sync {"chain_name": "osmo-local", "chain_id": "osmosis-testnet-1"}
    +2024-02-15T09:22:10.310493Z info Successful transaction {"provider_type": "cosmos", "chain_id": "osmosis-testnet-1", "gas_used": 165662, "fees": "24023uosmo", "fee_payer": "osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll", "height": 12, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenInit"], "tx_hash": "D7E7E6EC0299C120C0E32167C11F0B60921EF88CC6524345BCEB3B266EF727AA"}
    +2024-02-15T09:22:15.293348Z info Successful transaction {"provider_type": "cosmos", "chain_id": "gm", "gas_used": 171590, "fees": "6510stake", "fee_payer": "gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy", "height": 61, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenTry"], "tx_hash": "DE5F15D2CEB85278FA916185A01FBA5DA604563462893288EC7A8745FB597B96"}
    +2024-02-15T09:22:18.300397Z info Successful transaction {"provider_type": "cosmos", "chain_id": "osmosis-testnet-1", "gas_used": 126689, "fees": "18177uosmo", "fee_payer": "osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll", "height": 14, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenAck"], "tx_hash": "CB1FA1D3309513FC6C8599606DEFE75164F4CAE2ABD101D78133B287862A5ACA"}
    +2024-02-15T09:22:19.078583Z info Successfully created new channel {"chain_name": "osmo-local", "chain_id": "osmosis-testnet-1", "channel_id": "channel-0", "connection_id": "connection-0", "port_id": "transfer"}
    +2024-02-15T09:22:23.296353Z info Successful transaction {"provider_type": "cosmos", "chain_id": "gm", "gas_used": 124972, "fees": "4762stake", "fee_payer": "gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy", "height": 69, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenConfirm"], "tx_hash": "B917289EC7566B57B2D0EC759F2E703DBD652F9044362E78C05C4F6DF8FD7AC7"}
    +2024-02-15T09:22:24.080924Z info Successfully created new channel {"chain_name": "gm-local", "chain_id": "gm", "channel_id": "channel-0", "connection_id": "connection-0", "port_id": "transfer"}[!code focus]
    +2024-02-15T09:22:24.080992Z info Channel handshake termination candidate {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0", "termination_port_id": "transfer", "observed_port_id": "transfer", "termination_counterparty_port_id": "transfer", "observed_counterparty_port_id": "transfer"}//[!code focus]
    +2024-02-15T09:22:24.080998Z info Found termination condition for channel handshake {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0"}//[!code focus]

    TIP

    Notice your channel_id, you need to specify it when you make the IBC transfer transaction in next step!

    Start relaying packets

    After completing all these steps, you can start relaying with:

    bash
    rly start

    IBC transfer of tokens between osmosis-testnet-1 and gm is now possible.

    Transfer token from rollup chain to osmosis-local

    Make an ibc-transfer transaction. This tx will transfer 1000000stake from gm-key to receiver address in your local-osmosis chain.

    Set your keys and channel ID as variables:

    bash
    OSMO_KEY=osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll
    +GM_KEY=gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
    +CHANNEL_ID=channel-0
    bash
    gmd tx ibc-transfer transfer transfer $CHANNEL_ID $OSMO_KEY 42069stake --node tcp://localhost:36657 --chain-id gm --from gm-key --keyring-backend test --fees 5000stake

    Then check the balance of the receiver address to see if the token has been relayed or not.

    bash
    osmosisd query bank balances $OSMO_KEY --node tcp://localhost:46657 --chain-id osmosis-testnet-1

    The balances query command should return something like this:

    bash
    balances:
    +- amount: "42069"
    +  denom: ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878
    +- amount: "100000000999876914"
    +  denom: uosmo
    +- amount: "100000000000000"
    +  denom: utest
    +pagination:
    +  next_key: null
    +  total: "0"

    TIP

    ibc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273 is corresponding IBC denom in osmosis-testnet for native denom stake in GM chain. Your hash will be different than this and specific to your channel.

    Transfer token back from osmosis-local to rollup chain

    Set your channel hash from the last step like this:

    bash
    IBC_DENOM_STRING=youribc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273

    Make an ibc-transfer transaction:

    bash
    osmosisd tx ibc-transfer transfer transfer $CHANNEL_ID $GM_KEY 42069$IBC_DENOM_STRING --node tcp://localhost:46657 --chain-id osmosis-testnet-1 --from osmosis-relay --fees 500uosmo

    And then check the balances of the receiver address to see if the token has been relayed or not:

    bash
    gmd query bank balances $GM_KEY --node tcp://localhost:36657

    The balances query command should return something like this, which is close to the original balance, minus some gas fees:

    bash
    gmd query bank balances $GM_KEY --node tcp://localhost:36657
    +balances:
    +- amount: "9999999999999999999897679"
    +  denom: stake
    +pagination:
    +  total: "1"
    `,87)]))}const g=i(h,[["render",l]]);export{d as __pageData,g as default}; diff --git a/pr-528/assets/guides_ignite-rollkit.md.BTB38Ddl.js b/pr-528/assets/guides_ignite-rollkit.md.BTB38Ddl.js new file mode 100644 index 000000000..0fceb3897 --- /dev/null +++ b/pr-528/assets/guides_ignite-rollkit.md.BTB38Ddl.js @@ -0,0 +1 @@ +/* empty css */import{c as s}from"./chunks/constants.C1G_zmdY.js";import{c as n,a3 as t,j as a,t as l,k as e,o}from"./chunks/framework.B8-VHxRu.js";const h={class:"language-bash vp-adaptive-theme"},r={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},p={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},k={class:"language-bash vp-adaptive-theme"},g={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},c={class:"line"},u={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},v=JSON.parse('{"title":"How to Use Ignite to Create a Rollkit App","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Use Ignite to Create a Rollkit App | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/ignite-rollkit.md","filePath":"guides/ignite-rollkit.md","lastUpdated":1733420866000}'),b={name:"guides/ignite-rollkit.md"},B=Object.assign(b,{setup(y){return(F,i)=>(o(),n("div",null,[i[10]||(i[10]=t('

    How to Use Ignite to Create a Rollkit App

    This guide will walk you through the process of using Ignite to create a Rollkit app.

    Install Ignite

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    ',5)),a("div",h,[i[3]||(i[3]=a("button",{title:"Copy Code",class:"copy"},null,-1)),i[4]||(i[4]=a("span",{class:"lang"},"bash",-1)),a("pre",r,[a("code",null,[a("span",p,[i[0]||(i[0]=a("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"curl",-1)),a("span",d," https://get.ignite.com/cli@"+l(e(s).igniteVersionTag)+"!",1),i[1]||(i[1]=a("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}}," |",-1)),i[2]||(i[2]=a("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}}," bash",-1))])])])]),i[11]||(i[11]=t('

    Once Ignite is installed, scaffold a new blockchain with the following command:

    bash
    ignite scaffold chain gm --address-prefix gm --minimal --skip-proto

    This will create the gm blockchain. Navigate to the blockchain directory:

    bash
    cd gm

    Install Ignite App Rollkit

    In a new terminal window, you'll now install and run the Ignite App Rollkit.

    Run the following command to install the Rollkit App:

    ',7)),a("div",k,[i[8]||(i[8]=a("button",{title:"Copy Code",class:"copy"},null,-1)),i[9]||(i[9]=a("span",{class:"lang"},"bash",-1)),a("pre",g,[a("code",null,[a("span",c,[i[5]||(i[5]=a("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"ignite",-1)),i[6]||(i[6]=a("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," app",-1)),i[7]||(i[7]=a("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install",-1)),a("span",u," github.com/ignite/apps/rollkit@"+l(e(s).rollkitIgniteAppVersion),1)])])])]),i[12]||(i[12]=t('

    This installs the Rollkit application, which will be integrated into your blockchain.

    Add Rollkit Features

    Enhance your blockchain by adding Rollkit features. Use the following command:

    bash
    ignite rollkit add

    Build your chain

    Build your chain using the following command:

    bash
    ignite chain build

    Initialize Your Blockchain

    Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows:

    bash
    ignite rollkit init

    Initialize Rollkit CLI Configuration

    To initialize the Rollkit CLI configuration, generate the rollkit.toml file by running the following command:

    bash
    rollkit toml init

    This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain.

    Start your chain

    Now you are ready to start your chain. We need to include 2 flags:

    1. --rollkit.aggregator to signal that this node is the block producer
    2. --rollkit.sequencer_rollup_id gm to share the chain ID with the sequencer.

    Start your chain using the following command:

    bash
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id gm

    Your rollkit chain is now up and running.

    Summary

    By following these steps, you've successfully installed Ignite, integrated Rollkit features into your blockchain, and configured the Rollkit CLI to run your chain against a mock DA and mock sequencer.

    ',22))]))}});export{v as __pageData,B as default}; diff --git a/pr-528/assets/guides_ignite-rollkit.md.BTB38Ddl.lean.js b/pr-528/assets/guides_ignite-rollkit.md.BTB38Ddl.lean.js new file mode 100644 index 000000000..0fceb3897 --- /dev/null +++ b/pr-528/assets/guides_ignite-rollkit.md.BTB38Ddl.lean.js @@ -0,0 +1 @@ +/* empty css */import{c as s}from"./chunks/constants.C1G_zmdY.js";import{c as n,a3 as t,j as a,t as l,k as e,o}from"./chunks/framework.B8-VHxRu.js";const h={class:"language-bash vp-adaptive-theme"},r={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},p={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},k={class:"language-bash vp-adaptive-theme"},g={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},c={class:"line"},u={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},v=JSON.parse('{"title":"How to Use Ignite to Create a Rollkit App","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Use Ignite to Create a Rollkit App | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/ignite-rollkit.md","filePath":"guides/ignite-rollkit.md","lastUpdated":1733420866000}'),b={name:"guides/ignite-rollkit.md"},B=Object.assign(b,{setup(y){return(F,i)=>(o(),n("div",null,[i[10]||(i[10]=t('

    How to Use Ignite to Create a Rollkit App

    This guide will walk you through the process of using Ignite to create a Rollkit app.

    Install Ignite

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    ',5)),a("div",h,[i[3]||(i[3]=a("button",{title:"Copy Code",class:"copy"},null,-1)),i[4]||(i[4]=a("span",{class:"lang"},"bash",-1)),a("pre",r,[a("code",null,[a("span",p,[i[0]||(i[0]=a("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"curl",-1)),a("span",d," https://get.ignite.com/cli@"+l(e(s).igniteVersionTag)+"!",1),i[1]||(i[1]=a("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}}," |",-1)),i[2]||(i[2]=a("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}}," bash",-1))])])])]),i[11]||(i[11]=t('

    Once Ignite is installed, scaffold a new blockchain with the following command:

    bash
    ignite scaffold chain gm --address-prefix gm --minimal --skip-proto

    This will create the gm blockchain. Navigate to the blockchain directory:

    bash
    cd gm

    Install Ignite App Rollkit

    In a new terminal window, you'll now install and run the Ignite App Rollkit.

    Run the following command to install the Rollkit App:

    ',7)),a("div",k,[i[8]||(i[8]=a("button",{title:"Copy Code",class:"copy"},null,-1)),i[9]||(i[9]=a("span",{class:"lang"},"bash",-1)),a("pre",g,[a("code",null,[a("span",c,[i[5]||(i[5]=a("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"ignite",-1)),i[6]||(i[6]=a("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," app",-1)),i[7]||(i[7]=a("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install",-1)),a("span",u," github.com/ignite/apps/rollkit@"+l(e(s).rollkitIgniteAppVersion),1)])])])]),i[12]||(i[12]=t('

    This installs the Rollkit application, which will be integrated into your blockchain.

    Add Rollkit Features

    Enhance your blockchain by adding Rollkit features. Use the following command:

    bash
    ignite rollkit add

    Build your chain

    Build your chain using the following command:

    bash
    ignite chain build

    Initialize Your Blockchain

    Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows:

    bash
    ignite rollkit init

    Initialize Rollkit CLI Configuration

    To initialize the Rollkit CLI configuration, generate the rollkit.toml file by running the following command:

    bash
    rollkit toml init

    This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain.

    Start your chain

    Now you are ready to start your chain. We need to include 2 flags:

    1. --rollkit.aggregator to signal that this node is the block producer
    2. --rollkit.sequencer_rollup_id gm to share the chain ID with the sequencer.

    Start your chain using the following command:

    bash
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id gm

    Your rollkit chain is now up and running.

    Summary

    By following these steps, you've successfully installed Ignite, integrated Rollkit features into your blockchain, and configured the Rollkit CLI to run your chain against a mock DA and mock sequencer.

    ',22))]))}});export{v as __pageData,B as default}; diff --git a/pr-528/assets/guides_lazy-sequencing.md.CC98QQJ5.js b/pr-528/assets/guides_lazy-sequencing.md.CC98QQJ5.js new file mode 100644 index 000000000..60a35606f --- /dev/null +++ b/pr-528/assets/guides_lazy-sequencing.md.CC98QQJ5.js @@ -0,0 +1,3 @@ +import{_ as i,c as a,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"How to Use Lazy Sequencing (Aggregation)","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Use Lazy Sequencing (Aggregation) | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/lazy-sequencing.md","filePath":"guides/lazy-sequencing.md","lastUpdated":1733420866000}'),n={name:"guides/lazy-sequencing.md"};function l(o,s,h,p,r,k){return e(),a("div",null,s[0]||(s[0]=[t(`

    How to Use Lazy Sequencing (Aggregation)

    In this guide, we'll go over how to use lazy sequencing.

    This feature was introduced in Rollkit v0.7.0 (with custom buffer time later in v0.13.7) and allows rollup operators to wait for transactions before building blocks. This prevents the rollup from building empty blocks.

    To turn on lazy sequencing, add the following flag to your start command:

    bash
    --rollkit.lazy_aggregator

    Additionally, if you want to specify the time interval used for block production even if there are no transactions, use:

    bash
    --rollkit.lazy_block_time <duration>

    An example command with a custom block time of 1 minute:

    bash
    # start the chain
    +rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.lazy_aggregator --rollkit.lazy_block_time=1m0s // [!code ++]
    `,9)]))}const c=i(n,[["render",l]]);export{d as __pageData,c as default}; diff --git a/pr-528/assets/guides_lazy-sequencing.md.CC98QQJ5.lean.js b/pr-528/assets/guides_lazy-sequencing.md.CC98QQJ5.lean.js new file mode 100644 index 000000000..60a35606f --- /dev/null +++ b/pr-528/assets/guides_lazy-sequencing.md.CC98QQJ5.lean.js @@ -0,0 +1,3 @@ +import{_ as i,c as a,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"How to Use Lazy Sequencing (Aggregation)","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Use Lazy Sequencing (Aggregation) | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/lazy-sequencing.md","filePath":"guides/lazy-sequencing.md","lastUpdated":1733420866000}'),n={name:"guides/lazy-sequencing.md"};function l(o,s,h,p,r,k){return e(),a("div",null,s[0]||(s[0]=[t(`

    How to Use Lazy Sequencing (Aggregation)

    In this guide, we'll go over how to use lazy sequencing.

    This feature was introduced in Rollkit v0.7.0 (with custom buffer time later in v0.13.7) and allows rollup operators to wait for transactions before building blocks. This prevents the rollup from building empty blocks.

    To turn on lazy sequencing, add the following flag to your start command:

    bash
    --rollkit.lazy_aggregator

    Additionally, if you want to specify the time interval used for block production even if there are no transactions, use:

    bash
    --rollkit.lazy_block_time <duration>

    An example command with a custom block time of 1 minute:

    bash
    # start the chain
    +rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.lazy_aggregator --rollkit.lazy_block_time=1m0s // [!code ++]
    `,9)]))}const c=i(n,[["render",l]]);export{d as __pageData,c as default}; diff --git a/pr-528/assets/guides_max-pending-blocks.md.Cb9ZY4Ix.js b/pr-528/assets/guides_max-pending-blocks.md.Cb9ZY4Ix.js new file mode 100644 index 000000000..bf973c708 --- /dev/null +++ b/pr-528/assets/guides_max-pending-blocks.md.Cb9ZY4Ix.js @@ -0,0 +1,2 @@ +import{_ as i,c as a,a3 as e,o as n}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"How to configure the maximum number of blocks pending DA submission","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure the maximum number of blocks pending DA submission | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/max-pending-blocks.md","filePath":"guides/max-pending-blocks.md","lastUpdated":1733420866000}'),t={name:"guides/max-pending-blocks.md"};function l(o,s,h,p,k,d){return n(),a("div",null,s[0]||(s[0]=[e(`

    How to configure the maximum number of blocks pending DA submission

    The --rollkit.max_pending_blocks flag is used to configure the maximum limit of blocks pending DA submission (0 for no limit)

    bash
    --rollkit.max_pending_blocks uint

    An example command would look like this:

    bash
    rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.max_pending_blocks=100 // [!code ++]
    `,5)]))}const m=i(t,[["render",l]]);export{c as __pageData,m as default}; diff --git a/pr-528/assets/guides_max-pending-blocks.md.Cb9ZY4Ix.lean.js b/pr-528/assets/guides_max-pending-blocks.md.Cb9ZY4Ix.lean.js new file mode 100644 index 000000000..bf973c708 --- /dev/null +++ b/pr-528/assets/guides_max-pending-blocks.md.Cb9ZY4Ix.lean.js @@ -0,0 +1,2 @@ +import{_ as i,c as a,a3 as e,o as n}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"How to configure the maximum number of blocks pending DA submission","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure the maximum number of blocks pending DA submission | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/max-pending-blocks.md","filePath":"guides/max-pending-blocks.md","lastUpdated":1733420866000}'),t={name:"guides/max-pending-blocks.md"};function l(o,s,h,p,k,d){return n(),a("div",null,s[0]||(s[0]=[e(`

    How to configure the maximum number of blocks pending DA submission

    The --rollkit.max_pending_blocks flag is used to configure the maximum limit of blocks pending DA submission (0 for no limit)

    bash
    --rollkit.max_pending_blocks uint

    An example command would look like this:

    bash
    rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.max_pending_blocks=100 // [!code ++]
    `,5)]))}const m=i(t,[["render",l]]);export{c as __pageData,m as default}; diff --git a/pr-528/assets/guides_metrics.md.J4sWEr9K.js b/pr-528/assets/guides_metrics.md.J4sWEr9K.js new file mode 100644 index 000000000..c97d0c64b --- /dev/null +++ b/pr-528/assets/guides_metrics.md.J4sWEr9K.js @@ -0,0 +1 @@ +import{_ as e,c as d,a3 as a,o as r}from"./chunks/framework.B8-VHxRu.js";const b=JSON.parse('{"title":"How to configure metrics","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure metrics | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/metrics.md","filePath":"guides/metrics.md","lastUpdated":1733420866000}'),o={name:"guides/metrics.md"};function i(s,t,n,c,h,m){return r(),d("div",null,t[0]||(t[0]=[a('

    How to configure metrics

    Rollkit can report and serve the Prometheus metrics, which in their turn can be consumed by Prometheus collector(s).

    This functionality is disabled by default.

    To enable the Prometheus metrics, set instrumentation.prometheus=true in your CometBFT node's config file located at $CMTHOME/config/config.toml.

    Metrics will be served under /metrics on 26660 port by default. The listening address (default: localhost:26660) can be changed in the config file using instrumentation.prometheus_listen_addr.

    List of available metrics

    The following metrics are available, grouped by their subsystem:

    ABCI

    NameTypeTagsDescription
    cometbft_abci_connection_method_timing_secondsHistogramchain_id, method, typeTiming for each ABCI method.

    sequencer

    NameTypeTagsDescription
    cometbft_sequencer_heightGaugechain_idHeight of the chain.
    cometbft_sequencer_num_txsGaugechain_idNumber of transactions.
    cometbft_sequencer_block_size_bytesGaugechain_idSize of the block.
    cometbft_sequencer_total_txsGaugechain_idTotal number of transactions.
    cometbft_sequencer_latest_block_heightGaugechain_idThe latest block height.

    mempool

    NameTypeTagsDescription
    cometbft_mempool_sizeGaugechain_idSize of the mempool (number of uncommitted transactions).
    cometbft_mempool_size_bytesGaugechain_idTotal size of the mempool in bytes.
    cometbft_mempool_tx_size_bytesHistogramchain_idTransaction sizes in bytes.
    cometbft_mempool_failed_txsCounterchain_idNumber of failed transactions.
    cometbft_mempool_rejected_txsCounterchain_idNumber of rejected transactions.
    cometbft_mempool_evicted_txsCounterchain_idNumber of evicted transactions.
    cometbft_mempool_recheck_timesCounterchain_idNumber of times transactions are rechecked in the mempool.

    p2p

    NameTypeTagsDescription
    cometbft_p2p_peersGaugechain_idNumber of peers.
    cometbft_p2p_peer_receive_bytes_totalCounterpeer_id, chIDNumber of bytes received from a given peer.
    cometbft_p2p_peer_send_bytes_totalCounterpeer_id, chIDNumber of bytes sent to a given peer.
    cometbft_p2p_peer_pending_send_bytesGaugepeer_idPending bytes to be sent to a given peer.
    cometbft_p2p_num_txsGaugepeer_idNumber of transactions submitted by each peer.
    cometbft_p2p_message_receive_bytes_totalCountermessage_typeNumber of bytes of each message type received.
    cometbft_p2p_message_send_bytes_totalCountermessage_typeNumber of bytes of each message type sent.

    In addition to these, go-libp2p metrics are exported as well.

    state

    NameTypeTagsDescription
    cometbft_state_block_processing_timeHistogramchain_idTime spent processing FinalizeBlock.
    cometbft_state_consensus_param_updatesCounterchain_idNumber of consensus parameter updates returned by the application since process start.

    centralized-sequencer

    The centralized-sequencer has its own metrics and configuration, see the centralized sequencer docs for details.

    ',20)]))}const p=e(o,[["render",i]]);export{b as __pageData,p as default}; diff --git a/pr-528/assets/guides_metrics.md.J4sWEr9K.lean.js b/pr-528/assets/guides_metrics.md.J4sWEr9K.lean.js new file mode 100644 index 000000000..c97d0c64b --- /dev/null +++ b/pr-528/assets/guides_metrics.md.J4sWEr9K.lean.js @@ -0,0 +1 @@ +import{_ as e,c as d,a3 as a,o as r}from"./chunks/framework.B8-VHxRu.js";const b=JSON.parse('{"title":"How to configure metrics","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure metrics | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/metrics.md","filePath":"guides/metrics.md","lastUpdated":1733420866000}'),o={name:"guides/metrics.md"};function i(s,t,n,c,h,m){return r(),d("div",null,t[0]||(t[0]=[a('

    How to configure metrics

    Rollkit can report and serve the Prometheus metrics, which in their turn can be consumed by Prometheus collector(s).

    This functionality is disabled by default.

    To enable the Prometheus metrics, set instrumentation.prometheus=true in your CometBFT node's config file located at $CMTHOME/config/config.toml.

    Metrics will be served under /metrics on 26660 port by default. The listening address (default: localhost:26660) can be changed in the config file using instrumentation.prometheus_listen_addr.

    List of available metrics

    The following metrics are available, grouped by their subsystem:

    ABCI

    NameTypeTagsDescription
    cometbft_abci_connection_method_timing_secondsHistogramchain_id, method, typeTiming for each ABCI method.

    sequencer

    NameTypeTagsDescription
    cometbft_sequencer_heightGaugechain_idHeight of the chain.
    cometbft_sequencer_num_txsGaugechain_idNumber of transactions.
    cometbft_sequencer_block_size_bytesGaugechain_idSize of the block.
    cometbft_sequencer_total_txsGaugechain_idTotal number of transactions.
    cometbft_sequencer_latest_block_heightGaugechain_idThe latest block height.

    mempool

    NameTypeTagsDescription
    cometbft_mempool_sizeGaugechain_idSize of the mempool (number of uncommitted transactions).
    cometbft_mempool_size_bytesGaugechain_idTotal size of the mempool in bytes.
    cometbft_mempool_tx_size_bytesHistogramchain_idTransaction sizes in bytes.
    cometbft_mempool_failed_txsCounterchain_idNumber of failed transactions.
    cometbft_mempool_rejected_txsCounterchain_idNumber of rejected transactions.
    cometbft_mempool_evicted_txsCounterchain_idNumber of evicted transactions.
    cometbft_mempool_recheck_timesCounterchain_idNumber of times transactions are rechecked in the mempool.

    p2p

    NameTypeTagsDescription
    cometbft_p2p_peersGaugechain_idNumber of peers.
    cometbft_p2p_peer_receive_bytes_totalCounterpeer_id, chIDNumber of bytes received from a given peer.
    cometbft_p2p_peer_send_bytes_totalCounterpeer_id, chIDNumber of bytes sent to a given peer.
    cometbft_p2p_peer_pending_send_bytesGaugepeer_idPending bytes to be sent to a given peer.
    cometbft_p2p_num_txsGaugepeer_idNumber of transactions submitted by each peer.
    cometbft_p2p_message_receive_bytes_totalCountermessage_typeNumber of bytes of each message type received.
    cometbft_p2p_message_send_bytes_totalCountermessage_typeNumber of bytes of each message type sent.

    In addition to these, go-libp2p metrics are exported as well.

    state

    NameTypeTagsDescription
    cometbft_state_block_processing_timeHistogramchain_idTime spent processing FinalizeBlock.
    cometbft_state_consensus_param_updatesCounterchain_idNumber of consensus parameter updates returned by the application since process start.

    centralized-sequencer

    The centralized-sequencer has its own metrics and configuration, see the centralized sequencer docs for details.

    ',20)]))}const p=e(o,[["render",i]]);export{b as __pageData,p as default}; diff --git a/pr-528/assets/guides_overview.md.etpN25W8.js b/pr-528/assets/guides_overview.md.etpN25W8.js new file mode 100644 index 000000000..2ce8550a5 --- /dev/null +++ b/pr-528/assets/guides_overview.md.etpN25W8.js @@ -0,0 +1 @@ +import{_ as i,c as o,a3 as r,o as l}from"./chunks/framework.B8-VHxRu.js";const g=JSON.parse('{"title":"How To Guides","description":"This page provides a comprehensive overview of the how to guides available for Rollkit.","frontmatter":{"description":"This page provides a comprehensive overview of the how to guides available for Rollkit.","head":[["meta",{"name":"og:title","content":"How To Guides | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/overview.md","filePath":"guides/overview.md","lastUpdated":1733420866000}'),a={name:"guides/overview.md"};function t(s,e,n,p,d,u){return l(),o("div",null,e[0]||(e[0]=[r('

    How To Guides

    Welcome to the Rollkit guides section! Here, you'll find a wide range of guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Hopefully you've gone through some of the tutorials and are ready to dive deeper. These guides will go into detail on some specific topics that will make your life easier when developing with Rollkit.

    In this section, you'll find:

    💻 Support

    The guides will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a GitHub issue or let us know in our Telegram.

    ',7)]))}const h=i(a,[["render",t]]);export{g as __pageData,h as default}; diff --git a/pr-528/assets/guides_overview.md.etpN25W8.lean.js b/pr-528/assets/guides_overview.md.etpN25W8.lean.js new file mode 100644 index 000000000..2ce8550a5 --- /dev/null +++ b/pr-528/assets/guides_overview.md.etpN25W8.lean.js @@ -0,0 +1 @@ +import{_ as i,c as o,a3 as r,o as l}from"./chunks/framework.B8-VHxRu.js";const g=JSON.parse('{"title":"How To Guides","description":"This page provides a comprehensive overview of the how to guides available for Rollkit.","frontmatter":{"description":"This page provides a comprehensive overview of the how to guides available for Rollkit.","head":[["meta",{"name":"og:title","content":"How To Guides | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/overview.md","filePath":"guides/overview.md","lastUpdated":1733420866000}'),a={name:"guides/overview.md"};function t(s,e,n,p,d,u){return l(),o("div",null,e[0]||(e[0]=[r('

    How To Guides

    Welcome to the Rollkit guides section! Here, you'll find a wide range of guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Hopefully you've gone through some of the tutorials and are ready to dive deeper. These guides will go into detail on some specific topics that will make your life easier when developing with Rollkit.

    In this section, you'll find:

    💻 Support

    The guides will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a GitHub issue or let us know in our Telegram.

    ',7)]))}const h=i(a,[["render",t]]);export{g as __pageData,h as default}; diff --git a/pr-528/assets/guides_reset-state.md.CS-R_2m6.js b/pr-528/assets/guides_reset-state.md.CS-R_2m6.js new file mode 100644 index 000000000..a0db4a531 --- /dev/null +++ b/pr-528/assets/guides_reset-state.md.CS-R_2m6.js @@ -0,0 +1,55 @@ +import{_ as i,c as a,a3 as n,o as t}from"./chunks/framework.B8-VHxRu.js";const o=JSON.parse('{"title":"How to reset the state of your chain","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to reset the state of your chain | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/reset-state.md","filePath":"guides/reset-state.md","lastUpdated":1733420866000}'),l={name:"guides/reset-state.md"};function h(e,s,p,k,F,r){return t(),a("div",null,s[0]||(s[0]=[n(`

    How to reset the state of your chain

    This guide will walk you through how you reset the state of your chain.

    Disclaimer

    By definition, reseting the state is deleting your chain's data. Make sure you understand the implications of this prior to completion this guide.

    Some reason you might need to reset the state of your chain are:

    • During testing and development
    • During upgrades with breaking changes
    • Hardforks

    Prerequisities

    In order to complete this guide, you will need to have completed either the quick start tutorial or the build our chain tutorial.

    Quick Start

    When you run your chain with rollkit start you will create a .rollkit directory in your root directory.

    This directory will look like the following.

    bash
    tree $HOME/.rollkit
    +
    +├── config
    +│   ├── config.toml
    +│   ├── genesis.json
    +│   ├── node_key.json
    +│   └── priv_validator_key.json
    +└── data
    +    ├── priv_validator_state.json
    +    └── rollkit
    +        ├── 000001.sst
    +        ├── 000001.vlog
    +        ├── 000002.sst
    +        ├── 000002.vlog
    +        ├── DISCARD
    +        ├── KEYREGISTRY
    +        └── MANIFEST

    To reset the state of the chain, delete the entire .rollkit directory.

    bash
    rm -rf $HOME/.rollkit

    When you launch your chain again with rollkit start your .rollkit directory will be re-created and you will see your chain starting at block height 1 again.

    Wordle

    When you ran your wordle chain in the build your chain turtorial, it created a .wordle directory.

    This directory will look like the following:

    bash
    tree $HOME/.wordle
    +
    +├── config
    +│   ├── app.toml
    +│   ├── client.toml
    +│   ├── config.toml
    +│   ├── genesis.json
    +│   ├── gentx
    +│   │   └── gentx-6e46bd1f53acead98b43e63fcf2bd5435499350d.json
    +│   ├── node_key.json
    +│   └── priv_validator_key.json
    +├── data
    +│   ├── application.db
    +│   │   ├── 000001.log
    +│   │   ├── CURRENT
    +│   │   ├── LOCK
    +│   │   ├── LOG
    +│   │   └── MANIFEST-000000
    +│   ├── priv_validator_state.json
    +│   ├── rollkit
    +│   │   ├── 000001.sst
    +│   │   ├── 000001.vlog
    +│   │   ├── DISCARD
    +│   │   ├── KEYREGISTRY
    +│   │   └── MANIFEST
    +│   └── snapshots
    +│       └── metadata.db
    +│           ├── 000001.log
    +│           ├── CURRENT
    +│           ├── LOCK
    +│           ├── LOG
    +│           └── MANIFEST-000000
    +└── keyring-test
    +    ├── 4a90e750914792c2d7f98775c13a588d9d304bd0.address
    +    ├── 53dab037ac3bd380f4a9192b2c6eedbe95fce180.address
    +    ├── alice.info
    +    └── bob.info

    The directories you need to delete to reset your state are in the .wordle/data directory.

    bash
    $HOME/.wordle/data/application.db
    +$HOME/.wordle/data/rollkit
    +$HOME/.wordle/data/snapshots

    You can delete them with the following command:

    bash
    rollkit tendermint unsafe-reset-all

    When you launch your chain again with your rollkit start <flags> command, these data directories will be re-created and you will see your chain starting at block height 1 again.

    `,23)]))}const g=i(l,[["render",h]]);export{o as __pageData,g as default}; diff --git a/pr-528/assets/guides_reset-state.md.CS-R_2m6.lean.js b/pr-528/assets/guides_reset-state.md.CS-R_2m6.lean.js new file mode 100644 index 000000000..a0db4a531 --- /dev/null +++ b/pr-528/assets/guides_reset-state.md.CS-R_2m6.lean.js @@ -0,0 +1,55 @@ +import{_ as i,c as a,a3 as n,o as t}from"./chunks/framework.B8-VHxRu.js";const o=JSON.parse('{"title":"How to reset the state of your chain","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to reset the state of your chain | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/reset-state.md","filePath":"guides/reset-state.md","lastUpdated":1733420866000}'),l={name:"guides/reset-state.md"};function h(e,s,p,k,F,r){return t(),a("div",null,s[0]||(s[0]=[n(`

    How to reset the state of your chain

    This guide will walk you through how you reset the state of your chain.

    Disclaimer

    By definition, reseting the state is deleting your chain's data. Make sure you understand the implications of this prior to completion this guide.

    Some reason you might need to reset the state of your chain are:

    • During testing and development
    • During upgrades with breaking changes
    • Hardforks

    Prerequisities

    In order to complete this guide, you will need to have completed either the quick start tutorial or the build our chain tutorial.

    Quick Start

    When you run your chain with rollkit start you will create a .rollkit directory in your root directory.

    This directory will look like the following.

    bash
    tree $HOME/.rollkit
    +
    +├── config
    +│   ├── config.toml
    +│   ├── genesis.json
    +│   ├── node_key.json
    +│   └── priv_validator_key.json
    +└── data
    +    ├── priv_validator_state.json
    +    └── rollkit
    +        ├── 000001.sst
    +        ├── 000001.vlog
    +        ├── 000002.sst
    +        ├── 000002.vlog
    +        ├── DISCARD
    +        ├── KEYREGISTRY
    +        └── MANIFEST

    To reset the state of the chain, delete the entire .rollkit directory.

    bash
    rm -rf $HOME/.rollkit

    When you launch your chain again with rollkit start your .rollkit directory will be re-created and you will see your chain starting at block height 1 again.

    Wordle

    When you ran your wordle chain in the build your chain turtorial, it created a .wordle directory.

    This directory will look like the following:

    bash
    tree $HOME/.wordle
    +
    +├── config
    +│   ├── app.toml
    +│   ├── client.toml
    +│   ├── config.toml
    +│   ├── genesis.json
    +│   ├── gentx
    +│   │   └── gentx-6e46bd1f53acead98b43e63fcf2bd5435499350d.json
    +│   ├── node_key.json
    +│   └── priv_validator_key.json
    +├── data
    +│   ├── application.db
    +│   │   ├── 000001.log
    +│   │   ├── CURRENT
    +│   │   ├── LOCK
    +│   │   ├── LOG
    +│   │   └── MANIFEST-000000
    +│   ├── priv_validator_state.json
    +│   ├── rollkit
    +│   │   ├── 000001.sst
    +│   │   ├── 000001.vlog
    +│   │   ├── DISCARD
    +│   │   ├── KEYREGISTRY
    +│   │   └── MANIFEST
    +│   └── snapshots
    +│       └── metadata.db
    +│           ├── 000001.log
    +│           ├── CURRENT
    +│           ├── LOCK
    +│           ├── LOG
    +│           └── MANIFEST-000000
    +└── keyring-test
    +    ├── 4a90e750914792c2d7f98775c13a588d9d304bd0.address
    +    ├── 53dab037ac3bd380f4a9192b2c6eedbe95fce180.address
    +    ├── alice.info
    +    └── bob.info

    The directories you need to delete to reset your state are in the .wordle/data directory.

    bash
    $HOME/.wordle/data/application.db
    +$HOME/.wordle/data/rollkit
    +$HOME/.wordle/data/snapshots

    You can delete them with the following command:

    bash
    rollkit tendermint unsafe-reset-all

    When you launch your chain again with your rollkit start <flags> command, these data directories will be re-created and you will see your chain starting at block height 1 again.

    `,23)]))}const g=i(l,[["render",h]]);export{o as __pageData,g as default}; diff --git a/pr-528/assets/guides_restart-rollup.md.ebiKBW3L.js b/pr-528/assets/guides_restart-rollup.md.ebiKBW3L.js new file mode 100644 index 000000000..a2ac68a23 --- /dev/null +++ b/pr-528/assets/guides_restart-rollup.md.ebiKBW3L.js @@ -0,0 +1,12 @@ +import{_ as i,c as a,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const F=JSON.parse('{"title":"🔄 How to restart your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🔄 How to restart your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/restart-rollup.md","filePath":"guides/restart-rollup.md","lastUpdated":1733420866000}'),n={name:"guides/restart-rollup.md"};function h(l,s,r,p,k,o){return e(),a("div",null,s[0]||(s[0]=[t(`

    🔄 How to restart your rollup

    This guide will teach you how to restart your Rollkit rollup.

    Restart rollup

    This section covers the case where you need to restart your rollup.

    In order to restart your rollup, you simply need to run the <your-binary>d start [...args] command for your rollup.

    For example, if you ran the quick start tutorial, you started your rollup with:

    bash
    rollkit start

    You would have see output similar to:

    bash
    I[2024-10-17|14:52:12.845] Creating and publishing block                module=BlockManager height=7
    +I[2024-10-17|14:52:12.845] finalized block                              module=BlockManager height=7 num_txs_res=0 num_val_updates=0 block_app_hash=
    +I[2024-10-17|14:52:12.845] executed block                               module=BlockManager height=7 app_hash=
    +I[2024-10-17|14:52:12.846] indexed block events                         module=txindex height=7

    If you need to restart your rollup, you can run the same command again:

    bash
    rollkit start

    You will see that the block height will continue from where it left off:

    bash
    I[2024-10-17|14:52:13.845] Creating and publishing block                module=BlockManager height=8
    +I[2024-10-17|14:52:13.845] finalized block                              module=BlockManager height=8 num_txs_res=0 num_val_updates=0 block_app_hash=
    +I[2024-10-17|14:52:13.845] executed block                               module=BlockManager height=8 app_hash=
    +I[2024-10-17|14:52:13.845] indexed block events                         module=txindex height=8

    It is important to include any additional flags that you used when you first started your rollup. For example, if you used the --rollkit.da_namespace flag, you will need to include that flag when restarting your rollup to ensure your rollup continues to publish blobs to the same namespace.

    Restart rollup after running out of funds

    This section covers the case that the node that you are using to post blocks to your DA and consensus layer runs out of funds (tokens), and you need to restart your rollup.

    In this example, we're using Celestia's Mocha testnet and running the quick start. In this example, our Celestia DA light node ran out of Mocha testnet TIA and we are unable to post new blocks to Celestia due to a Code: 19 error. This error is defined by Cosmos SDK as:

    go
    // ErrTxInMempoolCache defines an ABCI typed error where a tx already exists in the mempool.
    +ErrTxInMempoolCache = Register(RootCodespace, 19, "tx already in mempool")

    In order to get around this error, and the same error on other Rollkit rollups, you will need to re-fund your Celestia account and increase the gas fee. This will override the transaction that is stuck in the mempool.

    If you top up the balance of your node and don't increase the gas fee, you will still encounter the Code: 19 error because there is a transaction (posting block to DA) that is duplicate to one that already exists. In order to get around this, you'll need to increase the gas fee and restart the chain.

    🟠 Errors in this example

    This is what the errors will look like if your DA node runs out of funding or you restart the chain without changing the gas fee:

    bash
    4:51PM INF submitting block to DA layer height=28126 module=BlockManager
    +4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=1 module=BlockManager
    +4:51PM ERR DA layer submission failed Error="Codespace: 'sdk', Code: 19, Message: " attempt=2 module=BlockManager
    +4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=3 module=BlockManager

    💰 Re-fund your account

    First, you'll need to send more tokens to the account running your Celestia node. If you didn't keep track of your key, you can run the following to get your address:

    bash
    cd $HOME && cd celestia-node
    +./cel-key list --keyring-backend test --node.type light --p2p.network <network>

    🛑 Stopping your rollup

    You can stop your rollup by using Control + C in your terminal where the node is running.

    ⛽ Increase the gas fee

    To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a Code: 19 error. See the How to configure gas price guide for more information.

    🔁 Restarting your rollup

    Follow the restart rollup section above.

    🛢️ Reduce gas fee & restart again

    In order to save your TIA, we also recommend stopping the chain with Control + C, changing the gas fee back to the default (in our case, 8000 utia) and restarting the chain:

    🎊 Congrats! You've successfully restarted your Rollkit rollup after running out of TIA.

    `,35)]))}const g=i(n,[["render",h]]);export{F as __pageData,g as default}; diff --git a/pr-528/assets/guides_restart-rollup.md.ebiKBW3L.lean.js b/pr-528/assets/guides_restart-rollup.md.ebiKBW3L.lean.js new file mode 100644 index 000000000..a2ac68a23 --- /dev/null +++ b/pr-528/assets/guides_restart-rollup.md.ebiKBW3L.lean.js @@ -0,0 +1,12 @@ +import{_ as i,c as a,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const F=JSON.parse('{"title":"🔄 How to restart your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🔄 How to restart your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/restart-rollup.md","filePath":"guides/restart-rollup.md","lastUpdated":1733420866000}'),n={name:"guides/restart-rollup.md"};function h(l,s,r,p,k,o){return e(),a("div",null,s[0]||(s[0]=[t(`

    🔄 How to restart your rollup

    This guide will teach you how to restart your Rollkit rollup.

    Restart rollup

    This section covers the case where you need to restart your rollup.

    In order to restart your rollup, you simply need to run the <your-binary>d start [...args] command for your rollup.

    For example, if you ran the quick start tutorial, you started your rollup with:

    bash
    rollkit start

    You would have see output similar to:

    bash
    I[2024-10-17|14:52:12.845] Creating and publishing block                module=BlockManager height=7
    +I[2024-10-17|14:52:12.845] finalized block                              module=BlockManager height=7 num_txs_res=0 num_val_updates=0 block_app_hash=
    +I[2024-10-17|14:52:12.845] executed block                               module=BlockManager height=7 app_hash=
    +I[2024-10-17|14:52:12.846] indexed block events                         module=txindex height=7

    If you need to restart your rollup, you can run the same command again:

    bash
    rollkit start

    You will see that the block height will continue from where it left off:

    bash
    I[2024-10-17|14:52:13.845] Creating and publishing block                module=BlockManager height=8
    +I[2024-10-17|14:52:13.845] finalized block                              module=BlockManager height=8 num_txs_res=0 num_val_updates=0 block_app_hash=
    +I[2024-10-17|14:52:13.845] executed block                               module=BlockManager height=8 app_hash=
    +I[2024-10-17|14:52:13.845] indexed block events                         module=txindex height=8

    It is important to include any additional flags that you used when you first started your rollup. For example, if you used the --rollkit.da_namespace flag, you will need to include that flag when restarting your rollup to ensure your rollup continues to publish blobs to the same namespace.

    Restart rollup after running out of funds

    This section covers the case that the node that you are using to post blocks to your DA and consensus layer runs out of funds (tokens), and you need to restart your rollup.

    In this example, we're using Celestia's Mocha testnet and running the quick start. In this example, our Celestia DA light node ran out of Mocha testnet TIA and we are unable to post new blocks to Celestia due to a Code: 19 error. This error is defined by Cosmos SDK as:

    go
    // ErrTxInMempoolCache defines an ABCI typed error where a tx already exists in the mempool.
    +ErrTxInMempoolCache = Register(RootCodespace, 19, "tx already in mempool")

    In order to get around this error, and the same error on other Rollkit rollups, you will need to re-fund your Celestia account and increase the gas fee. This will override the transaction that is stuck in the mempool.

    If you top up the balance of your node and don't increase the gas fee, you will still encounter the Code: 19 error because there is a transaction (posting block to DA) that is duplicate to one that already exists. In order to get around this, you'll need to increase the gas fee and restart the chain.

    🟠 Errors in this example

    This is what the errors will look like if your DA node runs out of funding or you restart the chain without changing the gas fee:

    bash
    4:51PM INF submitting block to DA layer height=28126 module=BlockManager
    +4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=1 module=BlockManager
    +4:51PM ERR DA layer submission failed Error="Codespace: 'sdk', Code: 19, Message: " attempt=2 module=BlockManager
    +4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=3 module=BlockManager

    💰 Re-fund your account

    First, you'll need to send more tokens to the account running your Celestia node. If you didn't keep track of your key, you can run the following to get your address:

    bash
    cd $HOME && cd celestia-node
    +./cel-key list --keyring-backend test --node.type light --p2p.network <network>

    🛑 Stopping your rollup

    You can stop your rollup by using Control + C in your terminal where the node is running.

    ⛽ Increase the gas fee

    To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a Code: 19 error. See the How to configure gas price guide for more information.

    🔁 Restarting your rollup

    Follow the restart rollup section above.

    🛢️ Reduce gas fee & restart again

    In order to save your TIA, we also recommend stopping the chain with Control + C, changing the gas fee back to the default (in our case, 8000 utia) and restarting the chain:

    🎊 Congrats! You've successfully restarted your Rollkit rollup after running out of TIA.

    `,35)]))}const g=i(n,[["render",h]]);export{F as __pageData,g as default}; diff --git a/pr-528/assets/guides_rollkit-monitoring.md.BZWQ7VSE.js b/pr-528/assets/guides_rollkit-monitoring.md.BZWQ7VSE.js new file mode 100644 index 000000000..1d949a526 --- /dev/null +++ b/pr-528/assets/guides_rollkit-monitoring.md.BZWQ7VSE.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as s,o as i}from"./chunks/framework.B8-VHxRu.js";const r="/docs-preview/pr-528/assets/custom-network.Ccp3HLJp.png",o="/docs-preview/pr-528/assets/import-address.CwDtvTun.png",n="/docs-preview/pr-528/assets/alert-rule.C7t8zNE5.png",l="/docs-preview/pr-528/assets/alert-events.ENf_Rhu-.png",y=JSON.parse('{"title":"How to integrate Range with your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to integrate Range with your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/rollkit-monitoring.md","filePath":"guides/rollkit-monitoring.md","lastUpdated":1733420866000}'),p={name:"guides/rollkit-monitoring.md"};function d(h,t,u,c,g,k){return i(),a("div",null,t[0]||(t[0]=[s('

    How to integrate Range with your rollup

    This section illustrates how Rollkit developers can leverage the Range platform to monitor their rollup activity and explore relevant addresses and transactions in less than 5 minutes.

    Overview

    In this guide, we’ll go over the steps of the integration of our sample rollup GM, which is divided into three sections:

    1. Integrate your rollup with Range and start the indexing.
    2. Add your addresses and contracts.
    3. Create your first alert and explore transactions.

    Prerequisites

    You need to have an operational rollkit rollup. If you haven't done so, you'll need to complete the GM world tutorial first.

    1. Integrate Your Rollup

    We’ll integrate our rollup GM into Range and start indexing blocks and transactions in real-time.

    custom-network

    Steps

    • Create an account in Range
    • Make sure you have a public RPC endpoint of your Rollkit rollup
    • Go to the settings tab on your account profile in the top-right corner
    • Click the Add Network button in the Custom Network section
    • Choose Rollkit and fill out the form
    • Congrats! Your rollup should be integrated in Range in less than 15 seconds.

    2. Add Your Addresses and Contracts

    Now that your rollup is integrated into Range, you can customize your workspace. The first step is adding addresses and contracts that you want to monitor. For that, head to the Address section:

    import-address

    Once you’ve added one or multiple addresses, you can start looking at the real-time transactions explorer in the Transactions tab.

    3. Creating Your First Alert Rule

    Now, you can set up alerts to monitor specific events or transactions in your rollup. As an example, we can create an alert that notifies us every time our address is involved in a successful transaction:

    alert-rules

    After executing a sample transaction:

    bash
    gmd tx bank send gm-991hesf7xgmjwttag2n2wzk43rvxh47nn4ckh3e6s gm-991rcctqc5l4px95k6tdg4pjrms70m2a9t35rl50t 4039stake --keyring-backend test --node tcp://127.0.0.1:36657 --chain-id gm --fees 5000stake

    The alert events will appear both in the Overview tab and the Alerting section:

    alert-events

    🎊 Congrats! You've detected the first monitored transaction in your GM rollup.

    ',24)]))}const F=e(p,[["render",d]]);export{y as __pageData,F as default}; diff --git a/pr-528/assets/guides_rollkit-monitoring.md.BZWQ7VSE.lean.js b/pr-528/assets/guides_rollkit-monitoring.md.BZWQ7VSE.lean.js new file mode 100644 index 000000000..1d949a526 --- /dev/null +++ b/pr-528/assets/guides_rollkit-monitoring.md.BZWQ7VSE.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as s,o as i}from"./chunks/framework.B8-VHxRu.js";const r="/docs-preview/pr-528/assets/custom-network.Ccp3HLJp.png",o="/docs-preview/pr-528/assets/import-address.CwDtvTun.png",n="/docs-preview/pr-528/assets/alert-rule.C7t8zNE5.png",l="/docs-preview/pr-528/assets/alert-events.ENf_Rhu-.png",y=JSON.parse('{"title":"How to integrate Range with your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to integrate Range with your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/rollkit-monitoring.md","filePath":"guides/rollkit-monitoring.md","lastUpdated":1733420866000}'),p={name:"guides/rollkit-monitoring.md"};function d(h,t,u,c,g,k){return i(),a("div",null,t[0]||(t[0]=[s('

    How to integrate Range with your rollup

    This section illustrates how Rollkit developers can leverage the Range platform to monitor their rollup activity and explore relevant addresses and transactions in less than 5 minutes.

    Overview

    In this guide, we’ll go over the steps of the integration of our sample rollup GM, which is divided into three sections:

    1. Integrate your rollup with Range and start the indexing.
    2. Add your addresses and contracts.
    3. Create your first alert and explore transactions.

    Prerequisites

    You need to have an operational rollkit rollup. If you haven't done so, you'll need to complete the GM world tutorial first.

    1. Integrate Your Rollup

    We’ll integrate our rollup GM into Range and start indexing blocks and transactions in real-time.

    custom-network

    Steps

    • Create an account in Range
    • Make sure you have a public RPC endpoint of your Rollkit rollup
    • Go to the settings tab on your account profile in the top-right corner
    • Click the Add Network button in the Custom Network section
    • Choose Rollkit and fill out the form
    • Congrats! Your rollup should be integrated in Range in less than 15 seconds.

    2. Add Your Addresses and Contracts

    Now that your rollup is integrated into Range, you can customize your workspace. The first step is adding addresses and contracts that you want to monitor. For that, head to the Address section:

    import-address

    Once you’ve added one or multiple addresses, you can start looking at the real-time transactions explorer in the Transactions tab.

    3. Creating Your First Alert Rule

    Now, you can set up alerts to monitor specific events or transactions in your rollup. As an example, we can create an alert that notifies us every time our address is involved in a successful transaction:

    alert-rules

    After executing a sample transaction:

    bash
    gmd tx bank send gm-991hesf7xgmjwttag2n2wzk43rvxh47nn4ckh3e6s gm-991rcctqc5l4px95k6tdg4pjrms70m2a9t35rl50t 4039stake --keyring-backend test --node tcp://127.0.0.1:36657 --chain-id gm --fees 5000stake

    The alert events will appear both in the Overview tab and the Alerting section:

    alert-events

    🎊 Congrats! You've detected the first monitored transaction in your GM rollup.

    ',24)]))}const F=e(p,[["render",d]]);export{y as __pageData,F as default}; diff --git a/pr-528/assets/guides_use-rollkit-cli.md.CRirDB19.js b/pr-528/assets/guides_use-rollkit-cli.md.CRirDB19.js new file mode 100644 index 000000000..d4f7a8a54 --- /dev/null +++ b/pr-528/assets/guides_use-rollkit-cli.md.CRirDB19.js @@ -0,0 +1,11 @@ +import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as n,j as s,a as l,a3 as a,t as e,k as o,o as h}from"./chunks/framework.B8-VHxRu.js";const p={class:"language-bash vp-adaptive-theme"},k={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},r={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y=JSON.parse('{"title":"How to Use Rollkit CLI","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Use Rollkit CLI | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/use-rollkit-cli.md","filePath":"guides/use-rollkit-cli.md","lastUpdated":1733420866000}'),g={name:"guides/use-rollkit-cli.md"},C=Object.assign(g,{setup(c){return(u,i)=>(h(),n("div",null,[i[3]||(i[3]=s("h1",{id:"how-to-use-rollkit-cli",tabindex:"-1"},[l("How to Use Rollkit CLI "),s("a",{class:"header-anchor",href:"#how-to-use-rollkit-cli","aria-label":'Permalink to "How to Use Rollkit CLI"'},"​")],-1)),i[4]||(i[4]=s("p",null,[l("This guide will walk you through the basics of installing and using Rollkit CLI. You'll learn how to install the CLI, initialize a configuration file ("),s("code",null,"rollkit.toml"),l("), and run rollup commands.")],-1)),i[5]||(i[5]=s("h2",{id:"_1-installing-rollkit-cli",tabindex:"-1"},[l("1. Installing Rollkit CLI "),s("a",{class:"header-anchor",href:"#_1-installing-rollkit-cli","aria-label":'Permalink to "1. Installing Rollkit CLI"'},"​")],-1)),i[6]||(i[6]=s("p",null,"To install Rollkit CLI, execute the following command:",-1)),s("div",p,[i[1]||(i[1]=s("button",{title:"Copy Code",class:"copy"},null,-1)),i[2]||(i[2]=s("span",{class:"lang"},"bash",-1)),s("pre",k,[s("code",null,[s("span",r,[i[0]||(i[0]=a('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),s("span",d," "+e(o(t).rollkitLatestTag),1)])])])]),i[7]||(i[7]=a(`

    This command downloads and installs the Rollkit CLI of specified version.

    2. Initializing rollkit.toml

    The rollkit.toml file is a configuration file that Rollkit uses to understand the structure and entry point of your rollup. To initialize this file, follow these steps:

    Steps to Generate rollkit.toml:

    1. Run the following command to generate the rollkit.toml file:

      bash
      rollkit toml init
    2. You should see an output similar to this (example taken from GM world tutorial):

      bash
      Found rollup entrypoint: /root/gm/cmd/gmd/main.go, adding to rollkit.toml
      +Could not find rollup config under gm. Please put the chain.config_dir in the rollkit.toml file manually.
      +Initialized rollkit.toml file in the current directory.
    3. The output indicates that the rollup entrypoint is ~/gm/cmd/gmd/main.go.

    4. Open the rollkit.toml file, and under the [chain] section, set config_dir to the appropriate directory where your chain configuration is. For GM World tutorial, rollkit.toml file looks like this:

      toml
      entrypoint = "./cmd/gmd/main.go"
      +
      +[chain]
      +  config_dir = "./.gm"

      Adjust entrypoint and config_dir according to your project structure.

    3. Running Rollup Commands Using Rollkit CLI

    Once you have the rollkit.toml file set up, you can run any rollup command using the Rollkit CLI. Ensure you are in the directory containing the rollkit.toml file when executing commands.

    Example:

    1. Navigate to the directory containing the rollkit.toml file.

    2. Now you could do:

      bash
      # instead of <rollup>d start
      +rollkit start 
      +# instead of <rollup>d tx
      +rollkit tx
      +# for any <rollup>d <command>
      +rollkit <command>

    Summary

    By following these steps, you can install the Rollkit CLI, initialize the rollkit.toml configuration file, and run rollup commands. This setup helps you manage and interact with your rollup project efficiently.

    `,11))]))}});export{y as __pageData,C as default}; diff --git a/pr-528/assets/guides_use-rollkit-cli.md.CRirDB19.lean.js b/pr-528/assets/guides_use-rollkit-cli.md.CRirDB19.lean.js new file mode 100644 index 000000000..d4f7a8a54 --- /dev/null +++ b/pr-528/assets/guides_use-rollkit-cli.md.CRirDB19.lean.js @@ -0,0 +1,11 @@ +import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as n,j as s,a as l,a3 as a,t as e,k as o,o as h}from"./chunks/framework.B8-VHxRu.js";const p={class:"language-bash vp-adaptive-theme"},k={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},r={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y=JSON.parse('{"title":"How to Use Rollkit CLI","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to Use Rollkit CLI | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/use-rollkit-cli.md","filePath":"guides/use-rollkit-cli.md","lastUpdated":1733420866000}'),g={name:"guides/use-rollkit-cli.md"},C=Object.assign(g,{setup(c){return(u,i)=>(h(),n("div",null,[i[3]||(i[3]=s("h1",{id:"how-to-use-rollkit-cli",tabindex:"-1"},[l("How to Use Rollkit CLI "),s("a",{class:"header-anchor",href:"#how-to-use-rollkit-cli","aria-label":'Permalink to "How to Use Rollkit CLI"'},"​")],-1)),i[4]||(i[4]=s("p",null,[l("This guide will walk you through the basics of installing and using Rollkit CLI. You'll learn how to install the CLI, initialize a configuration file ("),s("code",null,"rollkit.toml"),l("), and run rollup commands.")],-1)),i[5]||(i[5]=s("h2",{id:"_1-installing-rollkit-cli",tabindex:"-1"},[l("1. Installing Rollkit CLI "),s("a",{class:"header-anchor",href:"#_1-installing-rollkit-cli","aria-label":'Permalink to "1. Installing Rollkit CLI"'},"​")],-1)),i[6]||(i[6]=s("p",null,"To install Rollkit CLI, execute the following command:",-1)),s("div",p,[i[1]||(i[1]=s("button",{title:"Copy Code",class:"copy"},null,-1)),i[2]||(i[2]=s("span",{class:"lang"},"bash",-1)),s("pre",k,[s("code",null,[s("span",r,[i[0]||(i[0]=a('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),s("span",d," "+e(o(t).rollkitLatestTag),1)])])])]),i[7]||(i[7]=a(`

    This command downloads and installs the Rollkit CLI of specified version.

    2. Initializing rollkit.toml

    The rollkit.toml file is a configuration file that Rollkit uses to understand the structure and entry point of your rollup. To initialize this file, follow these steps:

    Steps to Generate rollkit.toml:

    1. Run the following command to generate the rollkit.toml file:

      bash
      rollkit toml init
    2. You should see an output similar to this (example taken from GM world tutorial):

      bash
      Found rollup entrypoint: /root/gm/cmd/gmd/main.go, adding to rollkit.toml
      +Could not find rollup config under gm. Please put the chain.config_dir in the rollkit.toml file manually.
      +Initialized rollkit.toml file in the current directory.
    3. The output indicates that the rollup entrypoint is ~/gm/cmd/gmd/main.go.

    4. Open the rollkit.toml file, and under the [chain] section, set config_dir to the appropriate directory where your chain configuration is. For GM World tutorial, rollkit.toml file looks like this:

      toml
      entrypoint = "./cmd/gmd/main.go"
      +
      +[chain]
      +  config_dir = "./.gm"

      Adjust entrypoint and config_dir according to your project structure.

    3. Running Rollup Commands Using Rollkit CLI

    Once you have the rollkit.toml file set up, you can run any rollup command using the Rollkit CLI. Ensure you are in the directory containing the rollkit.toml file when executing commands.

    Example:

    1. Navigate to the directory containing the rollkit.toml file.

    2. Now you could do:

      bash
      # instead of <rollup>d start
      +rollkit start 
      +# instead of <rollup>d tx
      +rollkit tx
      +# for any <rollup>d <command>
      +rollkit <command>

    Summary

    By following these steps, you can install the Rollkit CLI, initialize the rollkit.toml configuration file, and run rollup commands. This setup helps you manage and interact with your rollup project efficiently.

    `,11))]))}});export{y as __pageData,C as default}; diff --git a/pr-528/assets/guides_use-tia-for-gas.md.K3Str4v3.js b/pr-528/assets/guides_use-tia-for-gas.md.K3Str4v3.js new file mode 100644 index 000000000..227ecb804 --- /dev/null +++ b/pr-528/assets/guides_use-tia-for-gas.md.K3Str4v3.js @@ -0,0 +1,125 @@ +import{C as e}from"./chunks/callout.CtmRa3nB.js";import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as k,a3 as n,j as i,G as p,a,t as h,k as l,o as F}from"./chunks/framework.B8-VHxRu.js";/* empty css */const r={class:"tip custom-block"},d={class:"language-bash vp-adaptive-theme"},o={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},g={class:"line"},y={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},C=["href"],c={class:"language-bash vp-adaptive-theme"},B={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},u={class:"line"},E={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},m={class:"language-bash vp-adaptive-theme"},b={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},v={class:"line"},f={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},N=JSON.parse('{"title":"How to use IBC token (TIA) as gas token in your rollup","description":"Build a sovereign rollup using Rollkit CLI and a local DA network, with TIA as the gas token.","frontmatter":{"description":"Build a sovereign rollup using Rollkit CLI and a local DA network, with TIA as the gas token.","head":[["meta",{"name":"og:title","content":"How to use IBC token (TIA) as gas token in your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/use-tia-for-gas.md","filePath":"guides/use-tia-for-gas.md","lastUpdated":1733420866000}'),A={name:"guides/use-tia-for-gas.md"},T=Object.assign(A,{setup(q){return(D,s)=>(F(),k("div",null,[s[15]||(s[15]=n('

    How to use IBC token (TIA) as gas token in your rollup

    🌞 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup using Rollkit, with TIA as the gas token. Unlike the quick start guide, which uses a native rollup token for gas, this tutorial demonstrates how to integrate an IBC-enabled token, TIA, as the gas token within the rollup, providing a deeper exploration of sovereign rollup development.

    We will cover:

    • Building and configuring a Cosmos-SDK application-specific rollup blockchain.
    • Posting rollup data to a Data Availability (DA) network.
    • Executing transactions using TIA as the gas token (the end goal).

    No prior understanding of the build process is required, just that it utilizes the Cosmos SDK for blockchain applications.

    ',6)),i("div",r,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),p(e)]),s[16]||(s[16]=i("h2",{id:"dependencies",tabindex:"-1"},[a("🛠️ Dependencies "),i("a",{class:"header-anchor",href:"#dependencies","aria-label":'Permalink to "🛠️ Dependencies {#dependencies}"'},"​")],-1)),s[17]||(s[17]=i("p",null,[a("Rollkit uses the "),i("a",{href:"https://go.dev/dl/",target:"_blank",rel:"noreferrer"},"Go programming language"),a(". Here's how to install it:")],-1)),i("ul",null,[i("li",null,[s[4]||(s[4]=i("p",null,[i("strong",null,"Linux or macOS"),a(": Run the provided script:")],-1)),i("div",d,[s[2]||(s[2]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[3]||(s[3]=i("span",{class:"lang"},"bash",-1)),i("pre",o,[i("code",null,[i("span",g,[s[1]||(s[1]=n('curl -sSL https://rollkit.dev/install-go.sh | bash -s',6)),i("span",y," "+h(l(t).golangVersion),1)])])])])])]),i("ul",null,[i("li",null,[s[5]||(s[5]=i("strong",null,"Windows",-1)),s[6]||(s[6]=a(": Download and execute the ")),i("a",{href:`https://go.dev/dl/go${l(t).golangVersion}.windows-amd64.msi`},"installer",8,C),s[7]||(s[7]=a("."))])]),s[18]||(s[18]=i("h2",{id:"install-rollkit",tabindex:"-1"},[a("📦 Install Rollkit (CLI) "),i("a",{class:"header-anchor",href:"#install-rollkit","aria-label":'Permalink to "📦 Install Rollkit (CLI) {#install-rollkit}"'},"​")],-1)),s[19]||(s[19]=i("p",null,"To install Rollkit, run the following command in your terminal:",-1)),i("div",c,[s[9]||(s[9]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[10]||(s[10]=i("span",{class:"lang"},"bash",-1)),i("pre",B,[i("code",null,[i("span",u,[s[8]||(s[8]=n('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),i("span",E," "+h(l(t).rollkitLatestTag),1)])])])]),s[20]||(s[20]=n('

    Verify the installation by checking the Rollkit version:

    bash
    rollkit version

    A successful installation will display the version number and its associated git commit hash.

    🌐 Running a Local DA Network

    Learn to run a local DA network, designed for educational purposes, on your machine.

    To set up a local DA network node:

    ',6)),i("div",m,[s[13]||(s[13]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[14]||(s[14]=i("span",{class:"lang"},"bash",-1)),i("pre",b,[i("code",null,[i("span",v,[s[11]||(s[11]=n('(cd /tmp && curl -sSL https://rollkit.dev/install-local-da.sh | bash -s',10)),i("span",f," "+h(l(t).localDALatestTag),1),s[12]||(s[12]=i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},")",-1))])])])]),s[21]||(s[21]=n(`

    This script builds and runs the node, now listening on port 7980.

    🏗️ Building Your Sovereign Rollup

    With the local DA network running, let’s prepare your rollup blockchain.

    To make it simple, we will download a repository with a gm-world rollup that includes an init.sh script to handle all the setup for you.

    Download and build a gm-world rollup with an interactive script in a new terminal:

    WARNING

    Ensure the jq command line tool is installed before proceeding. Install it using sudo apt-get install jq on Ubuntu or brew install jq on macOS.

    TIP

    If you get errors of gmd not found, you may need to add the go/bin directory to your PATH. You can do this by running export PATH=$PATH:$HOME/go/bin and then running the init.sh script manually again.

    bash
    curl -sSL https://rollkit.dev/install-gm-rollup.sh | sh

    🛠️ Initialize Rollkit TOML Configuration

    Change to the gm directory and initialize the rollkit toml configuration:

    bash
    cd ./gm && rollkit toml init

    Edit the rollkit.toml file to include the following configuration:

    toml
    entrypoint = "/root/gm/cmd/gmd/main.go"
    +
    +[chain]
    +  config_dir = "./.gm"

    🚀 Starting your rollup

    Start the rollup, posting to the local DA network:

    bash
    rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 --minimum-gas-prices="0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA,0.025stake"

    Note that we specified the gas token to be IBC TIA. We still haven't made an IBC connection to Celestia's Mocha testnet, however, if we assume our first channel will be an ICS-20 transfer channel to Celestia, we can already calculate the token denom using this formula:

    js
    "ibc/" + toHex(sha256(toUtf8("transfer/channel-0/utia"))).toUpperCase();

    Now you should see the logs of the running node:

    bash
    12:21PM INF starting node with ABCI CometBFT in-process module=server
    +12:21PM INF starting node with Rollkit in-process module=server
    +12:21PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
    +12:21PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start impl=EventBus module=events msg="Starting EventBus service"
    +12:21PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
    +12:21PM INF Using default mempool ttl MempoolTTL=25 module=BlockManager
    +12:21PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
    +12:21PM INF service start impl=RPC module=server msg="Starting RPC service"
    +12:21PM INF service start impl=Node module=server msg="Starting Node service"
    +12:21PM INF starting P2P client module=server
    +12:21PM INF serving HTTP listen address=127.0.0.1:26657 module=server
    +12:21PM INF listening on address=/ip4/127.0.0.1/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF listening on address=/ip4/163.172.162.109/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF no seed nodes - only listening for connections module=p2p
    +12:21PM INF working in aggregator mode block time=1000 module=server
    +12:21PM INF Creating and publishing block height=22 module=BlockManager
    +12:21PM INF starting gRPC server... address=127.0.0.1:9290 module=grpc-server
    +12:21PM INF finalized block block_app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager num_txs_res=0 num_val_updates=0
    +12:21PM INF executed block app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager
    +12:21PM INF indexed block events height=22 module=txindex
    +...

    ✨ Connecting to Celestia Mocha testnet using IBC

    Next, we will establish an IBC connection with the Celestia Mocha testnet to enable TIA transfers for gas usage on our rollup.

    Install the IBC relayer:

    bash
    git clone --depth 1 --branch v2.5.2 https://github.com/cosmos/relayer.git /tmp/relayer
    +cd /tmp/relayer
    +make install

    Configure the relayer:

    bash
    rly config init
    +
    +mkdir -p "$HOME/.relayer/keys/{gm,mocha-4}"
    +
    +echo "global:
    +    api-listen-addr: :5183
    +    timeout: 10s
    +    memo: ''
    +    light-cache-size: 20
    +    log-level: info
    +    ics20-memo-limit: 0
    +    max-receiver-size: 150
    +chains:
    +    gm_rollup:
    +        type: cosmos
    +        value:
    +            key-directory: '$HOME/.relayer/keys/gm'
    +            key: a
    +            chain-id: gm
    +            rpc-addr: http://localhost:26657
    +            account-prefix: gm
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.025stake
    +            min-gas-amount: 0
    +            max-gas-amount: 0
    +            debug: false
    +            timeout: 20s
    +            block-timeout: ''
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ''
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +    mocha:
    +        type: cosmos
    +        value:
    +            key-directory: '$HOME/.relayer/keys/mocha-4'
    +            key: a
    +            chain-id: mocha-4
    +            rpc-addr: https://celestia-testnet-rpc.publicnode.com:443
    +            account-prefix: celestia
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.15utia
    +            min-gas-amount: 0
    +            max-gas-amount: 0
    +            debug: false
    +            timeout: 20s
    +            block-timeout: ''
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ''
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +paths:
    +    gm_mocha-4:
    +        src:
    +            chain-id: gm
    +        dst:
    +            chain-id: mocha-4
    +        src-channel-filter:
    +            rule: ''
    +            channel-list: []
    +" > "$HOME/.relayer/config/config.yaml"
    +
    +rly keys restore gm_rollup a "regret resist either bid upon yellow leaf early symbol win market vital"
    +rly keys restore mocha     a "regret resist either bid upon yellow leaf early symbol win market vital"

    Get the relayer accounts:

    bash
    rly address gm_rollup a # => gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc
    +rly address mocha     a # => celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu

    Note: These accounts should always be the same because of the hardcoded mnemonics that we've loaded in the rly keys restore step.

    Fund the relayer on our rollup:

    bash
    rollkit tx bank send gm-key-2 gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc 10000000stake --keyring-backend test --chain-id gm --fees 5000stake -y

    Fund the relayer on the Celestia Mocha testnet:

    Mocha Testnet Faucet Instructions.

    Verify the relayer is funded:

    bash
    rly q balance mocha     a # => address {celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu} balance {10000000utia}
    +rly q balance gm_rollup a # => address {gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc} balance {10000000stake}

    Create IBC clients:

    bash
    rly tx client gm_rollup mocha gm_mocha-4 --override
    +rly tx client mocha gm_rollup gm_mocha-4 --override

    Create IBC connection:

    bash
    rly tx connection gm_mocha-4

    Create IBC channel:

    bash
    rly tx channel gm_mocha-4 --src-port transfer --dst-port transfer --version ics20-1

    Start the relayer:

    bash
    rly start gm_mocha-4

    Transfer TIA from Mocha to our rollup:

    bash
    ACCOUNT_ON_ROLLUP="$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +CHANNEL_ID_ON_MOCHA="$(rly q channels mocha gm_rollup | jq -r .channel_id | tail -1)"
    +
    +rly tx transfer mocha gm_rollup 1000000utia "$ACCOUNT_ON_ROLLUP" "$CHANNEL_ID_ON_MOCHA" --path gm_mocha-4

    Verify the account on our rollup is funded with IBC TIA:

    bash
    rollkit q bank balances "$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +# =>
    +# balances:
    +# - amount: "1000000"
    +#   denom: ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA
    +# - amount: "9999999999999999989995000"
    +#   denom: stake
    +# pagination:
    +#   total: "2"

    💸 Transactions

    Finally, send a transaction on our rollup using IBC TIA as the gas token:

    bash
    ACCOUNT_ON_ROLLUP="$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +
    +# Send the transaction
    +TX_HASH=$(rollkit tx bank send "$ACCOUNT_ON_ROLLUP" "$ACCOUNT_ON_ROLLUP" 1stake --keyring-backend test --chain-id gm --gas-prices 0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA -y --output json | jq -r .txhash)
    +
    +# Verify success
    +rollkit q tx "$TX_HASH" --output json | jq .code # => 0

    🎉 Next steps

    Congratulations! You've built a local rollup that posts to a local DA network and uses TIA as the gas token!

    `,52))]))}});export{N as __pageData,T as default}; diff --git a/pr-528/assets/guides_use-tia-for-gas.md.K3Str4v3.lean.js b/pr-528/assets/guides_use-tia-for-gas.md.K3Str4v3.lean.js new file mode 100644 index 000000000..227ecb804 --- /dev/null +++ b/pr-528/assets/guides_use-tia-for-gas.md.K3Str4v3.lean.js @@ -0,0 +1,125 @@ +import{C as e}from"./chunks/callout.CtmRa3nB.js";import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as k,a3 as n,j as i,G as p,a,t as h,k as l,o as F}from"./chunks/framework.B8-VHxRu.js";/* empty css */const r={class:"tip custom-block"},d={class:"language-bash vp-adaptive-theme"},o={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},g={class:"line"},y={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},C=["href"],c={class:"language-bash vp-adaptive-theme"},B={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},u={class:"line"},E={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},m={class:"language-bash vp-adaptive-theme"},b={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},v={class:"line"},f={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},N=JSON.parse('{"title":"How to use IBC token (TIA) as gas token in your rollup","description":"Build a sovereign rollup using Rollkit CLI and a local DA network, with TIA as the gas token.","frontmatter":{"description":"Build a sovereign rollup using Rollkit CLI and a local DA network, with TIA as the gas token.","head":[["meta",{"name":"og:title","content":"How to use IBC token (TIA) as gas token in your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/use-tia-for-gas.md","filePath":"guides/use-tia-for-gas.md","lastUpdated":1733420866000}'),A={name:"guides/use-tia-for-gas.md"},T=Object.assign(A,{setup(q){return(D,s)=>(F(),k("div",null,[s[15]||(s[15]=n('

    How to use IBC token (TIA) as gas token in your rollup

    🌞 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup using Rollkit, with TIA as the gas token. Unlike the quick start guide, which uses a native rollup token for gas, this tutorial demonstrates how to integrate an IBC-enabled token, TIA, as the gas token within the rollup, providing a deeper exploration of sovereign rollup development.

    We will cover:

    • Building and configuring a Cosmos-SDK application-specific rollup blockchain.
    • Posting rollup data to a Data Availability (DA) network.
    • Executing transactions using TIA as the gas token (the end goal).

    No prior understanding of the build process is required, just that it utilizes the Cosmos SDK for blockchain applications.

    ',6)),i("div",r,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),p(e)]),s[16]||(s[16]=i("h2",{id:"dependencies",tabindex:"-1"},[a("🛠️ Dependencies "),i("a",{class:"header-anchor",href:"#dependencies","aria-label":'Permalink to "🛠️ Dependencies {#dependencies}"'},"​")],-1)),s[17]||(s[17]=i("p",null,[a("Rollkit uses the "),i("a",{href:"https://go.dev/dl/",target:"_blank",rel:"noreferrer"},"Go programming language"),a(". Here's how to install it:")],-1)),i("ul",null,[i("li",null,[s[4]||(s[4]=i("p",null,[i("strong",null,"Linux or macOS"),a(": Run the provided script:")],-1)),i("div",d,[s[2]||(s[2]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[3]||(s[3]=i("span",{class:"lang"},"bash",-1)),i("pre",o,[i("code",null,[i("span",g,[s[1]||(s[1]=n('curl -sSL https://rollkit.dev/install-go.sh | bash -s',6)),i("span",y," "+h(l(t).golangVersion),1)])])])])])]),i("ul",null,[i("li",null,[s[5]||(s[5]=i("strong",null,"Windows",-1)),s[6]||(s[6]=a(": Download and execute the ")),i("a",{href:`https://go.dev/dl/go${l(t).golangVersion}.windows-amd64.msi`},"installer",8,C),s[7]||(s[7]=a("."))])]),s[18]||(s[18]=i("h2",{id:"install-rollkit",tabindex:"-1"},[a("📦 Install Rollkit (CLI) "),i("a",{class:"header-anchor",href:"#install-rollkit","aria-label":'Permalink to "📦 Install Rollkit (CLI) {#install-rollkit}"'},"​")],-1)),s[19]||(s[19]=i("p",null,"To install Rollkit, run the following command in your terminal:",-1)),i("div",c,[s[9]||(s[9]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[10]||(s[10]=i("span",{class:"lang"},"bash",-1)),i("pre",B,[i("code",null,[i("span",u,[s[8]||(s[8]=n('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),i("span",E," "+h(l(t).rollkitLatestTag),1)])])])]),s[20]||(s[20]=n('

    Verify the installation by checking the Rollkit version:

    bash
    rollkit version

    A successful installation will display the version number and its associated git commit hash.

    🌐 Running a Local DA Network

    Learn to run a local DA network, designed for educational purposes, on your machine.

    To set up a local DA network node:

    ',6)),i("div",m,[s[13]||(s[13]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[14]||(s[14]=i("span",{class:"lang"},"bash",-1)),i("pre",b,[i("code",null,[i("span",v,[s[11]||(s[11]=n('(cd /tmp && curl -sSL https://rollkit.dev/install-local-da.sh | bash -s',10)),i("span",f," "+h(l(t).localDALatestTag),1),s[12]||(s[12]=i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},")",-1))])])])]),s[21]||(s[21]=n(`

    This script builds and runs the node, now listening on port 7980.

    🏗️ Building Your Sovereign Rollup

    With the local DA network running, let’s prepare your rollup blockchain.

    To make it simple, we will download a repository with a gm-world rollup that includes an init.sh script to handle all the setup for you.

    Download and build a gm-world rollup with an interactive script in a new terminal:

    WARNING

    Ensure the jq command line tool is installed before proceeding. Install it using sudo apt-get install jq on Ubuntu or brew install jq on macOS.

    TIP

    If you get errors of gmd not found, you may need to add the go/bin directory to your PATH. You can do this by running export PATH=$PATH:$HOME/go/bin and then running the init.sh script manually again.

    bash
    curl -sSL https://rollkit.dev/install-gm-rollup.sh | sh

    🛠️ Initialize Rollkit TOML Configuration

    Change to the gm directory and initialize the rollkit toml configuration:

    bash
    cd ./gm && rollkit toml init

    Edit the rollkit.toml file to include the following configuration:

    toml
    entrypoint = "/root/gm/cmd/gmd/main.go"
    +
    +[chain]
    +  config_dir = "./.gm"

    🚀 Starting your rollup

    Start the rollup, posting to the local DA network:

    bash
    rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 --minimum-gas-prices="0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA,0.025stake"

    Note that we specified the gas token to be IBC TIA. We still haven't made an IBC connection to Celestia's Mocha testnet, however, if we assume our first channel will be an ICS-20 transfer channel to Celestia, we can already calculate the token denom using this formula:

    js
    "ibc/" + toHex(sha256(toUtf8("transfer/channel-0/utia"))).toUpperCase();

    Now you should see the logs of the running node:

    bash
    12:21PM INF starting node with ABCI CometBFT in-process module=server
    +12:21PM INF starting node with Rollkit in-process module=server
    +12:21PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
    +12:21PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start impl=EventBus module=events msg="Starting EventBus service"
    +12:21PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
    +12:21PM INF Using default mempool ttl MempoolTTL=25 module=BlockManager
    +12:21PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
    +12:21PM INF service start impl=RPC module=server msg="Starting RPC service"
    +12:21PM INF service start impl=Node module=server msg="Starting Node service"
    +12:21PM INF starting P2P client module=server
    +12:21PM INF serving HTTP listen address=127.0.0.1:26657 module=server
    +12:21PM INF listening on address=/ip4/127.0.0.1/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF listening on address=/ip4/163.172.162.109/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF no seed nodes - only listening for connections module=p2p
    +12:21PM INF working in aggregator mode block time=1000 module=server
    +12:21PM INF Creating and publishing block height=22 module=BlockManager
    +12:21PM INF starting gRPC server... address=127.0.0.1:9290 module=grpc-server
    +12:21PM INF finalized block block_app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager num_txs_res=0 num_val_updates=0
    +12:21PM INF executed block app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager
    +12:21PM INF indexed block events height=22 module=txindex
    +...

    ✨ Connecting to Celestia Mocha testnet using IBC

    Next, we will establish an IBC connection with the Celestia Mocha testnet to enable TIA transfers for gas usage on our rollup.

    Install the IBC relayer:

    bash
    git clone --depth 1 --branch v2.5.2 https://github.com/cosmos/relayer.git /tmp/relayer
    +cd /tmp/relayer
    +make install

    Configure the relayer:

    bash
    rly config init
    +
    +mkdir -p "$HOME/.relayer/keys/{gm,mocha-4}"
    +
    +echo "global:
    +    api-listen-addr: :5183
    +    timeout: 10s
    +    memo: ''
    +    light-cache-size: 20
    +    log-level: info
    +    ics20-memo-limit: 0
    +    max-receiver-size: 150
    +chains:
    +    gm_rollup:
    +        type: cosmos
    +        value:
    +            key-directory: '$HOME/.relayer/keys/gm'
    +            key: a
    +            chain-id: gm
    +            rpc-addr: http://localhost:26657
    +            account-prefix: gm
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.025stake
    +            min-gas-amount: 0
    +            max-gas-amount: 0
    +            debug: false
    +            timeout: 20s
    +            block-timeout: ''
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ''
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +    mocha:
    +        type: cosmos
    +        value:
    +            key-directory: '$HOME/.relayer/keys/mocha-4'
    +            key: a
    +            chain-id: mocha-4
    +            rpc-addr: https://celestia-testnet-rpc.publicnode.com:443
    +            account-prefix: celestia
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.15utia
    +            min-gas-amount: 0
    +            max-gas-amount: 0
    +            debug: false
    +            timeout: 20s
    +            block-timeout: ''
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ''
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +paths:
    +    gm_mocha-4:
    +        src:
    +            chain-id: gm
    +        dst:
    +            chain-id: mocha-4
    +        src-channel-filter:
    +            rule: ''
    +            channel-list: []
    +" > "$HOME/.relayer/config/config.yaml"
    +
    +rly keys restore gm_rollup a "regret resist either bid upon yellow leaf early symbol win market vital"
    +rly keys restore mocha     a "regret resist either bid upon yellow leaf early symbol win market vital"

    Get the relayer accounts:

    bash
    rly address gm_rollup a # => gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc
    +rly address mocha     a # => celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu

    Note: These accounts should always be the same because of the hardcoded mnemonics that we've loaded in the rly keys restore step.

    Fund the relayer on our rollup:

    bash
    rollkit tx bank send gm-key-2 gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc 10000000stake --keyring-backend test --chain-id gm --fees 5000stake -y

    Fund the relayer on the Celestia Mocha testnet:

    Mocha Testnet Faucet Instructions.

    Verify the relayer is funded:

    bash
    rly q balance mocha     a # => address {celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu} balance {10000000utia}
    +rly q balance gm_rollup a # => address {gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc} balance {10000000stake}

    Create IBC clients:

    bash
    rly tx client gm_rollup mocha gm_mocha-4 --override
    +rly tx client mocha gm_rollup gm_mocha-4 --override

    Create IBC connection:

    bash
    rly tx connection gm_mocha-4

    Create IBC channel:

    bash
    rly tx channel gm_mocha-4 --src-port transfer --dst-port transfer --version ics20-1

    Start the relayer:

    bash
    rly start gm_mocha-4

    Transfer TIA from Mocha to our rollup:

    bash
    ACCOUNT_ON_ROLLUP="$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +CHANNEL_ID_ON_MOCHA="$(rly q channels mocha gm_rollup | jq -r .channel_id | tail -1)"
    +
    +rly tx transfer mocha gm_rollup 1000000utia "$ACCOUNT_ON_ROLLUP" "$CHANNEL_ID_ON_MOCHA" --path gm_mocha-4

    Verify the account on our rollup is funded with IBC TIA:

    bash
    rollkit q bank balances "$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +# =>
    +# balances:
    +# - amount: "1000000"
    +#   denom: ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA
    +# - amount: "9999999999999999989995000"
    +#   denom: stake
    +# pagination:
    +#   total: "2"

    💸 Transactions

    Finally, send a transaction on our rollup using IBC TIA as the gas token:

    bash
    ACCOUNT_ON_ROLLUP="$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +
    +# Send the transaction
    +TX_HASH=$(rollkit tx bank send "$ACCOUNT_ON_ROLLUP" "$ACCOUNT_ON_ROLLUP" 1stake --keyring-backend test --chain-id gm --gas-prices 0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA -y --output json | jq -r .txhash)
    +
    +# Verify success
    +rollkit q tx "$TX_HASH" --output json | jq .code # => 0

    🎉 Next steps

    Congratulations! You've built a local rollup that posts to a local DA network and uses TIA as the gas token!

    `,52))]))}});export{N as __pageData,T as default}; diff --git a/pr-528/assets/guides_zkml.md.DJQB_pUq.js b/pr-528/assets/guides_zkml.md.DJQB_pUq.js new file mode 100644 index 000000000..354b55fc8 --- /dev/null +++ b/pr-528/assets/guides_zkml.md.DJQB_pUq.js @@ -0,0 +1,86 @@ +import{_ as i,c as a,a3 as n,o as t}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"zkML Rollup Tutorial with Sindri","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"zkML Rollup Tutorial with Sindri | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/zkml.md","filePath":"guides/zkml.md","lastUpdated":1733420866000}'),e={name:"guides/zkml.md"};function l(p,s,r,h,o,k){return t(),a("div",null,s[0]||(s[0]=[n(`

    zkML Rollup Tutorial with Sindri

    Introduction - Code Once, Verify Anywhere

    This guide will show you how to build verifiable machine learning inference into your Rollkit rollup using zero-knowledge proofs generated on Sindri. The rollup will rely on a local Celestia devnet for consensus and ensuring data availability.

    We will focus on using a ZK circuit that incorporates a compact deep neural network model to enable verifiable ML inference. In this guide, we will deploy the circuit on Sindri, obtain a smart contract verifier (automatically generated by Sindri) for that circuit, deploy it on Rollkit, create a proof of ML inference on Sindri, and verify the proof on-chain.

    This approach not only secures the verification process of machine learning models, but also leverages the decentralized security and scalability of Celestia's architecture.

    Prerequisites

    • An operational EVM using Rollkit (see next step)
    • A Sindri API key, which can be obtained here
    • Python 3.10+ installed as well as the Sindri Python SDK (more information below)

    Setting Up the Polaris EVM using Rollkit

    This walkthrough assumes you started the Polaris EVM using Rollkit and should be interpreted as a direct continuation of this Polaris EVM and Rollkit guide.

    Installing the Sindri Python SDK

    Because we're working with ML, we're going to build with Sindri's Python SDK because Python is widely used in ML development. The Sindri Python SDK Quickstart Guide contains installation instructions and a high-level walkthrough of the functionality of this package, but the following will suffice if you have pip installed:

    bash
    pip install sindri

    Deploying and Proving a Cool zkML Circuit to Sindri

    For this tutorial, we'll be working with a pre-built zkML circuit built by Sindri. For a more in-depth description of this circuit and its corresponding ML model's behavior and design, please see here.

    Clone

    Clone the Sindri Resources GitHub repo.

    bash
    cd $HOME
    +git clone https://github.com/Sindri-Labs/sindri-resources.git

    Navigate to the food_ml circuit tutorial directory.

    bash
    cd sindri-resources/circuit_tutorials/circom/food_ml/

    Here, you will find a handful of files. The circuit/ directory contains the circuit code that we will upload to Sindri. The circuit/sindri.json file is the Sindri manifest for your upload. Within it, you can modify the circuit's "name" value to whatever you like.

    Modify

    Open the compile_and_prove.py script and append the following lines to the very bottom.

    python
    # Obtain smart contract verifier for our circuit and save it to a file
    +smart_contract_code: str = sindri.get_circuit_smart_contract_verifier(circuit_id)
    +verifier_code_file: str = "Verifier.sol"
    +with open(verifier_code_file, "w") as f:
    +    f.write(smart_contract_code)
    +print(f"Smart contract verifier code written to {verifier_code_file}\\n")
    +
    +# Obtain our proof's proof+public formatted as calldata for our circuit's
    +# smart contract verifier
    +proof = sindri.get_proof(proof_id, include_smart_contract_calldata=True)
    +calldata_file: str = "calldata.txt"
    +calldata: str  = proof["smart_contract_calldata"]
    +
    +# Fix formatting so it works with Rollkit
    +import json
    +a = json.loads("["+calldata_str+"]")
    +calldata_objects = []
    +for i in a:
    +    calldata_objects.append(json.dumps(i).replace("\\"", "").replace(" ",""))
    +rollkit_calldata_str = " ".join(calldata_objects)
    +
    +# Save calldata to file
    +with open(calldata_file, "w") as f:
    +    f.write(rollkit_calldata_str)
    +print(f"Proof calldata written to {calldata_file}\\n")

    These additions will allow us to fetch and save the following to files:

    • the circuit's smart contract verifier code that is generated by Sindri when we deployed our circuit
    • the proof's proof+public formatted as calldata to run with the smart contract verifier on Rollkit

    Deploy and Prove your zkML Circuit on Sindri

    Export your Sindri API Key to an environment variable (or prepend it to the run command in the next step).

    bash
    export SINDRI_API_KEY=<YOUR_API_KEY>

    Run the compile_and_prove.py script. This will upload the circuit/ directory to Sindri, where Sindri will compile and host your circuit. Then, it will run a single proof for the circuit. Finally, it will save the circuit's smart contract verifier code that is generated by Sindri to the Verifier.sol file and it will save the proof's proof+public formatted as calldata for that smart contract to calldata.txt.

    bash
    python3 compile_and_prove.py

    Congratulations! You just deployed a zkML circuit to Sindri and proved it on Sindri's production-quality infrastructure with built-in, custom GPU-accelerated proving techniques. Furthermore, you now have smart contract verifier code (and some calldata) for verifying proofs of that circuit on-chain.

    Deploy Smart Contract Verifier to Rollkit

    Next, we will deploy this smart contract to Rollkit and verify our zkML proof on-chain. This section assumes you have an operational Rollkit instance of Polaris EVM running and your gm-portal/ directory is located in the $HOME directory on your machine.

    Deploy

    Copy your new Verifier.sol smart contract to the ~/gm-portal/contracts/src/. directory in your Polaris EVM.

    bash
    cd $HOME
    +cp sindri-resources/circuit_tutorials/circom/food_ml/Verifier.sol gm-portal/contracts/src/Verifier.sol

    Next, let's make a copy of the example ~/gm-portal/contracts/script/GmPortal.s.sol and modify it to reference your new Verifier.sol contract.

    bash
    cd gm-portal/contracts/script/
    +cp GmPortal.s.sol Verifier.s.sol

    Open up the new Verifier.s.sol and modify it to interact with your new Verifier.sol instead of the example GmPortal.sol.

    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Script.sol";
    +
    +import {Verifier} from "src/Verifier.sol";
    +
    +contract VerifierScript is Script {
    +    function setUp() public {}
    +
    +    function run() public {
    +        vm.startBroadcast();
    +        new Verifier();
    +        vm.stopBroadcast();
    +    }
    +}

    Then, deploy the contract to your Rollkit environment. Your PRIVATE_KEY and RPC_URL are for your Rollkit Polaris EVM.

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545
    bash
    cd ..
    +forge script script/Verifier.s.sol:VerifierScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to the following.

    forge script script/Verifier.s.sol:VerifierScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠆] Compiling 20 files with 0.8.24
    +[⠰] Solc 0.8.24 finished in 101.99ms
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on Polaris EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    +⠉ [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 80085
    +✅  [Success]Hash: 0xa06a4585af436e2271fc9f697488ce49771c6480e72caac76739e286564c0fc3
    +Contract Address: 0x5C59C83c099F72FcE832208f96a23a1E43737a14
    +Block: 5699
    +Paid: 0.002924172006823068 ETH (974724 gas * 3.000000007 gwei)
    +
    +[...]

    From your contract deployment output, export your contract address: Contract Address: 0x5C59C83c099F72FcE832208f96a23a1E43737a14. Note that the address will be different.

    bash
    export CONTRACT_ADDRESS=0x5C59C83c099F72FcE832208f96a23a1E43737a14

    Interact with the Contract - Verify your zkML Proof On-Chain

    Now, we will send your zkML circuit's proof to the contract and verify it on-chain. Keep in mind that your verifier contract can be used across any EVM-compatible environment. Thus, we can compare the cost of execution across multiple environments.

    First, grab the contents of your proof calldata and save it in a variable.

    bash
    CALLDATA=$(cat $HOME/sindri-resources/circuit_tutorials/circom/food_ml/calldata.txt)

    Then, interact with the smart contract using the calldata.

    bash
    cast send $CONTRACT_ADDRESS \\
    +"verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])" \\
    +$CALLDATA \\
    +--private-key $PRIVATE_KEY \\
    +--rpc-url $RPC_URL

    The output will look like the following.

    bash
    cast send $CONTRACT_ADDRESS "verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])" $CALLDATA --private-key $PRIVATE_KEY --rpc-url $RPC_URL
    +
    +blockHash               0xbbd872d0c37fe889c2456daf80505c20f262b001842d919d06e48c163319af3d
    +blockNumber             11544
    +contractAddress
    +cumulativeGasUsed       231649
    +effectiveGasPrice       3000000007
    +from                    0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4
    +gasUsed                 231649
    +logs                    []
    +logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    +root
    +status                  1
    +transactionHash         0x58096aabd3cb58bdef28501bda01b6cf4a37ed0ba482f81462bc1043bb91f996
    +transactionIndex        0
    +type                    2
    +to                      0x5C59C83c099F72FcE832208f96a23a1E43737a14

    TIP

    Note: To see the decoded output of the contract call (to check if the proof was verified), you will need to view the call in a block explorer.

    Congratulations

    Congratulations, you've just verified a zkML circuit on Rollkit.

    For further reading, check out Sindri's blog post explaining how using Sindri + Rollkit x Celestia means verifiable ML doesn’t have to be prohibitively expensive for operators or end users.

    `,59)]))}const g=i(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/guides_zkml.md.DJQB_pUq.lean.js b/pr-528/assets/guides_zkml.md.DJQB_pUq.lean.js new file mode 100644 index 000000000..354b55fc8 --- /dev/null +++ b/pr-528/assets/guides_zkml.md.DJQB_pUq.lean.js @@ -0,0 +1,86 @@ +import{_ as i,c as a,a3 as n,o as t}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"zkML Rollup Tutorial with Sindri","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"zkML Rollup Tutorial with Sindri | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"guides/zkml.md","filePath":"guides/zkml.md","lastUpdated":1733420866000}'),e={name:"guides/zkml.md"};function l(p,s,r,h,o,k){return t(),a("div",null,s[0]||(s[0]=[n(`

    zkML Rollup Tutorial with Sindri

    Introduction - Code Once, Verify Anywhere

    This guide will show you how to build verifiable machine learning inference into your Rollkit rollup using zero-knowledge proofs generated on Sindri. The rollup will rely on a local Celestia devnet for consensus and ensuring data availability.

    We will focus on using a ZK circuit that incorporates a compact deep neural network model to enable verifiable ML inference. In this guide, we will deploy the circuit on Sindri, obtain a smart contract verifier (automatically generated by Sindri) for that circuit, deploy it on Rollkit, create a proof of ML inference on Sindri, and verify the proof on-chain.

    This approach not only secures the verification process of machine learning models, but also leverages the decentralized security and scalability of Celestia's architecture.

    Prerequisites

    • An operational EVM using Rollkit (see next step)
    • A Sindri API key, which can be obtained here
    • Python 3.10+ installed as well as the Sindri Python SDK (more information below)

    Setting Up the Polaris EVM using Rollkit

    This walkthrough assumes you started the Polaris EVM using Rollkit and should be interpreted as a direct continuation of this Polaris EVM and Rollkit guide.

    Installing the Sindri Python SDK

    Because we're working with ML, we're going to build with Sindri's Python SDK because Python is widely used in ML development. The Sindri Python SDK Quickstart Guide contains installation instructions and a high-level walkthrough of the functionality of this package, but the following will suffice if you have pip installed:

    bash
    pip install sindri

    Deploying and Proving a Cool zkML Circuit to Sindri

    For this tutorial, we'll be working with a pre-built zkML circuit built by Sindri. For a more in-depth description of this circuit and its corresponding ML model's behavior and design, please see here.

    Clone

    Clone the Sindri Resources GitHub repo.

    bash
    cd $HOME
    +git clone https://github.com/Sindri-Labs/sindri-resources.git

    Navigate to the food_ml circuit tutorial directory.

    bash
    cd sindri-resources/circuit_tutorials/circom/food_ml/

    Here, you will find a handful of files. The circuit/ directory contains the circuit code that we will upload to Sindri. The circuit/sindri.json file is the Sindri manifest for your upload. Within it, you can modify the circuit's "name" value to whatever you like.

    Modify

    Open the compile_and_prove.py script and append the following lines to the very bottom.

    python
    # Obtain smart contract verifier for our circuit and save it to a file
    +smart_contract_code: str = sindri.get_circuit_smart_contract_verifier(circuit_id)
    +verifier_code_file: str = "Verifier.sol"
    +with open(verifier_code_file, "w") as f:
    +    f.write(smart_contract_code)
    +print(f"Smart contract verifier code written to {verifier_code_file}\\n")
    +
    +# Obtain our proof's proof+public formatted as calldata for our circuit's
    +# smart contract verifier
    +proof = sindri.get_proof(proof_id, include_smart_contract_calldata=True)
    +calldata_file: str = "calldata.txt"
    +calldata: str  = proof["smart_contract_calldata"]
    +
    +# Fix formatting so it works with Rollkit
    +import json
    +a = json.loads("["+calldata_str+"]")
    +calldata_objects = []
    +for i in a:
    +    calldata_objects.append(json.dumps(i).replace("\\"", "").replace(" ",""))
    +rollkit_calldata_str = " ".join(calldata_objects)
    +
    +# Save calldata to file
    +with open(calldata_file, "w") as f:
    +    f.write(rollkit_calldata_str)
    +print(f"Proof calldata written to {calldata_file}\\n")

    These additions will allow us to fetch and save the following to files:

    • the circuit's smart contract verifier code that is generated by Sindri when we deployed our circuit
    • the proof's proof+public formatted as calldata to run with the smart contract verifier on Rollkit

    Deploy and Prove your zkML Circuit on Sindri

    Export your Sindri API Key to an environment variable (or prepend it to the run command in the next step).

    bash
    export SINDRI_API_KEY=<YOUR_API_KEY>

    Run the compile_and_prove.py script. This will upload the circuit/ directory to Sindri, where Sindri will compile and host your circuit. Then, it will run a single proof for the circuit. Finally, it will save the circuit's smart contract verifier code that is generated by Sindri to the Verifier.sol file and it will save the proof's proof+public formatted as calldata for that smart contract to calldata.txt.

    bash
    python3 compile_and_prove.py

    Congratulations! You just deployed a zkML circuit to Sindri and proved it on Sindri's production-quality infrastructure with built-in, custom GPU-accelerated proving techniques. Furthermore, you now have smart contract verifier code (and some calldata) for verifying proofs of that circuit on-chain.

    Deploy Smart Contract Verifier to Rollkit

    Next, we will deploy this smart contract to Rollkit and verify our zkML proof on-chain. This section assumes you have an operational Rollkit instance of Polaris EVM running and your gm-portal/ directory is located in the $HOME directory on your machine.

    Deploy

    Copy your new Verifier.sol smart contract to the ~/gm-portal/contracts/src/. directory in your Polaris EVM.

    bash
    cd $HOME
    +cp sindri-resources/circuit_tutorials/circom/food_ml/Verifier.sol gm-portal/contracts/src/Verifier.sol

    Next, let's make a copy of the example ~/gm-portal/contracts/script/GmPortal.s.sol and modify it to reference your new Verifier.sol contract.

    bash
    cd gm-portal/contracts/script/
    +cp GmPortal.s.sol Verifier.s.sol

    Open up the new Verifier.s.sol and modify it to interact with your new Verifier.sol instead of the example GmPortal.sol.

    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Script.sol";
    +
    +import {Verifier} from "src/Verifier.sol";
    +
    +contract VerifierScript is Script {
    +    function setUp() public {}
    +
    +    function run() public {
    +        vm.startBroadcast();
    +        new Verifier();
    +        vm.stopBroadcast();
    +    }
    +}

    Then, deploy the contract to your Rollkit environment. Your PRIVATE_KEY and RPC_URL are for your Rollkit Polaris EVM.

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545
    bash
    cd ..
    +forge script script/Verifier.s.sol:VerifierScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to the following.

    forge script script/Verifier.s.sol:VerifierScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠆] Compiling 20 files with 0.8.24
    +[⠰] Solc 0.8.24 finished in 101.99ms
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on Polaris EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    +⠉ [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 80085
    +✅  [Success]Hash: 0xa06a4585af436e2271fc9f697488ce49771c6480e72caac76739e286564c0fc3
    +Contract Address: 0x5C59C83c099F72FcE832208f96a23a1E43737a14
    +Block: 5699
    +Paid: 0.002924172006823068 ETH (974724 gas * 3.000000007 gwei)
    +
    +[...]

    From your contract deployment output, export your contract address: Contract Address: 0x5C59C83c099F72FcE832208f96a23a1E43737a14. Note that the address will be different.

    bash
    export CONTRACT_ADDRESS=0x5C59C83c099F72FcE832208f96a23a1E43737a14

    Interact with the Contract - Verify your zkML Proof On-Chain

    Now, we will send your zkML circuit's proof to the contract and verify it on-chain. Keep in mind that your verifier contract can be used across any EVM-compatible environment. Thus, we can compare the cost of execution across multiple environments.

    First, grab the contents of your proof calldata and save it in a variable.

    bash
    CALLDATA=$(cat $HOME/sindri-resources/circuit_tutorials/circom/food_ml/calldata.txt)

    Then, interact with the smart contract using the calldata.

    bash
    cast send $CONTRACT_ADDRESS \\
    +"verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])" \\
    +$CALLDATA \\
    +--private-key $PRIVATE_KEY \\
    +--rpc-url $RPC_URL

    The output will look like the following.

    bash
    cast send $CONTRACT_ADDRESS "verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])" $CALLDATA --private-key $PRIVATE_KEY --rpc-url $RPC_URL
    +
    +blockHash               0xbbd872d0c37fe889c2456daf80505c20f262b001842d919d06e48c163319af3d
    +blockNumber             11544
    +contractAddress
    +cumulativeGasUsed       231649
    +effectiveGasPrice       3000000007
    +from                    0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4
    +gasUsed                 231649
    +logs                    []
    +logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    +root
    +status                  1
    +transactionHash         0x58096aabd3cb58bdef28501bda01b6cf4a37ed0ba482f81462bc1043bb91f996
    +transactionIndex        0
    +type                    2
    +to                      0x5C59C83c099F72FcE832208f96a23a1E43737a14

    TIP

    Note: To see the decoded output of the contract call (to check if the proof was verified), you will need to view the call in a block explorer.

    Congratulations

    Congratulations, you've just verified a zkML circuit on Rollkit.

    For further reading, check out Sindri's blog post explaining how using Sindri + Rollkit x Celestia means verifiable ML doesn’t have to be prohibitively expensive for operators or end users.

    `,59)]))}const g=i(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/import-address.CwDtvTun.png b/pr-528/assets/import-address.CwDtvTun.png new file mode 100644 index 000000000..ce372438c Binary files /dev/null and b/pr-528/assets/import-address.CwDtvTun.png differ diff --git a/pr-528/assets/index.md.DES0RmPy.js b/pr-528/assets/index.md.DES0RmPy.js new file mode 100644 index 000000000..e69666e64 --- /dev/null +++ b/pr-528/assets/index.md.DES0RmPy.js @@ -0,0 +1 @@ +import{_ as t,c as e,o}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"","titleTemplate":":title","description":"","frontmatter":{"layout":"home","titleTemplate":":title","hero":{"name":"Rollkit","text":"The unstoppable stack","tagline":"Launch an unstoppable blockchain as easily as a smart contract","image":{"src":"/img/logo-big.svg","alt":"Rollkit"},"actions":[{"theme":"brand","text":"Quick start","link":"/tutorials/quick-start"},{"theme":"alt","text":"Introduction","link":"/learn/intro"}]},"features":[{"title":"Build with the Best","details":"Utilize all the existing powerful tooling in the Cosmos ecosystem including IBC, ABCI++, and CometBFT RPC equivalency.","link":"/learn/about#why-rollkit","icon":"✨"},{"title":"Optimize for your needs","details":"Take full advantage of modularity by optimizing your rollup to your needs. Tailor your block production. Choose your VM. Pick your DA layer.","link":"/learn/stack","icon":"⚙️"},{"title":"Take Control","details":"Retain the ability to upgrade via hard forks. Break free of offchain councils holding upgrade keys. Allow your community to be sovereign.","link":"/learn/intro","icon":"🎮"}],"head":[["meta",{"name":"og:title","content":"Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1733420866000}'),a={name:"index.md"};function i(l,n,r,s,c,d){return o(),e("div")}const p=t(a,[["render",i]]);export{m as __pageData,p as default}; diff --git a/pr-528/assets/index.md.DES0RmPy.lean.js b/pr-528/assets/index.md.DES0RmPy.lean.js new file mode 100644 index 000000000..e69666e64 --- /dev/null +++ b/pr-528/assets/index.md.DES0RmPy.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"","titleTemplate":":title","description":"","frontmatter":{"layout":"home","titleTemplate":":title","hero":{"name":"Rollkit","text":"The unstoppable stack","tagline":"Launch an unstoppable blockchain as easily as a smart contract","image":{"src":"/img/logo-big.svg","alt":"Rollkit"},"actions":[{"theme":"brand","text":"Quick start","link":"/tutorials/quick-start"},{"theme":"alt","text":"Introduction","link":"/learn/intro"}]},"features":[{"title":"Build with the Best","details":"Utilize all the existing powerful tooling in the Cosmos ecosystem including IBC, ABCI++, and CometBFT RPC equivalency.","link":"/learn/about#why-rollkit","icon":"✨"},{"title":"Optimize for your needs","details":"Take full advantage of modularity by optimizing your rollup to your needs. Tailor your block production. Choose your VM. Pick your DA layer.","link":"/learn/stack","icon":"⚙️"},{"title":"Take Control","details":"Retain the ability to upgrade via hard forks. Break free of offchain councils holding upgrade keys. Allow your community to be sovereign.","link":"/learn/intro","icon":"🎮"}],"head":[["meta",{"name":"og:title","content":"Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1733420866000}'),a={name:"index.md"};function i(l,n,r,s,c,d){return o(),e("div")}const p=t(a,[["render",i]]);export{m as __pageData,p as default}; diff --git a/pr-528/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/pr-528/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 new file mode 100644 index 000000000..b6b603d59 Binary files /dev/null and b/pr-528/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ diff --git a/pr-528/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/pr-528/assets/inter-italic-cyrillic.By2_1cv3.woff2 new file mode 100644 index 000000000..def40a4f6 Binary files /dev/null and b/pr-528/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ diff --git a/pr-528/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/pr-528/assets/inter-italic-greek-ext.1u6EdAuj.woff2 new file mode 100644 index 000000000..e070c3d30 Binary files /dev/null and b/pr-528/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ diff --git a/pr-528/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/pr-528/assets/inter-italic-greek.DJ8dCoTZ.woff2 new file mode 100644 index 000000000..a3c16ca40 Binary files /dev/null and b/pr-528/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ diff --git a/pr-528/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/pr-528/assets/inter-italic-latin-ext.CN1xVJS-.woff2 new file mode 100644 index 000000000..2210a899e Binary files /dev/null and b/pr-528/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ diff --git a/pr-528/assets/inter-italic-latin.C2AdPX0b.woff2 b/pr-528/assets/inter-italic-latin.C2AdPX0b.woff2 new file mode 100644 index 000000000..790d62dc7 Binary files /dev/null and b/pr-528/assets/inter-italic-latin.C2AdPX0b.woff2 differ diff --git a/pr-528/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/pr-528/assets/inter-italic-vietnamese.BSbpV94h.woff2 new file mode 100644 index 000000000..1eec0775a Binary files /dev/null and b/pr-528/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ diff --git a/pr-528/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/pr-528/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 new file mode 100644 index 000000000..2cfe61536 Binary files /dev/null and b/pr-528/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ diff --git a/pr-528/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/pr-528/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 new file mode 100644 index 000000000..e3886dd14 Binary files /dev/null and b/pr-528/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ diff --git a/pr-528/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/pr-528/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 new file mode 100644 index 000000000..36d67487d Binary files /dev/null and b/pr-528/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ diff --git a/pr-528/assets/inter-roman-greek.BBVDIX6e.woff2 b/pr-528/assets/inter-roman-greek.BBVDIX6e.woff2 new file mode 100644 index 000000000..2bed1e85e Binary files /dev/null and b/pr-528/assets/inter-roman-greek.BBVDIX6e.woff2 differ diff --git a/pr-528/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/pr-528/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 new file mode 100644 index 000000000..9a8d1e2b5 Binary files /dev/null and b/pr-528/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ diff --git a/pr-528/assets/inter-roman-latin.Di8DUHzh.woff2 b/pr-528/assets/inter-roman-latin.Di8DUHzh.woff2 new file mode 100644 index 000000000..07d3c53ae Binary files /dev/null and b/pr-528/assets/inter-roman-latin.Di8DUHzh.woff2 differ diff --git a/pr-528/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/pr-528/assets/inter-roman-vietnamese.BjW4sHH5.woff2 new file mode 100644 index 000000000..57bdc22ae Binary files /dev/null and b/pr-528/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ diff --git a/pr-528/assets/keplr.eOsQCwa1.png b/pr-528/assets/keplr.eOsQCwa1.png new file mode 100644 index 000000000..23bf042e3 Binary files /dev/null and b/pr-528/assets/keplr.eOsQCwa1.png differ diff --git a/pr-528/assets/learn_about.md.BlW1EOC5.js b/pr-528/assets/learn_about.md.BlW1EOC5.js new file mode 100644 index 000000000..7b47e4e54 --- /dev/null +++ b/pr-528/assets/learn_about.md.BlW1EOC5.js @@ -0,0 +1 @@ +import{_ as t,c as a,a3 as o,o as i}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"About Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"About Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/about.md","filePath":"learn/about.md","lastUpdated":1733420866000}'),l={name:"learn/about.md"};function r(s,e,n,c,h,u){return i(),a("div",null,e[0]||(e[0]=[o('

    About Rollkit

    Our mission is to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

    TIP

    In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

    If you're familiar with Rollkit, you may want to skip to the tutorials section.

    What is Rollkit?

    Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

    Read more on the Celestia blog to learn more about the concept of sovereign rollups.

    Rollkit is an open-source framework. It features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application.

    Rollkit uses data availability (DA) layers by having a unified client interface which can be implemented for use with different DA networks, such as Celestia.

    Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

    What problems is Rollkit solving?

    1. Scalability and customizability

    Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

    Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

    2. Security and time to market

    Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

    Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

    In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

    In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

    Why Rollkit?

    Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

    With Rollkit, developers can benefit from:

    • Shared security: Rollups inherit security from a data availability layer, by posting blocks to it. Rollups reduce the trust assumptions placed on rollup sequencers by allowing full nodes to download and verify the transactions in the blocks posted by the sequencer. For optimistic or zk rollups, in case of fraudulent blocks, full nodes can generate fraud or zk proofs, which they can share with the rest of the network, including light nodes. Our roadmap includes the ability for light clients to receive and verify proofs, so that everyday users can enjoy high security guarantees.

    • Scalability: Rollkit rollups are deployed on specialized data availability layers like Celestia, which directly leverages the scalability of the DA layer. Additionally, rollup transactions are executed off-chain rather than the data availability layer. This means rollups have their own dedicated computational resources, rather than sharing computational resources with other applications.

    • Customizability: Rollkit is built as an open source modular framework, to make it easier for developers to reuse the four main components and customize their rollups. These components are data availability layers, execution environments, proof systems, and sequencer schemes. The components used by the Rollkit stack are customizable.

    • Faster time to market: Rollkit eliminates the need to bootstrap a validator set, manage a consensus network, incur high economic costs, and face other trade-offs that come with deploying a new layer 1. Rollkit's goal is to make deploying a rollup as easy as it is to deploy a smart contract, cutting the time it takes to bring blockchain products to market from months or even years to just minutes.

    • Sovereignty: Rollkit also enables developers to deploy sovereign rollups for cases where communities require sovereignty.

    How can you use Rollkit?

    As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

    Rollup with any execution environment

    Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

    Sovereign rollup with Cosmos SDK

    Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

    Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

    Build a settlement layer

    Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

    When can you use Rollkit?

    As of today, Rollkit is still in the alpha stage. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer.

    We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

    Head down to the next section to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

    Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

    ',36)]))}const m=t(l,[["render",r]]);export{d as __pageData,m as default}; diff --git a/pr-528/assets/learn_about.md.BlW1EOC5.lean.js b/pr-528/assets/learn_about.md.BlW1EOC5.lean.js new file mode 100644 index 000000000..7b47e4e54 --- /dev/null +++ b/pr-528/assets/learn_about.md.BlW1EOC5.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,a3 as o,o as i}from"./chunks/framework.B8-VHxRu.js";const d=JSON.parse('{"title":"About Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"About Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/about.md","filePath":"learn/about.md","lastUpdated":1733420866000}'),l={name:"learn/about.md"};function r(s,e,n,c,h,u){return i(),a("div",null,e[0]||(e[0]=[o('

    About Rollkit

    Our mission is to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

    TIP

    In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

    If you're familiar with Rollkit, you may want to skip to the tutorials section.

    What is Rollkit?

    Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

    Read more on the Celestia blog to learn more about the concept of sovereign rollups.

    Rollkit is an open-source framework. It features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application.

    Rollkit uses data availability (DA) layers by having a unified client interface which can be implemented for use with different DA networks, such as Celestia.

    Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

    What problems is Rollkit solving?

    1. Scalability and customizability

    Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

    Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

    2. Security and time to market

    Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

    Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

    In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

    In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

    Why Rollkit?

    Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

    With Rollkit, developers can benefit from:

    • Shared security: Rollups inherit security from a data availability layer, by posting blocks to it. Rollups reduce the trust assumptions placed on rollup sequencers by allowing full nodes to download and verify the transactions in the blocks posted by the sequencer. For optimistic or zk rollups, in case of fraudulent blocks, full nodes can generate fraud or zk proofs, which they can share with the rest of the network, including light nodes. Our roadmap includes the ability for light clients to receive and verify proofs, so that everyday users can enjoy high security guarantees.

    • Scalability: Rollkit rollups are deployed on specialized data availability layers like Celestia, which directly leverages the scalability of the DA layer. Additionally, rollup transactions are executed off-chain rather than the data availability layer. This means rollups have their own dedicated computational resources, rather than sharing computational resources with other applications.

    • Customizability: Rollkit is built as an open source modular framework, to make it easier for developers to reuse the four main components and customize their rollups. These components are data availability layers, execution environments, proof systems, and sequencer schemes. The components used by the Rollkit stack are customizable.

    • Faster time to market: Rollkit eliminates the need to bootstrap a validator set, manage a consensus network, incur high economic costs, and face other trade-offs that come with deploying a new layer 1. Rollkit's goal is to make deploying a rollup as easy as it is to deploy a smart contract, cutting the time it takes to bring blockchain products to market from months or even years to just minutes.

    • Sovereignty: Rollkit also enables developers to deploy sovereign rollups for cases where communities require sovereignty.

    How can you use Rollkit?

    As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

    Rollup with any execution environment

    Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

    Sovereign rollup with Cosmos SDK

    Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

    Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

    Build a settlement layer

    Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

    When can you use Rollkit?

    As of today, Rollkit is still in the alpha stage. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer.

    We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

    Head down to the next section to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

    Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

    ',36)]))}const m=t(l,[["render",r]]);export{d as __pageData,m as default}; diff --git a/pr-528/assets/learn_building-and-deploying-a-rollup.md.6i8iJaOC.js b/pr-528/assets/learn_building-and-deploying-a-rollup.md.6i8iJaOC.js new file mode 100644 index 000000000..46ff3a4b7 --- /dev/null +++ b/pr-528/assets/learn_building-and-deploying-a-rollup.md.6i8iJaOC.js @@ -0,0 +1 @@ +import{_ as t,c as a,a3 as l,o as r}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"🗞️ Building a rollup and testnet deployment","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ Building a rollup and testnet deployment | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/building-and-deploying-a-rollup.md","filePath":"learn/building-and-deploying-a-rollup.md","lastUpdated":1733420866000}'),o={name:"learn/building-and-deploying-a-rollup.md"};function i(n,e,s,d,u,p){return r(),a("div",null,e[0]||(e[0]=[l('

    🗞️ Building a rollup and testnet deployment

    The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

    You can get started with the following tutorials:

    1. Beginner

    2️. Intermediate

    3️. Advanced

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a GitHub issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    ',11)]))}const g=t(o,[["render",i]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/learn_building-and-deploying-a-rollup.md.6i8iJaOC.lean.js b/pr-528/assets/learn_building-and-deploying-a-rollup.md.6i8iJaOC.lean.js new file mode 100644 index 000000000..46ff3a4b7 --- /dev/null +++ b/pr-528/assets/learn_building-and-deploying-a-rollup.md.6i8iJaOC.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,a3 as l,o as r}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"🗞️ Building a rollup and testnet deployment","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ Building a rollup and testnet deployment | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/building-and-deploying-a-rollup.md","filePath":"learn/building-and-deploying-a-rollup.md","lastUpdated":1733420866000}'),o={name:"learn/building-and-deploying-a-rollup.md"};function i(n,e,s,d,u,p){return r(),a("div",null,e[0]||(e[0]=[l('

    🗞️ Building a rollup and testnet deployment

    The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

    You can get started with the following tutorials:

    1. Beginner

    2️. Intermediate

    3️. Advanced

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a GitHub issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    ',11)]))}const g=t(o,[["render",i]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/learn_intro.md.DPoRa93Y.js b/pr-528/assets/learn_intro.md.DPoRa93Y.js new file mode 100644 index 000000000..402ca270e --- /dev/null +++ b/pr-528/assets/learn_intro.md.DPoRa93Y.js @@ -0,0 +1 @@ +import{_ as a,c as o,j as t,a as n,o as r}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Introduction | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/intro.md","filePath":"learn/intro.md","lastUpdated":1733420866000}'),i={name:"learn/intro.md"};function l(s,e,c,d,p,h){return r(),o("div",null,e[0]||(e[0]=[t("h1",{id:"introduction",tabindex:"-1"},[n("Introduction "),t("a",{class:"header-anchor",href:"#introduction","aria-label":'Permalink to "Introduction"'},"​")],-1),t("p",null,"Welcome to the Rollkit docs. We're happy you made it here! Rollkit allows anyone to launch an unstoppable blockchain as easily as a smart contract.",-1),t("p",null,"Rollkit is the unstoppable stack.",-1),t("p",null,"We're setting the bar high for developers' flexibility and ability to customize blockchains however they see fit.",-1)]))}const f=a(i,[["render",l]]);export{m as __pageData,f as default}; diff --git a/pr-528/assets/learn_intro.md.DPoRa93Y.lean.js b/pr-528/assets/learn_intro.md.DPoRa93Y.lean.js new file mode 100644 index 000000000..402ca270e --- /dev/null +++ b/pr-528/assets/learn_intro.md.DPoRa93Y.lean.js @@ -0,0 +1 @@ +import{_ as a,c as o,j as t,a as n,o as r}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Introduction | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/intro.md","filePath":"learn/intro.md","lastUpdated":1733420866000}'),i={name:"learn/intro.md"};function l(s,e,c,d,p,h){return r(),o("div",null,e[0]||(e[0]=[t("h1",{id:"introduction",tabindex:"-1"},[n("Introduction "),t("a",{class:"header-anchor",href:"#introduction","aria-label":'Permalink to "Introduction"'},"​")],-1),t("p",null,"Welcome to the Rollkit docs. We're happy you made it here! Rollkit allows anyone to launch an unstoppable blockchain as easily as a smart contract.",-1),t("p",null,"Rollkit is the unstoppable stack.",-1),t("p",null,"We're setting the bar high for developers' flexibility and ability to customize blockchains however they see fit.",-1)]))}const f=a(i,[["render",l]]);export{m as __pageData,f as default}; diff --git a/pr-528/assets/learn_specifications.md.BQuKD7Aj.js b/pr-528/assets/learn_specifications.md.BQuKD7Aj.js new file mode 100644 index 000000000..19ef4dce4 --- /dev/null +++ b/pr-528/assets/learn_specifications.md.BQuKD7Aj.js @@ -0,0 +1 @@ +import{_ as a,c as n,j as e,a as t,o}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Technical specifications","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Technical specifications | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/specifications.md","filePath":"learn/specifications.md","lastUpdated":1733420866000}'),c={name:"learn/specifications.md"};function l(s,i,r,d,p,f){return o(),n("div",null,i[0]||(i[0]=[e("h1",{id:"technical-specifications",tabindex:"-1"},[t("Technical specifications "),e("a",{class:"header-anchor",href:"#technical-specifications","aria-label":'Permalink to "Technical specifications"'},"​")],-1),e("p",null,[e("a",{href:"https://rollkit.github.io/rollkit/index.html",target:"_blank",rel:"noreferrer"},"Rollkit specifications"),t(" - is comprehensive documentation on the inner components of Rollkit, including data storage, transaction processing, and more. It’s an essential resource for developers looking to understand, contribute to and leverage the full capabilities of Rollkit.")],-1),e("p",null,[t("Additional Rollkit documentation can be found in the "),e("a",{href:"https://pkg.go.dev/github.com/rollkit/rollkit",target:"_blank",rel:"noreferrer"},"Rollkit godocs"),t(".")],-1)]))}const k=a(c,[["render",l]]);export{m as __pageData,k as default}; diff --git a/pr-528/assets/learn_specifications.md.BQuKD7Aj.lean.js b/pr-528/assets/learn_specifications.md.BQuKD7Aj.lean.js new file mode 100644 index 000000000..19ef4dce4 --- /dev/null +++ b/pr-528/assets/learn_specifications.md.BQuKD7Aj.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,j as e,a as t,o}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Technical specifications","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Technical specifications | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/specifications.md","filePath":"learn/specifications.md","lastUpdated":1733420866000}'),c={name:"learn/specifications.md"};function l(s,i,r,d,p,f){return o(),n("div",null,i[0]||(i[0]=[e("h1",{id:"technical-specifications",tabindex:"-1"},[t("Technical specifications "),e("a",{class:"header-anchor",href:"#technical-specifications","aria-label":'Permalink to "Technical specifications"'},"​")],-1),e("p",null,[e("a",{href:"https://rollkit.github.io/rollkit/index.html",target:"_blank",rel:"noreferrer"},"Rollkit specifications"),t(" - is comprehensive documentation on the inner components of Rollkit, including data storage, transaction processing, and more. It’s an essential resource for developers looking to understand, contribute to and leverage the full capabilities of Rollkit.")],-1),e("p",null,[t("Additional Rollkit documentation can be found in the "),e("a",{href:"https://pkg.go.dev/github.com/rollkit/rollkit",target:"_blank",rel:"noreferrer"},"Rollkit godocs"),t(".")],-1)]))}const k=a(c,[["render",l]]);export{m as __pageData,k as default}; diff --git a/pr-528/assets/learn_stack.md.CAr6XwiN.js b/pr-528/assets/learn_stack.md.CAr6XwiN.js new file mode 100644 index 000000000..367c9a95c --- /dev/null +++ b/pr-528/assets/learn_stack.md.CAr6XwiN.js @@ -0,0 +1,3 @@ +import{_ as i,c as n,j as t,a,b as s,w as o,a4 as d,a3 as c,B as h,o as r,G as p}from"./chunks/framework.B8-VHxRu.js";const q=JSON.parse('{"title":"Rollkit stack","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit stack | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/stack.md","filePath":"learn/stack.md","lastUpdated":1733420866000}'),u={name:"learn/stack.md"};function f(m,e,g,k,b,y){const l=h("Mermaid");return r(),n("div",null,[e[1]||(e[1]=t("h1",{id:"rollkit-stack",tabindex:"-1"},[a("Rollkit stack "),t("a",{class:"header-anchor",href:"#rollkit-stack","aria-label":'Permalink to "Rollkit stack"'},"​")],-1)),e[2]||(e[2]=t("p",null,"This page will cover the main components of Rollkit.",-1)),e[3]||(e[3]=t("p",null,"Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.",-1)),e[4]||(e[4]=t("h2",{id:"application-structure",tabindex:"-1"},[a("Application structure "),t("a",{class:"header-anchor",href:"#application-structure","aria-label":'Permalink to "Application structure"'},"​")],-1)),(r(),s(d,null,{default:o(()=>[p(l,{id:"mermaid-12",class:"mermaid",graph:"graph%20TD%0A%20%20%20%20A%5BRollkit%20Rollup%5D%0A%20%20%20%20B%5BRollkit%5D%0A%20%20%20%20C%5BData%20Availability%20Chain%5D%0A%20%20%20%20%0A%20%20%20%20A%20%3C--%3E%7CABCI%7C%20B%0A%20%20%20%20B%20%3C--%3E%7CDA%20API%7C%20C%0A"})]),fallback:o(()=>e[0]||(e[0]=[a(" Loading... ")])),_:1})),e[5]||(e[5]=c(`

    ABCI interface

    Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

    Cosmos SDK

    Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

    Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

    And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

    Data availability

    Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

    The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

    The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

    Celestia

    Celestia is a prominent example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

    New DA layer integrations can be added by using the go-da interface.

    Node components

    Mempool

    The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

    Block manager

    The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

    All nodes run SyncLoop which looks for the following operations:

    • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
    • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
    • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

    All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

    RPC

    Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

    • Information about the rollup node: information such as node's health, status, and network info.
    • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
    • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
    • ABCI: rollup application information.

    The following RPC protocols are currently supported:

    • URI over HTTP
    • JSON-RPC over HTTP
    • JSON-RPC over WebSockets

    The RPC provides an additional query for DA included blocks using the height parameter:

    sh
    curl http://127.0.0.1:26657/block?height=1
    +
    +curl http://127.0.0.1:26657/block?height=included

    Parameters

    • height (integer or string): height of the requested block. If no height is specified the latest block will be used. If height is set to the string "included", the latest DA included block will be returned.

    P2P layer

    Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

    Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

    Rollkit node types

    Rollkit nodes are implemented in the node package.

    Full node

    Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

    Light node (work in progress)

    Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

    Sequencer node

    Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

    Rollkit plans to support multiple different pluggable sequencer schemes:

    Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
    Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
    Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
    Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
    Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

    "Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

    * implementation of this property is in progress.

    State validity modes

    Pessimistic (full nodes only)

    A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

    Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

    Optimistic (fraud proofs) (work in progress)

    Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

    Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

    Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

    Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

    You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

    Validity (ZK proofs)

    Validity (ZK) rollups are planned, but not currently supported by Rollkit.

    `,58))])}const w=i(u,[["render",f]]);export{q as __pageData,w as default}; diff --git a/pr-528/assets/learn_stack.md.CAr6XwiN.lean.js b/pr-528/assets/learn_stack.md.CAr6XwiN.lean.js new file mode 100644 index 000000000..367c9a95c --- /dev/null +++ b/pr-528/assets/learn_stack.md.CAr6XwiN.lean.js @@ -0,0 +1,3 @@ +import{_ as i,c as n,j as t,a,b as s,w as o,a4 as d,a3 as c,B as h,o as r,G as p}from"./chunks/framework.B8-VHxRu.js";const q=JSON.parse('{"title":"Rollkit stack","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit stack | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/stack.md","filePath":"learn/stack.md","lastUpdated":1733420866000}'),u={name:"learn/stack.md"};function f(m,e,g,k,b,y){const l=h("Mermaid");return r(),n("div",null,[e[1]||(e[1]=t("h1",{id:"rollkit-stack",tabindex:"-1"},[a("Rollkit stack "),t("a",{class:"header-anchor",href:"#rollkit-stack","aria-label":'Permalink to "Rollkit stack"'},"​")],-1)),e[2]||(e[2]=t("p",null,"This page will cover the main components of Rollkit.",-1)),e[3]||(e[3]=t("p",null,"Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.",-1)),e[4]||(e[4]=t("h2",{id:"application-structure",tabindex:"-1"},[a("Application structure "),t("a",{class:"header-anchor",href:"#application-structure","aria-label":'Permalink to "Application structure"'},"​")],-1)),(r(),s(d,null,{default:o(()=>[p(l,{id:"mermaid-12",class:"mermaid",graph:"graph%20TD%0A%20%20%20%20A%5BRollkit%20Rollup%5D%0A%20%20%20%20B%5BRollkit%5D%0A%20%20%20%20C%5BData%20Availability%20Chain%5D%0A%20%20%20%20%0A%20%20%20%20A%20%3C--%3E%7CABCI%7C%20B%0A%20%20%20%20B%20%3C--%3E%7CDA%20API%7C%20C%0A"})]),fallback:o(()=>e[0]||(e[0]=[a(" Loading... ")])),_:1})),e[5]||(e[5]=c(`

    ABCI interface

    Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

    Cosmos SDK

    Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

    Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

    And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

    Data availability

    Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

    The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

    The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

    Celestia

    Celestia is a prominent example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

    New DA layer integrations can be added by using the go-da interface.

    Node components

    Mempool

    The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

    Block manager

    The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

    All nodes run SyncLoop which looks for the following operations:

    • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
    • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
    • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

    All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

    RPC

    Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

    • Information about the rollup node: information such as node's health, status, and network info.
    • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
    • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
    • ABCI: rollup application information.

    The following RPC protocols are currently supported:

    • URI over HTTP
    • JSON-RPC over HTTP
    • JSON-RPC over WebSockets

    The RPC provides an additional query for DA included blocks using the height parameter:

    sh
    curl http://127.0.0.1:26657/block?height=1
    +
    +curl http://127.0.0.1:26657/block?height=included

    Parameters

    • height (integer or string): height of the requested block. If no height is specified the latest block will be used. If height is set to the string "included", the latest DA included block will be returned.

    P2P layer

    Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

    Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

    Rollkit node types

    Rollkit nodes are implemented in the node package.

    Full node

    Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

    Light node (work in progress)

    Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

    Sequencer node

    Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

    Rollkit plans to support multiple different pluggable sequencer schemes:

    Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
    Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
    Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
    Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
    Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

    "Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

    * implementation of this property is in progress.

    State validity modes

    Pessimistic (full nodes only)

    A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

    Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

    Optimistic (fraud proofs) (work in progress)

    Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

    Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

    Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

    Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

    You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

    Validity (ZK proofs)

    Validity (ZK) rollups are planned, but not currently supported by Rollkit.

    `,58))])}const w=i(u,[["render",f]]);export{q as __pageData,w as default}; diff --git a/pr-528/assets/learn_transaction-flow.md.BlnJIkpx.js b/pr-528/assets/learn_transaction-flow.md.BlnJIkpx.js new file mode 100644 index 000000000..23c3ac6db --- /dev/null +++ b/pr-528/assets/learn_transaction-flow.md.BlnJIkpx.js @@ -0,0 +1 @@ +import{_ as d,c,a3 as u,b as l,w as o,a4 as s,j as e,a as i,B as p,o as t,G as r}from"./chunks/framework.B8-VHxRu.js";const E=JSON.parse('{"title":"Transaction flow","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Transaction flow | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/transaction-flow.md","filePath":"learn/transaction-flow.md","lastUpdated":1733420866000}'),h={name:"learn/transaction-flow.md"};function f(m,a,A,g,b,k){const n=p("Mermaid");return t(),c("div",null,[a[4]||(a[4]=u('

    Transaction flow

    Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

    • submitting transactions
    • gossipping headers and fraud proofs

    WARNING

    Light nodes are still a work in progress.

    Here's what the typical transaction flow looks like:

    Transaction submission

    ',6)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-29",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20User%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20%0A%20%20%20%20User-%3E%3ELightNode%3A%20Submit%20Transaction%0A%20%20%20%20LightNode-%3E%3EFullNode%3A%20Gossip%20Transaction%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Refuse%20(if%20invalid)%0A"})]),fallback:o(()=>a[0]||(a[0]=[i(" Loading... ")])),_:1})),a[5]||(a[5]=e("h2",{id:"transaction-validation-and-processing",tabindex:"-1"},[i("Transaction validation and processing "),e("a",{class:"header-anchor",href:"#transaction-validation-and-processing","aria-label":'Permalink to "Transaction validation and processing"'},"​")],-1)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-33",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20Sequencer%0A%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Check%20Validity%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Add%20to%20Mempool%20(if%20valid)%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Transaction%20Processed%20(if%20valid)%0A%20%20%20%20FullNode-%3E%3ESequencer%3A%20Inform%20about%20Valid%20Transaction%0A%20%20%20%20Sequencer-%3E%3EDALayer%3A%20Add%20to%20Rollup%20Block%0A"})]),fallback:o(()=>a[1]||(a[1]=[i(" Loading... ")])),_:1})),a[6]||(a[6]=e("h2",{id:"block-processing",tabindex:"-1"},[i("Block processing "),e("a",{class:"header-anchor",href:"#block-processing","aria-label":'Permalink to "Block processing"'},"​")],-1)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-37",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20DALayer%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20DALayer-%3E%3ERollupChain%3A%20Update%20State%0A%20%20%20%20DALayer-%3E%3EFullNode%3A%20Download%20%26%20Validate%20Block%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Generate%20Fraud%20Proofs%20(if%20invalid)%0A"})]),fallback:o(()=>a[2]||(a[2]=[i(" Loading... ")])),_:1})),a[7]||(a[7]=e("h2",{id:"fraud-proof-gossip-and-forking",tabindex:"-1"},[i("Fraud proof gossip and forking "),e("a",{class:"header-anchor",href:"#fraud-proof-gossip-and-forking","aria-label":'Permalink to "Fraud proof gossip and forking"'},"​")],-1)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-41",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20FullNode-%3E%3ELightNode%3A%20Gossip%20Fraud%20Proofs%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3ERollupChain%3A%20Halt%20%26%20Decide%20to%20Fork%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3EDALayer%3A%20Submit%20New%20Block%20(after%20fork)%0A"})]),fallback:o(()=>a[3]||(a[3]=[i(" Loading... ")])),_:1})),a[8]||(a[8]=e("p",null,"To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.",-1)),a[9]||(a[9]=e("p",null,"If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.",-1)),a[10]||(a[10]=e("p",null,"After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.",-1)),a[11]||(a[11]=e("p",null,[i("As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes "),e("a",{href:"/docs-preview/pr-528/learn/stack#sequencer-node"},"here"),i(".")],-1))])}const N=d(h,[["render",f]]);export{E as __pageData,N as default}; diff --git a/pr-528/assets/learn_transaction-flow.md.BlnJIkpx.lean.js b/pr-528/assets/learn_transaction-flow.md.BlnJIkpx.lean.js new file mode 100644 index 000000000..23c3ac6db --- /dev/null +++ b/pr-528/assets/learn_transaction-flow.md.BlnJIkpx.lean.js @@ -0,0 +1 @@ +import{_ as d,c,a3 as u,b as l,w as o,a4 as s,j as e,a as i,B as p,o as t,G as r}from"./chunks/framework.B8-VHxRu.js";const E=JSON.parse('{"title":"Transaction flow","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Transaction flow | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/transaction-flow.md","filePath":"learn/transaction-flow.md","lastUpdated":1733420866000}'),h={name:"learn/transaction-flow.md"};function f(m,a,A,g,b,k){const n=p("Mermaid");return t(),c("div",null,[a[4]||(a[4]=u('

    Transaction flow

    Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

    • submitting transactions
    • gossipping headers and fraud proofs

    WARNING

    Light nodes are still a work in progress.

    Here's what the typical transaction flow looks like:

    Transaction submission

    ',6)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-29",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20User%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20%0A%20%20%20%20User-%3E%3ELightNode%3A%20Submit%20Transaction%0A%20%20%20%20LightNode-%3E%3EFullNode%3A%20Gossip%20Transaction%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Refuse%20(if%20invalid)%0A"})]),fallback:o(()=>a[0]||(a[0]=[i(" Loading... ")])),_:1})),a[5]||(a[5]=e("h2",{id:"transaction-validation-and-processing",tabindex:"-1"},[i("Transaction validation and processing "),e("a",{class:"header-anchor",href:"#transaction-validation-and-processing","aria-label":'Permalink to "Transaction validation and processing"'},"​")],-1)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-33",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20Sequencer%0A%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Check%20Validity%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Add%20to%20Mempool%20(if%20valid)%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Transaction%20Processed%20(if%20valid)%0A%20%20%20%20FullNode-%3E%3ESequencer%3A%20Inform%20about%20Valid%20Transaction%0A%20%20%20%20Sequencer-%3E%3EDALayer%3A%20Add%20to%20Rollup%20Block%0A"})]),fallback:o(()=>a[1]||(a[1]=[i(" Loading... ")])),_:1})),a[6]||(a[6]=e("h2",{id:"block-processing",tabindex:"-1"},[i("Block processing "),e("a",{class:"header-anchor",href:"#block-processing","aria-label":'Permalink to "Block processing"'},"​")],-1)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-37",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20DALayer%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20DALayer-%3E%3ERollupChain%3A%20Update%20State%0A%20%20%20%20DALayer-%3E%3EFullNode%3A%20Download%20%26%20Validate%20Block%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Generate%20Fraud%20Proofs%20(if%20invalid)%0A"})]),fallback:o(()=>a[2]||(a[2]=[i(" Loading... ")])),_:1})),a[7]||(a[7]=e("h2",{id:"fraud-proof-gossip-and-forking",tabindex:"-1"},[i("Fraud proof gossip and forking "),e("a",{class:"header-anchor",href:"#fraud-proof-gossip-and-forking","aria-label":'Permalink to "Fraud proof gossip and forking"'},"​")],-1)),(t(),l(s,null,{default:o(()=>[r(n,{id:"mermaid-41",class:"mermaid",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20FullNode-%3E%3ELightNode%3A%20Gossip%20Fraud%20Proofs%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3ERollupChain%3A%20Halt%20%26%20Decide%20to%20Fork%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3EDALayer%3A%20Submit%20New%20Block%20(after%20fork)%0A"})]),fallback:o(()=>a[3]||(a[3]=[i(" Loading... ")])),_:1})),a[8]||(a[8]=e("p",null,"To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.",-1)),a[9]||(a[9]=e("p",null,"If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.",-1)),a[10]||(a[10]=e("p",null,"After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.",-1)),a[11]||(a[11]=e("p",null,[i("As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes "),e("a",{href:"/docs-preview/pr-528/learn/stack#sequencer-node"},"here"),i(".")],-1))])}const N=d(h,[["render",f]]);export{E as __pageData,N as default}; diff --git a/pr-528/assets/sequencing.DlIPdR1A.jpg b/pr-528/assets/sequencing.DlIPdR1A.jpg new file mode 100644 index 000000000..32f759730 Binary files /dev/null and b/pr-528/assets/sequencing.DlIPdR1A.jpg differ diff --git a/pr-528/assets/style.DDWgmFUe.css b/pr-528/assets/style.DDWgmFUe.css new file mode 100644 index 000000000..fa8d182fe --- /dev/null +++ b/pr-528/assets/style.DDWgmFUe.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/docs-preview/pr-528/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-54a304ca]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-54a304ca],.VPBackdrop.fade-leave-to[data-v-54a304ca]{opacity:0}.VPBackdrop.fade-leave-active[data-v-54a304ca]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-54a304ca]{display:none}}.NotFound[data-v-6ff51ddd]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-6ff51ddd]{padding:96px 32px 168px}}.code[data-v-6ff51ddd]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-6ff51ddd]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-6ff51ddd]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-6ff51ddd]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-6ff51ddd]{padding-top:20px}.link[data-v-6ff51ddd]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-6ff51ddd]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-53c99d69]{position:relative;z-index:1}.nested[data-v-53c99d69]{padding-right:16px;padding-left:16px}.outline-link[data-v-53c99d69]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-53c99d69]:hover,.outline-link.active[data-v-53c99d69]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-53c99d69]{padding-left:13px}.VPDocAsideOutline[data-v-f610f197]{display:none}.VPDocAsideOutline.has-outline[data-v-f610f197]{display:block}.content[data-v-f610f197]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-f610f197]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-f610f197]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-cb998dce]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-cb998dce]{flex-grow:1}.VPDocAside[data-v-cb998dce] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-cb998dce] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-cb998dce] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-1bb0c8a8]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-1bb0c8a8]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-1bcd8184]{margin-top:64px}.edit-info[data-v-1bcd8184]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-1bcd8184]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-1bcd8184]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-1bcd8184]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-1bcd8184]{margin-right:8px}.prev-next[data-v-1bcd8184]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-1bcd8184]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-1bcd8184]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-1bcd8184]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-1bcd8184]{margin-left:auto;text-align:right}.desc[data-v-1bcd8184]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-1bcd8184]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-e6f2a212]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-e6f2a212]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-e6f2a212]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-e6f2a212]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-e6f2a212]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-e6f2a212]{display:flex;justify-content:center}.VPDoc .aside[data-v-e6f2a212]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-e6f2a212]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-e6f2a212]{max-width:1104px}}.container[data-v-e6f2a212]{margin:0 auto;width:100%}.aside[data-v-e6f2a212]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-e6f2a212]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-e6f2a212]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-e6f2a212]::-webkit-scrollbar{display:none}.aside-curtain[data-v-e6f2a212]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-e6f2a212]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-e6f2a212]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-e6f2a212]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-e6f2a212]{order:1;margin:0;min-width:640px}}.content-container[data-v-e6f2a212]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-e6f2a212]{max-width:688px}.VPButton[data-v-93dc4167]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-93dc4167]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-93dc4167]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-93dc4167]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-93dc4167]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-93dc4167]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-93dc4167]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-93dc4167]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-93dc4167]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-93dc4167]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-93dc4167]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-93dc4167]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-93dc4167]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-ab19afbb]{display:none}.dark .VPImage.light[data-v-ab19afbb]{display:none}.VPHero[data-v-b10c5094]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-b10c5094]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-b10c5094]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-b10c5094]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-b10c5094]{flex-direction:row}}.main[data-v-b10c5094]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-b10c5094]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-b10c5094]{text-align:left}}@media (min-width: 960px){.main[data-v-b10c5094]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-b10c5094]{max-width:592px}}.name[data-v-b10c5094],.text[data-v-b10c5094]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-b10c5094],.VPHero.has-image .text[data-v-b10c5094]{margin:0 auto}.name[data-v-b10c5094]{color:var(--vp-home-hero-name-color)}.clip[data-v-b10c5094]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-b10c5094],.text[data-v-b10c5094]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-b10c5094],.text[data-v-b10c5094]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-b10c5094],.VPHero.has-image .text[data-v-b10c5094]{margin:0}}.tagline[data-v-b10c5094]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-b10c5094]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-b10c5094]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-b10c5094]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-b10c5094]{margin:0}}.actions[data-v-b10c5094]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-b10c5094]{justify-content:center}@media (min-width: 640px){.actions[data-v-b10c5094]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-b10c5094]{justify-content:flex-start}}.action[data-v-b10c5094]{flex-shrink:0;padding:6px}.image[data-v-b10c5094]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-b10c5094]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-b10c5094]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-b10c5094]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-b10c5094]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-b10c5094]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-b10c5094]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-b10c5094]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-b10c5094]{width:320px;height:320px}}[data-v-b10c5094] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-b10c5094] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-b10c5094] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-bd37d1a2]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-bd37d1a2]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-bd37d1a2]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-bd37d1a2]>.VPImage{margin-bottom:20px}.icon[data-v-bd37d1a2]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-bd37d1a2]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-bd37d1a2]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-bd37d1a2]{padding-top:8px}.link-text-value[data-v-bd37d1a2]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-bd37d1a2]{margin-left:6px}.VPFeatures[data-v-b1eea84a]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-b1eea84a]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-b1eea84a]{padding:0 64px}}.container[data-v-b1eea84a]{margin:0 auto;max-width:1152px}.items[data-v-b1eea84a]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-b1eea84a]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-b1eea84a],.item.grid-4[data-v-b1eea84a],.item.grid-6[data-v-b1eea84a]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-b1eea84a],.item.grid-4[data-v-b1eea84a]{width:50%}.item.grid-3[data-v-b1eea84a],.item.grid-6[data-v-b1eea84a]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-b1eea84a]{width:25%}}.container[data-v-c141a4bd]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-c141a4bd]{padding:0 48px}}@media (min-width: 960px){.container[data-v-c141a4bd]{width:100%;padding:0 64px}}.vp-doc[data-v-c141a4bd] .VPHomeSponsors,.vp-doc[data-v-c141a4bd] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-c141a4bd] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-c141a4bd] .VPHomeSponsors a,.vp-doc[data-v-c141a4bd] .VPTeamPage a{text-decoration:none}.VPHome[data-v-07b1ad08]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-07b1ad08]{margin-bottom:128px}}.VPContent[data-v-9a6c75ad]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-9a6c75ad]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-9a6c75ad]{margin:0}@media (min-width: 960px){.VPContent[data-v-9a6c75ad]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-9a6c75ad]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-9a6c75ad]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-566314d4]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-566314d4]{display:none}.VPFooter[data-v-566314d4] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-566314d4] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-566314d4]{padding:32px}}.container[data-v-566314d4]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-566314d4],.copyright[data-v-566314d4]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-883964e0]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-883964e0]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-883964e0]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-883964e0]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-883964e0]{color:var(--vp-c-text-1)}.icon[data-v-883964e0]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-883964e0]{font-size:14px}.icon[data-v-883964e0]{font-size:16px}}.open>.icon[data-v-883964e0]{transform:rotate(90deg)}.items[data-v-883964e0]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-883964e0]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-883964e0]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-883964e0]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-883964e0]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-883964e0]{transition:all .2s ease-out}.flyout-leave-active[data-v-883964e0]{transition:all .15s ease-in}.flyout-enter-from[data-v-883964e0],.flyout-leave-to[data-v-883964e0]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-2488c25a]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-2488c25a]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-2488c25a]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-2488c25a]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-2488c25a]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-2488c25a]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-2488c25a]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-2488c25a]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-2488c25a]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-2488c25a]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-2488c25a]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-2488c25a]{display:none}}.menu-icon[data-v-2488c25a]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-2488c25a]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-2488c25a]{padding:12px 32px 11px}}.VPSwitch[data-v-b4ccac88]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-b4ccac88]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-b4ccac88]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-b4ccac88]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-b4ccac88] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-b4ccac88] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-be9742d9]{opacity:1}.moon[data-v-be9742d9],.dark .sun[data-v-be9742d9]{opacity:0}.dark .moon[data-v-be9742d9]{opacity:1}.dark .VPSwitchAppearance[data-v-be9742d9] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-3f90c1a5]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-3f90c1a5]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-7eeeb2dc]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-7eeeb2dc]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-7eeeb2dc]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-7eeeb2dc]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-a6b0397c]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-a6b0397c]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-a6b0397c]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-a6b0397c]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-20ed86d6]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-20ed86d6] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-20ed86d6] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-20ed86d6] .group:last-child{padding-bottom:0}.VPMenu[data-v-20ed86d6] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-20ed86d6] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-20ed86d6] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-20ed86d6] .action{padding-left:24px}.VPFlyout[data-v-bfe7971f]{position:relative}.VPFlyout[data-v-bfe7971f]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-bfe7971f]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-bfe7971f]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-bfe7971f]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-bfe7971f]{color:var(--vp-c-brand-2)}.button[aria-expanded=false]+.menu[data-v-bfe7971f]{opacity:0;visibility:hidden;transform:translateY(0)}.VPFlyout:hover .menu[data-v-bfe7971f],.button[aria-expanded=true]+.menu[data-v-bfe7971f]{opacity:1;visibility:visible;transform:translateY(0)}.button[data-v-bfe7971f]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-bfe7971f]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-bfe7971f]{margin-right:0;font-size:16px}.text-icon[data-v-bfe7971f]{margin-left:4px;font-size:14px}.icon[data-v-bfe7971f]{font-size:20px;transition:fill .25s}.menu[data-v-bfe7971f]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-60a9a2d3]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-60a9a2d3]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-60a9a2d3]>svg,.VPSocialLink[data-v-60a9a2d3]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-e71e869c]{display:flex;justify-content:center}.VPNavBarExtra[data-v-f953d92f]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-f953d92f]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-f953d92f]{display:none}}.trans-title[data-v-f953d92f]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-f953d92f],.item.social-links[data-v-f953d92f]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-f953d92f]{min-width:176px}.appearance-action[data-v-f953d92f]{margin-right:-2px}.social-links-list[data-v-f953d92f]{margin:-4px -8px}.VPNavBarHamburger[data-v-6bee1efd]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-6bee1efd]{display:none}}.container[data-v-6bee1efd]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-6bee1efd]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-6bee1efd]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-6bee1efd]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-6bee1efd]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-6bee1efd]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-6bee1efd]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-6bee1efd],.VPNavBarHamburger.active:hover .middle[data-v-6bee1efd],.VPNavBarHamburger.active:hover .bottom[data-v-6bee1efd]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-6bee1efd],.middle[data-v-6bee1efd],.bottom[data-v-6bee1efd]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-6bee1efd]{top:0;left:0;transform:translate(0)}.middle[data-v-6bee1efd]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-6bee1efd]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-815115f5]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-815115f5],.VPNavBarMenuLink[data-v-815115f5]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-afb2845e]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-afb2845e]{display:flex}}/*! @docsearch/css 3.6.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-ef6192dc]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-ef6192dc]{display:flex;align-items:center}}.title[data-v-9f43907a]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-9f43907a]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-9f43907a]{border-bottom-color:var(--vp-c-divider)}}[data-v-9f43907a] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-acee064b]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-acee064b]{display:flex;align-items:center}}.title[data-v-acee064b]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-9fd4d1dd]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-9fd4d1dd]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-9fd4d1dd]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-9fd4d1dd]:not(.home){background-color:transparent}.VPNavBar[data-v-9fd4d1dd]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-9fd4d1dd]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-9fd4d1dd]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-9fd4d1dd]{padding:0}}.container[data-v-9fd4d1dd]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-9fd4d1dd],.container>.content[data-v-9fd4d1dd]{pointer-events:none}.container[data-v-9fd4d1dd] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-9fd4d1dd]{max-width:100%}}.title[data-v-9fd4d1dd]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-9fd4d1dd]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-9fd4d1dd]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-9fd4d1dd]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-9fd4d1dd]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-9fd4d1dd]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-9fd4d1dd]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-9fd4d1dd]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-9fd4d1dd]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-9fd4d1dd]{column-gap:.5rem}}.menu+.translations[data-v-9fd4d1dd]:before,.menu+.appearance[data-v-9fd4d1dd]:before,.menu+.social-links[data-v-9fd4d1dd]:before,.translations+.appearance[data-v-9fd4d1dd]:before,.appearance+.social-links[data-v-9fd4d1dd]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-9fd4d1dd]:before,.translations+.appearance[data-v-9fd4d1dd]:before{margin-right:16px}.appearance+.social-links[data-v-9fd4d1dd]:before{margin-left:16px}.social-links[data-v-9fd4d1dd]{margin-right:-8px}.divider[data-v-9fd4d1dd]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-9fd4d1dd]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-9fd4d1dd]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-9fd4d1dd]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-a3e2920d]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-a3e2920d]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-fa963d97]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-fa963d97]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-e04f3e85]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-e04f3e85]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-f60dbfa7]{display:block}.title[data-v-f60dbfa7]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-d99bfeec]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-d99bfeec]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-d99bfeec]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-d99bfeec]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-d99bfeec]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-d99bfeec]{transform:rotate(45deg)}.button[data-v-d99bfeec]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-d99bfeec]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-d99bfeec]{transition:transform .25s}.group[data-v-d99bfeec]:first-child{padding-top:0}.group+.group[data-v-d99bfeec],.group+.item[data-v-d99bfeec]{padding-top:4px}.VPNavScreenTranslations[data-v-516e4bc3]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-516e4bc3]{height:auto}.title[data-v-516e4bc3]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-516e4bc3]{font-size:16px}.icon.lang[data-v-516e4bc3]{margin-right:8px}.icon.chevron[data-v-516e4bc3]{margin-left:4px}.list[data-v-516e4bc3]{padding:4px 0 0 24px}.link[data-v-516e4bc3]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-2dd6d0c7]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-2dd6d0c7],.VPNavScreen.fade-leave-active[data-v-2dd6d0c7]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-2dd6d0c7],.VPNavScreen.fade-leave-active .container[data-v-2dd6d0c7]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-2dd6d0c7],.VPNavScreen.fade-leave-to[data-v-2dd6d0c7]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-2dd6d0c7],.VPNavScreen.fade-leave-to .container[data-v-2dd6d0c7]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-2dd6d0c7]{display:none}}.container[data-v-2dd6d0c7]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-2dd6d0c7],.menu+.appearance[data-v-2dd6d0c7],.translations+.appearance[data-v-2dd6d0c7]{margin-top:24px}.menu+.social-links[data-v-2dd6d0c7]{margin-top:16px}.appearance+.social-links[data-v-2dd6d0c7]{margin-top:16px}.VPNav[data-v-7ad780c2]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-7ad780c2]{position:fixed}}.VPSidebarItem.level-0[data-v-edd2eed8]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-edd2eed8]{padding-bottom:10px}.item[data-v-edd2eed8]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-edd2eed8]{cursor:pointer}.indicator[data-v-edd2eed8]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-edd2eed8],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-edd2eed8],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-edd2eed8],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-edd2eed8]{background-color:var(--vp-c-brand-1)}.link[data-v-edd2eed8]{display:flex;align-items:center;flex-grow:1}.text[data-v-edd2eed8]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-edd2eed8]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-edd2eed8],.VPSidebarItem.level-2 .text[data-v-edd2eed8],.VPSidebarItem.level-3 .text[data-v-edd2eed8],.VPSidebarItem.level-4 .text[data-v-edd2eed8],.VPSidebarItem.level-5 .text[data-v-edd2eed8]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-edd2eed8]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-1.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-2.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-3.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-4.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-5.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-edd2eed8]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-edd2eed8]{color:var(--vp-c-brand-1)}.caret[data-v-edd2eed8]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-edd2eed8]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-edd2eed8]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-edd2eed8]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-edd2eed8]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-edd2eed8],.VPSidebarItem.level-2 .items[data-v-edd2eed8],.VPSidebarItem.level-3 .items[data-v-edd2eed8],.VPSidebarItem.level-4 .items[data-v-edd2eed8],.VPSidebarItem.level-5 .items[data-v-edd2eed8]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-edd2eed8]{display:none}.no-transition[data-v-51288d80] .caret-icon{transition:none}.group+.group[data-v-51288d80]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-51288d80]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-42c4c606]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-42c4c606]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-42c4c606]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-42c4c606]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-42c4c606]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-42c4c606]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-42c4c606]{outline:0}.VPSkipLink[data-v-c8291ffa]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-c8291ffa]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-c8291ffa]{top:14px;left:16px}}.Layout[data-v-d8b57b2d]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3dc26e1d]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-3dc26e1d]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-3dc26e1d]{margin:128px 0}}.VPHomeSponsors[data-v-3dc26e1d]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-3dc26e1d]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-3dc26e1d]{padding:0 64px}}.container[data-v-3dc26e1d]{margin:0 auto;max-width:1152px}.love[data-v-3dc26e1d]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-3dc26e1d]{display:inline-block}.message[data-v-3dc26e1d]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3dc26e1d]{padding-top:32px}.action[data-v-3dc26e1d]{padding-top:40px;text-align:center}.VPTeamPage[data-v-a5329171]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-a5329171]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-a5329171-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-a5329171-s],.VPTeamMembers+.VPTeamPageSection[data-v-a5329171-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-a5329171-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-a5329171-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-a5329171-s],.VPTeamMembers+.VPTeamPageSection[data-v-a5329171-s]{margin-top:96px}}.VPTeamMembers[data-v-a5329171-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-a5329171-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-a5329171-s]{padding:0 64px}}.VPTeamPageTitle[data-v-46c5e327]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-46c5e327]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-46c5e327]{padding:80px 64px 48px}}.title[data-v-46c5e327]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-46c5e327]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-46c5e327]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-46c5e327]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-3bf2e850]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-3bf2e850]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-3bf2e850]{padding:0 64px}}.title[data-v-3bf2e850]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-3bf2e850]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-3bf2e850]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-3bf2e850]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-3bf2e850]{padding-top:40px}.VPTeamMembersItem[data-v-acff304e]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-acff304e]{padding:32px}.VPTeamMembersItem.small .data[data-v-acff304e]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-acff304e]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-acff304e]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-acff304e]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-acff304e]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-acff304e]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-acff304e]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-acff304e]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-acff304e]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-acff304e]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-acff304e]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-acff304e]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-acff304e]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-acff304e]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-acff304e]{text-align:center}.avatar[data-v-acff304e]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-acff304e]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-acff304e]{margin:0;font-weight:600}.affiliation[data-v-acff304e]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-acff304e]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-acff304e]:hover{color:var(--vp-c-brand-1)}.desc[data-v-acff304e]{margin:0 auto}.desc[data-v-acff304e] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-acff304e]{display:flex;justify-content:center;height:56px}.sp-link[data-v-acff304e]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-acff304e]:hover,.sp .sp-link.link[data-v-acff304e]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-acff304e]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-bf782009]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-bf782009]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-bf782009]{max-width:876px}.VPTeamMembers.medium .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-bf782009]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-bf782009]{max-width:760px}.container[data-v-bf782009]{display:grid;gap:24px;margin:0 auto;max-width:1152px}:root{--vp-c-brand: #0c92f2;--vp-c-brand-light: #49adf5;--vp-c-brand-lighter: #85c8f8;--vp-c-brand-lightest: #c2e3fb;--vp-c-brand-dark: #096db5;--vp-c-brand-darker: #064979;--vp-c-brand-dimm: rgba(0, 181, 144, .08)}:root{--vp-button-brand-border: var(--vp-c-brand-light);--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand);--vp-button-brand-hover-border: var(--vp-c-brand-light);--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-light);--vp-button-brand-active-border: var(--vp-c-brand-light);--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-button-brand-bg)}:root{--vp-home-hero-name-color: transparent;--vp-home-hero-name-background: -webkit-linear-gradient( 120deg, #096db5 30%, #3FA9F5 );--vp-home-hero-image-background-image: linear-gradient( -45deg, #096db5 50%, #3FA9F5 50% );--vp-home-hero-image-filter: blur(40px)}@media (min-width: 640px){:root{--vp-home-hero-image-filter: blur(56px)}}@media (min-width: 960px){:root{--vp-home-hero-image-filter: blur(72px)}}:root{--vp-custom-block-tip-border: var(--vp-c-brand);--vp-custom-block-tip-text: var(--vp-c-brand-darker);--vp-custom-block-tip-bg: var(--vp-c-brand-dimm)}.dark{--vp-custom-block-tip-border: var(--vp-c-brand);--vp-custom-block-tip-text: var(--vp-c-brand-lightest);--vp-custom-block-tip-bg: var(--vp-c-brand-dimm)}.DocSearch{--docsearch-primary-color: var(--vp-c-brand) !important}.VPLocalSearchBox[data-v-68e678c9]{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;display:flex}.backdrop[data-v-68e678c9]{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-backdrop-bg-color);transition:opacity .5s}.shell[data-v-68e678c9]{position:relative;padding:12px;margin:64px auto;display:flex;flex-direction:column;gap:16px;background:var(--vp-local-search-bg);width:min(100vw - 60px,900px);height:min-content;max-height:min(100vh - 128px,900px);border-radius:6px}@media (max-width: 767px){.shell[data-v-68e678c9]{margin:0;width:100vw;height:100vh;max-height:none;border-radius:0}}.search-bar[data-v-68e678c9]{border:1px solid var(--vp-c-divider);border-radius:4px;display:flex;align-items:center;padding:0 12px;cursor:text}@media (max-width: 767px){.search-bar[data-v-68e678c9]{padding:0 8px}}.search-bar[data-v-68e678c9]:focus-within{border-color:var(--vp-c-brand-1)}.local-search-icon[data-v-68e678c9]{display:block;font-size:18px}.navigate-icon[data-v-68e678c9]{display:block;font-size:14px}.search-icon[data-v-68e678c9]{margin:8px}@media (max-width: 767px){.search-icon[data-v-68e678c9]{display:none}}.search-input[data-v-68e678c9]{padding:6px 12px;font-size:inherit;width:100%}@media (max-width: 767px){.search-input[data-v-68e678c9]{padding:6px 4px}}.search-actions[data-v-68e678c9]{display:flex;gap:4px}@media (any-pointer: coarse){.search-actions[data-v-68e678c9]{gap:8px}}@media (min-width: 769px){.search-actions.before[data-v-68e678c9]{display:none}}.search-actions button[data-v-68e678c9]{padding:8px}.search-actions button[data-v-68e678c9]:not([disabled]):hover,.toggle-layout-button.detailed-list[data-v-68e678c9]{color:var(--vp-c-brand-1)}.search-actions button.clear-button[data-v-68e678c9]:disabled{opacity:.37}.search-keyboard-shortcuts[data-v-68e678c9]{font-size:.8rem;opacity:75%;display:flex;flex-wrap:wrap;gap:16px;line-height:14px}.search-keyboard-shortcuts span[data-v-68e678c9]{display:flex;align-items:center;gap:4px}@media (max-width: 767px){.search-keyboard-shortcuts[data-v-68e678c9]{display:none}}.search-keyboard-shortcuts kbd[data-v-68e678c9]{background:#8080801a;border-radius:4px;padding:3px 6px;min-width:24px;display:inline-block;text-align:center;vertical-align:middle;border:1px solid rgba(128,128,128,.15);box-shadow:0 2px 2px #0000001a}.results[data-v-68e678c9]{display:flex;flex-direction:column;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.result[data-v-68e678c9]{display:flex;align-items:center;gap:8px;border-radius:4px;transition:none;line-height:1rem;border:solid 2px var(--vp-local-search-result-border);outline:none}.result>div[data-v-68e678c9]{margin:12px;width:100%;overflow:hidden}@media (max-width: 767px){.result>div[data-v-68e678c9]{margin:8px}}.titles[data-v-68e678c9]{display:flex;flex-wrap:wrap;gap:4px;position:relative;z-index:1001;padding:2px 0}.title[data-v-68e678c9]{display:flex;align-items:center;gap:4px}.title.main[data-v-68e678c9]{font-weight:500}.title-icon[data-v-68e678c9]{opacity:.5;font-weight:500;color:var(--vp-c-brand-1)}.title svg[data-v-68e678c9]{opacity:.5}.result.selected[data-v-68e678c9]{--vp-local-search-result-bg: var(--vp-local-search-result-selected-bg);border-color:var(--vp-local-search-result-selected-border)}.excerpt-wrapper[data-v-68e678c9]{position:relative}.excerpt[data-v-68e678c9]{opacity:50%;pointer-events:none;max-height:140px;overflow:hidden;position:relative;margin-top:4px}.result.selected .excerpt[data-v-68e678c9]{opacity:1}.excerpt[data-v-68e678c9] *{font-size:.8rem!important;line-height:130%!important}.titles[data-v-68e678c9] mark,.excerpt[data-v-68e678c9] mark{background-color:var(--vp-local-search-highlight-bg);color:var(--vp-local-search-highlight-text);border-radius:2px;padding:0 2px}.excerpt[data-v-68e678c9] .vp-code-group .tabs{display:none}.excerpt[data-v-68e678c9] .vp-code-group div[class*=language-]{border-radius:8px!important}.excerpt-gradient-bottom[data-v-68e678c9]{position:absolute;bottom:-1px;left:0;width:100%;height:8px;background:linear-gradient(transparent,var(--vp-local-search-result-bg));z-index:1000}.excerpt-gradient-top[data-v-68e678c9]{position:absolute;top:-1px;left:0;width:100%;height:8px;background:linear-gradient(var(--vp-local-search-result-bg),transparent);z-index:1000}.result.selected .titles[data-v-68e678c9],.result.selected .title-icon[data-v-68e678c9]{color:var(--vp-c-brand-1)!important}.no-results[data-v-68e678c9]{font-size:.9rem;text-align:center;padding:12px}svg[data-v-68e678c9]{flex:none} diff --git a/pr-528/assets/testnets_cosmwasm-testnet.md.BqquMyrO.js b/pr-528/assets/testnets_cosmwasm-testnet.md.BqquMyrO.js new file mode 100644 index 000000000..66c350617 --- /dev/null +++ b/pr-528/assets/testnets_cosmwasm-testnet.md.BqquMyrO.js @@ -0,0 +1,72 @@ +import{_ as k,V as E,o as l,c as h,j as e,a3 as o,a as n,G as r}from"./chunks/framework.B8-VHxRu.js";const d="/docs-preview/pr-528/assets/faucet.BrSlg9f5.png",u="/docs-preview/pr-528/assets/keplr.eOsQCwa1.png",g={name:"app",methods:{async addNetwork(){try{const s=await E(()=>import("./chunks/rosm.sMFJ_kYE.js"),[]);console.log("got back settings",s);try{await window.keplr.enable(s.chainId),alert(s.chainId+" already added")}catch{console.log("Unable to connect to wallet natively, so trying experimental chain");try{await window.keplr.experimentalSuggestChain(s),await window.keplr.enable(s.chainId)}catch(i){console.log("and yet there is a problem in trying to do that too",i)}}}catch(s){if(s instanceof SyntaxError)alert("There was a syntax error. Please correct it and try again: "+s.message);else throw s}}}};function c(s,a,i,C,q,t){return l(),h("button",{onClick:a[0]||(a[0]=(...p)=>t.addNetwork&&t.addNetwork(...p))},a[1]||(a[1]=[e("img",{src:u,alt:"",width:"20",height:"20"},null,-1)]))}const F=k(g,[["render",c]]),m=JSON.parse('{"title":"CosmWasm Testnet","description":"This page provides details about Rollkit testnets.","frontmatter":{"description":"This page provides details about Rollkit testnets.","head":[["meta",{"name":"og:title","content":"CosmWasm Testnet | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"testnets/cosmwasm-testnet.md","filePath":"testnets/cosmwasm-testnet.md","lastUpdated":1733420866000}'),y={name:"testnets/cosmwasm-testnet.md"},b=Object.assign(y,{setup(s){return(a,i)=>(l(),h("div",null,[i[2]||(i[2]=o(`

    CosmWasm Testnet

    Our CosmWasm testnet is deployed by following the cosmwasm tutorial. The rollkit/wasmd contains the code for the same.

    Details of ROSM testnet

    • Chain ID: rosm
    • Address Prefix: wasm
      • e.g., wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
    • Rollkit version: v0.13.1
    • RPC: https://rpc.rosm.rollkit.dev/
      • Example: https://rpc.rosm.rollkit.dev/block?height=1

        json
        {
        +    "jsonrpc": "2.0",
        +    "result": {
        +        "block_id": {
        +        "hash": "9D5C710CD64D031752A7DB86E09C8EA8CE4CAE4E30878C6D0487C57806060A47",
        +        "parts": {
        +            "total": 0,
        +            "hash": ""
        +        }
        +        },
        +        "block": {
        +        "header": {
        +            "version": {
        +            "block": "11"
        +            },
        +            "chain_id": "rosm",
        +            "height": "1",
        +            "time": "2024-04-09T15:48:50.464427035Z",
        +            "last_block_id": {
        +            "hash": "",
        +            "parts": {
        +                "total": 0,
        +                "hash": ""
        +            }
        +            },
        +            "last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "data_hash": "6E340B9CFFB37A989CA544E6BB780A2C78901D3FB33738768511A30617AFA01D",
        +            "validators_hash": "036DA1AB230A4CE8654358F77CB426BA2F8EF9B81EA06FACA32085B0B0D25C2A",
        +            "next_validators_hash": "036DA1AB230A4CE8654358F77CB426BA2F8EF9B81EA06FACA32085B0B0D25C2A",
        +            "consensus_hash": "0000000000000000000000000000000000000000000000000000000000000000",
        +            "app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "proposer_address": "D7D4C5A2AC271061512789BEE3718305BEAA519B"
        +        },
        +        "data": {
        +            "txs": []
        +        },
        +        "evidence": {
        +            "evidence": null
        +        },
        +        "last_commit": {
        +            "height": "1",
        +            "round": 0,
        +            "block_id": {
        +            "hash": "9D5C710CD64D031752A7DB86E09C8EA8CE4CAE4E30878C6D0487C57806060A47",
        +            "parts": {
        +                "total": 0,
        +                "hash": ""
        +            }
        +            },
        +            "signatures": [
        +            {
        +                "block_id_flag": 2,
        +                "validator_address": "D7D4C5A2AC271061512789BEE3718305BEAA519B",
        +                "timestamp": "2024-04-09T15:48:50.464427035Z",
        +                "signature": "FWSRXEOvry/FC0KERmqyLP8voIVw8QFywgELDfLBAuFcMpm7TB7pTLb4OPwzjAoSt6Hbo/uIIny/pRhw8RoHDQ=="
        +            }
        +            ]
        +        }
        +        }
        +    },
        +    "id": -1
        +}
    • Tendermint API endpoint (uses default 1317 port): https://api.rosm.rollkit.dev
      • Example: https://api.rosm.rollkit.dev/cosmos/auth/v1beta1/accounts/wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
      json
      {
      +    "account": {
      +        "@type": "/cosmos.auth.v1beta1.BaseAccount",
      +        "address": "wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5",
      +        "pub_key": null,
      +        "account_number": "7",
      +        "sequence": "0"
      +    }
      +}
    • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm

    WARNING

    The modular.cloud explorer is work in progress. In the meanwhile, the wasm CLI can be used to query the accounts. For example: to collect the transactions for any account, following command can be used.

    wasmd query txs --query "message.sender='wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5'" --node https://rpc.rosm.rollkit.dev

    Add Rosm to Keplr

    Don't have the Keplr Browser extension? Add Keplr Wallet Here

    ',8)),e("p",null,[i[0]||(i[0]=n("Click ")),r(F),i[1]||(i[1]=n(" to add Rosm testnet to your Keplr wallet"))])]))}});export{m as __pageData,b as default}; diff --git a/pr-528/assets/testnets_cosmwasm-testnet.md.BqquMyrO.lean.js b/pr-528/assets/testnets_cosmwasm-testnet.md.BqquMyrO.lean.js new file mode 100644 index 000000000..66c350617 --- /dev/null +++ b/pr-528/assets/testnets_cosmwasm-testnet.md.BqquMyrO.lean.js @@ -0,0 +1,72 @@ +import{_ as k,V as E,o as l,c as h,j as e,a3 as o,a as n,G as r}from"./chunks/framework.B8-VHxRu.js";const d="/docs-preview/pr-528/assets/faucet.BrSlg9f5.png",u="/docs-preview/pr-528/assets/keplr.eOsQCwa1.png",g={name:"app",methods:{async addNetwork(){try{const s=await E(()=>import("./chunks/rosm.sMFJ_kYE.js"),[]);console.log("got back settings",s);try{await window.keplr.enable(s.chainId),alert(s.chainId+" already added")}catch{console.log("Unable to connect to wallet natively, so trying experimental chain");try{await window.keplr.experimentalSuggestChain(s),await window.keplr.enable(s.chainId)}catch(i){console.log("and yet there is a problem in trying to do that too",i)}}}catch(s){if(s instanceof SyntaxError)alert("There was a syntax error. Please correct it and try again: "+s.message);else throw s}}}};function c(s,a,i,C,q,t){return l(),h("button",{onClick:a[0]||(a[0]=(...p)=>t.addNetwork&&t.addNetwork(...p))},a[1]||(a[1]=[e("img",{src:u,alt:"",width:"20",height:"20"},null,-1)]))}const F=k(g,[["render",c]]),m=JSON.parse('{"title":"CosmWasm Testnet","description":"This page provides details about Rollkit testnets.","frontmatter":{"description":"This page provides details about Rollkit testnets.","head":[["meta",{"name":"og:title","content":"CosmWasm Testnet | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"testnets/cosmwasm-testnet.md","filePath":"testnets/cosmwasm-testnet.md","lastUpdated":1733420866000}'),y={name:"testnets/cosmwasm-testnet.md"},b=Object.assign(y,{setup(s){return(a,i)=>(l(),h("div",null,[i[2]||(i[2]=o(`

    CosmWasm Testnet

    Our CosmWasm testnet is deployed by following the cosmwasm tutorial. The rollkit/wasmd contains the code for the same.

    Details of ROSM testnet

    • Chain ID: rosm
    • Address Prefix: wasm
      • e.g., wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
    • Rollkit version: v0.13.1
    • RPC: https://rpc.rosm.rollkit.dev/
      • Example: https://rpc.rosm.rollkit.dev/block?height=1

        json
        {
        +    "jsonrpc": "2.0",
        +    "result": {
        +        "block_id": {
        +        "hash": "9D5C710CD64D031752A7DB86E09C8EA8CE4CAE4E30878C6D0487C57806060A47",
        +        "parts": {
        +            "total": 0,
        +            "hash": ""
        +        }
        +        },
        +        "block": {
        +        "header": {
        +            "version": {
        +            "block": "11"
        +            },
        +            "chain_id": "rosm",
        +            "height": "1",
        +            "time": "2024-04-09T15:48:50.464427035Z",
        +            "last_block_id": {
        +            "hash": "",
        +            "parts": {
        +                "total": 0,
        +                "hash": ""
        +            }
        +            },
        +            "last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "data_hash": "6E340B9CFFB37A989CA544E6BB780A2C78901D3FB33738768511A30617AFA01D",
        +            "validators_hash": "036DA1AB230A4CE8654358F77CB426BA2F8EF9B81EA06FACA32085B0B0D25C2A",
        +            "next_validators_hash": "036DA1AB230A4CE8654358F77CB426BA2F8EF9B81EA06FACA32085B0B0D25C2A",
        +            "consensus_hash": "0000000000000000000000000000000000000000000000000000000000000000",
        +            "app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "proposer_address": "D7D4C5A2AC271061512789BEE3718305BEAA519B"
        +        },
        +        "data": {
        +            "txs": []
        +        },
        +        "evidence": {
        +            "evidence": null
        +        },
        +        "last_commit": {
        +            "height": "1",
        +            "round": 0,
        +            "block_id": {
        +            "hash": "9D5C710CD64D031752A7DB86E09C8EA8CE4CAE4E30878C6D0487C57806060A47",
        +            "parts": {
        +                "total": 0,
        +                "hash": ""
        +            }
        +            },
        +            "signatures": [
        +            {
        +                "block_id_flag": 2,
        +                "validator_address": "D7D4C5A2AC271061512789BEE3718305BEAA519B",
        +                "timestamp": "2024-04-09T15:48:50.464427035Z",
        +                "signature": "FWSRXEOvry/FC0KERmqyLP8voIVw8QFywgELDfLBAuFcMpm7TB7pTLb4OPwzjAoSt6Hbo/uIIny/pRhw8RoHDQ=="
        +            }
        +            ]
        +        }
        +        }
        +    },
        +    "id": -1
        +}
    • Tendermint API endpoint (uses default 1317 port): https://api.rosm.rollkit.dev
      • Example: https://api.rosm.rollkit.dev/cosmos/auth/v1beta1/accounts/wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
      json
      {
      +    "account": {
      +        "@type": "/cosmos.auth.v1beta1.BaseAccount",
      +        "address": "wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5",
      +        "pub_key": null,
      +        "account_number": "7",
      +        "sequence": "0"
      +    }
      +}
    • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm

    WARNING

    The modular.cloud explorer is work in progress. In the meanwhile, the wasm CLI can be used to query the accounts. For example: to collect the transactions for any account, following command can be used.

    wasmd query txs --query "message.sender='wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5'" --node https://rpc.rosm.rollkit.dev

    Add Rosm to Keplr

    Don't have the Keplr Browser extension? Add Keplr Wallet Here

    ',8)),e("p",null,[i[0]||(i[0]=n("Click ")),r(F),i[1]||(i[1]=n(" to add Rosm testnet to your Keplr wallet"))])]))}});export{m as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_bitcoin.md.gblAdhNv.js b/pr-528/assets/tutorials_bitcoin.md.gblAdhNv.js new file mode 100644 index 000000000..b7bd049d0 --- /dev/null +++ b/pr-528/assets/tutorials_bitcoin.md.gblAdhNv.js @@ -0,0 +1,121 @@ +import{_ as i}from"./chunks/rollkit-bitcoin-1.DCy-Y3gh.js";import{_ as a,c as t,a3 as n,o as e}from"./chunks/framework.B8-VHxRu.js";const F=JSON.parse('{"title":"Bitcoin rollup tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Bitcoin rollup tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/bitcoin.md","filePath":"tutorials/bitcoin.md","lastUpdated":1733420866000}'),l={name:"tutorials/bitcoin.md"};function h(p,s,k,r,o,d){return e(),t("div",null,s[0]||(s[0]=[n('

    Bitcoin rollup tutorial

    ☀️Introduction

    In this tutorial, we will explore how to use Rollkit to create sovereign rollups on Bitcoin. First, we will install Bitcoin Core to run a local testnet. Then, we will install and set up a Rollkit node to work with Bitcoin as a data availability layer. Lastly, we'll look at how to create a custom EVM execution environment and how to deploy a sovereign rollup on Bitcoin using Rollkit.

    By the end of this tutorial, you will have a good understanding of how Rollkit works and how to create sovereign rollups on Bitcoin using Rollkit. You will also have the knowledge and skills needed to customize Rollkit with different execution environments and data availability layers, opening up new possibilities for creating scalable and efficient blockchain applications.

    Read more in our blog post.

    rollkit-bitcoin

    📖 The stack

    Sovereign rollups on Bitcoin are made possible through a module that allows Rollkit rollups to use Bitcoin for data availability. This integration opens up possibilities for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and security guarantees.

    The Taproot upgrade and Ordinals usage of Bitcoin for publishing arbitrary data made it possible to integrate Bitcoin as a data availability layer into Rollkit. The modular design of Rollkit allows for easy integration of new data availability layers, making it possible to deploy sovereign rollups on Bitcoin.

    The goal of Rollkit is to make it easy to build and customize rollups, enabling developers to build sovereign rollups on Bitcoin or customize Rollkit with different execution environments and data availability layers.

    💻 Prerequisites

    An Ubuntu machine with:

    • 8GB RAM
    • 160 GB SSD
    • Ubuntu 22.10
    • 4 core AMD CPU

    🛠️ Dependency setup

    First, make sure to update and upgrade the OS:

    bash
    sudo apt update && sudo apt upgrade -y

    These are essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the nodes:

    bash
    sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu snapd npm -y

    Now, we will install the remaining dependencies.

    🏃 Golang

    We will use golang to build and run our test networks. Install it for AMD with these commands:

    bash
    ver="1.19.1"
    +cd $HOME
    +wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
    +sudo rm -rf /usr/local/go
    +sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
    +rm "go$ver.linux-amd64.tar.gz"
    +echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
    +source $HOME/.bash_profile
    +go version

    ⚒️ Foundry

    Install Foundry:

    bash
    curl -L https://foundry.paradigm.xyz/ | bash

    Set the path:

    bash
    source /root/.bashrc

    Run this to finish the installation of Foundry:

    bash
    foundryup

    🪙 Install Bitcoin

    Running the rollup requires a local regtest Bitcoin node. You can set this up by running the following commands.

    Install Bitcoin Core:

    bash
    sudo snap install bitcoin-core

    Check version:

    bash
    bitcoin-core.cli --version

    🟢 Running a local Bitcoin network

    Set up the config for regtest (local network):

    bash
    bitcoin-core.daemon "-chain=regtest" "-rpcport=18332" "-rpcuser=rpcuser" "-rpcpassword=rpcpass" "-fallbackfee=0.000001" "-txindex=1"

    👛 Create a wallet for the chain

    Open up a new terminal and run the following to create a wallet:

    bash
    bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass createwallet w1

    Your output will look like:

    console
    {
    +  "name": "w1",
    +  "warning": ""
    +}

    🎬 Start generating blocks

    Now, generate a new address and mine 101 blocks:

    bash
    export COINBASE=$(bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getnewaddress)
    +bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass generatetoaddress 101 $COINBASE

    Next, we'll mine a block every second.

    Add this script and remember where you placed it, I am putting it in my root directory:

    shell
    # Script to generate a new block every second
    +# Put this script at the root of your unpacked folder
    +#!/bin/bash
    +
    +echo "Generating a block every second. Press [CTRL+C] to stop.."
    +
    +address=\`bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getnewaddress\`
    +
    +while :
    +do
    +        echo "Generate a new block \`date '+%d/%m/%Y %H:%M:%S'\`"
    +        bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass generatetoaddress 1 $address
    +        sleep 1
    +done

    Run the following from where you placed your start.sh script. Start generating blocks by running:

    bash
    bash start.sh

    🧊 Block height

    Check the current block height:

    bash
    bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getblockcount

    Your output will look similar to below:

    bash
    4980

    Set a variable for the common flags being used:

    bash
    export FLAGS="-regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass"

    🧊 Block hash

    Check the latest block hash:

    bash
    bitcoin-core.cli $FLAGS getblockhash 4980

    Your output will be the block hash of the height you first queried:

    bash
    1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5

    Set the block hash as a variable:

    bash
    export HASH=1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5

    🧊 Block header

    Now to get the block header, run the following command (be sure to replace the hash with yours):

    bash
    bitcoin-core.cli $FLAGS getblockheader $HASH

    Now to finish the exercise, query the height from the block header and the hash:

    bash
    bitcoin-core.cli $FLAGS getblockheader $HASH | jq '.height'

    🎬 Restarting the local network

    In the case that you are starting your regtest network again, you can use the following command to clear the old chain history:

    bash
    rm -rf \${LOCATION OF .bitcoin folder}

    🏃‍♀️ Running the Ethermint rollup

    DANGER

    The Ethermint tutorial is currently not supported.

    Clone Ethermint:

    bash
    git clone https://github.com/celestiaorg/ethermint.git
    +cd ethermint
    +git checkout bitcoin-da
    +make install

    Initialize the chain:

    bash
    bash init.sh

    Set variables for starting the chain:

    bash
    export NAMESPACE=$(openssl rand -hex 8)

    Start the chain:

    bash
    ethermintd start --rollkit.aggregator --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height 1

    Congratulations! Now that you have your Ethermint and Bitcoin rollup running, you're ready to deploy some smart contracts to the EVM!

    ⚡️ Initialize development environment

    First, be sure you have installed Foundry on your local development environment.

    Next, create a new project and change into the directory:

    bash
    forge init bitcoin-ethermint-app
    +cd bitcoin-ethermint-app

    Foundry has created an example smart contract located at src/Counter.sol.

    TIP

    We will run the commands for the Foundry portion of this tutorial in the ~/bitcoin-ethermint-app/ directory.

    📒 Updating the contract and tests

    Let's update the contracts to include a basic counter example. Open the Counter.sol file in the src directory and add the following code:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +contract Counter {
    +    int private count;
    +    
    +    constructor(int _count) {
    +        count = _count;
    +    }
    +
    +    function incrementCounter() public {
    +        count += 1;
    +    }
    +    function decrementCounter() public {
    +        count -= 1;
    +    }
    +
    +    function getCount() public view returns (int) {
    +        return count;
    +    }
    +}

    Next, let's create a test for this contract.

    Open test/Counter.T.Sol and update the code with the following:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Test.sol";
    +import 'src/Counter.sol';
    +
    +contract CounterTest is Test {
    +    Counter counter;
    +    function setUp() public {
    +        counter = new Counter(10);
    +    }
    +
    +    function testGetCount() public {
    +        int value = counter.getCount();
    +        assertEq(value, 10);
    +        emit log_int(value);
    +    }
    +
    +    function testIncrement() public {
    +        counter.incrementCounter();
    +        counter.incrementCounter();
    +        int value = counter.getCount();
    +        assertEq(value, 12);
    +        emit log_int(value);
    +    }
    +
    +    function testDecrement() public {
    +        counter.decrementCounter();
    +        int value = counter.getCount();
    +        assertEq(value, 9);
    +        emit log_int(value);
    +    }
    +}

    Foundry uses Dappsys Test to provide basic logging and assertion functionality. It's included in the Forge Standard Library.

    Here, we are using assertEq to assert equality. You can view all of the assertion functions available here.

    Next, we can test the contract using Forge with the following command:

    bash
    forge test -vv

    A successful test will have output similar to the following:

    bash
    [⠊] Compiling...
    +[⠰] Installing solc version 0.8.17
    +[⠒] Successfully installed solc 0.8.17
    +[⠆] Compiling 18 files with 0.8.17
    +[⠑] Solc 0.8.17 finished in 3.59s
    +Compiler run successful
    +
    +Running 3 tests for test/Counter.t.sol:ContractTest
    +[PASS] testDecrement() (gas: 12350)
    +Logs:
    +  9
    +
    +[PASS] testGetCount() (gas: 8510)
    +Logs:
    +  10
    +
    +[PASS] testIncrement() (gas: 13285)
    +Logs:
    +  12
    +
    +Test result: ok. 3 passed; 0 failed; finished in 2.24ms

    📜 Updating the deployment script

    Now that we've tested the contract, let's try deploying it locally using Solidity Scripting.

    To do so, update the deloyment script at script/Counter.s.sol with the following code:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Script.sol";
    +
    +import {Counter} from "src/Counter.sol";
    +
    +contract CounterScript is Script {
    +    function setUp() public {}
    +
    +    function run() public {
    +        vm.startBroadcast();
    +        new Counter(10);
    +        vm.stopBroadcast();
    +    }
    +}

    Now we can use this script to deploy our smart contract to either a live or test network.

    🏠 Deploying locally

    Next start Anvil, the local testnet:

    bash
    anvil --port 9545

    Once started, Anvil will give you a local RPC endpoint as well as a handful of Private Keys and Accounts that you can use.

    Set ANVIL_KEY with one of the private keys generated by running:

    bash
    export ANVIL_KEY=<anvil-private-key>

    And set the RPC URL as an environment variable:

    bash
    export RPC_URL=http://127.0.0.1:9545

    We can now use the local RPC along with one of the private keys to deploy locally:

    bash
    forge script script/Counter.s.sol:CounterScript --fork-url \\
    +$RPC_URL  --private-key $ANVIL_KEY --broadcast

    Once the contract has been deployed locally, Anvil will log out the contract address.

    Next, set the contract address as an environment variable:

    bash
    export CONTRACT_ADDRESS=<contract-address>

    We can then test sending transactions to it with cast send.

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \\
    +--private-key $ANVIL_KEY --rpc-url $RPC_URL

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url $RPC_URL

    🧪 Deploying to the Ethermint sovereign rollup

    Now that we've deployed and tested locally, we can deploy to our Ethermint chain.

    First, we will need to export the private key generated by the ethermint init.sh script:

    bash
    PRIVATE_KEY=$(ethermintd keys unsafe-export-eth-key mykey --keyring-backend test)

    NOTE: Here, the key name from init.sh is mykey but you can modify the init.sh to change the name of your key.

    Now, we can start deploying the smart contract to our Ethermint chain.

    To do so, run the following script:

    bash
    forge script script/Counter.s.sol:CounterScript \\
    +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast

    Set the contract address in the output as the CONTRACT_ADDRESS variable:

    bash
    export CONTRACT_ADDRESS=<new-contract-address>

    Once the contract has been deployed to the Ethermint rollup, we can use cast send to test sending transactions to it:

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \\
    +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url http://127.0.0.1:8545
    `,138)]))}const E=a(l,[["render",h]]);export{F as __pageData,E as default}; diff --git a/pr-528/assets/tutorials_bitcoin.md.gblAdhNv.lean.js b/pr-528/assets/tutorials_bitcoin.md.gblAdhNv.lean.js new file mode 100644 index 000000000..b7bd049d0 --- /dev/null +++ b/pr-528/assets/tutorials_bitcoin.md.gblAdhNv.lean.js @@ -0,0 +1,121 @@ +import{_ as i}from"./chunks/rollkit-bitcoin-1.DCy-Y3gh.js";import{_ as a,c as t,a3 as n,o as e}from"./chunks/framework.B8-VHxRu.js";const F=JSON.parse('{"title":"Bitcoin rollup tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Bitcoin rollup tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/bitcoin.md","filePath":"tutorials/bitcoin.md","lastUpdated":1733420866000}'),l={name:"tutorials/bitcoin.md"};function h(p,s,k,r,o,d){return e(),t("div",null,s[0]||(s[0]=[n('

    Bitcoin rollup tutorial

    ☀️Introduction

    In this tutorial, we will explore how to use Rollkit to create sovereign rollups on Bitcoin. First, we will install Bitcoin Core to run a local testnet. Then, we will install and set up a Rollkit node to work with Bitcoin as a data availability layer. Lastly, we'll look at how to create a custom EVM execution environment and how to deploy a sovereign rollup on Bitcoin using Rollkit.

    By the end of this tutorial, you will have a good understanding of how Rollkit works and how to create sovereign rollups on Bitcoin using Rollkit. You will also have the knowledge and skills needed to customize Rollkit with different execution environments and data availability layers, opening up new possibilities for creating scalable and efficient blockchain applications.

    Read more in our blog post.

    rollkit-bitcoin

    📖 The stack

    Sovereign rollups on Bitcoin are made possible through a module that allows Rollkit rollups to use Bitcoin for data availability. This integration opens up possibilities for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and security guarantees.

    The Taproot upgrade and Ordinals usage of Bitcoin for publishing arbitrary data made it possible to integrate Bitcoin as a data availability layer into Rollkit. The modular design of Rollkit allows for easy integration of new data availability layers, making it possible to deploy sovereign rollups on Bitcoin.

    The goal of Rollkit is to make it easy to build and customize rollups, enabling developers to build sovereign rollups on Bitcoin or customize Rollkit with different execution environments and data availability layers.

    💻 Prerequisites

    An Ubuntu machine with:

    • 8GB RAM
    • 160 GB SSD
    • Ubuntu 22.10
    • 4 core AMD CPU

    🛠️ Dependency setup

    First, make sure to update and upgrade the OS:

    bash
    sudo apt update && sudo apt upgrade -y

    These are essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the nodes:

    bash
    sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu snapd npm -y

    Now, we will install the remaining dependencies.

    🏃 Golang

    We will use golang to build and run our test networks. Install it for AMD with these commands:

    bash
    ver="1.19.1"
    +cd $HOME
    +wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
    +sudo rm -rf /usr/local/go
    +sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
    +rm "go$ver.linux-amd64.tar.gz"
    +echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
    +source $HOME/.bash_profile
    +go version

    ⚒️ Foundry

    Install Foundry:

    bash
    curl -L https://foundry.paradigm.xyz/ | bash

    Set the path:

    bash
    source /root/.bashrc

    Run this to finish the installation of Foundry:

    bash
    foundryup

    🪙 Install Bitcoin

    Running the rollup requires a local regtest Bitcoin node. You can set this up by running the following commands.

    Install Bitcoin Core:

    bash
    sudo snap install bitcoin-core

    Check version:

    bash
    bitcoin-core.cli --version

    🟢 Running a local Bitcoin network

    Set up the config for regtest (local network):

    bash
    bitcoin-core.daemon "-chain=regtest" "-rpcport=18332" "-rpcuser=rpcuser" "-rpcpassword=rpcpass" "-fallbackfee=0.000001" "-txindex=1"

    👛 Create a wallet for the chain

    Open up a new terminal and run the following to create a wallet:

    bash
    bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass createwallet w1

    Your output will look like:

    console
    {
    +  "name": "w1",
    +  "warning": ""
    +}

    🎬 Start generating blocks

    Now, generate a new address and mine 101 blocks:

    bash
    export COINBASE=$(bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getnewaddress)
    +bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass generatetoaddress 101 $COINBASE

    Next, we'll mine a block every second.

    Add this script and remember where you placed it, I am putting it in my root directory:

    shell
    # Script to generate a new block every second
    +# Put this script at the root of your unpacked folder
    +#!/bin/bash
    +
    +echo "Generating a block every second. Press [CTRL+C] to stop.."
    +
    +address=\`bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getnewaddress\`
    +
    +while :
    +do
    +        echo "Generate a new block \`date '+%d/%m/%Y %H:%M:%S'\`"
    +        bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass generatetoaddress 1 $address
    +        sleep 1
    +done

    Run the following from where you placed your start.sh script. Start generating blocks by running:

    bash
    bash start.sh

    🧊 Block height

    Check the current block height:

    bash
    bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getblockcount

    Your output will look similar to below:

    bash
    4980

    Set a variable for the common flags being used:

    bash
    export FLAGS="-regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass"

    🧊 Block hash

    Check the latest block hash:

    bash
    bitcoin-core.cli $FLAGS getblockhash 4980

    Your output will be the block hash of the height you first queried:

    bash
    1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5

    Set the block hash as a variable:

    bash
    export HASH=1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5

    🧊 Block header

    Now to get the block header, run the following command (be sure to replace the hash with yours):

    bash
    bitcoin-core.cli $FLAGS getblockheader $HASH

    Now to finish the exercise, query the height from the block header and the hash:

    bash
    bitcoin-core.cli $FLAGS getblockheader $HASH | jq '.height'

    🎬 Restarting the local network

    In the case that you are starting your regtest network again, you can use the following command to clear the old chain history:

    bash
    rm -rf \${LOCATION OF .bitcoin folder}

    🏃‍♀️ Running the Ethermint rollup

    DANGER

    The Ethermint tutorial is currently not supported.

    Clone Ethermint:

    bash
    git clone https://github.com/celestiaorg/ethermint.git
    +cd ethermint
    +git checkout bitcoin-da
    +make install

    Initialize the chain:

    bash
    bash init.sh

    Set variables for starting the chain:

    bash
    export NAMESPACE=$(openssl rand -hex 8)

    Start the chain:

    bash
    ethermintd start --rollkit.aggregator --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height 1

    Congratulations! Now that you have your Ethermint and Bitcoin rollup running, you're ready to deploy some smart contracts to the EVM!

    ⚡️ Initialize development environment

    First, be sure you have installed Foundry on your local development environment.

    Next, create a new project and change into the directory:

    bash
    forge init bitcoin-ethermint-app
    +cd bitcoin-ethermint-app

    Foundry has created an example smart contract located at src/Counter.sol.

    TIP

    We will run the commands for the Foundry portion of this tutorial in the ~/bitcoin-ethermint-app/ directory.

    📒 Updating the contract and tests

    Let's update the contracts to include a basic counter example. Open the Counter.sol file in the src directory and add the following code:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +contract Counter {
    +    int private count;
    +    
    +    constructor(int _count) {
    +        count = _count;
    +    }
    +
    +    function incrementCounter() public {
    +        count += 1;
    +    }
    +    function decrementCounter() public {
    +        count -= 1;
    +    }
    +
    +    function getCount() public view returns (int) {
    +        return count;
    +    }
    +}

    Next, let's create a test for this contract.

    Open test/Counter.T.Sol and update the code with the following:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Test.sol";
    +import 'src/Counter.sol';
    +
    +contract CounterTest is Test {
    +    Counter counter;
    +    function setUp() public {
    +        counter = new Counter(10);
    +    }
    +
    +    function testGetCount() public {
    +        int value = counter.getCount();
    +        assertEq(value, 10);
    +        emit log_int(value);
    +    }
    +
    +    function testIncrement() public {
    +        counter.incrementCounter();
    +        counter.incrementCounter();
    +        int value = counter.getCount();
    +        assertEq(value, 12);
    +        emit log_int(value);
    +    }
    +
    +    function testDecrement() public {
    +        counter.decrementCounter();
    +        int value = counter.getCount();
    +        assertEq(value, 9);
    +        emit log_int(value);
    +    }
    +}

    Foundry uses Dappsys Test to provide basic logging and assertion functionality. It's included in the Forge Standard Library.

    Here, we are using assertEq to assert equality. You can view all of the assertion functions available here.

    Next, we can test the contract using Forge with the following command:

    bash
    forge test -vv

    A successful test will have output similar to the following:

    bash
    [⠊] Compiling...
    +[⠰] Installing solc version 0.8.17
    +[⠒] Successfully installed solc 0.8.17
    +[⠆] Compiling 18 files with 0.8.17
    +[⠑] Solc 0.8.17 finished in 3.59s
    +Compiler run successful
    +
    +Running 3 tests for test/Counter.t.sol:ContractTest
    +[PASS] testDecrement() (gas: 12350)
    +Logs:
    +  9
    +
    +[PASS] testGetCount() (gas: 8510)
    +Logs:
    +  10
    +
    +[PASS] testIncrement() (gas: 13285)
    +Logs:
    +  12
    +
    +Test result: ok. 3 passed; 0 failed; finished in 2.24ms

    📜 Updating the deployment script

    Now that we've tested the contract, let's try deploying it locally using Solidity Scripting.

    To do so, update the deloyment script at script/Counter.s.sol with the following code:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Script.sol";
    +
    +import {Counter} from "src/Counter.sol";
    +
    +contract CounterScript is Script {
    +    function setUp() public {}
    +
    +    function run() public {
    +        vm.startBroadcast();
    +        new Counter(10);
    +        vm.stopBroadcast();
    +    }
    +}

    Now we can use this script to deploy our smart contract to either a live or test network.

    🏠 Deploying locally

    Next start Anvil, the local testnet:

    bash
    anvil --port 9545

    Once started, Anvil will give you a local RPC endpoint as well as a handful of Private Keys and Accounts that you can use.

    Set ANVIL_KEY with one of the private keys generated by running:

    bash
    export ANVIL_KEY=<anvil-private-key>

    And set the RPC URL as an environment variable:

    bash
    export RPC_URL=http://127.0.0.1:9545

    We can now use the local RPC along with one of the private keys to deploy locally:

    bash
    forge script script/Counter.s.sol:CounterScript --fork-url \\
    +$RPC_URL  --private-key $ANVIL_KEY --broadcast

    Once the contract has been deployed locally, Anvil will log out the contract address.

    Next, set the contract address as an environment variable:

    bash
    export CONTRACT_ADDRESS=<contract-address>

    We can then test sending transactions to it with cast send.

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \\
    +--private-key $ANVIL_KEY --rpc-url $RPC_URL

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url $RPC_URL

    🧪 Deploying to the Ethermint sovereign rollup

    Now that we've deployed and tested locally, we can deploy to our Ethermint chain.

    First, we will need to export the private key generated by the ethermint init.sh script:

    bash
    PRIVATE_KEY=$(ethermintd keys unsafe-export-eth-key mykey --keyring-backend test)

    NOTE: Here, the key name from init.sh is mykey but you can modify the init.sh to change the name of your key.

    Now, we can start deploying the smart contract to our Ethermint chain.

    To do so, run the following script:

    bash
    forge script script/Counter.s.sol:CounterScript \\
    +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast

    Set the contract address in the output as the CONTRACT_ADDRESS variable:

    bash
    export CONTRACT_ADDRESS=<new-contract-address>

    Once the contract has been deployed to the Ethermint rollup, we can use cast send to test sending transactions to it:

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \\
    +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url http://127.0.0.1:8545
    `,138)]))}const E=a(l,[["render",h]]);export{F as __pageData,E as default}; diff --git a/pr-528/assets/tutorials_da_avail-da.md.CNxn6ngQ.js b/pr-528/assets/tutorials_da_avail-da.md.CNxn6ngQ.js new file mode 100644 index 000000000..7fefc441c --- /dev/null +++ b/pr-528/assets/tutorials_da_avail-da.md.CNxn6ngQ.js @@ -0,0 +1,9 @@ +import{_ as a,c as s,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"Using Avail as DA","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Using Avail as DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/avail-da.md","filePath":"tutorials/da/avail-da.md","lastUpdated":1733420866000}'),l={name:"tutorials/da/avail-da.md"};function n(o,i,h,r,p,d){return e(),s("div",null,i[0]||(i[0]=[t(`

    Using Avail as DA

    🌞 Introduction

    Disclaimer

    This tutorial is currently broken. Follow the work to fix this tutorial in rollkit/avail-da issue 57

    Avail DA offers scalable data availability that underpins the Avail ecosystem and ensures instantaneous and reliable data integrity, enabling rollups to grow, through the use of cutting-edge zero knowledge and KZG Polynomial commitments.

    This tutorial serves as a comprehensive guide for deploying your GM world rollup on Avail's data availability (DA) network.

    Before proceeding, ensure that you have completed the GM World rollup setup.

    Note : If you want to go through gm world setup docs for more information, you can refer GM world rollup tutorial, which covers setting up a local sovereign gm-world rollup and connecting it to a local (mock) DA node.

    🪶 Running an Avail light node

    Before you can start your rollup node, you need to initiate, sync, and possibly fund a light node on Turing Testnet which is the test network of Avail

    🚀 Using Turing Testnet

    • To fund your wallet address for using Turing Testnet: get AVAIL tokens from the faucet
    • Paste your mnemonic in the identity.toml file by creating a identity.toml with the following command: touch identity.toml Example:
    bash
    avail_secret_uri = '<paste your mnemonic here>'

    Running just an Avail light node is enough for Turing testnet. Run the Avail light node using the following command

    bash
    cargo run --release -- --network turing --app-id 1 --clean --identity identity.toml

    If you want to sync Avail light node with your desired block number, you can add the following config in your config.yaml file from here

    bash
    http_server_host = '127.0.0.1'
    +http_server_port = 8000
    +port = 38000
    +sync_start_block = 322264

    After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates.

    🧹 Cleaning previous chain history

    From the GM world rollup tutorial, you should already have the gmd binary and the $HOME/.gm directory.

    To clear old rollup data:

    bash
    rm -r $(which gmd) && rm -rf $HOME/.gm

    🏗️ Building your rollup

    Now we need to rebuild our rollup by simply running the existing init.sh script:

    bash
    cd $HOME/gm && bash init.sh

    This process creates a new $HOME/.gm directory and a new gmd binary. Next, we need to connect our rollup to the running Avail light node.

    🛠️ Configuring flags for DA

    Now we're prepared to initiate our rollup and establish a connection with the Avail light node. The gmd start command requires two DA configuration flags:

    • --rollkit.da_start_height
    • --rollkit.da_address

    TIP

    Optionally, you could also set the --rollkit.da_block_time flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.

    Let's determine what to provide for each of them.

    First, let's query the DA Layer start height using an RPC endpoint provided by Avail Labs. For local, it would be - https://localhost:8000/v1/latest_block, and for Turing Testnet - https://avail-turing-rpc.publicnode.com

    Here is an example for the local development (replace URL for Turing Testnet if needed):

    bash
    DA_BLOCK_HEIGHT=$(curl https://localhost:8000/v1/latest_block | jq -r '.result.block.header.height')
    +echo -e "\\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \\n"

    You will see the output like this:

    bash
     Your DA_BLOCK_HEIGHT is 35

    🔥 Running your rollup connected to an avail light node

    Now let's run our rollup node with all DA flags:

    bash
        gmd start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_address="grpc://localhost:3000" \\   
    +    --rollkit.da_start_height $DA_BLOCK_HEIGHT \\
    +    --minimum-gas-prices="0.1stake"

    Now, the rollup is running and posting blocks (aggregated in batches) to Avail. You can view your rollup by finding your account on Turing testnet

    INFO

    For details on configuring gas prices specifically for the DA network, see our DA Network Gas Price Guide. This is separate from the --minimum-gas-prices="0.025stake" setting, which is used for rollup network operations.

    🎉 Next steps

    Congratulations! You've built a local rollup that posts to Avail's testnets as well as locally. Well done! Now, go forth and build something great! Good luck!

    `,43)]))}const g=a(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/tutorials_da_avail-da.md.CNxn6ngQ.lean.js b/pr-528/assets/tutorials_da_avail-da.md.CNxn6ngQ.lean.js new file mode 100644 index 000000000..7fefc441c --- /dev/null +++ b/pr-528/assets/tutorials_da_avail-da.md.CNxn6ngQ.lean.js @@ -0,0 +1,9 @@ +import{_ as a,c as s,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"Using Avail as DA","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Using Avail as DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/avail-da.md","filePath":"tutorials/da/avail-da.md","lastUpdated":1733420866000}'),l={name:"tutorials/da/avail-da.md"};function n(o,i,h,r,p,d){return e(),s("div",null,i[0]||(i[0]=[t(`

    Using Avail as DA

    🌞 Introduction

    Disclaimer

    This tutorial is currently broken. Follow the work to fix this tutorial in rollkit/avail-da issue 57

    Avail DA offers scalable data availability that underpins the Avail ecosystem and ensures instantaneous and reliable data integrity, enabling rollups to grow, through the use of cutting-edge zero knowledge and KZG Polynomial commitments.

    This tutorial serves as a comprehensive guide for deploying your GM world rollup on Avail's data availability (DA) network.

    Before proceeding, ensure that you have completed the GM World rollup setup.

    Note : If you want to go through gm world setup docs for more information, you can refer GM world rollup tutorial, which covers setting up a local sovereign gm-world rollup and connecting it to a local (mock) DA node.

    🪶 Running an Avail light node

    Before you can start your rollup node, you need to initiate, sync, and possibly fund a light node on Turing Testnet which is the test network of Avail

    🚀 Using Turing Testnet

    • To fund your wallet address for using Turing Testnet: get AVAIL tokens from the faucet
    • Paste your mnemonic in the identity.toml file by creating a identity.toml with the following command: touch identity.toml Example:
    bash
    avail_secret_uri = '<paste your mnemonic here>'

    Running just an Avail light node is enough for Turing testnet. Run the Avail light node using the following command

    bash
    cargo run --release -- --network turing --app-id 1 --clean --identity identity.toml

    If you want to sync Avail light node with your desired block number, you can add the following config in your config.yaml file from here

    bash
    http_server_host = '127.0.0.1'
    +http_server_port = 8000
    +port = 38000
    +sync_start_block = 322264

    After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates.

    🧹 Cleaning previous chain history

    From the GM world rollup tutorial, you should already have the gmd binary and the $HOME/.gm directory.

    To clear old rollup data:

    bash
    rm -r $(which gmd) && rm -rf $HOME/.gm

    🏗️ Building your rollup

    Now we need to rebuild our rollup by simply running the existing init.sh script:

    bash
    cd $HOME/gm && bash init.sh

    This process creates a new $HOME/.gm directory and a new gmd binary. Next, we need to connect our rollup to the running Avail light node.

    🛠️ Configuring flags for DA

    Now we're prepared to initiate our rollup and establish a connection with the Avail light node. The gmd start command requires two DA configuration flags:

    • --rollkit.da_start_height
    • --rollkit.da_address

    TIP

    Optionally, you could also set the --rollkit.da_block_time flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.

    Let's determine what to provide for each of them.

    First, let's query the DA Layer start height using an RPC endpoint provided by Avail Labs. For local, it would be - https://localhost:8000/v1/latest_block, and for Turing Testnet - https://avail-turing-rpc.publicnode.com

    Here is an example for the local development (replace URL for Turing Testnet if needed):

    bash
    DA_BLOCK_HEIGHT=$(curl https://localhost:8000/v1/latest_block | jq -r '.result.block.header.height')
    +echo -e "\\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \\n"

    You will see the output like this:

    bash
     Your DA_BLOCK_HEIGHT is 35

    🔥 Running your rollup connected to an avail light node

    Now let's run our rollup node with all DA flags:

    bash
        gmd start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_address="grpc://localhost:3000" \\   
    +    --rollkit.da_start_height $DA_BLOCK_HEIGHT \\
    +    --minimum-gas-prices="0.1stake"

    Now, the rollup is running and posting blocks (aggregated in batches) to Avail. You can view your rollup by finding your account on Turing testnet

    INFO

    For details on configuring gas prices specifically for the DA network, see our DA Network Gas Price Guide. This is separate from the --minimum-gas-prices="0.025stake" setting, which is used for rollup network operations.

    🎉 Next steps

    Congratulations! You've built a local rollup that posts to Avail's testnets as well as locally. Well done! Now, go forth and build something great! Good luck!

    `,43)]))}const g=a(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/tutorials_da_celestia-da.md.bErwepps.js b/pr-528/assets/tutorials_da_celestia-da.md.bErwepps.js new file mode 100644 index 000000000..653884c73 --- /dev/null +++ b/pr-528/assets/tutorials_da_celestia-da.md.bErwepps.js @@ -0,0 +1,13 @@ +import{c as a}from"./chunks/constants.C1G_zmdY.js";import{c as h,a3 as l,j as i,t,k as e,a as n,o}from"./chunks/framework.B8-VHxRu.js";const p={class:"vp-code-group vp-adaptive-theme"},r={class:"blocks"},d={class:"language-sh vp-adaptive-theme active"},k={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},g={class:"line"},c={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},u={class:"line"},F={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y={class:"language-sh vp-adaptive-theme"},b={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},E={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},v={class:"line"},B={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},m={class:"language-sh vp-adaptive-theme"},f={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},A={class:"line"},T={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},D={class:"line"},_={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},M=JSON.parse('{"title":"Using Celestia as DA","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Using Celestia as DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/celestia-da.md","filePath":"tutorials/da/celestia-da.md","lastUpdated":1733420866000}'),q={name:"tutorials/da/celestia-da.md"},H=Object.assign(q,{setup(x){return(N,s)=>(o(),h("div",null,[s[25]||(s[25]=l('

    Using Celestia as DA

    🌞 Introduction

    This tutorial serves as a comprehensive guide for deploying your rollup on Celestia's data availability (DA) network. From the Rollkit perspective, there's no difference in posting blocks to Celestia's testnets or Mainnet Beta.

    Before proceeding, ensure that you have completed the quick start tutorial, which covers installing the rollkit CLI and running a rollup against a local DA network.

    🪶 Running a Celestia light node

    Before you can start your rollup node, you need to initiate, sync, and fund a light node on one of Celestia's networks on a compatible version:

    ',6)),i("div",p,[s[24]||(s[24]=l('
    ',1)),i("div",r,[i("div",d,[s[6]||(s[6]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[7]||(s[7]=i("span",{class:"lang"},"sh",-1)),i("pre",k,[i("code",null,[i("span",g,[s[0]||(s[0]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Rollkit",-1)),s[1]||(s[1]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",c," "+t(e(a).celestiaNodeArabicaRollkitTag),1)]),s[5]||(s[5]=n(` +`)),i("span",u,[s[2]||(s[2]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Celestia",-1)),s[3]||(s[3]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Node",-1)),s[4]||(s[4]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",F," "+t(e(a).celestiaNodeArabicaTag),1)])])])]),i("div",y,[s[14]||(s[14]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[15]||(s[15]=i("span",{class:"lang"},"sh",-1)),i("pre",b,[i("code",null,[i("span",C,[s[8]||(s[8]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Rollkit",-1)),s[9]||(s[9]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",E," "+t(e(a).celestiaNodeMochaRollkitTag),1)]),s[13]||(s[13]=n(` +`)),i("span",v,[s[10]||(s[10]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Celestia",-1)),s[11]||(s[11]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Node",-1)),s[12]||(s[12]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",B," "+t(e(a).celestiaNodeMochaTag),1)])])])]),i("div",m,[s[22]||(s[22]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[23]||(s[23]=i("span",{class:"lang"},"sh",-1)),i("pre",f,[i("code",null,[i("span",A,[s[16]||(s[16]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Rollkit",-1)),s[17]||(s[17]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",T," "+t(e(a).celestiaNodeMainnetRollkitTag),1)]),s[21]||(s[21]=n(` +`)),i("span",D,[s[18]||(s[18]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Celestia",-1)),s[19]||(s[19]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Node",-1)),s[20]||(s[20]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",_," "+t(e(a).celestiaNodeMainnetTag),1)])])])])])]),s[26]||(s[26]=l(`

    The main difference lies in how you fund your wallet address: using testnet TIA or TIA for Mainnet Beta.

    After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates to Celestia.

    🏗️ Prerequisites

    🛠️ Configuring flags for DA

    Now that we are posting to the Celestia DA instead of the local DA, the rollkit start command requires three DA configuration flags:

    • --rollkit.da_start_height
    • --rollkit.da_auth_token
    • --rollkit.da_namespace

    TIP

    Optionally, you could also set the --rollkit.da_block_time flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.

    Let's determine which values to provide for each of them.

    First, let's query the DA layer start height using our light node.

    bash
    DA_BLOCK_HEIGHT=$(celestia header network-head | jq -r '.result.header.height')
    +echo -e "\\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \\n"

    The output of the command above will look similar to this:

    bash
     Your DA_BLOCK_HEIGHT is 2127672

    Now, let's obtain the authentication token of your light node using the following command:

    bash
    AUTH_TOKEN=$(celestia light auth write --p2p.network arabica)
    +echo -e "\\n Your DA AUTH_TOKEN is $AUTH_TOKEN \\n"
    bash
    AUTH_TOKEN=$(celestia light auth write --p2p.network mocha)
    +echo -e "\\n Your DA AUTH_TOKEN is $AUTH_TOKEN \\n"
    bash
    AUTH_TOKEN=$(celestia light auth write)
    +echo -e "\\n Your DA AUTH_TOKEN is $AUTH_TOKEN \\n"

    The output of the command above will look similar to this:

    bash
     Your DA AUTH_TOKEN is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiXX0.cSrJjpfUdTNFtzGho69V0D_8kyECn9Mzv8ghJSpKRDE

    Next, let's set up the namespace to be used for posting data on Celestia:

    bash
    DA_NAMESPACE=00000000000000000000000000000000000000000008e5f679bf7116cb

    TIP

    00000000000000000000000000000000000000000008e5f679bf7116cb is a default namespace for Mocha testnet. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 20 characters (10 bytes) in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 bytes.

    Learn more about namespaces.

    Lastly, set your DA address for your light node, which by default runs at port 26658:

    bash
    DA_ADDRESS=http://localhost:26658

    🔥 Running your rollup connected to Celestia light node

    Finally, let's initiate the rollup node with all the flags:

    bash
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_auth_token $AUTH_TOKEN \\
    +    --rollkit.da_namespace $DA_NAMESPACE \\
    +    --rollkit.da_start_height $DA_BLOCK_HEIGHT \\
    +    --rollkit.da_address $DA_ADDRESS

    Now, the rollup is running and posting blocks (aggregated in batches) to Celestia. You can view your rollup by using your namespace or account on one of Celestia's block explorers.

    For example, here on Celenium for Arabica.

    Other explorers:

    🎉 Next steps

    Congratulations! You've built a local rollup that posts data to Celestia's DA layer. Well done! Now, go forth and build something great! Good luck!

    `,32))]))}});export{M as __pageData,H as default}; diff --git a/pr-528/assets/tutorials_da_celestia-da.md.bErwepps.lean.js b/pr-528/assets/tutorials_da_celestia-da.md.bErwepps.lean.js new file mode 100644 index 000000000..653884c73 --- /dev/null +++ b/pr-528/assets/tutorials_da_celestia-da.md.bErwepps.lean.js @@ -0,0 +1,13 @@ +import{c as a}from"./chunks/constants.C1G_zmdY.js";import{c as h,a3 as l,j as i,t,k as e,a as n,o}from"./chunks/framework.B8-VHxRu.js";const p={class:"vp-code-group vp-adaptive-theme"},r={class:"blocks"},d={class:"language-sh vp-adaptive-theme active"},k={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},g={class:"line"},c={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},u={class:"line"},F={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y={class:"language-sh vp-adaptive-theme"},b={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},E={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},v={class:"line"},B={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},m={class:"language-sh vp-adaptive-theme"},f={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},A={class:"line"},T={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},D={class:"line"},_={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},M=JSON.parse('{"title":"Using Celestia as DA","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Using Celestia as DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/celestia-da.md","filePath":"tutorials/da/celestia-da.md","lastUpdated":1733420866000}'),q={name:"tutorials/da/celestia-da.md"},H=Object.assign(q,{setup(x){return(N,s)=>(o(),h("div",null,[s[25]||(s[25]=l('

    Using Celestia as DA

    🌞 Introduction

    This tutorial serves as a comprehensive guide for deploying your rollup on Celestia's data availability (DA) network. From the Rollkit perspective, there's no difference in posting blocks to Celestia's testnets or Mainnet Beta.

    Before proceeding, ensure that you have completed the quick start tutorial, which covers installing the rollkit CLI and running a rollup against a local DA network.

    🪶 Running a Celestia light node

    Before you can start your rollup node, you need to initiate, sync, and fund a light node on one of Celestia's networks on a compatible version:

    ',6)),i("div",p,[s[24]||(s[24]=l('
    ',1)),i("div",r,[i("div",d,[s[6]||(s[6]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[7]||(s[7]=i("span",{class:"lang"},"sh",-1)),i("pre",k,[i("code",null,[i("span",g,[s[0]||(s[0]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Rollkit",-1)),s[1]||(s[1]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",c," "+t(e(a).celestiaNodeArabicaRollkitTag),1)]),s[5]||(s[5]=n(` +`)),i("span",u,[s[2]||(s[2]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Celestia",-1)),s[3]||(s[3]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Node",-1)),s[4]||(s[4]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",F," "+t(e(a).celestiaNodeArabicaTag),1)])])])]),i("div",y,[s[14]||(s[14]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[15]||(s[15]=i("span",{class:"lang"},"sh",-1)),i("pre",b,[i("code",null,[i("span",C,[s[8]||(s[8]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Rollkit",-1)),s[9]||(s[9]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",E," "+t(e(a).celestiaNodeMochaRollkitTag),1)]),s[13]||(s[13]=n(` +`)),i("span",v,[s[10]||(s[10]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Celestia",-1)),s[11]||(s[11]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Node",-1)),s[12]||(s[12]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",B," "+t(e(a).celestiaNodeMochaTag),1)])])])]),i("div",m,[s[22]||(s[22]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[23]||(s[23]=i("span",{class:"lang"},"sh",-1)),i("pre",f,[i("code",null,[i("span",A,[s[16]||(s[16]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Rollkit",-1)),s[17]||(s[17]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",T," "+t(e(a).celestiaNodeMainnetRollkitTag),1)]),s[21]||(s[21]=n(` +`)),i("span",D,[s[18]||(s[18]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"Celestia",-1)),s[19]||(s[19]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Node",-1)),s[20]||(s[20]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," Version:",-1)),i("span",_," "+t(e(a).celestiaNodeMainnetTag),1)])])])])])]),s[26]||(s[26]=l(`

    The main difference lies in how you fund your wallet address: using testnet TIA or TIA for Mainnet Beta.

    After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates to Celestia.

    🏗️ Prerequisites

    🛠️ Configuring flags for DA

    Now that we are posting to the Celestia DA instead of the local DA, the rollkit start command requires three DA configuration flags:

    • --rollkit.da_start_height
    • --rollkit.da_auth_token
    • --rollkit.da_namespace

    TIP

    Optionally, you could also set the --rollkit.da_block_time flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.

    Let's determine which values to provide for each of them.

    First, let's query the DA layer start height using our light node.

    bash
    DA_BLOCK_HEIGHT=$(celestia header network-head | jq -r '.result.header.height')
    +echo -e "\\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \\n"

    The output of the command above will look similar to this:

    bash
     Your DA_BLOCK_HEIGHT is 2127672

    Now, let's obtain the authentication token of your light node using the following command:

    bash
    AUTH_TOKEN=$(celestia light auth write --p2p.network arabica)
    +echo -e "\\n Your DA AUTH_TOKEN is $AUTH_TOKEN \\n"
    bash
    AUTH_TOKEN=$(celestia light auth write --p2p.network mocha)
    +echo -e "\\n Your DA AUTH_TOKEN is $AUTH_TOKEN \\n"
    bash
    AUTH_TOKEN=$(celestia light auth write)
    +echo -e "\\n Your DA AUTH_TOKEN is $AUTH_TOKEN \\n"

    The output of the command above will look similar to this:

    bash
     Your DA AUTH_TOKEN is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiXX0.cSrJjpfUdTNFtzGho69V0D_8kyECn9Mzv8ghJSpKRDE

    Next, let's set up the namespace to be used for posting data on Celestia:

    bash
    DA_NAMESPACE=00000000000000000000000000000000000000000008e5f679bf7116cb

    TIP

    00000000000000000000000000000000000000000008e5f679bf7116cb is a default namespace for Mocha testnet. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 20 characters (10 bytes) in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 bytes.

    Learn more about namespaces.

    Lastly, set your DA address for your light node, which by default runs at port 26658:

    bash
    DA_ADDRESS=http://localhost:26658

    🔥 Running your rollup connected to Celestia light node

    Finally, let's initiate the rollup node with all the flags:

    bash
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_auth_token $AUTH_TOKEN \\
    +    --rollkit.da_namespace $DA_NAMESPACE \\
    +    --rollkit.da_start_height $DA_BLOCK_HEIGHT \\
    +    --rollkit.da_address $DA_ADDRESS

    Now, the rollup is running and posting blocks (aggregated in batches) to Celestia. You can view your rollup by using your namespace or account on one of Celestia's block explorers.

    For example, here on Celenium for Arabica.

    Other explorers:

    🎉 Next steps

    Congratulations! You've built a local rollup that posts data to Celestia's DA layer. Well done! Now, go forth and build something great! Good luck!

    `,32))]))}});export{M as __pageData,H as default}; diff --git a/pr-528/assets/tutorials_da_local-da.md.Cyup0Whx.js b/pr-528/assets/tutorials_da_local-da.md.Cyup0Whx.js new file mode 100644 index 000000000..1f95f2575 --- /dev/null +++ b/pr-528/assets/tutorials_da_local-da.md.Cyup0Whx.js @@ -0,0 +1,4 @@ +import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as l,a3 as i,j as s,t as e,k as n,o}from"./chunks/framework.B8-VHxRu.js";const r={class:"language-bash vp-adaptive-theme"},h={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},d={class:"line"},p={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y=JSON.parse('{"title":"Using Local DA","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Using Local DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/local-da.md","filePath":"tutorials/da/local-da.md","lastUpdated":1733420866000}'),c={name:"tutorials/da/local-da.md"},C=Object.assign(c,{setup(k){return(u,a)=>(o(),l("div",null,[a[3]||(a[3]=i('

    Using Local DA

    Introduction

    This tutorial serves as a comprehensive guide for using the local-da with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    Setting Up a Local DA Network

    To set up a local DA network node on your machine, run the following script to install and start the local DA node:

    ',6)),s("div",r,[a[1]||(a[1]=s("button",{title:"Copy Code",class:"copy"},null,-1)),a[2]||(a[2]=s("span",{class:"lang"},"bash",-1)),s("pre",h,[s("code",null,[s("span",d,[a[0]||(a[0]=i('curl -sSL https://rollkit.dev/install-local-da.sh | bash -s',6)),s("span",p," "+e(n(t).localDALatestTag),1)])])])]),a[4]||(a[4]=i(`

    This script will build and run the node, which will then listen on port 7980.

    Configuring your rollup to connect to the local DA network

    To connect your rollup to the local DA network, you need to pass the --rollkit.da_address flag with the local DA node address.

    Run your rollup

    Start your rollup node with the following command, ensuring to include the DA address flag:

    sh
    rollkit start --rollkit.da_address http://localhost:7980
    sh
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_address http://localhost:7980 \\
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log message indicating that your rollup is connected to the local DA network:

    shell
    I[2024-11-15|14:54:19.842] DA server is already running                 module=main address=http://localhost:7980

    Summary

    By following these steps, you will set up a local DA network node and configure your rollup to post data to it. This setup is useful for testing and development in a controlled environment.

    `,10))]))}});export{y as __pageData,C as default}; diff --git a/pr-528/assets/tutorials_da_local-da.md.Cyup0Whx.lean.js b/pr-528/assets/tutorials_da_local-da.md.Cyup0Whx.lean.js new file mode 100644 index 000000000..1f95f2575 --- /dev/null +++ b/pr-528/assets/tutorials_da_local-da.md.Cyup0Whx.lean.js @@ -0,0 +1,4 @@ +import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as l,a3 as i,j as s,t as e,k as n,o}from"./chunks/framework.B8-VHxRu.js";const r={class:"language-bash vp-adaptive-theme"},h={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},d={class:"line"},p={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y=JSON.parse('{"title":"Using Local DA","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Using Local DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/local-da.md","filePath":"tutorials/da/local-da.md","lastUpdated":1733420866000}'),c={name:"tutorials/da/local-da.md"},C=Object.assign(c,{setup(k){return(u,a)=>(o(),l("div",null,[a[3]||(a[3]=i('

    Using Local DA

    Introduction

    This tutorial serves as a comprehensive guide for using the local-da with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    Setting Up a Local DA Network

    To set up a local DA network node on your machine, run the following script to install and start the local DA node:

    ',6)),s("div",r,[a[1]||(a[1]=s("button",{title:"Copy Code",class:"copy"},null,-1)),a[2]||(a[2]=s("span",{class:"lang"},"bash",-1)),s("pre",h,[s("code",null,[s("span",d,[a[0]||(a[0]=i('curl -sSL https://rollkit.dev/install-local-da.sh | bash -s',6)),s("span",p," "+e(n(t).localDALatestTag),1)])])])]),a[4]||(a[4]=i(`

    This script will build and run the node, which will then listen on port 7980.

    Configuring your rollup to connect to the local DA network

    To connect your rollup to the local DA network, you need to pass the --rollkit.da_address flag with the local DA node address.

    Run your rollup

    Start your rollup node with the following command, ensuring to include the DA address flag:

    sh
    rollkit start --rollkit.da_address http://localhost:7980
    sh
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_address http://localhost:7980 \\
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log message indicating that your rollup is connected to the local DA network:

    shell
    I[2024-11-15|14:54:19.842] DA server is already running                 module=main address=http://localhost:7980

    Summary

    By following these steps, you will set up a local DA network node and configure your rollup to post data to it. This setup is useful for testing and development in a controlled environment.

    `,10))]))}});export{y as __pageData,C as default}; diff --git a/pr-528/assets/tutorials_da_overview.md.D8MH92i5.js b/pr-528/assets/tutorials_da_overview.md.D8MH92i5.js new file mode 100644 index 000000000..554fc4488 --- /dev/null +++ b/pr-528/assets/tutorials_da_overview.md.D8MH92i5.js @@ -0,0 +1,8 @@ +import{_ as a,c as s,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"DA","description":"This page provides an overview of how rollkit integrates with DA.","frontmatter":{"description":"This page provides an overview of how rollkit integrates with DA.","head":[["meta",{"name":"og:title","content":"DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/overview.md","filePath":"tutorials/da/overview.md","lastUpdated":1733420866000}'),l={name:"tutorials/da/overview.md"};function n(h,i,r,k,o,p){return e(),s("div",null,i[0]||(i[0]=[t(`

    DA

    Now that you have the foundations of running and building a rollup with Rollkit, it is time to start customizing it to fit your needs.

    The first choice you need to make is which data availability (DA) layer to use. The DA layer is a critical component of a blockchain, as it provides the data availability and finality guarantees that your chain needs to operate securely.

    Rollkit uses the go-da interface to communicate to DA layers. Any DA layer that implements this interface can be used with Rollkit.

    Go DA

    The go-da interface defines the core functions required to interact with a DA layer. Probably the two most important functions being Get and Submit.

    go
    // DA defines very generic interface for interaction with Data Availability layers.
    +type DA interface {
    +	// Get returns Blob for each given ID, or an error.
    +	Get(ctx context.Context, ids []ID, namespace Namespace) ([]Blob, error)
    +
    +	// Submit submits the Blobs to Data Availability layer.
    +	Submit(ctx context.Context, blobs []Blob, gasPrice float64, namespace Namespace) ([]ID, error)
    +}

    DA layers can integrate the go-da interface directly into their node like Celestia, or they can define a middleware service like Avail.

    Mock DA

    You might have noticed that we did not define any DA layer during the quick start or build a chain tutorials. This is because we used a mock DA layer that is built into Rollkit.

    If you revisit the logs from those tutorials, you will see one of the first lines being:

    shell
    I[2024-11-15|14:09:41.735] Starting mock DA server                      module=main address=http://localhost:26658

    The mock DA layer is a simple in-memory DA layer that is great for testing and development. It is not suitable for production use, as it does not provide the data availability and finality guarantees that a real DA layer would.

    DA Layers

    Now that you have a better understanding of what a DA layer is, you can start to explore the different DA layers that are available to use with Rollkit.

    `,16)]))}const g=a(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/tutorials_da_overview.md.D8MH92i5.lean.js b/pr-528/assets/tutorials_da_overview.md.D8MH92i5.lean.js new file mode 100644 index 000000000..554fc4488 --- /dev/null +++ b/pr-528/assets/tutorials_da_overview.md.D8MH92i5.lean.js @@ -0,0 +1,8 @@ +import{_ as a,c as s,a3 as t,o as e}from"./chunks/framework.B8-VHxRu.js";const c=JSON.parse('{"title":"DA","description":"This page provides an overview of how rollkit integrates with DA.","frontmatter":{"description":"This page provides an overview of how rollkit integrates with DA.","head":[["meta",{"name":"og:title","content":"DA | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/da/overview.md","filePath":"tutorials/da/overview.md","lastUpdated":1733420866000}'),l={name:"tutorials/da/overview.md"};function n(h,i,r,k,o,p){return e(),s("div",null,i[0]||(i[0]=[t(`

    DA

    Now that you have the foundations of running and building a rollup with Rollkit, it is time to start customizing it to fit your needs.

    The first choice you need to make is which data availability (DA) layer to use. The DA layer is a critical component of a blockchain, as it provides the data availability and finality guarantees that your chain needs to operate securely.

    Rollkit uses the go-da interface to communicate to DA layers. Any DA layer that implements this interface can be used with Rollkit.

    Go DA

    The go-da interface defines the core functions required to interact with a DA layer. Probably the two most important functions being Get and Submit.

    go
    // DA defines very generic interface for interaction with Data Availability layers.
    +type DA interface {
    +	// Get returns Blob for each given ID, or an error.
    +	Get(ctx context.Context, ids []ID, namespace Namespace) ([]Blob, error)
    +
    +	// Submit submits the Blobs to Data Availability layer.
    +	Submit(ctx context.Context, blobs []Blob, gasPrice float64, namespace Namespace) ([]ID, error)
    +}

    DA layers can integrate the go-da interface directly into their node like Celestia, or they can define a middleware service like Avail.

    Mock DA

    You might have noticed that we did not define any DA layer during the quick start or build a chain tutorials. This is because we used a mock DA layer that is built into Rollkit.

    If you revisit the logs from those tutorials, you will see one of the first lines being:

    shell
    I[2024-11-15|14:09:41.735] Starting mock DA server                      module=main address=http://localhost:26658

    The mock DA layer is a simple in-memory DA layer that is great for testing and development. It is not suitable for production use, as it does not provide the data availability and finality guarantees that a real DA layer would.

    DA Layers

    Now that you have a better understanding of what a DA layer is, you can start to explore the different DA layers that are available to use with Rollkit.

    `,16)]))}const g=a(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/pr-528/assets/tutorials_deploy-overview.md.Bj3ZxHuP.js b/pr-528/assets/tutorials_deploy-overview.md.Bj3ZxHuP.js new file mode 100644 index 000000000..707227b1b --- /dev/null +++ b/pr-528/assets/tutorials_deploy-overview.md.Bj3ZxHuP.js @@ -0,0 +1 @@ +import{_ as o,c as t,a3 as l,o as r}from"./chunks/framework.B8-VHxRu.js";const h=JSON.parse('{"title":"Deploying Your Rollup","description":"This page provides an overview of some common ways to deploy rollups.","frontmatter":{"description":"This page provides an overview of some common ways to deploy rollups.","head":[["meta",{"name":"og:title","content":"Deploying Your Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/deploy-overview.md","filePath":"tutorials/deploy-overview.md","lastUpdated":1733420866000}'),i={name:"tutorials/deploy-overview.md"};function a(s,e,n,p,u,d){return r(),t("div",null,e[0]||(e[0]=[l('

    Deploying Your Rollup

    One of the benefits of building rollups with Rollkit is the flexibility you have as a developer to choose things like the DA layer, the settlement scheme, and the execution environment.

    The challenge that comes with this flexibility is that there are more services that now need to be deployed and managed while running your rollup.

    In the tutorials so far, you've seen various helper scripts used to make things easier. While great for tutorials, there are better ways to deploy and manage rollups than using various bash scripts.

    In this section, you'll see a few examples of how you can deploy your rollup environment with all your services running in a more production-ready way.

    Disclaimer

    These examples are for educational purposes only. Before deploying your rollup for production use you should fully understand the services you are deploying and your choice in deployment method.

    ',7)]))}const y=o(i,[["render",a]]);export{h as __pageData,y as default}; diff --git a/pr-528/assets/tutorials_deploy-overview.md.Bj3ZxHuP.lean.js b/pr-528/assets/tutorials_deploy-overview.md.Bj3ZxHuP.lean.js new file mode 100644 index 000000000..707227b1b --- /dev/null +++ b/pr-528/assets/tutorials_deploy-overview.md.Bj3ZxHuP.lean.js @@ -0,0 +1 @@ +import{_ as o,c as t,a3 as l,o as r}from"./chunks/framework.B8-VHxRu.js";const h=JSON.parse('{"title":"Deploying Your Rollup","description":"This page provides an overview of some common ways to deploy rollups.","frontmatter":{"description":"This page provides an overview of some common ways to deploy rollups.","head":[["meta",{"name":"og:title","content":"Deploying Your Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/deploy-overview.md","filePath":"tutorials/deploy-overview.md","lastUpdated":1733420866000}'),i={name:"tutorials/deploy-overview.md"};function a(s,e,n,p,u,d){return r(),t("div",null,e[0]||(e[0]=[l('

    Deploying Your Rollup

    One of the benefits of building rollups with Rollkit is the flexibility you have as a developer to choose things like the DA layer, the settlement scheme, and the execution environment.

    The challenge that comes with this flexibility is that there are more services that now need to be deployed and managed while running your rollup.

    In the tutorials so far, you've seen various helper scripts used to make things easier. While great for tutorials, there are better ways to deploy and manage rollups than using various bash scripts.

    In this section, you'll see a few examples of how you can deploy your rollup environment with all your services running in a more production-ready way.

    Disclaimer

    These examples are for educational purposes only. Before deploying your rollup for production use you should fully understand the services you are deploying and your choice in deployment method.

    ',7)]))}const y=o(i,[["render",a]]);export{h as __pageData,y as default}; diff --git a/pr-528/assets/tutorials_docker-compose.md.BvDnivbM.js b/pr-528/assets/tutorials_docker-compose.md.BvDnivbM.js new file mode 100644 index 000000000..80b2d0946 --- /dev/null +++ b/pr-528/assets/tutorials_docker-compose.md.BvDnivbM.js @@ -0,0 +1,121 @@ +import{C as h}from"./chunks/callout.CtmRa3nB.js";import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as p,j as i,a,G as k,a3 as n,t,k as l,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const o={class:"tip custom-block"},d={class:"language-dockerfile vp-adaptive-theme"},c={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},g={class:"line"},E={style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},y={class:"line"},F={style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},u={class:"language-yml vp-adaptive-theme"},m={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},D={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},b={class:"line"},A={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},P=JSON.parse('{"title":"🐳 Docker Compose","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🐳 Docker Compose | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/docker-compose.md","filePath":"tutorials/docker-compose.md","lastUpdated":1733420866000}'),f={name:"tutorials/docker-compose.md"},I=Object.assign(f,{setup(B){return(w,s)=>(r(),p("div",null,[s[17]||(s[17]=i("h1",{id:"🐳-docker-compose",tabindex:"-1"},[a("🐳 Docker Compose "),i("a",{class:"header-anchor",href:"#🐳-docker-compose","aria-label":'Permalink to "🐳 Docker Compose"'},"​")],-1)),s[18]||(s[18]=i("p",null,[a("This tutorial is going to show you how to deploy the "),i("a",{href:"/docs-preview/pr-528/tutorials/wordle"},"wordle chain"),a(" using Docker Compose.")],-1)),s[19]||(s[19]=i("p",null,[a("You can learn more about Docker Compose "),i("a",{href:"https://docs.docker.com/compose/",target:"_blank",rel:"noreferrer"},"here"),a(".")],-1)),i("div",o,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),k(h)]),s[20]||(s[20]=n('

    💻 Pre-requisites

    Make sure you have your wordle chain ready by completing the Build your chain tutorial.

    🛠️ Dependencies

    💻 Docker Compose

    You can install docker compose here.

    Once installed, you can verify the installation by running:

    bash
    docker compose version
    bash
    Docker Compose version v2.23.0-desktop.1

    🛠️ Setting up your environment

    In addition to our chain, we need to run a DA and Sequencer node.

    We will use the local-da and local-sequencer for this tutorial and run it with our chain.

    To save time, we can use their respective Dockerfiles:

    This will allow us to focus on how we can run the wordle chain with Docker Compose.

    🐳 Dockerfile

    First, we need to create a Dockerfile for our wordle chain. Create a new file called Dockerfile in the root of the wordle directory and add the following code:

    ',16)),i("div",d,[s[10]||(s[10]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[11]||(s[11]=i("span",{class:"lang"},"dockerfile",-1)),i("pre",c,[i("code",null,[s[3]||(s[3]=n(`# Stage 1: Install ignite CLI and rollkit +FROM golang as base + +# Install dependencies +RUN apt update && \\ + apt-get install -y \\ + build-essential \\ + ca-certificates \\ + curl + +# Install rollkit +`,22)),i("span",g,[s[1]||(s[1]=i("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"RUN",-1)),i("span",E," curl -sSL https://rollkit.dev/install.sh | sh -s "+t(l(e).rollkitLatestTag),1)]),s[4]||(s[4]=a(` +`)),s[5]||(s[5]=i("span",{class:"line"},null,-1)),s[6]||(s[6]=a(` +`)),s[7]||(s[7]=i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"# Install ignite")],-1)),s[8]||(s[8]=a(` +`)),i("span",y,[s[2]||(s[2]=i("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"RUN",-1)),i("span",F," curl https://get.ignite.com/cli@"+t(l(e).igniteVersionTag)+"! | bash",1)]),s[9]||(s[9]=n(` + +# Set the working directory +WORKDIR /app + +# cache dependencies. +COPY ./go.mod . +COPY ./go.sum . +RUN go mod download + +# Copy all files from the current directory to the container +COPY . . + +# Remove the rollkit.toml and entrypoint files if they exist. This is to avoid cross OS issues. +RUN rm entrypoint rollkit.toml + +# Build the chain +RUN ignite chain build && ignite rollkit init + +# Initialize the rollkit.toml file +RUN rollkit toml init + +# Run rollkit command to initialize the entrypoint executable +RUN rollkit + +# Stage 2: Set up the runtime environment +FROM debian:bookworm-slim + +# Install jq +RUN apt update && \\ + apt-get install -y \\ + jq + +# Set the working directory +WORKDIR /root + +# Copy over the rollkit binary from the build stage +COPY --from=base /go/bin/rollkit /usr/bin + +# Copy the entrypoint and rollkit.toml files from the build stage +COPY --from=base /app/entrypoint ./entrypoint +COPY --from=base /app/rollkit.toml ./rollkit.toml + +# Copy the $HOME/.wordle directory from the build stage. +# This directory contains all your chain config. +COPY --from=base /root/.wordle /root/.wordle + +# Ensure the entrypoint script is executable +RUN chmod +x ./entrypoint + +# Keep the container running after it has been started +# CMD tail -f /dev/null + +ENTRYPOINT [ "rollkit" ] +CMD [ "start", "--rollkit.aggregator", "--rollkit.sequencer_rollup_id", "wordle"]`,108))])])]),s[21]||(s[21]=n(`

    This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain.

    Build the docker image by running the following command:

    bash
    docker build -t wordle .

    You can then see the built image by running:

    bash
    docker images

    You should see the following output:

    bash
    REPOSITORY  TAG     IMAGE ID       CREATED         SIZE
    +wordle      latest  5d3533c1ea1c   8 seconds ago   443MB

    🐳 Docker Compose file

    Next we need to create our compose.yaml file for docker compose to use.

    In the root of the wordle directory, create a new file called compose.yaml and add the following code:

    `,10)),i("div",u,[s[15]||(s[15]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[16]||(s[16]=i("span",{class:"lang"},"yml",-1)),i("pre",m,[i("code",null,[s[12]||(s[12]=n(`services: + # Define the wordle chain service + wordle: + # Set the name of the docker container for ease of use + container_name: wordle + # Use the image we just built + image: wordle + # Used for networking between the two services + network_mode: host + # The command config is used for launching the chain once the Docker container is running + command: + [ + "start", + "--rollkit.aggregator", + "--rollkit.da_address", + "http://0.0.0.0:7980", + "--rollkit.sequencer_address", + "0.0.0.0:50051", + "--rollkit.sequencer_rollup_id", + "wordle", + ] + # Ensures the local-da service is up and running before starting the chain + depends_on: + - local-da + - local-sequencer + + # Define the local DA service + local-da: + # Use the published image from rollkit + image: +`,60)),i("span",C,[i("span",D," ghcr.io/rollkit/local-da:"+t(l(e).localDALatestTag),1)]),s[13]||(s[13]=n(` + # Set the name of the docker container for ease of use + container_name: local-da + # Publish the ports to connect + ports: + - "7980:7980" + + # Define the local sequencer service + local-sequencer: + # Use the published image from rollkit + image: +`,21)),i("span",b,[i("span",A," ghcr.io/rollkit/go-sequencing:"+t(l(e).goSequencingLatestTag),1)]),s[14]||(s[14]=n(` + # Set the name of the docker container for ease of use + container_name: local-sequencer + # Start the sequencer with the listen all flag and the rollup id set to wordle + command: ["-listen-all", "-rollup-id=wordle"] + # Publish the ports to connect + ports: + - "50051:50051"`,14))])])]),s[22]||(s[22]=n(`

    We now have all we need to run the wordle chain and connect to a local DA node.

    🚀 Run Wordle chain

    Run your wordle chain by running the following command:

    bash
    docker compose up

    You'll see logs of your chain being output.

    Congratulations! You have successfully run the wordle chain with Docker Compose.

    🚀 Interacting with the chain

    Since we are using docker images, we can interact with the chain by entering the docker container.

    You can see the docker containers running with the wordle chain and the local DA node by running the following command:

    bash
    docker ps

    You should see output like the following:

    bash
    CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS         PORTS                      NAMES
    +86f9bfa5b6d2   wordle            "rollkit start --rol…"   7 minutes ago    Up 3 seconds                              wordle
    +67a2c3058e01   local-sequencer   "local-sequencer -li…"   11 minutes ago   Up 3 seconds   0.0.0.0:50051->50051/tcp   local-sequencer
    +dae3359665f8   local-da          "local-da -listen-all"   2 hours ago      Up 3 seconds   0.0.0.0:7980->7980/tcp     local-da

    We can see the wordle chain running in container wordle and the local DA network running in container local-da.

    Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it wordle sh

    Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the Wordle tutorial.

    Once you are done interacting with your chain, you can exit out of your docker container with:

    bash
    exit

    Then you can shut down your chain environment by running CRTL+C in your terminal.

    🎉 Next steps

    Congratulations again! You now know how to run your chain with docker compose and interact with it using the Rollkit CLI in the docker container.

    `,21))]))}});export{P as __pageData,I as default}; diff --git a/pr-528/assets/tutorials_docker-compose.md.BvDnivbM.lean.js b/pr-528/assets/tutorials_docker-compose.md.BvDnivbM.lean.js new file mode 100644 index 000000000..80b2d0946 --- /dev/null +++ b/pr-528/assets/tutorials_docker-compose.md.BvDnivbM.lean.js @@ -0,0 +1,121 @@ +import{C as h}from"./chunks/callout.CtmRa3nB.js";import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as p,j as i,a,G as k,a3 as n,t,k as l,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const o={class:"tip custom-block"},d={class:"language-dockerfile vp-adaptive-theme"},c={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},g={class:"line"},E={style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},y={class:"line"},F={style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},u={class:"language-yml vp-adaptive-theme"},m={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},D={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},b={class:"line"},A={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},P=JSON.parse('{"title":"🐳 Docker Compose","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🐳 Docker Compose | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/docker-compose.md","filePath":"tutorials/docker-compose.md","lastUpdated":1733420866000}'),f={name:"tutorials/docker-compose.md"},I=Object.assign(f,{setup(B){return(w,s)=>(r(),p("div",null,[s[17]||(s[17]=i("h1",{id:"🐳-docker-compose",tabindex:"-1"},[a("🐳 Docker Compose "),i("a",{class:"header-anchor",href:"#🐳-docker-compose","aria-label":'Permalink to "🐳 Docker Compose"'},"​")],-1)),s[18]||(s[18]=i("p",null,[a("This tutorial is going to show you how to deploy the "),i("a",{href:"/docs-preview/pr-528/tutorials/wordle"},"wordle chain"),a(" using Docker Compose.")],-1)),s[19]||(s[19]=i("p",null,[a("You can learn more about Docker Compose "),i("a",{href:"https://docs.docker.com/compose/",target:"_blank",rel:"noreferrer"},"here"),a(".")],-1)),i("div",o,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),k(h)]),s[20]||(s[20]=n('

    💻 Pre-requisites

    Make sure you have your wordle chain ready by completing the Build your chain tutorial.

    🛠️ Dependencies

    💻 Docker Compose

    You can install docker compose here.

    Once installed, you can verify the installation by running:

    bash
    docker compose version
    bash
    Docker Compose version v2.23.0-desktop.1

    🛠️ Setting up your environment

    In addition to our chain, we need to run a DA and Sequencer node.

    We will use the local-da and local-sequencer for this tutorial and run it with our chain.

    To save time, we can use their respective Dockerfiles:

    This will allow us to focus on how we can run the wordle chain with Docker Compose.

    🐳 Dockerfile

    First, we need to create a Dockerfile for our wordle chain. Create a new file called Dockerfile in the root of the wordle directory and add the following code:

    ',16)),i("div",d,[s[10]||(s[10]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[11]||(s[11]=i("span",{class:"lang"},"dockerfile",-1)),i("pre",c,[i("code",null,[s[3]||(s[3]=n(`# Stage 1: Install ignite CLI and rollkit +FROM golang as base + +# Install dependencies +RUN apt update && \\ + apt-get install -y \\ + build-essential \\ + ca-certificates \\ + curl + +# Install rollkit +`,22)),i("span",g,[s[1]||(s[1]=i("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"RUN",-1)),i("span",E," curl -sSL https://rollkit.dev/install.sh | sh -s "+t(l(e).rollkitLatestTag),1)]),s[4]||(s[4]=a(` +`)),s[5]||(s[5]=i("span",{class:"line"},null,-1)),s[6]||(s[6]=a(` +`)),s[7]||(s[7]=i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"# Install ignite")],-1)),s[8]||(s[8]=a(` +`)),i("span",y,[s[2]||(s[2]=i("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"RUN",-1)),i("span",F," curl https://get.ignite.com/cli@"+t(l(e).igniteVersionTag)+"! | bash",1)]),s[9]||(s[9]=n(` + +# Set the working directory +WORKDIR /app + +# cache dependencies. +COPY ./go.mod . +COPY ./go.sum . +RUN go mod download + +# Copy all files from the current directory to the container +COPY . . + +# Remove the rollkit.toml and entrypoint files if they exist. This is to avoid cross OS issues. +RUN rm entrypoint rollkit.toml + +# Build the chain +RUN ignite chain build && ignite rollkit init + +# Initialize the rollkit.toml file +RUN rollkit toml init + +# Run rollkit command to initialize the entrypoint executable +RUN rollkit + +# Stage 2: Set up the runtime environment +FROM debian:bookworm-slim + +# Install jq +RUN apt update && \\ + apt-get install -y \\ + jq + +# Set the working directory +WORKDIR /root + +# Copy over the rollkit binary from the build stage +COPY --from=base /go/bin/rollkit /usr/bin + +# Copy the entrypoint and rollkit.toml files from the build stage +COPY --from=base /app/entrypoint ./entrypoint +COPY --from=base /app/rollkit.toml ./rollkit.toml + +# Copy the $HOME/.wordle directory from the build stage. +# This directory contains all your chain config. +COPY --from=base /root/.wordle /root/.wordle + +# Ensure the entrypoint script is executable +RUN chmod +x ./entrypoint + +# Keep the container running after it has been started +# CMD tail -f /dev/null + +ENTRYPOINT [ "rollkit" ] +CMD [ "start", "--rollkit.aggregator", "--rollkit.sequencer_rollup_id", "wordle"]`,108))])])]),s[21]||(s[21]=n(`

    This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain.

    Build the docker image by running the following command:

    bash
    docker build -t wordle .

    You can then see the built image by running:

    bash
    docker images

    You should see the following output:

    bash
    REPOSITORY  TAG     IMAGE ID       CREATED         SIZE
    +wordle      latest  5d3533c1ea1c   8 seconds ago   443MB

    🐳 Docker Compose file

    Next we need to create our compose.yaml file for docker compose to use.

    In the root of the wordle directory, create a new file called compose.yaml and add the following code:

    `,10)),i("div",u,[s[15]||(s[15]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[16]||(s[16]=i("span",{class:"lang"},"yml",-1)),i("pre",m,[i("code",null,[s[12]||(s[12]=n(`services: + # Define the wordle chain service + wordle: + # Set the name of the docker container for ease of use + container_name: wordle + # Use the image we just built + image: wordle + # Used for networking between the two services + network_mode: host + # The command config is used for launching the chain once the Docker container is running + command: + [ + "start", + "--rollkit.aggregator", + "--rollkit.da_address", + "http://0.0.0.0:7980", + "--rollkit.sequencer_address", + "0.0.0.0:50051", + "--rollkit.sequencer_rollup_id", + "wordle", + ] + # Ensures the local-da service is up and running before starting the chain + depends_on: + - local-da + - local-sequencer + + # Define the local DA service + local-da: + # Use the published image from rollkit + image: +`,60)),i("span",C,[i("span",D," ghcr.io/rollkit/local-da:"+t(l(e).localDALatestTag),1)]),s[13]||(s[13]=n(` + # Set the name of the docker container for ease of use + container_name: local-da + # Publish the ports to connect + ports: + - "7980:7980" + + # Define the local sequencer service + local-sequencer: + # Use the published image from rollkit + image: +`,21)),i("span",b,[i("span",A," ghcr.io/rollkit/go-sequencing:"+t(l(e).goSequencingLatestTag),1)]),s[14]||(s[14]=n(` + # Set the name of the docker container for ease of use + container_name: local-sequencer + # Start the sequencer with the listen all flag and the rollup id set to wordle + command: ["-listen-all", "-rollup-id=wordle"] + # Publish the ports to connect + ports: + - "50051:50051"`,14))])])]),s[22]||(s[22]=n(`

    We now have all we need to run the wordle chain and connect to a local DA node.

    🚀 Run Wordle chain

    Run your wordle chain by running the following command:

    bash
    docker compose up

    You'll see logs of your chain being output.

    Congratulations! You have successfully run the wordle chain with Docker Compose.

    🚀 Interacting with the chain

    Since we are using docker images, we can interact with the chain by entering the docker container.

    You can see the docker containers running with the wordle chain and the local DA node by running the following command:

    bash
    docker ps

    You should see output like the following:

    bash
    CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS         PORTS                      NAMES
    +86f9bfa5b6d2   wordle            "rollkit start --rol…"   7 minutes ago    Up 3 seconds                              wordle
    +67a2c3058e01   local-sequencer   "local-sequencer -li…"   11 minutes ago   Up 3 seconds   0.0.0.0:50051->50051/tcp   local-sequencer
    +dae3359665f8   local-da          "local-da -listen-all"   2 hours ago      Up 3 seconds   0.0.0.0:7980->7980/tcp     local-da

    We can see the wordle chain running in container wordle and the local DA network running in container local-da.

    Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it wordle sh

    Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the Wordle tutorial.

    Once you are done interacting with your chain, you can exit out of your docker container with:

    bash
    exit

    Then you can shut down your chain environment by running CRTL+C in your terminal.

    🎉 Next steps

    Congratulations again! You now know how to run your chain with docker compose and interact with it using the Rollkit CLI in the docker container.

    `,21))]))}});export{P as __pageData,I as default}; diff --git a/pr-528/assets/tutorials_execution_artela-evm-plus-plus.md.COcivXff.js b/pr-528/assets/tutorials_execution_artela-evm-plus-plus.md.COcivXff.js new file mode 100644 index 000000000..98535d3be --- /dev/null +++ b/pr-528/assets/tutorials_execution_artela-evm-plus-plus.md.COcivXff.js @@ -0,0 +1,9 @@ +import{C as s}from"./chunks/callout.CtmRa3nB.js";import{E as a}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as l,j as i,a as n,G as t,a3 as o,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const h="/docs-preview/pr-528/artela-evm-rollkit/artela-evm-rollkit.png",p={class:"tip custom-block"},k={class:"warning custom-block"},b=JSON.parse('{"title":"Quick Start Guide for Artela EVM++ with Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Quick Start Guide for Artela EVM++ with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/artela-evm-plus-plus.md","filePath":"tutorials/execution/artela-evm-plus-plus.md","lastUpdated":1733420866000}'),d={name:"tutorials/execution/artela-evm-plus-plus.md"},C=Object.assign(d,{setup(c){return(u,e)=>(r(),l("div",null,[e[2]||(e[2]=i("h1",{id:"quick-start-guide-for-artela-evm-with-rollkit",tabindex:"-1"},[n("Quick Start Guide for Artela EVM++ with Rollkit "),i("a",{class:"header-anchor",href:"#quick-start-guide-for-artela-evm-with-rollkit","aria-label":'Permalink to "Quick Start Guide for Artela EVM++ with Rollkit"'},"​")],-1)),i("div",p,[e[0]||(e[0]=i("p",{class:"custom-block-title"},"TIP",-1)),t(s)]),i("div",k,[e[1]||(e[1]=i("p",{class:"custom-block-title"},"WARNING",-1)),t(a)]),e[3]||(e[3]=o('

    This guide will assist you to quickly set up a rollup node with Artela EVM++ execution layer using Rollkit and local-DA.

    artela-evm-rollkit

    EVM++ is a modular dual-VM execution layer that supports the dynamic creation of native extension modules for blockchain at runtime. It enables developers to leverage WasmVM to build native extensions that co-process with EVM, offering enhanced customization capabilities. More than just a dual-VM setup, these native extensions facilitate blockchain-level customization. They allow for the integration of custom logic throughout the transaction lifecycle, providing access to an expanded runtime context.

    📦 Clone the Artela Rollkit Repository

    Start by cloning the Artela Rollkit repository:

    bash
    git clone https://github.com/artela-network/artela-rollkit.git
    +cd artela-rollkit

    🛥️ Run with Docker Compose

    Ensure Docker is installed on your system before setting up the Artela rollup node. If not already installed, download and follow the setup instructions available here.

    TIP

    Make sure you meet these prerequisites of enabling host network mode in Docker.

    After installing Docker, run the following command to start a local development node:

    bash
    docker compose up -d

    This command launches the Artela rollup node with Rollkit and local-DA. To monitor the logs, use this command:

    bash
    docker logs artroll -f

    If you observe the following output, the local development node is running properly:

    bash
    ...
    +7:09AM INF finalized block block_app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager num_txs_res=0 num_val_updates=0
    +7:09AM INF executed block app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager
    +7:09AM INF indexed block events height=3 module=txindex
    +7:09AM INF Creating and publishing block height=4 module=BlockManager
    +...

    🔑 Get prefunded test accounts

    Access testing accounts by entering the artroll Docker container:

    bash
    docker exec -ti artroll /bin/bash

    Retrieve the address and private key of testing accounts using:

    bash
    # 👇 Alternatively, you can use myKey2.info, myKey3.info, myKey4.info
    +./entrypoint keyinfo --file ~/.artroll/keyring-test/mykey.info --passwd test

    This will display the testing private key and its address:

    bash
    private key: { Plain Private Key in Hex Format }
    +address: { Address Associated with the Private Key }

    There are four testing accounts available in the local development node for interacting with the EVM chain.

    ⚙️ Configuring the Node

    You can modify runtime parameters of the Artela development node by adjusting its configuration files. Follow the steps below to make these changes.

    To configure the development node, first access the Docker container by running the following command:

    bash
    docker exec -it artroll /bin/bash

    Inside the container, you will need to modify the following configuration files:

    • /root/.artroll/config/app.toml
    • /root/.artroll/config/config.toml

    After making the necessary changes, return to the Docker host and restart the container to apply the new configuration:

    bash
    docker compose restart artroll

    🧪 Build on EVM++

    Let’s dive into Artela EVM++ by kicking off with the Hello World project, the following code will guide you through the essentials:

    👉 Contract interaction tutorial: Get hands-on experience with deploying and interacting with smart contracts on the Artela rollup node.

    TIP

    When you are following the Contract interaction tutorial, you need to make the following replacements:

    1. Use https://github.com/artela-network/gm-portal.git instead of the original gm-portal repo.
    2. Use the private key you obtained from the previous step in this tutorial instead of the one used in the Contract interaction tutorial.
    3. The contract address should be 0x9fcEbD70654D360b41ccD123dADAAad6ce13C788 instead of the one starts with 0x18D....

    👉 Quick Start for Aspect on EVM++: Try your first Aspect with Artela rollup node.

    TIP

    Please note that when you are following the Aspect on EVM++ tutorial, you need to make the following replacements:

    1. Replace npm install -g @artela/aspect-tool with npm install -g @artela-next/aspect-tool
    2. Replace the Artela Testnet node URL in project.config.json with http://localhost:8545 to connect to your local rollup node.
    3. Use the private key you obtained from the previous step in this tutorial instead of creating a new account.

    By now, we assume that you:

    • Have a basic understanding of Artela technology.
    • Have installed and played with Artela development tools.
    • Understand how Aspect functions and its impact on making dApps distinct and superior.
    • May already have numerous innovative ideas for building on Artela.

    📖 More to know

    If you want to gain a deeper understanding of Aspect’s capabilities and limitations to fully grasp how it can enhance or constrain your project, make sure not to overlook these essential concepts:

    💥 Build with examples

    Our community has built numbers of projects with Aspect, you can refer to these projects and modify them to learn how to use Aspect more effectively.

    Simple examples that use the basic functionalities of Aspect:

    Real-world use cases that show how to build more complex projects with Aspect:

    🛑 Stopping the Node

    To cease operations and shutdown the Artela rollup node, use:

    bash
    docker compose down

    This command halts all running containers and clears the environment.

    🎉 Conclusion

    Congratulations! You have successfully learnt some basic knowledge of EVM++ and have set up an Artela EVM++ rollup using Rollkit and local-DA. This setup enables you to test the integrated capabilities of Artela’s EVM++ with Rollkit.

    `,54))]))}});export{b as __pageData,C as default}; diff --git a/pr-528/assets/tutorials_execution_artela-evm-plus-plus.md.COcivXff.lean.js b/pr-528/assets/tutorials_execution_artela-evm-plus-plus.md.COcivXff.lean.js new file mode 100644 index 000000000..98535d3be --- /dev/null +++ b/pr-528/assets/tutorials_execution_artela-evm-plus-plus.md.COcivXff.lean.js @@ -0,0 +1,9 @@ +import{C as s}from"./chunks/callout.CtmRa3nB.js";import{E as a}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as l,j as i,a as n,G as t,a3 as o,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const h="/docs-preview/pr-528/artela-evm-rollkit/artela-evm-rollkit.png",p={class:"tip custom-block"},k={class:"warning custom-block"},b=JSON.parse('{"title":"Quick Start Guide for Artela EVM++ with Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Quick Start Guide for Artela EVM++ with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/artela-evm-plus-plus.md","filePath":"tutorials/execution/artela-evm-plus-plus.md","lastUpdated":1733420866000}'),d={name:"tutorials/execution/artela-evm-plus-plus.md"},C=Object.assign(d,{setup(c){return(u,e)=>(r(),l("div",null,[e[2]||(e[2]=i("h1",{id:"quick-start-guide-for-artela-evm-with-rollkit",tabindex:"-1"},[n("Quick Start Guide for Artela EVM++ with Rollkit "),i("a",{class:"header-anchor",href:"#quick-start-guide-for-artela-evm-with-rollkit","aria-label":'Permalink to "Quick Start Guide for Artela EVM++ with Rollkit"'},"​")],-1)),i("div",p,[e[0]||(e[0]=i("p",{class:"custom-block-title"},"TIP",-1)),t(s)]),i("div",k,[e[1]||(e[1]=i("p",{class:"custom-block-title"},"WARNING",-1)),t(a)]),e[3]||(e[3]=o('

    This guide will assist you to quickly set up a rollup node with Artela EVM++ execution layer using Rollkit and local-DA.

    artela-evm-rollkit

    EVM++ is a modular dual-VM execution layer that supports the dynamic creation of native extension modules for blockchain at runtime. It enables developers to leverage WasmVM to build native extensions that co-process with EVM, offering enhanced customization capabilities. More than just a dual-VM setup, these native extensions facilitate blockchain-level customization. They allow for the integration of custom logic throughout the transaction lifecycle, providing access to an expanded runtime context.

    📦 Clone the Artela Rollkit Repository

    Start by cloning the Artela Rollkit repository:

    bash
    git clone https://github.com/artela-network/artela-rollkit.git
    +cd artela-rollkit

    🛥️ Run with Docker Compose

    Ensure Docker is installed on your system before setting up the Artela rollup node. If not already installed, download and follow the setup instructions available here.

    TIP

    Make sure you meet these prerequisites of enabling host network mode in Docker.

    After installing Docker, run the following command to start a local development node:

    bash
    docker compose up -d

    This command launches the Artela rollup node with Rollkit and local-DA. To monitor the logs, use this command:

    bash
    docker logs artroll -f

    If you observe the following output, the local development node is running properly:

    bash
    ...
    +7:09AM INF finalized block block_app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager num_txs_res=0 num_val_updates=0
    +7:09AM INF executed block app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager
    +7:09AM INF indexed block events height=3 module=txindex
    +7:09AM INF Creating and publishing block height=4 module=BlockManager
    +...

    🔑 Get prefunded test accounts

    Access testing accounts by entering the artroll Docker container:

    bash
    docker exec -ti artroll /bin/bash

    Retrieve the address and private key of testing accounts using:

    bash
    # 👇 Alternatively, you can use myKey2.info, myKey3.info, myKey4.info
    +./entrypoint keyinfo --file ~/.artroll/keyring-test/mykey.info --passwd test

    This will display the testing private key and its address:

    bash
    private key: { Plain Private Key in Hex Format }
    +address: { Address Associated with the Private Key }

    There are four testing accounts available in the local development node for interacting with the EVM chain.

    ⚙️ Configuring the Node

    You can modify runtime parameters of the Artela development node by adjusting its configuration files. Follow the steps below to make these changes.

    To configure the development node, first access the Docker container by running the following command:

    bash
    docker exec -it artroll /bin/bash

    Inside the container, you will need to modify the following configuration files:

    • /root/.artroll/config/app.toml
    • /root/.artroll/config/config.toml

    After making the necessary changes, return to the Docker host and restart the container to apply the new configuration:

    bash
    docker compose restart artroll

    🧪 Build on EVM++

    Let’s dive into Artela EVM++ by kicking off with the Hello World project, the following code will guide you through the essentials:

    👉 Contract interaction tutorial: Get hands-on experience with deploying and interacting with smart contracts on the Artela rollup node.

    TIP

    When you are following the Contract interaction tutorial, you need to make the following replacements:

    1. Use https://github.com/artela-network/gm-portal.git instead of the original gm-portal repo.
    2. Use the private key you obtained from the previous step in this tutorial instead of the one used in the Contract interaction tutorial.
    3. The contract address should be 0x9fcEbD70654D360b41ccD123dADAAad6ce13C788 instead of the one starts with 0x18D....

    👉 Quick Start for Aspect on EVM++: Try your first Aspect with Artela rollup node.

    TIP

    Please note that when you are following the Aspect on EVM++ tutorial, you need to make the following replacements:

    1. Replace npm install -g @artela/aspect-tool with npm install -g @artela-next/aspect-tool
    2. Replace the Artela Testnet node URL in project.config.json with http://localhost:8545 to connect to your local rollup node.
    3. Use the private key you obtained from the previous step in this tutorial instead of creating a new account.

    By now, we assume that you:

    • Have a basic understanding of Artela technology.
    • Have installed and played with Artela development tools.
    • Understand how Aspect functions and its impact on making dApps distinct and superior.
    • May already have numerous innovative ideas for building on Artela.

    📖 More to know

    If you want to gain a deeper understanding of Aspect’s capabilities and limitations to fully grasp how it can enhance or constrain your project, make sure not to overlook these essential concepts:

    💥 Build with examples

    Our community has built numbers of projects with Aspect, you can refer to these projects and modify them to learn how to use Aspect more effectively.

    Simple examples that use the basic functionalities of Aspect:

    Real-world use cases that show how to build more complex projects with Aspect:

    🛑 Stopping the Node

    To cease operations and shutdown the Artela rollup node, use:

    bash
    docker compose down

    This command halts all running containers and clears the environment.

    🎉 Conclusion

    Congratulations! You have successfully learnt some basic knowledge of EVM++ and have set up an Artela EVM++ rollup using Rollkit and local-DA. This setup enables you to test the integrated capabilities of Artela’s EVM++ with Rollkit.

    `,54))]))}});export{b as __pageData,C as default}; diff --git a/pr-528/assets/tutorials_execution_beaconkit.md.SR_e-FYk.js b/pr-528/assets/tutorials_execution_beaconkit.md.SR_e-FYk.js new file mode 100644 index 000000000..c9006e40d --- /dev/null +++ b/pr-528/assets/tutorials_execution_beaconkit.md.SR_e-FYk.js @@ -0,0 +1,39 @@ +import{C as n}from"./chunks/callout.CtmRa3nB.js";import{E as h}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as l,j as s,a as k,G as t,a3 as a,t as p,k as F,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const d={class:"tip custom-block"},o={class:"warning custom-block"},g={class:"language-bash vp-adaptive-theme"},c={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},y={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},_=JSON.parse('{"title":"Building a Sovereign Rollup with BeaconKit and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Building a Sovereign Rollup with BeaconKit and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/beaconkit.md","filePath":"tutorials/execution/beaconkit.md","lastUpdated":1733420866000}'),B={name:"tutorials/execution/beaconkit.md"},q=Object.assign(B,{setup(E){return(u,i)=>(r(),l("div",null,[i[5]||(i[5]=s("h1",{id:"building-a-sovereign-rollup-with-beaconkit-and-rollkit",tabindex:"-1"},[k("Building a Sovereign Rollup with BeaconKit and Rollkit "),s("a",{class:"header-anchor",href:"#building-a-sovereign-rollup-with-beaconkit-and-rollkit","aria-label":'Permalink to "Building a Sovereign Rollup with BeaconKit and Rollkit"'},"​")],-1)),s("div",d,[i[0]||(i[0]=s("p",{class:"custom-block-title"},"TIP",-1)),t(n)]),s("div",o,[i[1]||(i[1]=s("p",{class:"custom-block-title"},"WARNING",-1)),t(h)]),i[6]||(i[6]=a('

    beaconkit

    Introduction

    This tutorial guides developers through the process of building and running a sovereign rollup using BeaconKit and Rollkit. BeaconKit is a modular framework for building EVM-based consensus clients, while Rollkit is a modular framework for building sovereign rollups. By combining these tools, you can create your own customizable rollup chain using the Ethereum Virtual Machine (EVM).

    Prerequisites

    Before you begin, ensure you have the following software installed on your machine:

    Rollkit

    Rollkit is a modular framework for sovereign rollups. Follow our Quick Start Guide to walk through the installation process. The installation script will install the Rollkit CLI, Golang, and jq if they are not already present on your machine.

    Docker

    Docker is essential for running containerized applications. Follow the provided link to install Docker on your system.

    Run a local Data Availability (DA) node

    First, set up a local data availability network node:

    ',11)),s("div",g,[i[3]||(i[3]=s("button",{title:"Copy Code",class:"copy"},null,-1)),i[4]||(i[4]=s("span",{class:"lang"},"bash",-1)),s("pre",c,[s("code",null,[s("span",C,[i[2]||(i[2]=a('cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s',8)),s("span",y," "+p(F(e).localDALatestTag),1)])])])]),i[7]||(i[7]=a(`

    This script builds and runs a DA node, which will listen on port 7980.

    Clone the BeaconKit repository

    Clone the BeaconKit repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +git clone -b rollkit https://github.com/rollkit/beacon-kit.git
    +cd beacon-kit && git checkout rollkit

    Start the Go Ethereum (Geth) client

    Start local ephemeral Go Ethereum client to provide the execution layer:

    bash
    cd $HOME/beacon-kit
    +make start-geth

    Notice within logs indicating that your Geth client is running the RPC server is listening on port 8545. You will need that port to deploy and interact with smart contracts on the BeaconKit EVM.

    Build and run the BeaconKit node

    Open a new terminal and run:

    bash
    cd $HOME/beacon-kit
    +make start

    This command builds, configures, and starts an ephemeral beacond node as a Rollkit sequencer.

    You should now see output indicating that your Rollkit node is running, with log messages about creating and publishing blocks, computing state roots, and other node activities:

    bash
    ...
    +11:45AM INF indexed block events height=39 module=txindex
    +11:45AM INF Creating and publishing block height=40 module=BlockManager
    +11:45AM INF requesting beacon block assembly 🙈 module=server service=validator slot=40
    +11:45AM INF payload retrieved from local builder 🏗️  for_slot=40 module=server num_blobs=0 override_builder=false parent_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 service=payload-builder
    +11:45AM INF computing state root for block 🌲 module=server service=validator slot=40
    +11:45AM INF state root computed for block 💻  module=server service=validator slot=40 state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF beacon block successfully built 🛠️  duration=46.93036ms module=server service=validator slot=40 state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF received proposal with beacon_block=true blob_sidecars=true module=baseapp service=prepare-proposal
    +11:45AM INF no blob sidecars to verify, skipping verifier 🧢 module=server service=blockchain slot=0x28
    +11:45AM INF received proposal with beacon_block=true blob_sidecars=true module=baseapp service=prepare-proposal
    +11:45AM INF no blob sidecars to verify, skipping verifier 🧢 module=server service=blockchain slot=0x28
    +11:45AM INF received incoming beacon block 📫 module=server service=blockchain state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF calling new payload is_optimistic=false module=server payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 payload_parent_block_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF state root verification succeeded - accepting incoming beacon block 🏎️ module=server service=blockchain state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF optimistically triggering payload build for next slot 🛩️  module=server next_slot=41 service=blockchain
    +11:45AM INF notifying forkchoice update  finalized_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 has_attributes=true head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server safe_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM WRN suggested fee recipient is not configured 🔆 fee-recipent="0x000000...000000 (20B)" module=server service=engine.client
    +11:45AM INF calling new payload is_optimistic=true module=server payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 payload_parent_block_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF bob the builder; can we forkchoice update it?; bob the builder; yes we can 🚧 for_slot=41 head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server parent_block_root=0x9676648a3c292540562b082c20c4b6663986182f5d8733f84fb3f1445b66a4ce payload_id=0x03bc2b46dc4bef55 service=payload-builder
    +11:45AM INF finalized block block_app_hash=004216246AE7750D578035EA1C6CD13330BD91A0C3FDD628F96D514ACF691BE5 height=40 module=BlockManager num_txs_res=2 num_val_updates=0
    +11:45AM INF executed block app_hash=004216246AE7750D578035EA1C6CD13330BD91A0C3FDD628F96D514ACF691BE5 height=40 module=BlockManager
    +11:45AM INF notifying forkchoice update  finalized_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 has_attributes=false head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server safe_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF indexed block events height=40 module=txindex
    +11:45AM INF successfully refreshed engine auth token module=server service=engine.client
    +11:45AM INF Creating and publishing block height=41 module=BlockManager
    +...

    Smart Contract Deployment and Interaction

    To deploy and interact with smart contracts on the BeaconKit EVM, you can use the tools you are already familiar with, follow our Contract interaction tutorial to get a hands on experience.

    To fund your account with some tokens, modify a Geth genesis file and restart the Geth client: Open $HOME/beacon-kit/testing/files/eth-genesis.json, and add your account address and balance:

    bash
    "nonce": "0x0000000000000000",
    +"timestamp": "0x0",
    +"alloc": {
    +  "<your address>": { // [!code focus]
    +    "balance": "0x12345000000000000000000" // [!code focus]
    +  }, // [!code focus]
    +  "0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4": {
    +    "balance": "0x123450000000000000000"
    +  },

    Conclusion

    Congratulations! You've successfully set up a BeaconKit node using Rollkit, creating your own sovereign rollup. This setup demonstrates the basic functionality of combining BeaconKit with Rollkit.

    Next Steps

    To further customize your rollup chain:

    1. Experiment with different Rollkit settings to optimize performance.
    2. Consider implementing custom smart contracts on your rollup.
    3. Test the scalability and performance of your rollup under various conditions.

    Troubleshooting

    If you encounter issues:

    • Ensure all prerequisites are correctly installed and up to date.
    • Check that your local DA node is running correctly on port 7980.
    • Verify that the Geth client is properly initialized and running.
    • Review the BeaconKit logs for any specific error messages.

    For more detailed information and updates, visit the BeaconKit GitHub repository and the Rollkit documentation.

    `,27))]))}});export{_ as __pageData,q as default}; diff --git a/pr-528/assets/tutorials_execution_beaconkit.md.SR_e-FYk.lean.js b/pr-528/assets/tutorials_execution_beaconkit.md.SR_e-FYk.lean.js new file mode 100644 index 000000000..c9006e40d --- /dev/null +++ b/pr-528/assets/tutorials_execution_beaconkit.md.SR_e-FYk.lean.js @@ -0,0 +1,39 @@ +import{C as n}from"./chunks/callout.CtmRa3nB.js";import{E as h}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as l,j as s,a as k,G as t,a3 as a,t as p,k as F,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const d={class:"tip custom-block"},o={class:"warning custom-block"},g={class:"language-bash vp-adaptive-theme"},c={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},y={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},_=JSON.parse('{"title":"Building a Sovereign Rollup with BeaconKit and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Building a Sovereign Rollup with BeaconKit and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/beaconkit.md","filePath":"tutorials/execution/beaconkit.md","lastUpdated":1733420866000}'),B={name:"tutorials/execution/beaconkit.md"},q=Object.assign(B,{setup(E){return(u,i)=>(r(),l("div",null,[i[5]||(i[5]=s("h1",{id:"building-a-sovereign-rollup-with-beaconkit-and-rollkit",tabindex:"-1"},[k("Building a Sovereign Rollup with BeaconKit and Rollkit "),s("a",{class:"header-anchor",href:"#building-a-sovereign-rollup-with-beaconkit-and-rollkit","aria-label":'Permalink to "Building a Sovereign Rollup with BeaconKit and Rollkit"'},"​")],-1)),s("div",d,[i[0]||(i[0]=s("p",{class:"custom-block-title"},"TIP",-1)),t(n)]),s("div",o,[i[1]||(i[1]=s("p",{class:"custom-block-title"},"WARNING",-1)),t(h)]),i[6]||(i[6]=a('

    beaconkit

    Introduction

    This tutorial guides developers through the process of building and running a sovereign rollup using BeaconKit and Rollkit. BeaconKit is a modular framework for building EVM-based consensus clients, while Rollkit is a modular framework for building sovereign rollups. By combining these tools, you can create your own customizable rollup chain using the Ethereum Virtual Machine (EVM).

    Prerequisites

    Before you begin, ensure you have the following software installed on your machine:

    Rollkit

    Rollkit is a modular framework for sovereign rollups. Follow our Quick Start Guide to walk through the installation process. The installation script will install the Rollkit CLI, Golang, and jq if they are not already present on your machine.

    Docker

    Docker is essential for running containerized applications. Follow the provided link to install Docker on your system.

    Run a local Data Availability (DA) node

    First, set up a local data availability network node:

    ',11)),s("div",g,[i[3]||(i[3]=s("button",{title:"Copy Code",class:"copy"},null,-1)),i[4]||(i[4]=s("span",{class:"lang"},"bash",-1)),s("pre",c,[s("code",null,[s("span",C,[i[2]||(i[2]=a('cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s',8)),s("span",y," "+p(F(e).localDALatestTag),1)])])])]),i[7]||(i[7]=a(`

    This script builds and runs a DA node, which will listen on port 7980.

    Clone the BeaconKit repository

    Clone the BeaconKit repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +git clone -b rollkit https://github.com/rollkit/beacon-kit.git
    +cd beacon-kit && git checkout rollkit

    Start the Go Ethereum (Geth) client

    Start local ephemeral Go Ethereum client to provide the execution layer:

    bash
    cd $HOME/beacon-kit
    +make start-geth

    Notice within logs indicating that your Geth client is running the RPC server is listening on port 8545. You will need that port to deploy and interact with smart contracts on the BeaconKit EVM.

    Build and run the BeaconKit node

    Open a new terminal and run:

    bash
    cd $HOME/beacon-kit
    +make start

    This command builds, configures, and starts an ephemeral beacond node as a Rollkit sequencer.

    You should now see output indicating that your Rollkit node is running, with log messages about creating and publishing blocks, computing state roots, and other node activities:

    bash
    ...
    +11:45AM INF indexed block events height=39 module=txindex
    +11:45AM INF Creating and publishing block height=40 module=BlockManager
    +11:45AM INF requesting beacon block assembly 🙈 module=server service=validator slot=40
    +11:45AM INF payload retrieved from local builder 🏗️  for_slot=40 module=server num_blobs=0 override_builder=false parent_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 service=payload-builder
    +11:45AM INF computing state root for block 🌲 module=server service=validator slot=40
    +11:45AM INF state root computed for block 💻  module=server service=validator slot=40 state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF beacon block successfully built 🛠️  duration=46.93036ms module=server service=validator slot=40 state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF received proposal with beacon_block=true blob_sidecars=true module=baseapp service=prepare-proposal
    +11:45AM INF no blob sidecars to verify, skipping verifier 🧢 module=server service=blockchain slot=0x28
    +11:45AM INF received proposal with beacon_block=true blob_sidecars=true module=baseapp service=prepare-proposal
    +11:45AM INF no blob sidecars to verify, skipping verifier 🧢 module=server service=blockchain slot=0x28
    +11:45AM INF received incoming beacon block 📫 module=server service=blockchain state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF calling new payload is_optimistic=false module=server payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 payload_parent_block_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF state root verification succeeded - accepting incoming beacon block 🏎️ module=server service=blockchain state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF optimistically triggering payload build for next slot 🛩️  module=server next_slot=41 service=blockchain
    +11:45AM INF notifying forkchoice update  finalized_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 has_attributes=true head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server safe_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM WRN suggested fee recipient is not configured 🔆 fee-recipent="0x000000...000000 (20B)" module=server service=engine.client
    +11:45AM INF calling new payload is_optimistic=true module=server payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 payload_parent_block_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF bob the builder; can we forkchoice update it?; bob the builder; yes we can 🚧 for_slot=41 head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server parent_block_root=0x9676648a3c292540562b082c20c4b6663986182f5d8733f84fb3f1445b66a4ce payload_id=0x03bc2b46dc4bef55 service=payload-builder
    +11:45AM INF finalized block block_app_hash=004216246AE7750D578035EA1C6CD13330BD91A0C3FDD628F96D514ACF691BE5 height=40 module=BlockManager num_txs_res=2 num_val_updates=0
    +11:45AM INF executed block app_hash=004216246AE7750D578035EA1C6CD13330BD91A0C3FDD628F96D514ACF691BE5 height=40 module=BlockManager
    +11:45AM INF notifying forkchoice update  finalized_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 has_attributes=false head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server safe_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF indexed block events height=40 module=txindex
    +11:45AM INF successfully refreshed engine auth token module=server service=engine.client
    +11:45AM INF Creating and publishing block height=41 module=BlockManager
    +...

    Smart Contract Deployment and Interaction

    To deploy and interact with smart contracts on the BeaconKit EVM, you can use the tools you are already familiar with, follow our Contract interaction tutorial to get a hands on experience.

    To fund your account with some tokens, modify a Geth genesis file and restart the Geth client: Open $HOME/beacon-kit/testing/files/eth-genesis.json, and add your account address and balance:

    bash
    "nonce": "0x0000000000000000",
    +"timestamp": "0x0",
    +"alloc": {
    +  "<your address>": { // [!code focus]
    +    "balance": "0x12345000000000000000000" // [!code focus]
    +  }, // [!code focus]
    +  "0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4": {
    +    "balance": "0x123450000000000000000"
    +  },

    Conclusion

    Congratulations! You've successfully set up a BeaconKit node using Rollkit, creating your own sovereign rollup. This setup demonstrates the basic functionality of combining BeaconKit with Rollkit.

    Next Steps

    To further customize your rollup chain:

    1. Experiment with different Rollkit settings to optimize performance.
    2. Consider implementing custom smart contracts on your rollup.
    3. Test the scalability and performance of your rollup under various conditions.

    Troubleshooting

    If you encounter issues:

    • Ensure all prerequisites are correctly installed and up to date.
    • Check that your local DA node is running correctly on port 7980.
    • Verify that the Geth client is properly initialized and running.
    • Review the BeaconKit logs for any specific error messages.

    For more detailed information and updates, visit the BeaconKit GitHub repository and the Rollkit documentation.

    `,27))]))}});export{_ as __pageData,q as default}; diff --git a/pr-528/assets/tutorials_execution_cosmwasm.md.B988wSVS.js b/pr-528/assets/tutorials_execution_cosmwasm.md.B988wSVS.js new file mode 100644 index 000000000..84e260c62 --- /dev/null +++ b/pr-528/assets/tutorials_execution_cosmwasm.md.B988wSVS.js @@ -0,0 +1,100 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as n}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as h,j as i,a as k,G as a,a3 as l,o as p}from"./chunks/framework.B8-VHxRu.js";/* empty css */const e={class:"tip custom-block"},F={class:"warning custom-block"},E=JSON.parse('{"title":"🗞️ CosmWasm rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ CosmWasm rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/cosmwasm.md","filePath":"tutorials/execution/cosmwasm.md","lastUpdated":1733420866000}'),r={name:"tutorials/execution/cosmwasm.md"},B=Object.assign(r,{setup(d){return(o,s)=>(p(),h("div",null,[s[2]||(s[2]=i("h1",{id:"🗞️-cosmwasm-rollup",tabindex:"-1"},[k("🗞️ CosmWasm rollup "),i("a",{class:"header-anchor",href:"#🗞️-cosmwasm-rollup","aria-label":'Permalink to "🗞️ CosmWasm rollup"'},"​")],-1)),i("div",e,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),a(t)]),i("div",F,[s[1]||(s[1]=i("p",{class:"custom-block-title"},"WARNING",-1)),a(n)]),s[3]||(s[3]=l(`

    CosmWasm is a smart contracting platform built for the Cosmos ecosystem by making use of WebAssembly (Wasm) to build smart contracts for Cosmos-SDK. In this tutorial, we will be exploring how to integrate CosmWasm with local DA layer using Rollkit.

    The smart contract we will use for this tutorial is one provided by the CosmWasm team for Nameservice purchasing.

    You can check out the contract here.

    How to write the Rust smart contract for Nameservice is outside the scope of this tutorial.

    💻 CosmWasm dependency

    As with the GM Rollup, we use kurtosis to help with managing all the services we need to run. You can install kurtosis here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   0.90.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🚀 Starting your rollup

    Now that we have kurtosis installed, we can launch our CosmWasm rollup along with the local DA by running the following command:

    bash
    kurtosis run github.com/rollkit/cosmwasm@v0.2.0

    You should see an output like this:

    bash
    INFO[2024-07-02T11:15:43-04:00] Creating a new enclave for Starlark to run inside...
    +INFO[2024-07-11T11:53:13-04:00] Enclave 'forgotten-fen' created successfully 
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/local-da:v0.2.1 - remotely downloaded
    +> ghcr.io/rollkit/cosmwasm:v0.1.0 - remotely downloaded
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '96d04bc472c9455d88d046128fbdefa6'
    +
    +Printing a message
    +connecting to da layer via http://172.16.0.5:7980
    +
    +Printing a message
    +Adding CosmWasm service
    +
    +Adding service with name 'wasm' and image 'ghcr.io/rollkit/cosmwasm:3b5a25b'
    +Service 'wasm' added with service UUID 'c71b0308616d40ad919ad24c3d14f35b'
    +
    +Printing a message
    +CosmWasm service is available at http://172.16.0.6:36657
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-11T11:53:27-04:00] ====================================================== 
    +INFO[2024-07-11T11:53:27-04:00] ||          Created enclave: forgotten-fen          || 
    +INFO[2024-07-11T11:53:27-04:00] ====================================================== 
    +Name:            forgotten-fen
    +UUID:            8cd936e91ada
    +Status:          RUNNING
    +Creation Time:   Thu, 11 Jul 2024 11:53:00 EDT
    +Flags:           
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                            Status
    +96d04bc472c9   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980       RUNNING
    +c71b0308616d   wasm       grpc-addr: 9290/tcp -> http://127.0.0.1:9290     RUNNING
    +                          p2p-laddr: 36656/tcp -> http://127.0.0.1:36656   
    +                          rpc-laddr: 36657/tcp -> http://127.0.0.1:36657

    Kurtosis has successfully launched the CosmWasm rollup and the local DA network. You can see the services running in docker as well:

    bash
    docker ps
    bash
    CONTAINER ID   IMAGE                              COMMAND                  CREATED              STATUS              PORTS                                                                              NAMES
    +5bfeda0a871f   ghcr.io/rollkit/cosmwasm:v0.1.0    "/bin/sh -c 'wasmd s…"   About a minute ago   Up About a minute   0.0.0.0:9290->9290/tcp, 0.0.0.0:36656-36657->36656-36657/tcp                       wasm--c71b0308616d40ad919ad24c3d14f35b
    +782dec73fcf8   ghcr.io/rollkit/local-da:v0.2.1    "local-da -listen-all"   About a minute ago   Up About a minute   0.0.0.0:7980->7980/tcp                                                             local-da--96d04bc472c9455d88d046128fbdefa6
    +62da89015918   kurtosistech/core:0.90.1           "/bin/sh -c ./api-co…"   About a minute ago   Up About a minute   0.0.0.0:55500->7443/tcp                                                            kurtosis-api--8cd936e91ada45beab50f0d19be8c57f
    +1eb6366a5e16   fluent/fluent-bit:1.9.7            "/fluent-bit/bin/flu…"   About a minute ago   Up About a minute   2020/tcp                                                                           kurtosis-logs-collector--8cd936e91ada45beab50f0d19be8c57f
    +8bfee95b49ee   kurtosistech/engine:0.90.1         "/bin/sh -c ./kurtos…"   39 minutes ago       Up 39 minutes       0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--cee974a1c2b141478c9eb2a9b1e4f87f
    +d532fc82579f   traefik:2.10.6                     "/bin/sh -c 'mkdir -…"   39 minutes ago       Up 39 minutes       80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--cee974a1c2b141478c9eb2a9b1e4f87f
    +7700c0b72195   timberio/vector:0.31.0-debian      "/bin/sh -c 'printf …"   39 minutes ago       Up 39 minutes                                                                                          kurtosis-logs-aggregator

    We can see the CosmWasm rollup running in container wasm--c71b0308616d40ad919ad24c3d14f35b and the local DA network running in container local-da--96d04bc472c9455d88d046128fbdefa6.

    Let's hold on to the container name for the CosmWasm rollup, as we will need it later.

    bash
    CW=$(docker ps --format '{{.Names}}' | grep wasm)
    +echo $CW

    You can verify the rollup is running by checking the logs:

    bash
    docker logs $CW
    bash
    ...
    +3:55PM INF Creating and publishing block height=137 module=BlockManager
    +3:55PM INF finalized block block_app_hash=E71622A57B08D28613A34E3D7AD36BF294CF5A88F4CDD5DD18E6FB65C76F7209 height=137 module=BlockManager num_txs_res=0 num_val_updates=0
    +3:55PM INF executed block app_hash=E71622A57B08D28613A34E3D7AD36BF294CF5A88F4CDD5DD18E6FB65C76F7209 height=137 module=BlockManager
    +3:55PM INF indexed block events height=137 module=txindex
    +3:55PM INF Creating and publishing block height=138 module=BlockManager
    +3:55PM INF finalized block block_app_hash=E09F4A71E216D85F4CCB9FCBCEE53D82BCA597451C1D4B4FCE0E4081B5FA40E3 height=138 module=BlockManager num_txs_res=0 num_val_updates=0
    +3:55PM INF executed block app_hash=E09F4A71E216D85F4CCB9FCBCEE53D82BCA597451C1D4B4FCE0E4081B5FA40E3 height=138 module=BlockManager
    +...

    Good work so far, we have a Rollup node, DA network node, now we can move onto the contract deployment.

    📒 Contract deployment on CosmWasm with Rollkit

    🤖 Compile the smart contract

    To compile the smart contract, you can use our docker image.

    First download the image:

    bash
    docker pull ghcr.io/rollkit/contract:v0.2.0

    Then run the container:

    bash
    docker run --rm -d --name cw ghcr.io/rollkit/contract:v0.2.0

    The container is now running and has the pre-built nameservice contract for us. Let's copy it out of the container.

    bash
    docker cp cw:/root/cw-contracts/contracts/nameservice .

    We now have the nameservice contract in the nameservice directory.

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/nameservice directory you just copied:

    bash
    sudo docker run --rm -v "$(pwd)":/code \\
    +  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \\
    +  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \\
    +  cosmwasm/rust-optimizer:0.12.6

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    We will need to do this in the docker container that the CosmWasm rollup is running. So first let's move the compiled contract to the container:

    bash
    docker cp artifacts/cw_nameservice.wasm $CW:/root/cw_nameservice.wasm

    Now let's jump into the container:

    bash
    docker exec -it $CW sh

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    bash
    TX_HASH=$(wasmd tx wasm store cw_nameservice.wasm --from localwasm-key --keyring-backend test --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    🔎 Contract querying

    Now, let's query our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
    +echo $CODE_ID

    This will give us back the Code ID of the deployed contract.

    In our case, since it's the first contract deployed on our local network, the value is 1.

    Now, we can take a look at the contracts instantiated by this Code ID:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --node http://127.0.0.1:36657 --output json

    We get the following output:

    json
    {"contracts":[],"pagination":{"next_key":null,"total":"0"}}

    📃 Contract instantiation

    We start instantiating the contract by writing up the following INIT message for nameservice contract. Here, we are specifying that purchase_price of a name is 100uwasm and transfer_price is 999uwasm.

    bash
    INIT='{"purchase_price":{"amount":"100","denom":"uwasm"},"transfer_price":{"amount":"999","denom":"uwasm"}}'
    +wasmd tx wasm instantiate $CODE_ID "$INIT" --from localwasm-key --keyring-backend test --label "name service" --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 -y --no-admin --node http://127.0.0.1:36657

    📄 Contract interaction

    Now that we instantiated it, we can interact further with the contract:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657
    +CONTRACT=$(wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657 | jq -r '.contracts[-1]')
    +echo $CONTRACT
    +
    +wasmd query wasm contract --node http://127.0.0.1:36657 $CONTRACT
    +wasmd query bank balances --node http://127.0.0.1:36657 $CONTRACT

    This allows us to see the contract address, contract details, and bank balances.

    Your output will look similar to below:

    bash
    {"contracts":["wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d"],"pagination":{"next_key":null,"total":"0"}}
    +wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d
    +address: wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d
    +contract_info:
    +  admin: ""
    +  code_id: "1"
    +  created: null
    +  creator: wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z
    +  extension: null
    +  ibc_port_id: ""
    +  label: name service
    +balances: []
    +pagination:
    +  next_key: null
    +  total: "0"

    Now, let's register a name to the contract for our wallet address:

    bash
    REGISTER='{"register":{"name":"fred"}}'
    +wasmd tx wasm execute $CONTRACT "$REGISTER" --amount 100uwasm --from localwasm-key --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --keyring-backend test -y

    Your output will look similar to below:

    bash
    gas estimate: 167533
    +code: 0
    +codespace: ""
    +data: ""
    +events: []
    +gas_used: "0"
    +gas_wanted: "0"
    +height: "0"
    +info: ""
    +logs: []
    +raw_log: '[]'
    +timestamp: ""
    +tx: null
    +txhash: C147257485B72E7FFA5FDB943C94CE951A37817554339586FFD645AD2AA397C3

    If you try to register the same name again, you'll see an expected error:

    bash
    Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: Name has been taken (name fred): execute wasm contract failed [CosmWasm/wasmd/x/wasm/keeper/keeper.go:364] With gas wanted: '0' and gas used: '123809' : unknown request

    Next, query the owner of the name record:

    bash
    NAME_QUERY='{"resolve_record": {"name": "fred"}}'
    +wasmd query wasm contract-state smart $CONTRACT "$NAME_QUERY" --node http://127.0.0.1:36657 --output json

    You'll see the owner's address in a JSON response:

    bash
    {"data":{"address":"wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z"}}

    With that, we have instantiated and interacted with the CosmWasm nameservice smart contract on our local DA network using Rollkit!

    `,82))]))}});export{E as __pageData,B as default}; diff --git a/pr-528/assets/tutorials_execution_cosmwasm.md.B988wSVS.lean.js b/pr-528/assets/tutorials_execution_cosmwasm.md.B988wSVS.lean.js new file mode 100644 index 000000000..84e260c62 --- /dev/null +++ b/pr-528/assets/tutorials_execution_cosmwasm.md.B988wSVS.lean.js @@ -0,0 +1,100 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as n}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as h,j as i,a as k,G as a,a3 as l,o as p}from"./chunks/framework.B8-VHxRu.js";/* empty css */const e={class:"tip custom-block"},F={class:"warning custom-block"},E=JSON.parse('{"title":"🗞️ CosmWasm rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ CosmWasm rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/cosmwasm.md","filePath":"tutorials/execution/cosmwasm.md","lastUpdated":1733420866000}'),r={name:"tutorials/execution/cosmwasm.md"},B=Object.assign(r,{setup(d){return(o,s)=>(p(),h("div",null,[s[2]||(s[2]=i("h1",{id:"🗞️-cosmwasm-rollup",tabindex:"-1"},[k("🗞️ CosmWasm rollup "),i("a",{class:"header-anchor",href:"#🗞️-cosmwasm-rollup","aria-label":'Permalink to "🗞️ CosmWasm rollup"'},"​")],-1)),i("div",e,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),a(t)]),i("div",F,[s[1]||(s[1]=i("p",{class:"custom-block-title"},"WARNING",-1)),a(n)]),s[3]||(s[3]=l(`

    CosmWasm is a smart contracting platform built for the Cosmos ecosystem by making use of WebAssembly (Wasm) to build smart contracts for Cosmos-SDK. In this tutorial, we will be exploring how to integrate CosmWasm with local DA layer using Rollkit.

    The smart contract we will use for this tutorial is one provided by the CosmWasm team for Nameservice purchasing.

    You can check out the contract here.

    How to write the Rust smart contract for Nameservice is outside the scope of this tutorial.

    💻 CosmWasm dependency

    As with the GM Rollup, we use kurtosis to help with managing all the services we need to run. You can install kurtosis here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   0.90.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🚀 Starting your rollup

    Now that we have kurtosis installed, we can launch our CosmWasm rollup along with the local DA by running the following command:

    bash
    kurtosis run github.com/rollkit/cosmwasm@v0.2.0

    You should see an output like this:

    bash
    INFO[2024-07-02T11:15:43-04:00] Creating a new enclave for Starlark to run inside...
    +INFO[2024-07-11T11:53:13-04:00] Enclave 'forgotten-fen' created successfully 
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/local-da:v0.2.1 - remotely downloaded
    +> ghcr.io/rollkit/cosmwasm:v0.1.0 - remotely downloaded
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '96d04bc472c9455d88d046128fbdefa6'
    +
    +Printing a message
    +connecting to da layer via http://172.16.0.5:7980
    +
    +Printing a message
    +Adding CosmWasm service
    +
    +Adding service with name 'wasm' and image 'ghcr.io/rollkit/cosmwasm:3b5a25b'
    +Service 'wasm' added with service UUID 'c71b0308616d40ad919ad24c3d14f35b'
    +
    +Printing a message
    +CosmWasm service is available at http://172.16.0.6:36657
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-11T11:53:27-04:00] ====================================================== 
    +INFO[2024-07-11T11:53:27-04:00] ||          Created enclave: forgotten-fen          || 
    +INFO[2024-07-11T11:53:27-04:00] ====================================================== 
    +Name:            forgotten-fen
    +UUID:            8cd936e91ada
    +Status:          RUNNING
    +Creation Time:   Thu, 11 Jul 2024 11:53:00 EDT
    +Flags:           
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                            Status
    +96d04bc472c9   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980       RUNNING
    +c71b0308616d   wasm       grpc-addr: 9290/tcp -> http://127.0.0.1:9290     RUNNING
    +                          p2p-laddr: 36656/tcp -> http://127.0.0.1:36656   
    +                          rpc-laddr: 36657/tcp -> http://127.0.0.1:36657

    Kurtosis has successfully launched the CosmWasm rollup and the local DA network. You can see the services running in docker as well:

    bash
    docker ps
    bash
    CONTAINER ID   IMAGE                              COMMAND                  CREATED              STATUS              PORTS                                                                              NAMES
    +5bfeda0a871f   ghcr.io/rollkit/cosmwasm:v0.1.0    "/bin/sh -c 'wasmd s…"   About a minute ago   Up About a minute   0.0.0.0:9290->9290/tcp, 0.0.0.0:36656-36657->36656-36657/tcp                       wasm--c71b0308616d40ad919ad24c3d14f35b
    +782dec73fcf8   ghcr.io/rollkit/local-da:v0.2.1    "local-da -listen-all"   About a minute ago   Up About a minute   0.0.0.0:7980->7980/tcp                                                             local-da--96d04bc472c9455d88d046128fbdefa6
    +62da89015918   kurtosistech/core:0.90.1           "/bin/sh -c ./api-co…"   About a minute ago   Up About a minute   0.0.0.0:55500->7443/tcp                                                            kurtosis-api--8cd936e91ada45beab50f0d19be8c57f
    +1eb6366a5e16   fluent/fluent-bit:1.9.7            "/fluent-bit/bin/flu…"   About a minute ago   Up About a minute   2020/tcp                                                                           kurtosis-logs-collector--8cd936e91ada45beab50f0d19be8c57f
    +8bfee95b49ee   kurtosistech/engine:0.90.1         "/bin/sh -c ./kurtos…"   39 minutes ago       Up 39 minutes       0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--cee974a1c2b141478c9eb2a9b1e4f87f
    +d532fc82579f   traefik:2.10.6                     "/bin/sh -c 'mkdir -…"   39 minutes ago       Up 39 minutes       80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--cee974a1c2b141478c9eb2a9b1e4f87f
    +7700c0b72195   timberio/vector:0.31.0-debian      "/bin/sh -c 'printf …"   39 minutes ago       Up 39 minutes                                                                                          kurtosis-logs-aggregator

    We can see the CosmWasm rollup running in container wasm--c71b0308616d40ad919ad24c3d14f35b and the local DA network running in container local-da--96d04bc472c9455d88d046128fbdefa6.

    Let's hold on to the container name for the CosmWasm rollup, as we will need it later.

    bash
    CW=$(docker ps --format '{{.Names}}' | grep wasm)
    +echo $CW

    You can verify the rollup is running by checking the logs:

    bash
    docker logs $CW
    bash
    ...
    +3:55PM INF Creating and publishing block height=137 module=BlockManager
    +3:55PM INF finalized block block_app_hash=E71622A57B08D28613A34E3D7AD36BF294CF5A88F4CDD5DD18E6FB65C76F7209 height=137 module=BlockManager num_txs_res=0 num_val_updates=0
    +3:55PM INF executed block app_hash=E71622A57B08D28613A34E3D7AD36BF294CF5A88F4CDD5DD18E6FB65C76F7209 height=137 module=BlockManager
    +3:55PM INF indexed block events height=137 module=txindex
    +3:55PM INF Creating and publishing block height=138 module=BlockManager
    +3:55PM INF finalized block block_app_hash=E09F4A71E216D85F4CCB9FCBCEE53D82BCA597451C1D4B4FCE0E4081B5FA40E3 height=138 module=BlockManager num_txs_res=0 num_val_updates=0
    +3:55PM INF executed block app_hash=E09F4A71E216D85F4CCB9FCBCEE53D82BCA597451C1D4B4FCE0E4081B5FA40E3 height=138 module=BlockManager
    +...

    Good work so far, we have a Rollup node, DA network node, now we can move onto the contract deployment.

    📒 Contract deployment on CosmWasm with Rollkit

    🤖 Compile the smart contract

    To compile the smart contract, you can use our docker image.

    First download the image:

    bash
    docker pull ghcr.io/rollkit/contract:v0.2.0

    Then run the container:

    bash
    docker run --rm -d --name cw ghcr.io/rollkit/contract:v0.2.0

    The container is now running and has the pre-built nameservice contract for us. Let's copy it out of the container.

    bash
    docker cp cw:/root/cw-contracts/contracts/nameservice .

    We now have the nameservice contract in the nameservice directory.

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/nameservice directory you just copied:

    bash
    sudo docker run --rm -v "$(pwd)":/code \\
    +  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \\
    +  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \\
    +  cosmwasm/rust-optimizer:0.12.6

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    We will need to do this in the docker container that the CosmWasm rollup is running. So first let's move the compiled contract to the container:

    bash
    docker cp artifacts/cw_nameservice.wasm $CW:/root/cw_nameservice.wasm

    Now let's jump into the container:

    bash
    docker exec -it $CW sh

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    bash
    TX_HASH=$(wasmd tx wasm store cw_nameservice.wasm --from localwasm-key --keyring-backend test --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    🔎 Contract querying

    Now, let's query our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
    +echo $CODE_ID

    This will give us back the Code ID of the deployed contract.

    In our case, since it's the first contract deployed on our local network, the value is 1.

    Now, we can take a look at the contracts instantiated by this Code ID:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --node http://127.0.0.1:36657 --output json

    We get the following output:

    json
    {"contracts":[],"pagination":{"next_key":null,"total":"0"}}

    📃 Contract instantiation

    We start instantiating the contract by writing up the following INIT message for nameservice contract. Here, we are specifying that purchase_price of a name is 100uwasm and transfer_price is 999uwasm.

    bash
    INIT='{"purchase_price":{"amount":"100","denom":"uwasm"},"transfer_price":{"amount":"999","denom":"uwasm"}}'
    +wasmd tx wasm instantiate $CODE_ID "$INIT" --from localwasm-key --keyring-backend test --label "name service" --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 -y --no-admin --node http://127.0.0.1:36657

    📄 Contract interaction

    Now that we instantiated it, we can interact further with the contract:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657
    +CONTRACT=$(wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657 | jq -r '.contracts[-1]')
    +echo $CONTRACT
    +
    +wasmd query wasm contract --node http://127.0.0.1:36657 $CONTRACT
    +wasmd query bank balances --node http://127.0.0.1:36657 $CONTRACT

    This allows us to see the contract address, contract details, and bank balances.

    Your output will look similar to below:

    bash
    {"contracts":["wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d"],"pagination":{"next_key":null,"total":"0"}}
    +wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d
    +address: wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d
    +contract_info:
    +  admin: ""
    +  code_id: "1"
    +  created: null
    +  creator: wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z
    +  extension: null
    +  ibc_port_id: ""
    +  label: name service
    +balances: []
    +pagination:
    +  next_key: null
    +  total: "0"

    Now, let's register a name to the contract for our wallet address:

    bash
    REGISTER='{"register":{"name":"fred"}}'
    +wasmd tx wasm execute $CONTRACT "$REGISTER" --amount 100uwasm --from localwasm-key --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --keyring-backend test -y

    Your output will look similar to below:

    bash
    gas estimate: 167533
    +code: 0
    +codespace: ""
    +data: ""
    +events: []
    +gas_used: "0"
    +gas_wanted: "0"
    +height: "0"
    +info: ""
    +logs: []
    +raw_log: '[]'
    +timestamp: ""
    +tx: null
    +txhash: C147257485B72E7FFA5FDB943C94CE951A37817554339586FFD645AD2AA397C3

    If you try to register the same name again, you'll see an expected error:

    bash
    Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: Name has been taken (name fred): execute wasm contract failed [CosmWasm/wasmd/x/wasm/keeper/keeper.go:364] With gas wanted: '0' and gas used: '123809' : unknown request

    Next, query the owner of the name record:

    bash
    NAME_QUERY='{"resolve_record": {"name": "fred"}}'
    +wasmd query wasm contract-state smart $CONTRACT "$NAME_QUERY" --node http://127.0.0.1:36657 --output json

    You'll see the owner's address in a JSON response:

    bash
    {"data":{"address":"wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z"}}

    With that, we have instantiated and interacted with the CosmWasm nameservice smart contract on our local DA network using Rollkit!

    `,82))]))}});export{E as __pageData,B as default}; diff --git a/pr-528/assets/tutorials_execution_evm-contract-interaction.md.Br9sP-5f.js b/pr-528/assets/tutorials_execution_evm-contract-interaction.md.Br9sP-5f.js new file mode 100644 index 000000000..ce28803c3 --- /dev/null +++ b/pr-528/assets/tutorials_execution_evm-contract-interaction.md.Br9sP-5f.js @@ -0,0 +1,34 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as n}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as e,j as a,a as l,G as i,a3 as h,o as p}from"./chunks/framework.B8-VHxRu.js";/* empty css */const o="/docs-preview/pr-528/frontend-evm.png",r={class:"tip custom-block"},k={class:"warning custom-block"},C=JSON.parse('{"title":"Smart Contract Interaction on EVM Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Smart Contract Interaction on EVM Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/evm-contract-interaction.md","filePath":"tutorials/execution/evm-contract-interaction.md","lastUpdated":1733420866000}'),d={name:"tutorials/execution/evm-contract-interaction.md"},b=Object.assign(d,{setup(c){return(g,s)=>(p(),e("div",null,[s[2]||(s[2]=a("h1",{id:"smart-contract-interaction-on-evm-rollup",tabindex:"-1"},[l("Smart Contract Interaction on EVM Rollup "),a("a",{class:"header-anchor",href:"#smart-contract-interaction-on-evm-rollup","aria-label":'Permalink to "Smart Contract Interaction on EVM Rollup"'},"​")],-1)),a("div",r,[s[0]||(s[0]=a("p",{class:"custom-block-title"},"TIP",-1)),i(t)]),a("div",k,[s[1]||(s[1]=a("p",{class:"custom-block-title"},"WARNING",-1)),i(n)]),s[3]||(s[3]=h(`

    In this tutorial, you will deploy a smart contract to your EVM rollup and interact with it on a frontend. This tutorial assumes that you spinned up an EVM rollup, know it's RPC URL, and have funded an account on it.

    Install Foundry

    To install Foundry, run the following commands:

    bash
    curl -L https://foundry.paradigm.xyz | bash
    +foundryup

    Funds

    Here is the private key and derived address of the account for you to be used in this tutorial (make sure to fund it with some ETH):

    bash
    PrivateKey: 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +Address: 0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4

    Frontend

    Now we will make a frontend with a smart contract on our EVM rollup. First, clone the GM Portal repository:

    bash
    cd $HOME
    +git clone https://github.com/rollkit/gm-portal.git
    +cd gm-portal

    Deploy the ooga booga portal contract

    Next, you will deploy the smart contract. Export the funded private key and RPC URL:

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545 // or for Octane EVM the port is 8000

    Use Foundry to deploy the contract to your EVM:

    bash
    cd contracts
    +forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to:

    bash
    forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠑] Compiling 18 files with 0.8.20
    +[⠘] Solc 0.8.20 finished in 1.52s
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    + [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 2061
    +  [Success]Hash: 0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860
    +Contract Address: 0x18Df82C7E422A42D47345Ed86B0E935E9718eBda // [!code focus]
    +Block: 682
    +Paid: 0.001528707003566983 ETH (509569 gas * 3.000000007 gwei)
    +
    +[...]

    From the contract deployment output, export your contract address:

    bash
    export CONTRACT_ADDRESS=0x18Df82C7E422A42D47345Ed86B0E935E9718eBda

    Interact with the contract

    Send an "ooga booga" to the contract:

    bash
    cast send $CONTRACT_ADDRESS \\
    +"gm(string)" "ooga booga" \\
    +--private-key $PRIVATE_KEY \\
    +--rpc-url $RPC_URL

    Get total (hex-encoded) GMs (ooga boogas):

    bash
    cast call $CONTRACT_ADDRESS "getTotalGms()" --rpc-url $RPC_URL

    Start and update the frontend

    Now, change into the frontend directory:

    bash
    cd $HOME/gm-portal/frontend
    +yarn && yarn dev

    Now, your frontend is running! We'll display and interact with our smart contract on our frontend.

    First, you will need to change the contract address on gm-portal/frontend/src/App.tsx to your contract address from above before you can interact with the contract on the frontend:

    TIP

    Only if you changed the contract, you will need to update the ABI in gm-portal/frontend/GmPortal.json from gm-portal/contracts/out/GmPortal.sol/GmPortal.json. This can be done with:

    bash
    cd $HOME
    +cp gm-portal/contracts/out/GmPortal.sol/GmPortal.json gm-portal/frontend

    Interact with the frontend

    In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.

    To transfer to an external account, use this command:

    bash
    export RECEIVER=<receiver ETH address>
    +cast send --private-key $PRIVATE_KEY $RECEIVER --value 1ether --rpc-url $RPC_URL

    If you are in a different terminal than the one you set the private key in originally, you may need to set it again.

    Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!

    frontend-evm

    Conclusion

    You have successfully deployed a smart contract to your EVM rollup and interacted with it on a frontend. You can now build more complex applications on your EVM rollup!

    ',39))]))}});export{C as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_execution_evm-contract-interaction.md.Br9sP-5f.lean.js b/pr-528/assets/tutorials_execution_evm-contract-interaction.md.Br9sP-5f.lean.js new file mode 100644 index 000000000..ce28803c3 --- /dev/null +++ b/pr-528/assets/tutorials_execution_evm-contract-interaction.md.Br9sP-5f.lean.js @@ -0,0 +1,34 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as n}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as e,j as a,a as l,G as i,a3 as h,o as p}from"./chunks/framework.B8-VHxRu.js";/* empty css */const o="/docs-preview/pr-528/frontend-evm.png",r={class:"tip custom-block"},k={class:"warning custom-block"},C=JSON.parse('{"title":"Smart Contract Interaction on EVM Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Smart Contract Interaction on EVM Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/evm-contract-interaction.md","filePath":"tutorials/execution/evm-contract-interaction.md","lastUpdated":1733420866000}'),d={name:"tutorials/execution/evm-contract-interaction.md"},b=Object.assign(d,{setup(c){return(g,s)=>(p(),e("div",null,[s[2]||(s[2]=a("h1",{id:"smart-contract-interaction-on-evm-rollup",tabindex:"-1"},[l("Smart Contract Interaction on EVM Rollup "),a("a",{class:"header-anchor",href:"#smart-contract-interaction-on-evm-rollup","aria-label":'Permalink to "Smart Contract Interaction on EVM Rollup"'},"​")],-1)),a("div",r,[s[0]||(s[0]=a("p",{class:"custom-block-title"},"TIP",-1)),i(t)]),a("div",k,[s[1]||(s[1]=a("p",{class:"custom-block-title"},"WARNING",-1)),i(n)]),s[3]||(s[3]=h(`

    In this tutorial, you will deploy a smart contract to your EVM rollup and interact with it on a frontend. This tutorial assumes that you spinned up an EVM rollup, know it's RPC URL, and have funded an account on it.

    Install Foundry

    To install Foundry, run the following commands:

    bash
    curl -L https://foundry.paradigm.xyz | bash
    +foundryup

    Funds

    Here is the private key and derived address of the account for you to be used in this tutorial (make sure to fund it with some ETH):

    bash
    PrivateKey: 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +Address: 0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4

    Frontend

    Now we will make a frontend with a smart contract on our EVM rollup. First, clone the GM Portal repository:

    bash
    cd $HOME
    +git clone https://github.com/rollkit/gm-portal.git
    +cd gm-portal

    Deploy the ooga booga portal contract

    Next, you will deploy the smart contract. Export the funded private key and RPC URL:

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545 // or for Octane EVM the port is 8000

    Use Foundry to deploy the contract to your EVM:

    bash
    cd contracts
    +forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to:

    bash
    forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠑] Compiling 18 files with 0.8.20
    +[⠘] Solc 0.8.20 finished in 1.52s
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    + [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 2061
    +  [Success]Hash: 0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860
    +Contract Address: 0x18Df82C7E422A42D47345Ed86B0E935E9718eBda // [!code focus]
    +Block: 682
    +Paid: 0.001528707003566983 ETH (509569 gas * 3.000000007 gwei)
    +
    +[...]

    From the contract deployment output, export your contract address:

    bash
    export CONTRACT_ADDRESS=0x18Df82C7E422A42D47345Ed86B0E935E9718eBda

    Interact with the contract

    Send an "ooga booga" to the contract:

    bash
    cast send $CONTRACT_ADDRESS \\
    +"gm(string)" "ooga booga" \\
    +--private-key $PRIVATE_KEY \\
    +--rpc-url $RPC_URL

    Get total (hex-encoded) GMs (ooga boogas):

    bash
    cast call $CONTRACT_ADDRESS "getTotalGms()" --rpc-url $RPC_URL

    Start and update the frontend

    Now, change into the frontend directory:

    bash
    cd $HOME/gm-portal/frontend
    +yarn && yarn dev

    Now, your frontend is running! We'll display and interact with our smart contract on our frontend.

    First, you will need to change the contract address on gm-portal/frontend/src/App.tsx to your contract address from above before you can interact with the contract on the frontend:

    TIP

    Only if you changed the contract, you will need to update the ABI in gm-portal/frontend/GmPortal.json from gm-portal/contracts/out/GmPortal.sol/GmPortal.json. This can be done with:

    bash
    cd $HOME
    +cp gm-portal/contracts/out/GmPortal.sol/GmPortal.json gm-portal/frontend

    Interact with the frontend

    In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.

    To transfer to an external account, use this command:

    bash
    export RECEIVER=<receiver ETH address>
    +cast send --private-key $PRIVATE_KEY $RECEIVER --value 1ether --rpc-url $RPC_URL

    If you are in a different terminal than the one you set the private key in originally, you may need to set it again.

    Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!

    frontend-evm

    Conclusion

    You have successfully deployed a smart contract to your EVM rollup and interacted with it on a frontend. You can now build more complex applications on your EVM rollup!

    ',39))]))}});export{C as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_execution_octane-evm.md.HsEF3TEL.js b/pr-528/assets/tutorials_execution_octane-evm.md.HsEF3TEL.js new file mode 100644 index 000000000..0614138af --- /dev/null +++ b/pr-528/assets/tutorials_execution_octane-evm.md.HsEF3TEL.js @@ -0,0 +1,3 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as e}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as n,j as a,a as l,G as s,a3 as o,o as h}from"./chunks/framework.B8-VHxRu.js";/* empty css */const p={class:"tip custom-block"},r={class:"warning custom-block"},y=JSON.parse('{"title":"Quick start guide for Omni Octane with Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Quick start guide for Omni Octane with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/octane-evm.md","filePath":"tutorials/execution/octane-evm.md","lastUpdated":1733420866000}'),d={name:"tutorials/execution/octane-evm.md"},b=Object.assign(d,{setup(c){return(k,i)=>(h(),n("div",null,[i[2]||(i[2]=a("h1",{id:"quick-start-guide-for-omni-octane-with-rollkit",tabindex:"-1"},[l("Quick start guide for Omni Octane with Rollkit "),a("a",{class:"header-anchor",href:"#quick-start-guide-for-omni-octane-with-rollkit","aria-label":'Permalink to "Quick start guide for Omni Octane with Rollkit"'},"​")],-1)),a("div",p,[i[0]||(i[0]=a("p",{class:"custom-block-title"},"TIP",-1)),s(t)]),a("div",r,[i[1]||(i[1]=a("p",{class:"custom-block-title"},"WARNING",-1)),s(e)]),i[3]||(i[3]=o(`

    This guide will help you quickly set up and run an Omni node using Rollkit and local-DA.

    📦 Clone the Omni repository

    To get started, clone the Omni repository with the Rollkit branch:

    bash
    git clone -b rollkit https://github.com/rollkit/omni.git
    +cd omni

    🏗️ Build Docker images

    Before running Omni, you need to build the Docker images. This step requires GoReleaser to be installed on your system. If you don't have GoReleaser, you'll need to install it first:

    • On macOS with Homebrew:
      bash
      brew install goreleaser
    • On Linux or Windows with Go installed:
      bash
      go install github.com/goreleaser/goreleaser@latest

    Make sure GoReleaser is in your PATH after installation.

    Once GoReleaser is installed, run the following command to build the Docker images:

    bash
    make build-docker

    This command will build all the necessary Docker images for running Omni with Rollkit.

    If you encounter any issues with GoReleaser or the build process, make sure you have sufficient free space on your machine. You can check your available disk space using the df -h command on Linux/macOS or powershell -command "Get-PSDrive -PSProvider 'FileSystem'" on Windows.

    🚀 Deploy Omni with Rollkit and local-DA

    To start your Omni node with Rollkit and local-DA, execute:

    bash
    make devnet-zero-deploy

    Upon execution, the command will set up and start your Omni node. You should see output indicating the progress and status of your node. Notice the EVM Chain RPC available message, which indicates that the Omni node is ready to accept EVM transactions:

    bash
    24-07-22 20:29:03.655 INFO EVM Chain RPC available                  chain_id=1651 chain_name=omni_evm url=http://127.0.0.1:8000

    🧪 Smart Contract Deployment and Interaction

    To deploy and interact with smart contracts on the Omni EVM, you can use the tools you are already familiar with, follow our Contract interaction tutorial to get a hands on experience.

    To fund your account with some tokens, you can use the omni-cli, which needs to be installed first:

    bash
    make install-cli # install omni cli 
    +omni devnet fund --rpc-url http://127.0.0.1:8000 --address=<your address>

    🛑 Stopping the node

    When you're done and want to stop the Omni node, use the following command:

    bash
    make devnet-zero-clean

    This will stop all running containers and clean up the environment.

    🎉 Conclusion

    That's it! You've successfully set up and run an Omni node with Rollkit and local-DA. This setup allows you to experiment with Omni's capabilities integrated with Rollkit.

    `,27))]))}});export{y as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_execution_octane-evm.md.HsEF3TEL.lean.js b/pr-528/assets/tutorials_execution_octane-evm.md.HsEF3TEL.lean.js new file mode 100644 index 000000000..0614138af --- /dev/null +++ b/pr-528/assets/tutorials_execution_octane-evm.md.HsEF3TEL.lean.js @@ -0,0 +1,3 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as e}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as n,j as a,a as l,G as s,a3 as o,o as h}from"./chunks/framework.B8-VHxRu.js";/* empty css */const p={class:"tip custom-block"},r={class:"warning custom-block"},y=JSON.parse('{"title":"Quick start guide for Omni Octane with Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Quick start guide for Omni Octane with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/octane-evm.md","filePath":"tutorials/execution/octane-evm.md","lastUpdated":1733420866000}'),d={name:"tutorials/execution/octane-evm.md"},b=Object.assign(d,{setup(c){return(k,i)=>(h(),n("div",null,[i[2]||(i[2]=a("h1",{id:"quick-start-guide-for-omni-octane-with-rollkit",tabindex:"-1"},[l("Quick start guide for Omni Octane with Rollkit "),a("a",{class:"header-anchor",href:"#quick-start-guide-for-omni-octane-with-rollkit","aria-label":'Permalink to "Quick start guide for Omni Octane with Rollkit"'},"​")],-1)),a("div",p,[i[0]||(i[0]=a("p",{class:"custom-block-title"},"TIP",-1)),s(t)]),a("div",r,[i[1]||(i[1]=a("p",{class:"custom-block-title"},"WARNING",-1)),s(e)]),i[3]||(i[3]=o(`

    This guide will help you quickly set up and run an Omni node using Rollkit and local-DA.

    📦 Clone the Omni repository

    To get started, clone the Omni repository with the Rollkit branch:

    bash
    git clone -b rollkit https://github.com/rollkit/omni.git
    +cd omni

    🏗️ Build Docker images

    Before running Omni, you need to build the Docker images. This step requires GoReleaser to be installed on your system. If you don't have GoReleaser, you'll need to install it first:

    • On macOS with Homebrew:
      bash
      brew install goreleaser
    • On Linux or Windows with Go installed:
      bash
      go install github.com/goreleaser/goreleaser@latest

    Make sure GoReleaser is in your PATH after installation.

    Once GoReleaser is installed, run the following command to build the Docker images:

    bash
    make build-docker

    This command will build all the necessary Docker images for running Omni with Rollkit.

    If you encounter any issues with GoReleaser or the build process, make sure you have sufficient free space on your machine. You can check your available disk space using the df -h command on Linux/macOS or powershell -command "Get-PSDrive -PSProvider 'FileSystem'" on Windows.

    🚀 Deploy Omni with Rollkit and local-DA

    To start your Omni node with Rollkit and local-DA, execute:

    bash
    make devnet-zero-deploy

    Upon execution, the command will set up and start your Omni node. You should see output indicating the progress and status of your node. Notice the EVM Chain RPC available message, which indicates that the Omni node is ready to accept EVM transactions:

    bash
    24-07-22 20:29:03.655 INFO EVM Chain RPC available                  chain_id=1651 chain_name=omni_evm url=http://127.0.0.1:8000

    🧪 Smart Contract Deployment and Interaction

    To deploy and interact with smart contracts on the Omni EVM, you can use the tools you are already familiar with, follow our Contract interaction tutorial to get a hands on experience.

    To fund your account with some tokens, you can use the omni-cli, which needs to be installed first:

    bash
    make install-cli # install omni cli 
    +omni devnet fund --rpc-url http://127.0.0.1:8000 --address=<your address>

    🛑 Stopping the node

    When you're done and want to stop the Omni node, use the following command:

    bash
    make devnet-zero-clean

    This will stop all running containers and clean up the environment.

    🎉 Conclusion

    That's it! You've successfully set up and run an Omni node with Rollkit and local-DA. This setup allows you to experiment with Omni's capabilities integrated with Rollkit.

    `,27))]))}});export{y as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_execution_polaris-evm.md.C0Bj_-Ui.js b/pr-528/assets/tutorials_execution_polaris-evm.md.C0Bj_-Ui.js new file mode 100644 index 000000000..916a415d6 --- /dev/null +++ b/pr-528/assets/tutorials_execution_polaris-evm.md.C0Bj_-Ui.js @@ -0,0 +1,61 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as n}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as e,j as i,a as l,G as a,a3 as h,o as p}from"./chunks/framework.B8-VHxRu.js";/* empty css */const k="/docs-preview/pr-528/polaris-evm/polaris-start-site.png",r="/docs-preview/pr-528/polaris-evm/polaris-evm.png",o={class:"tip custom-block"},d={class:"warning custom-block"},B=JSON.parse('{"title":"Polaris EVM and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Polaris EVM and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/polaris-evm.md","filePath":"tutorials/execution/polaris-evm.md","lastUpdated":1733420866000}'),F={name:"tutorials/execution/polaris-evm.md"},b=Object.assign(F,{setup(g){return(c,s)=>(p(),e("div",null,[s[2]||(s[2]=i("h1",{id:"polaris-evm-and-rollkit",tabindex:"-1"},[l("Polaris EVM and Rollkit "),i("a",{class:"header-anchor",href:"#polaris-evm-and-rollkit","aria-label":'Permalink to "Polaris EVM and Rollkit"'},"​")],-1)),i("div",o,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),a(t)]),i("div",d,[s[1]||(s[1]=i("p",{class:"custom-block-title"},"WARNING",-1)),a(n)]),s[3]||(s[3]=h(`

    DANGER

    We regret to inform that Polaris V1 and Rollkit integration is not fully functional. Current issues are tracked in https://github.com/rollkit/rollkit/issues/1594. We are expecting Polaris V2 release soon and Rollkit support will be added along with update tutorial.

    This tutorial provides step-by-step instructions for running the Polaris EVM using Rollkit. Polaris EVM is a version of the Ethereum Virtual Machine (EVM) that is designed to run the Berachain network. This version has been modified to use Celestia as a data availability layer. This integration uses a local-celestia-devnet. Rollkit is used to deploy a Polaris EVM rollup without needing to set up a data availability and consensus network.

    Prerequisites

    Before you can run Polaris EVM using Rollkit, you need to have the following software installed on your machine:

    • Docker running on your machine
    • Go version >= 1.21.0

    Run a local-celestia-devnet

    Before you can start Polaris EVM, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.12.6

    Clone the repo

    To get started, clone the Polaris repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +git clone https://github.com/berachain/polaris.git
    +cd polaris && git checkout rollkit

    Install Foundry

    bash
    curl -L https://foundry.paradigm.xyz | bash

    Start the Polaris EVM using Rollkit

    Then start the chain in your first terminal:

    bash
    cd $HOME/polaris && foundryup
    +make start

    Congratulations

    You now have a Polaris EVM Rollkit rollup running! The rollup logs will begin to look similar to this:

    bash
    7:58PM INF submitting block to DA layer height=11 module=BlockManager // [!code focus]
    +7:58PM INF successfully submitted Rollkit block to DA layer daHeight=30 module=BlockManager rollkitHeight=11 // [!code focus]
    +7:58PM INF prune start height=11 module=server
    +7:58PM INF prune end height=11 module=server
    +7:58PM INF indexed block events height=11 module=txindex
    +7:58PM INF Creating and publishing block height=12 module=BlockManager // [!code focus]
    +7:58PM INF preparing evm block module=polaris-geth seal_hash=0x314b131b1d4117445091b25240eaf420cdbdcf9f653eabd1d95aa0dab3cd1359
    +7:58PM INF finalizing evm block block_hash=0x5207a1ff35540dafe70565d3a95ed07f6c9b1ed9114f93c6c47ee0a1c0d4cc2e module=polaris-geth num_txs=0
    +7:58PM INF finalized block block_app_hash=AC959F089C21DC617275E0AB35E77DC3839C9597ECFDECDAD6C924EC49B1EB07 height=12 module=BlockManager num_txs_res=0 num_val_updates=0
    +7:58PM INF executed block app_hash="���\\b�!�aru��5�}���������$�I��\\a" height=12 module=BlockManager

    Funds

    The following private key has funds on your Polaris chain:

    bash
    Address: 0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4
    +PrivateKey: 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306

    Just deploy a smart contract to get started! If you'd like to learn how to deploy your own GM Portal (as an ooga booga portal) you can follow the remainder of this tutorial.

    Frontend

    Now we will make a frontend with a smart contract on our Polaris EVM rollup. First, clone the GM Portal repository and check out to the Polaris branch (ooga booga portal):

    bash
    cd $HOME
    +git clone https://github.com/jcstein/gm-portal.git
    +cd gm-portal && git checkout polaris

    Deploy the ooga booga portal contract

    Next, you will deploy the smart contract. Export the funded private key and RPC URL:

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545

    Use Foundry to deploy the contract to your EVM:

    bash
    cd contracts
    +forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to:

    bash
    forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠑] Compiling 18 files with 0.8.20
    +[⠘] Solc 0.8.20 finished in 1.52s
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on Polaris EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    + [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 2061
    +  [Success]Hash: 0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860
    +Contract Address: 0x18Df82C7E422A42D47345Ed86B0E935E9718eBda // [!code focus]
    +Block: 682
    +Paid: 0.001528707003566983 ETH (509569 gas * 3.000000007 gwei)
    +
    +[...]

    From the contract deployment output, export your contract address:

    bash
    export CONTRACT_ADDRESS=0x18Df82C7E422A42D47345Ed86B0E935E9718eBda

    Interact with the contract

    Send an "ooga booga" to the contract:

    bash
    cast send $CONTRACT_ADDRESS \\
    +"gm(string)" "ooga booga" \\
    +--private-key $PRIVATE_KEY \\
    +--rpc-url $RPC_URL

    Get total (hex-encoded) GMs (ooga boogas):

    bash
    cast call $CONTRACT_ADDRESS "getTotalGms()" --rpc-url $RPC_URL

    Start and update the frontend

    Now, change into the frontend directory:

    bash
    cd $HOME/gm-portal/frontend
    +yarn && yarn dev

    polaris-evm

    Now, your frontend is running! We'll display and interact with our smart contract on our frontend.

    First, you will need to change the contract address on gm-portal/frontend/src/App.tsx to your contract address from above before you can interact with the contract on the frontend:

    TIP

    Only if you changed the contract, you will need to update the ABI in gm-portal/frontend/GmPortal.json from gm-portal/contracts/out/GmPortal.sol/GmPortal.json. This can be done with:

    bash
    cd $HOME
    +cp gm-portal/contracts/out/GmPortal.sol/GmPortal.json gm-portal/frontend

    Interact with the frontend

    In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.

    To transfer to an external account, use this command:

    bash
    export RECEIVER=<receiver ETH address>
    +cast send --private-key $PRIVATE_KEY $RECEIVER --value 1ether --rpc-url $RPC_URL

    If you are in a different terminal than the one you set the private key in originally, you may need to set it again.

    Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!

    polaris-evm

    Running Polaris EVM with a Celestia light node

    In this portion of the tutorial, we will go over running Polaris x Rollkit using a Celestia light node to post data to Mocha testnet. These steps can be used for Mainnet Beta and Arabica devnet, too, you'll just need to change the network in the --p2p.network string flag and your RPC.

    TIP

    Before using RPC methods through the CLI, you'll need to set your auth token.

    In order to successfully post and retrieve data to and from Celestia's Mocha testnet, your light node will need to be fully synced. You can check the status by using the das.SamplingStats method using the CLI.

    Your node will also need to be funded with testnet TIA, which you can obtain by retrieving your account address and visiting a faucet.

    Start your light node

    1. Fully sync and fund a light node on Celestia's Mocha testnet (mocha-4). Follow instructions to install and start your Celestia data availability layer light node selecting the Mocha network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    2. Use celestia-da to connect to Rollkit. Your node does not need to be running when you start celestia-da. To start celestia-da and your light node, run this command:

    TIP

    You can either use the default 000000506f6c61726973 namespace below, or set your own by using a command similar to this to generate one (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Learn more about namespaces .

    bash
    docker run -d \\
    +-e NODE_TYPE=light \\
    +-e P2P_NETWORK=mocha \\
    +-p 26650:26650 \\
    +-p 26658:26658 \\
    +-p 26659:26659 \\
    +-v $HOME/.celestia-light-mocha-4/:/home/celestia/.celestia-light-mocha-4/ \\
    +ghcr.io/rollkit/celestia-da:v0.12.10 \\
    +celestia-da light start \\
    +--p2p.network=mocha \\
    +--da.grpc.namespace=000000506f6c61726973 \\
    +--da.grpc.listen=0.0.0.0:26650 \\
    +--core.ip rpc-mocha.pops.one \\
    +--gateway

    Setup Polaris script

    First, ensure you're on the correct branch of Polaris:

    bash
    cd $HOME/polaris && git checkout rollkit

    Before starting your rollup, you'll want to make a change in $HOME/polaris/e2e/testapp/entrypoint.sh to point to the right DA start height:

    bash
    # set the data availability layer's block height from local-celestia-devnet
    +DA_BLOCK_HEIGHT=$(docker exec $(docker ps -q) celestia header local-head --token $AUTH_TOKEN | jq '.result.header.height' -r) // [!code --]
    +DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block |jq -r '.result.block.header.height') // [!code ++]

    Start the EVM rollup

    Change into the Polaris directory in your terminal:

    bash
    cd $HOME/polaris
    +make start

    Congratulations! Your light node is now posting your rollup's data to Celestia's Mocha testnet.

    Find an explorer to view the default namespace in the tutorial or search for your own namespace on Celenium.

    `,73))]))}});export{B as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_execution_polaris-evm.md.C0Bj_-Ui.lean.js b/pr-528/assets/tutorials_execution_polaris-evm.md.C0Bj_-Ui.lean.js new file mode 100644 index 000000000..916a415d6 --- /dev/null +++ b/pr-528/assets/tutorials_execution_polaris-evm.md.C0Bj_-Ui.lean.js @@ -0,0 +1,61 @@ +import{C as t}from"./chunks/callout.CtmRa3nB.js";import{E as n}from"./chunks/execution_callout.Y2UDM0wA.js";import{c as e,j as i,a as l,G as a,a3 as h,o as p}from"./chunks/framework.B8-VHxRu.js";/* empty css */const k="/docs-preview/pr-528/polaris-evm/polaris-start-site.png",r="/docs-preview/pr-528/polaris-evm/polaris-evm.png",o={class:"tip custom-block"},d={class:"warning custom-block"},B=JSON.parse('{"title":"Polaris EVM and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Polaris EVM and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/execution/polaris-evm.md","filePath":"tutorials/execution/polaris-evm.md","lastUpdated":1733420866000}'),F={name:"tutorials/execution/polaris-evm.md"},b=Object.assign(F,{setup(g){return(c,s)=>(p(),e("div",null,[s[2]||(s[2]=i("h1",{id:"polaris-evm-and-rollkit",tabindex:"-1"},[l("Polaris EVM and Rollkit "),i("a",{class:"header-anchor",href:"#polaris-evm-and-rollkit","aria-label":'Permalink to "Polaris EVM and Rollkit"'},"​")],-1)),i("div",o,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),a(t)]),i("div",d,[s[1]||(s[1]=i("p",{class:"custom-block-title"},"WARNING",-1)),a(n)]),s[3]||(s[3]=h(`

    DANGER

    We regret to inform that Polaris V1 and Rollkit integration is not fully functional. Current issues are tracked in https://github.com/rollkit/rollkit/issues/1594. We are expecting Polaris V2 release soon and Rollkit support will be added along with update tutorial.

    This tutorial provides step-by-step instructions for running the Polaris EVM using Rollkit. Polaris EVM is a version of the Ethereum Virtual Machine (EVM) that is designed to run the Berachain network. This version has been modified to use Celestia as a data availability layer. This integration uses a local-celestia-devnet. Rollkit is used to deploy a Polaris EVM rollup without needing to set up a data availability and consensus network.

    Prerequisites

    Before you can run Polaris EVM using Rollkit, you need to have the following software installed on your machine:

    • Docker running on your machine
    • Go version >= 1.21.0

    Run a local-celestia-devnet

    Before you can start Polaris EVM, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.12.6

    Clone the repo

    To get started, clone the Polaris repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +git clone https://github.com/berachain/polaris.git
    +cd polaris && git checkout rollkit

    Install Foundry

    bash
    curl -L https://foundry.paradigm.xyz | bash

    Start the Polaris EVM using Rollkit

    Then start the chain in your first terminal:

    bash
    cd $HOME/polaris && foundryup
    +make start

    Congratulations

    You now have a Polaris EVM Rollkit rollup running! The rollup logs will begin to look similar to this:

    bash
    7:58PM INF submitting block to DA layer height=11 module=BlockManager // [!code focus]
    +7:58PM INF successfully submitted Rollkit block to DA layer daHeight=30 module=BlockManager rollkitHeight=11 // [!code focus]
    +7:58PM INF prune start height=11 module=server
    +7:58PM INF prune end height=11 module=server
    +7:58PM INF indexed block events height=11 module=txindex
    +7:58PM INF Creating and publishing block height=12 module=BlockManager // [!code focus]
    +7:58PM INF preparing evm block module=polaris-geth seal_hash=0x314b131b1d4117445091b25240eaf420cdbdcf9f653eabd1d95aa0dab3cd1359
    +7:58PM INF finalizing evm block block_hash=0x5207a1ff35540dafe70565d3a95ed07f6c9b1ed9114f93c6c47ee0a1c0d4cc2e module=polaris-geth num_txs=0
    +7:58PM INF finalized block block_app_hash=AC959F089C21DC617275E0AB35E77DC3839C9597ECFDECDAD6C924EC49B1EB07 height=12 module=BlockManager num_txs_res=0 num_val_updates=0
    +7:58PM INF executed block app_hash="���\\b�!�aru��5�}���������$�I��\\a" height=12 module=BlockManager

    Funds

    The following private key has funds on your Polaris chain:

    bash
    Address: 0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4
    +PrivateKey: 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306

    Just deploy a smart contract to get started! If you'd like to learn how to deploy your own GM Portal (as an ooga booga portal) you can follow the remainder of this tutorial.

    Frontend

    Now we will make a frontend with a smart contract on our Polaris EVM rollup. First, clone the GM Portal repository and check out to the Polaris branch (ooga booga portal):

    bash
    cd $HOME
    +git clone https://github.com/jcstein/gm-portal.git
    +cd gm-portal && git checkout polaris

    Deploy the ooga booga portal contract

    Next, you will deploy the smart contract. Export the funded private key and RPC URL:

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545

    Use Foundry to deploy the contract to your EVM:

    bash
    cd contracts
    +forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to:

    bash
    forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠑] Compiling 18 files with 0.8.20
    +[⠘] Solc 0.8.20 finished in 1.52s
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on Polaris EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    + [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 2061
    +  [Success]Hash: 0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860
    +Contract Address: 0x18Df82C7E422A42D47345Ed86B0E935E9718eBda // [!code focus]
    +Block: 682
    +Paid: 0.001528707003566983 ETH (509569 gas * 3.000000007 gwei)
    +
    +[...]

    From the contract deployment output, export your contract address:

    bash
    export CONTRACT_ADDRESS=0x18Df82C7E422A42D47345Ed86B0E935E9718eBda

    Interact with the contract

    Send an "ooga booga" to the contract:

    bash
    cast send $CONTRACT_ADDRESS \\
    +"gm(string)" "ooga booga" \\
    +--private-key $PRIVATE_KEY \\
    +--rpc-url $RPC_URL

    Get total (hex-encoded) GMs (ooga boogas):

    bash
    cast call $CONTRACT_ADDRESS "getTotalGms()" --rpc-url $RPC_URL

    Start and update the frontend

    Now, change into the frontend directory:

    bash
    cd $HOME/gm-portal/frontend
    +yarn && yarn dev

    polaris-evm

    Now, your frontend is running! We'll display and interact with our smart contract on our frontend.

    First, you will need to change the contract address on gm-portal/frontend/src/App.tsx to your contract address from above before you can interact with the contract on the frontend:

    TIP

    Only if you changed the contract, you will need to update the ABI in gm-portal/frontend/GmPortal.json from gm-portal/contracts/out/GmPortal.sol/GmPortal.json. This can be done with:

    bash
    cd $HOME
    +cp gm-portal/contracts/out/GmPortal.sol/GmPortal.json gm-portal/frontend

    Interact with the frontend

    In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.

    To transfer to an external account, use this command:

    bash
    export RECEIVER=<receiver ETH address>
    +cast send --private-key $PRIVATE_KEY $RECEIVER --value 1ether --rpc-url $RPC_URL

    If you are in a different terminal than the one you set the private key in originally, you may need to set it again.

    Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!

    polaris-evm

    Running Polaris EVM with a Celestia light node

    In this portion of the tutorial, we will go over running Polaris x Rollkit using a Celestia light node to post data to Mocha testnet. These steps can be used for Mainnet Beta and Arabica devnet, too, you'll just need to change the network in the --p2p.network string flag and your RPC.

    TIP

    Before using RPC methods through the CLI, you'll need to set your auth token.

    In order to successfully post and retrieve data to and from Celestia's Mocha testnet, your light node will need to be fully synced. You can check the status by using the das.SamplingStats method using the CLI.

    Your node will also need to be funded with testnet TIA, which you can obtain by retrieving your account address and visiting a faucet.

    Start your light node

    1. Fully sync and fund a light node on Celestia's Mocha testnet (mocha-4). Follow instructions to install and start your Celestia data availability layer light node selecting the Mocha network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    2. Use celestia-da to connect to Rollkit. Your node does not need to be running when you start celestia-da. To start celestia-da and your light node, run this command:

    TIP

    You can either use the default 000000506f6c61726973 namespace below, or set your own by using a command similar to this to generate one (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Learn more about namespaces .

    bash
    docker run -d \\
    +-e NODE_TYPE=light \\
    +-e P2P_NETWORK=mocha \\
    +-p 26650:26650 \\
    +-p 26658:26658 \\
    +-p 26659:26659 \\
    +-v $HOME/.celestia-light-mocha-4/:/home/celestia/.celestia-light-mocha-4/ \\
    +ghcr.io/rollkit/celestia-da:v0.12.10 \\
    +celestia-da light start \\
    +--p2p.network=mocha \\
    +--da.grpc.namespace=000000506f6c61726973 \\
    +--da.grpc.listen=0.0.0.0:26650 \\
    +--core.ip rpc-mocha.pops.one \\
    +--gateway

    Setup Polaris script

    First, ensure you're on the correct branch of Polaris:

    bash
    cd $HOME/polaris && git checkout rollkit

    Before starting your rollup, you'll want to make a change in $HOME/polaris/e2e/testapp/entrypoint.sh to point to the right DA start height:

    bash
    # set the data availability layer's block height from local-celestia-devnet
    +DA_BLOCK_HEIGHT=$(docker exec $(docker ps -q) celestia header local-head --token $AUTH_TOKEN | jq '.result.header.height' -r) // [!code --]
    +DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block |jq -r '.result.block.header.height') // [!code ++]

    Start the EVM rollup

    Change into the Polaris directory in your terminal:

    bash
    cd $HOME/polaris
    +make start

    Congratulations! Your light node is now posting your rollup's data to Celestia's Mocha testnet.

    Find an explorer to view the default namespace in the tutorial or search for your own namespace on Celenium.

    `,73))]))}});export{B as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_gm-world.md.Z6jfcI3H.js b/pr-528/assets/tutorials_gm-world.md.Z6jfcI3H.js new file mode 100644 index 000000000..bc03add02 --- /dev/null +++ b/pr-528/assets/tutorials_gm-world.md.Z6jfcI3H.js @@ -0,0 +1,120 @@ +import{C as n}from"./chunks/callout.CtmRa3nB.js";import{c as h,a3 as i,j as a,G as t,o as l}from"./chunks/framework.B8-VHxRu.js";/* empty css */const k="/docs-preview/pr-528/img/gm-world-frontend-wallet-connected.png",p={class:"tip custom-block"},y=JSON.parse('{"title":"GM world rollup","description":"Build a sovereign rollup using only Rollkit CLI and a local DA network.","frontmatter":{"description":"Build a sovereign rollup using only Rollkit CLI and a local DA network.","head":[["meta",{"name":"og:title","content":"GM world rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world.md","filePath":"tutorials/gm-world.md","lastUpdated":1733420866000}'),e={name:"tutorials/gm-world.md"},C=Object.assign(e,{setup(F){return(r,s)=>(l(),h("div",null,[s[1]||(s[1]=i('

    GM world rollup

    🌞 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup (gm stands for "good morning") using Rollkit. Unlike the quick start guide, this tutorial provides a more practical approach to understanding sovereign rollup development.

    We will cover:

    • Building and configuring a Cosmos-SDK application-specific rollup blockchain.
    • Posting rollup data to a Data Availability (DA) network.
    • Executing transactions (the end goal).

    No prior understanding of the build process is required, just that it utilizes the Cosmos SDK for blockchain applications.

    ',6)),a("div",p,[s[0]||(s[0]=a("p",{class:"custom-block-title"},"TIP",-1)),t(n)]),s[2]||(s[2]=i(`

    🛠️ Dependencies

    As we move into more advanced use cases, we use kurtosis to help with managing all the services we need to run. You can install kurtosis here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   0.90.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🚀 Starting your rollup

    Now that we have kurtosis installed, we can launch our GM rollup along with the local DA by running the following command:

    bash
    kurtosis run github.com/rollkit/gm@v0.3.1

    You should see an output like this:

    bash
    INFO[2024-07-02T11:15:43-04:00] Creating a new enclave for Starlark to run inside...
    +INFO[2024-07-02T11:15:46-04:00] Enclave 'sparse-grotto' created successfully
    +INFO[2024-07-02T11:15:46-04:00] Executing Starlark package at '/Users/matt/Code/rollkit/gm' as the passed argument '.' looks like a directory
    +INFO[2024-07-02T11:15:46-04:00] Compressing package 'github.com/rollkit/gm' at '.' for upload
    +INFO[2024-07-02T11:15:46-04:00] Uploading and executing package 'github.com/rollkit/gm'
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/gm:05bd40e - locally cached
    +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached
    +
    +Printing a message
    +Adding Local DA service
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '990942dc84ab4b3ab2c8d64002a5bafa'
    +
    +Printing a message
    +Adding GM service
    +
    +Printing a message
    +NOTE: This can take a few minutes to start up...
    +
    +Adding service with name 'gm' and image 'ghcr.io/rollkit/gm:05bd40e'
    +Service 'gm' added with service UUID 'ed0233f8291d4a42bdd0e173393af809'
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-02T11:15:50-04:00] ======================================================
    +INFO[2024-07-02T11:15:50-04:00] ||          Created enclave: sparse-grotto          ||
    +INFO[2024-07-02T11:15:50-04:00] ======================================================
    +Name:            sparse-grotto
    +UUID:            49dd471ac3bb
    +Status:          RUNNING
    +Creation Time:   Tue, 02 Jul 2024 11:15:43 EDT
    +Flags:
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                          Status
    +ed0233f8291d   gm         jsonrpc: 26657/tcp -> http://127.0.0.1:26657   RUNNING
    +990942dc84ab   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980     RUNNING

    Kurtosis has successfully launched the GM rollup and the local DA network. The GM rollup is running on port 26657 and the local DA network is running on port 7980. You can see the services running in docker as well:

    bash
    docker ps
    bash
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
    +af16c1a5e68c   ghcr.io/rollkit/gm:05bd40e        "/bin/sh -c 'rollkit…"   46 seconds ago   Up 45 seconds   0.0.0.0:26657->26657/tcp                                                           gm--ed0233f8291d4a42bdd0e173393af809
    +9db601efd92b   ghcr.io/rollkit/local-da:v0.2.1   "local-da -listen-all"   46 seconds ago   Up 46 seconds   0.0.0.0:7980->7980/tcp                                                             local-da--990942dc84ab4b3ab2c8d64002a5bafa
    +7fec3d659452   kurtosistech/core:0.90.1          "/bin/sh -c ./api-co…"   50 seconds ago   Up 50 seconds   0.0.0.0:59855->7443/tcp                                                            kurtosis-api--49dd471ac3bb413d96932d4020c20b21
    +198f7873bbec   fluent/fluent-bit:1.9.7           "/fluent-bit/bin/flu…"   51 seconds ago   Up 51 seconds   2020/tcp                                                                           kurtosis-logs-collector--49dd471ac3bb413d96932d4020c20b21
    +f921884f4132   kurtosistech/engine:0.90.1        "/bin/sh -c ./kurtos…"   2 hours ago      Up 2 hours      0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--1657ab3f1c3942658a3993a0e3b54327
    +c5363b77b543   traefik:2.10.6                    "/bin/sh -c 'mkdir -…"   2 hours ago      Up 2 hours      80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--1657ab3f1c3942658a3993a0e3b54327
    +39eb05e1c693   timberio/vector:0.31.0-debian     "/bin/sh -c 'printf …"   2 hours ago      Up 2 hours                                                                                         kurtosis-logs-aggregator

    We can see the GM rollup running in container gm--ed0233f8291d4a42bdd0e173393af809 and the local DA network running in container local-da--990942dc84ab4b3ab2c8d64002a5bafa.

    Let's hold on to the container name for the GM rollup as we will need it later.

    bash
    GM=$(docker ps --format '{{.Names}}' | grep gm)
    +echo $GM

    You can verify the rollup is running by checking the logs:

    bash
    docker logs $GM
    bash
    ...
    +12:21PM INF starting node with ABCI CometBFT in-process module=server
    +12:21PM INF starting node with Rollkit in-process module=server
    +12:21PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
    +12:21PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start impl=EventBus module=events msg="Starting EventBus service"
    +12:21PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
    +12:21PM INF Using default mempool ttl MempoolTTL=25 module=BlockManager
    +12:21PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
    +12:21PM INF service start impl=RPC module=server msg="Starting RPC service"
    +12:21PM INF service start impl=Node module=server msg="Starting Node service"
    +12:21PM INF starting P2P client module=server
    +12:21PM INF serving HTTP listen address=127.0.0.1:26657 module=server
    +12:21PM INF listening on address=/ip4/127.0.0.1/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF listening on address=/ip4/163.172.162.109/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF no seed nodes - only listening for connections module=p2p
    +12:21PM INF working in aggregator mode block time=1000 module=server
    +12:21PM INF Creating and publishing block height=22 module=BlockManager
    +12:21PM INF starting gRPC server... address=127.0.0.1:9290 module=grpc-server
    +12:21PM INF finalized block block_app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager num_txs_res=0 num_val_updates=0
    +12:21PM INF executed block app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager
    +12:21PM INF indexed block events height=22 module=txindex
    +...

    Good work so far, we have a Rollup node, DA network node, now we can start submitting transactions.

    💸 Transactions

    Since our rollup is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it $GM sh

    First, list your keys:

    bash
    rollkit keys list --keyring-backend test

    You should see an output like the following

    bash
    - address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +  name: alice
    +  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A5WPM5WzfNIPrGyha/TlHt0okdlzS1O4Gb1d1kU+xuG+"}'
    +  type: local
    +- address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
    +  name: bob
    +  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A+jOX/CWInFer2IkqgXGo0da9j7Ubq+e1LJWzTMDjwdt"}'
    +  type: local

    For convenience we export two of our keys like this:

    bash
    export KEY1=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +export KEY2=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3

    Now let's submit a transaction that sends coins from one account to another (don't worry about all the flags, for now, we just want to submit transaction from a high-level perspective):

    bash
    rollkit tx bank send $KEY2 $KEY1 42069stake --keyring-backend test --chain-id gm --fees 5000stake

    You'll be prompted to accept the transaction:

    bash
    auth_info:
    +  fee:
    +    amount: []
    +    gas_limit: "200000"
    +    granter: ""
    +    payer: ""
    +  signer_infos: []
    +  tip: null
    +body:
    +  extension_options: []
    +  memo: ""
    +  messages:
    +  - '@type': /cosmos.bank.v1beta1.MsgSend
    +    amount:
    +    - amount: "42069"
    +      denom: stake
    +    from_address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
    +    to_address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +  non_critical_extension_options: []
    +  timeout_height: "0"
    +signatures: []
    +confirm transaction before signing and broadcasting [y/N]: // [!code focus]

    Confirm and sign the transaction as prompted. now you see the transaction hash at the output:

    bash
    //...
    +
    +txhash: 677CAF6C80B85ACEF6F9EC7906FB3CB021322AAC78B015FA07D5112F2F824BFF

    ⚖️ Checking Balances

    Query balances after the transaction:

    bash
    rollkit query bank balances $KEY1

    The receiver’s balance should show an increase.

    bash
    balances: // [!code focus]
    +- amount: "42069" // [!code focus]
    +  denom: stake
    +pagination:
    +  next_key: null
    +  total: "0"

    For the sender’s balance:

    bash
    rollkit query bank balances $KEY2

    Output:

    bash
    balances: // [!code focus]
    +- amount: "99957931" // [!code focus]
    +  denom: stake
    +pagination:
    +  next_key: null
    +  total: "0"

    📦 GM world UI app

    Now that you have an idea of how to interact with the rollup with the rollkit CLI, let's look at the user interface (UI) application aspect of connecting a wallet to a rollup.

    Connecting your wallet to your rollup is as straightforward as connecting to any other blockchain. It assumes you have the Keplr wallet extension installed in your browser.

    🔗 Connecting your wallet

    Kurtosis spun up a UI app alongside your rollup already, so to connect your Keplr wallet to the application, simply open your browser and go to http://localhost:3000.

    Click the "Connect Wallet" button on the page, and approve the connection request in the Keplr prompt.

    Once authorized, your wallet address will be displayed, confirming that your wallet is successfully connected.

    gm-world-frontend-connected

    TIP

    If you run into any issues, make sure your Keplr wallet is updated and set to connect to your local environment.

    🎉 Next steps

    Congratulations! You've experienced connecting to a rollup from the user side — simple and straightforward. Now, you might consider exploring how to add more application logic to your rollup using the Cosmos SDK, as demonstrated in our Wordle App tutorial.

    ',55))]))}});export{y as __pageData,C as default}; diff --git a/pr-528/assets/tutorials_gm-world.md.Z6jfcI3H.lean.js b/pr-528/assets/tutorials_gm-world.md.Z6jfcI3H.lean.js new file mode 100644 index 000000000..bc03add02 --- /dev/null +++ b/pr-528/assets/tutorials_gm-world.md.Z6jfcI3H.lean.js @@ -0,0 +1,120 @@ +import{C as n}from"./chunks/callout.CtmRa3nB.js";import{c as h,a3 as i,j as a,G as t,o as l}from"./chunks/framework.B8-VHxRu.js";/* empty css */const k="/docs-preview/pr-528/img/gm-world-frontend-wallet-connected.png",p={class:"tip custom-block"},y=JSON.parse('{"title":"GM world rollup","description":"Build a sovereign rollup using only Rollkit CLI and a local DA network.","frontmatter":{"description":"Build a sovereign rollup using only Rollkit CLI and a local DA network.","head":[["meta",{"name":"og:title","content":"GM world rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world.md","filePath":"tutorials/gm-world.md","lastUpdated":1733420866000}'),e={name:"tutorials/gm-world.md"},C=Object.assign(e,{setup(F){return(r,s)=>(l(),h("div",null,[s[1]||(s[1]=i('

    GM world rollup

    🌞 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup (gm stands for "good morning") using Rollkit. Unlike the quick start guide, this tutorial provides a more practical approach to understanding sovereign rollup development.

    We will cover:

    • Building and configuring a Cosmos-SDK application-specific rollup blockchain.
    • Posting rollup data to a Data Availability (DA) network.
    • Executing transactions (the end goal).

    No prior understanding of the build process is required, just that it utilizes the Cosmos SDK for blockchain applications.

    ',6)),a("div",p,[s[0]||(s[0]=a("p",{class:"custom-block-title"},"TIP",-1)),t(n)]),s[2]||(s[2]=i(`

    🛠️ Dependencies

    As we move into more advanced use cases, we use kurtosis to help with managing all the services we need to run. You can install kurtosis here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   0.90.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🚀 Starting your rollup

    Now that we have kurtosis installed, we can launch our GM rollup along with the local DA by running the following command:

    bash
    kurtosis run github.com/rollkit/gm@v0.3.1

    You should see an output like this:

    bash
    INFO[2024-07-02T11:15:43-04:00] Creating a new enclave for Starlark to run inside...
    +INFO[2024-07-02T11:15:46-04:00] Enclave 'sparse-grotto' created successfully
    +INFO[2024-07-02T11:15:46-04:00] Executing Starlark package at '/Users/matt/Code/rollkit/gm' as the passed argument '.' looks like a directory
    +INFO[2024-07-02T11:15:46-04:00] Compressing package 'github.com/rollkit/gm' at '.' for upload
    +INFO[2024-07-02T11:15:46-04:00] Uploading and executing package 'github.com/rollkit/gm'
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/gm:05bd40e - locally cached
    +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached
    +
    +Printing a message
    +Adding Local DA service
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '990942dc84ab4b3ab2c8d64002a5bafa'
    +
    +Printing a message
    +Adding GM service
    +
    +Printing a message
    +NOTE: This can take a few minutes to start up...
    +
    +Adding service with name 'gm' and image 'ghcr.io/rollkit/gm:05bd40e'
    +Service 'gm' added with service UUID 'ed0233f8291d4a42bdd0e173393af809'
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-02T11:15:50-04:00] ======================================================
    +INFO[2024-07-02T11:15:50-04:00] ||          Created enclave: sparse-grotto          ||
    +INFO[2024-07-02T11:15:50-04:00] ======================================================
    +Name:            sparse-grotto
    +UUID:            49dd471ac3bb
    +Status:          RUNNING
    +Creation Time:   Tue, 02 Jul 2024 11:15:43 EDT
    +Flags:
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                          Status
    +ed0233f8291d   gm         jsonrpc: 26657/tcp -> http://127.0.0.1:26657   RUNNING
    +990942dc84ab   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980     RUNNING

    Kurtosis has successfully launched the GM rollup and the local DA network. The GM rollup is running on port 26657 and the local DA network is running on port 7980. You can see the services running in docker as well:

    bash
    docker ps
    bash
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
    +af16c1a5e68c   ghcr.io/rollkit/gm:05bd40e        "/bin/sh -c 'rollkit…"   46 seconds ago   Up 45 seconds   0.0.0.0:26657->26657/tcp                                                           gm--ed0233f8291d4a42bdd0e173393af809
    +9db601efd92b   ghcr.io/rollkit/local-da:v0.2.1   "local-da -listen-all"   46 seconds ago   Up 46 seconds   0.0.0.0:7980->7980/tcp                                                             local-da--990942dc84ab4b3ab2c8d64002a5bafa
    +7fec3d659452   kurtosistech/core:0.90.1          "/bin/sh -c ./api-co…"   50 seconds ago   Up 50 seconds   0.0.0.0:59855->7443/tcp                                                            kurtosis-api--49dd471ac3bb413d96932d4020c20b21
    +198f7873bbec   fluent/fluent-bit:1.9.7           "/fluent-bit/bin/flu…"   51 seconds ago   Up 51 seconds   2020/tcp                                                                           kurtosis-logs-collector--49dd471ac3bb413d96932d4020c20b21
    +f921884f4132   kurtosistech/engine:0.90.1        "/bin/sh -c ./kurtos…"   2 hours ago      Up 2 hours      0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--1657ab3f1c3942658a3993a0e3b54327
    +c5363b77b543   traefik:2.10.6                    "/bin/sh -c 'mkdir -…"   2 hours ago      Up 2 hours      80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--1657ab3f1c3942658a3993a0e3b54327
    +39eb05e1c693   timberio/vector:0.31.0-debian     "/bin/sh -c 'printf …"   2 hours ago      Up 2 hours                                                                                         kurtosis-logs-aggregator

    We can see the GM rollup running in container gm--ed0233f8291d4a42bdd0e173393af809 and the local DA network running in container local-da--990942dc84ab4b3ab2c8d64002a5bafa.

    Let's hold on to the container name for the GM rollup as we will need it later.

    bash
    GM=$(docker ps --format '{{.Names}}' | grep gm)
    +echo $GM

    You can verify the rollup is running by checking the logs:

    bash
    docker logs $GM
    bash
    ...
    +12:21PM INF starting node with ABCI CometBFT in-process module=server
    +12:21PM INF starting node with Rollkit in-process module=server
    +12:21PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
    +12:21PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start impl=EventBus module=events msg="Starting EventBus service"
    +12:21PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
    +12:21PM INF Using default mempool ttl MempoolTTL=25 module=BlockManager
    +12:21PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
    +12:21PM INF service start impl=RPC module=server msg="Starting RPC service"
    +12:21PM INF service start impl=Node module=server msg="Starting Node service"
    +12:21PM INF starting P2P client module=server
    +12:21PM INF serving HTTP listen address=127.0.0.1:26657 module=server
    +12:21PM INF listening on address=/ip4/127.0.0.1/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF listening on address=/ip4/163.172.162.109/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF no seed nodes - only listening for connections module=p2p
    +12:21PM INF working in aggregator mode block time=1000 module=server
    +12:21PM INF Creating and publishing block height=22 module=BlockManager
    +12:21PM INF starting gRPC server... address=127.0.0.1:9290 module=grpc-server
    +12:21PM INF finalized block block_app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager num_txs_res=0 num_val_updates=0
    +12:21PM INF executed block app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager
    +12:21PM INF indexed block events height=22 module=txindex
    +...

    Good work so far, we have a Rollup node, DA network node, now we can start submitting transactions.

    💸 Transactions

    Since our rollup is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it $GM sh

    First, list your keys:

    bash
    rollkit keys list --keyring-backend test

    You should see an output like the following

    bash
    - address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +  name: alice
    +  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A5WPM5WzfNIPrGyha/TlHt0okdlzS1O4Gb1d1kU+xuG+"}'
    +  type: local
    +- address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
    +  name: bob
    +  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A+jOX/CWInFer2IkqgXGo0da9j7Ubq+e1LJWzTMDjwdt"}'
    +  type: local

    For convenience we export two of our keys like this:

    bash
    export KEY1=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +export KEY2=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3

    Now let's submit a transaction that sends coins from one account to another (don't worry about all the flags, for now, we just want to submit transaction from a high-level perspective):

    bash
    rollkit tx bank send $KEY2 $KEY1 42069stake --keyring-backend test --chain-id gm --fees 5000stake

    You'll be prompted to accept the transaction:

    bash
    auth_info:
    +  fee:
    +    amount: []
    +    gas_limit: "200000"
    +    granter: ""
    +    payer: ""
    +  signer_infos: []
    +  tip: null
    +body:
    +  extension_options: []
    +  memo: ""
    +  messages:
    +  - '@type': /cosmos.bank.v1beta1.MsgSend
    +    amount:
    +    - amount: "42069"
    +      denom: stake
    +    from_address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
    +    to_address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +  non_critical_extension_options: []
    +  timeout_height: "0"
    +signatures: []
    +confirm transaction before signing and broadcasting [y/N]: // [!code focus]

    Confirm and sign the transaction as prompted. now you see the transaction hash at the output:

    bash
    //...
    +
    +txhash: 677CAF6C80B85ACEF6F9EC7906FB3CB021322AAC78B015FA07D5112F2F824BFF

    ⚖️ Checking Balances

    Query balances after the transaction:

    bash
    rollkit query bank balances $KEY1

    The receiver’s balance should show an increase.

    bash
    balances: // [!code focus]
    +- amount: "42069" // [!code focus]
    +  denom: stake
    +pagination:
    +  next_key: null
    +  total: "0"

    For the sender’s balance:

    bash
    rollkit query bank balances $KEY2

    Output:

    bash
    balances: // [!code focus]
    +- amount: "99957931" // [!code focus]
    +  denom: stake
    +pagination:
    +  next_key: null
    +  total: "0"

    📦 GM world UI app

    Now that you have an idea of how to interact with the rollup with the rollkit CLI, let's look at the user interface (UI) application aspect of connecting a wallet to a rollup.

    Connecting your wallet to your rollup is as straightforward as connecting to any other blockchain. It assumes you have the Keplr wallet extension installed in your browser.

    🔗 Connecting your wallet

    Kurtosis spun up a UI app alongside your rollup already, so to connect your Keplr wallet to the application, simply open your browser and go to http://localhost:3000.

    Click the "Connect Wallet" button on the page, and approve the connection request in the Keplr prompt.

    Once authorized, your wallet address will be displayed, confirming that your wallet is successfully connected.

    gm-world-frontend-connected

    TIP

    If you run into any issues, make sure your Keplr wallet is updated and set to connect to your local environment.

    🎉 Next steps

    Congratulations! You've experienced connecting to a rollup from the user side — simple and straightforward. Now, you might consider exploring how to add more application logic to your rollup using the Cosmos SDK, as demonstrated in our Wordle App tutorial.

    ',55))]))}});export{y as __pageData,C as default}; diff --git a/pr-528/assets/tutorials_kurtosis.md.DOF3pkOI.js b/pr-528/assets/tutorials_kurtosis.md.DOF3pkOI.js new file mode 100644 index 000000000..f477bf655 --- /dev/null +++ b/pr-528/assets/tutorials_kurtosis.md.DOF3pkOI.js @@ -0,0 +1,110 @@ +import{C as n}from"./chunks/callout.CtmRa3nB.js";import{c as h,a3 as i,j as a,G as t,o as l}from"./chunks/framework.B8-VHxRu.js";/* empty css */const k={class:"tip custom-block"},o=JSON.parse('{"title":"🟩 Kurtosis","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🟩 Kurtosis | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/kurtosis.md","filePath":"tutorials/kurtosis.md","lastUpdated":1733420866000}'),p={name:"tutorials/kurtosis.md"},E=Object.assign(p,{setup(e){return(F,s)=>(l(),h("div",null,[s[1]||(s[1]=i('

    🟩 Kurtosis

    This tutorial is going to show you how to deploy the wordle chain using Kurtosis.

    You can learn more about Kurtosis here.

    Disclaimer

    Kurtosis currently does not fully support data persistence across runs, because of this it is not recommended for production use.

    This tutorial is WIP and does not currently support the new sequencing API introduced in rollkit v0.14.0

    ',4)),a("div",k,[s[0]||(s[0]=a("p",{class:"custom-block-title"},"TIP",-1)),t(n)]),s[2]||(s[2]=i(`

    💻 Pre-requisites

    Make sure you have your wordle chain ready by completing the Build your chain tutorial.

    🛠️ Dependencies

    💻 Kurtosis CLI

    You can install the kurtosis cli here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   1.3.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🛠️ Setting up your environment

    The wordle chain is a relatively simple chain in that there are just 2 nodes involved: the chain and the data availability network (DA) node.

    We will use a local DA node for this tutorial and run it in the same Kurtosis enclave as our chain.

    To save time, we can use the local DA kurtosis package found here.

    This will allow us to focus on how we can run the wordle chain in Kurtosis.

    🐳 Dockerfile

    First, we need to create a Dockerfile for our wordle chain.

    Create a new file called Dockerfile in the root of the wordle directory and add the following code from the Docker Compose tutorial.

    This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain.

    Build the docker image by running the following command:

    bash
    docker build -t wordle .

    You can then see the built image by running:

    bash
    docker images

    You should see the following output:

    bash
    REPOSITORY  TAG     IMAGE ID       CREATED         SIZE
    +wordle      latest  5d3533c1ea1c   8 seconds ago   443MB

    🟢 Kurtosis

    To initialize a kurtosis package, run the following command:

    bash
    kurtosis package init

    This will create a kurtosis.yml file and a main.star file. The kurtosis.yml file is where you define your package. Open it and update it to something like the following:

    yaml
    name: github.com/rollkit/wordle
    +description: |-
    +  # github.com/rollkit/wordle
    +  A simple wordle chain for the Rollkit tutorial.
    +replace: {}

    You should replace github.com/rollkit/wordle with your own repository name.

    The main.star file is where we define the kurtosis package. Open it up and replace the contents with the following code:

    python
    # This Kurtosis package spins up a wordle chain that connects to a DA node
    +
    +# Import the local da kurtosis package
    +da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0")
    +
    +
    +def run(plan):
    +    # Start the DA node
    +    da_address = da_node.run(
    +        plan,
    +    )
    +    plan.print("connecting to da layer via {0}".format(da_address))
    +
    +    # Define the wordle start command
    +    wordle_start_cmd = [
    +        "rollkit",
    +        "start",
    +        "--rollkit.aggregator",
    +        "--rollkit.da_address {0}".format(da_address),
    +        "--rollkit.sequencer_address {0}".format(sequencer_address),
    +        "--rollkit.sequencer_rollup_id wordle",
    +    ]
    +    # Define the jsonrpc ports
    +    wordle_ports = {
    +        "jsonrpc": PortSpec(
    +            number=26657, transport_protocol="TCP", application_protocol="http"
    +        ),
    +    }
    +    # Start the wordle chain
    +    wordle = plan.add_service(
    +        name="wordle",
    +        config=ServiceConfig(
    +            # Use the wordle image we just built
    +            image="wordle",
    +            # Set the command to start the wordle chain in the docker container
    +            cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)],
    +            ports=wordle_ports,
    +            public_ports=wordle_ports,
    +        ),
    +    )

    We now have all we need to run the wordle chain and connect to a local DA node.

    🚀 Run Wordle chain

    Run your wordle chain by running the following command:

    bash
    kurtosis run .

    You'll see an output like the following:

    bash
    INFO[2024-07-16T14:56:39-04:00] No Kurtosis engine was found; attempting to start one... 
    +INFO[2024-07-16T14:56:39-04:00] Starting the centralized logs components...  
    +INFO[2024-07-16T14:56:39-04:00] Centralized logs components started.         
    +INFO[2024-07-16T14:56:40-04:00] Reverse proxy started.                       
    +INFO[2024-07-16T14:56:43-04:00] Successfully started Kurtosis engine         
    +INFO[2024-07-16T14:56:43-04:00] Creating a new enclave for Starlark to run inside... 
    +INFO[2024-07-16T14:56:46-04:00] Enclave 'yearning-bog' created successfully  
    +INFO[2024-07-16T14:56:46-04:00] Executing Starlark package at '/Users/matt/Code/test/wordle' as the passed argument '.' looks like a directory 
    +INFO[2024-07-16T14:56:46-04:00] Compressing package 'github.com/example-org/example-package' at '.' for upload 
    +INFO[2024-07-16T14:56:48-04:00] Uploading and executing package 'github.com/example-org/example-package' 
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached
    +> wordle - locally cached
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '775883b14f7f4db393addcebe3afe34d'
    +
    +Printing a message
    +connecting to da layer via http://172.16.0.5:7980
    +
    +Adding service with name 'wordle' and image 'wordle'
    +Service 'wordle' added with service UUID '5a969765174a47ada0727bd68e087f36'
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-16T14:56:54-04:00] ===================================================== 
    +INFO[2024-07-16T14:56:54-04:00] ||          Created enclave: yearning-bog          || 
    +INFO[2024-07-16T14:56:54-04:00] ===================================================== 
    +Name:            yearning-bog
    +UUID:            dc4026b38a60
    +Status:          RUNNING
    +Creation Time:   Tue, 16 Jul 2024 14:56:43 EDT
    +Flags:           
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                          Status
    +775883b14f7f   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980     RUNNING
    +5a969765174a   wordle     jsonrpc: 26657/tcp -> http://127.0.0.1:26657   RUNNING

    Congratulations! You have successfully run the wordle chain in Kurtosis.

    🚀 Interacting with the chain

    Since we used the docker image to run the chain in Kurtosis, we can interact with the chain by entering the docker container.

    You can see the docker containers running with the wordle chain and the local DA node by running the following command:

    bash
    docker ps

    You should see the following output:

    bash
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
    +cbf66a881cb2   wordle:latest                     "/bin/sh -c 'rollkit…"   5 seconds ago    Up 4 seconds    0.0.0.0:26657->26657/tcp                                                           wordle--5a969765174a47ada0727bd68e087f36
    +09bdf1e94862   ghcr.io/rollkit/local-da:v0.2.1   "local-da -listen-all"   6 seconds ago    Up 5 seconds    0.0.0.0:7980->7980/tcp                                                             local-da--775883b14f7f4db393addcebe3afe34d
    +2b50989f65cd   kurtosistech/core:0.90.1          "/bin/sh -c ./api-co…"   14 seconds ago   Up 13 seconds   0.0.0.0:57050->7443/tcp                                                            kurtosis-api--dc4026b38a604b82af88a0cd9bedb245
    +74b6708de48e   fluent/fluent-bit:1.9.7           "/fluent-bit/bin/flu…"   14 seconds ago   Up 13 seconds   2020/tcp                                                                           kurtosis-logs-collector--dc4026b38a604b82af88a0cd9bedb245
    +f1a64151bd29   kurtosistech/engine:0.90.1        "/bin/sh -c ./kurtos…"   18 seconds ago   Up 17 seconds   0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--089b9be758464668857fa46c2187bfe3
    +ce2291909a3d   traefik:2.10.6                    "/bin/sh -c 'mkdir -…"   19 seconds ago   Up 18 seconds   80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--089b9be758464668857fa46c2187bfe3
    +2e8da9bdf81f   timberio/vector:0.31.0-debian     "/bin/sh -c 'printf …"   19 seconds ago   Up 18 seconds                                                                                      kurtosis-logs-aggregator

    We can see the wordle chain running in container wordle--5a969765174a47ada0727bd68e087f36 and the local DA network running in container local-da--775883b14f7f4db393addcebe3afe34d.

    Let's hold on to the container name for the world chain as we will need it later.

    bash
    WORDLE=$(docker ps --format '{{.Names}}' | grep wordle)
    +echo $WORDLE

    You can verify the chain is running by checking the logs:

    bash
    docker logs $WORDLE

    You should see the following output:

    bash
    ...
    +6:56PM INF executed block app_hash=313F7C52E30B3DEE3511D66B3E2C1B2A56DF4CDE54A90B02AC79678D822B644A height=5 module=BlockManager
    +6:56PM INF indexed block events height=5 module=txindex
    +6:56PM INF Creating and publishing block height=6 module=BlockManager
    +6:56PM INF finalized block block_app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager num_txs_res=0 num_val_updates=0
    +6:56PM INF executed block app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager
    +6:56PM INF indexed block events height=6 module=txindex
    +6:57PM INF Creating and publishing block height=7 module=BlockManager
    +6:57PM INF finalized block block_app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager num_txs_res=0 num_val_updates=0
    +6:57PM INF executed block app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager
    +6:57PM INF indexed block events height=7 module=txindex
    +6:57PM INF Creating and publishing block height=8 module=BlockManager
    +6:57PM INF finalized block block_app_hash=C93D26AEE9B611952C8122DEB67DBAD95B3604F5C9C5DFBA95A3E7A4CF0AF641 height=8 module=BlockManager num_txs_res=0 num_val_updates=0
    +...

    Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it $WORDLE sh

    Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the Wordle tutorial.

    Once you are done interacting with your chain, you can exit out of your docker container with:

    bash
    exit

    Then you can shut down your chain and kurtosis by running:

    bash
    kurtosis clean -a

    🎉 Next steps

    Congratulations again! You now know how to run your chain with Kurtosis and interact with it using the Rollkit CLI in the docker container.

    `,60))]))}});export{o as __pageData,E as default}; diff --git a/pr-528/assets/tutorials_kurtosis.md.DOF3pkOI.lean.js b/pr-528/assets/tutorials_kurtosis.md.DOF3pkOI.lean.js new file mode 100644 index 000000000..f477bf655 --- /dev/null +++ b/pr-528/assets/tutorials_kurtosis.md.DOF3pkOI.lean.js @@ -0,0 +1,110 @@ +import{C as n}from"./chunks/callout.CtmRa3nB.js";import{c as h,a3 as i,j as a,G as t,o as l}from"./chunks/framework.B8-VHxRu.js";/* empty css */const k={class:"tip custom-block"},o=JSON.parse('{"title":"🟩 Kurtosis","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🟩 Kurtosis | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/kurtosis.md","filePath":"tutorials/kurtosis.md","lastUpdated":1733420866000}'),p={name:"tutorials/kurtosis.md"},E=Object.assign(p,{setup(e){return(F,s)=>(l(),h("div",null,[s[1]||(s[1]=i('

    🟩 Kurtosis

    This tutorial is going to show you how to deploy the wordle chain using Kurtosis.

    You can learn more about Kurtosis here.

    Disclaimer

    Kurtosis currently does not fully support data persistence across runs, because of this it is not recommended for production use.

    This tutorial is WIP and does not currently support the new sequencing API introduced in rollkit v0.14.0

    ',4)),a("div",k,[s[0]||(s[0]=a("p",{class:"custom-block-title"},"TIP",-1)),t(n)]),s[2]||(s[2]=i(`

    💻 Pre-requisites

    Make sure you have your wordle chain ready by completing the Build your chain tutorial.

    🛠️ Dependencies

    💻 Kurtosis CLI

    You can install the kurtosis cli here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   1.3.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🛠️ Setting up your environment

    The wordle chain is a relatively simple chain in that there are just 2 nodes involved: the chain and the data availability network (DA) node.

    We will use a local DA node for this tutorial and run it in the same Kurtosis enclave as our chain.

    To save time, we can use the local DA kurtosis package found here.

    This will allow us to focus on how we can run the wordle chain in Kurtosis.

    🐳 Dockerfile

    First, we need to create a Dockerfile for our wordle chain.

    Create a new file called Dockerfile in the root of the wordle directory and add the following code from the Docker Compose tutorial.

    This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain.

    Build the docker image by running the following command:

    bash
    docker build -t wordle .

    You can then see the built image by running:

    bash
    docker images

    You should see the following output:

    bash
    REPOSITORY  TAG     IMAGE ID       CREATED         SIZE
    +wordle      latest  5d3533c1ea1c   8 seconds ago   443MB

    🟢 Kurtosis

    To initialize a kurtosis package, run the following command:

    bash
    kurtosis package init

    This will create a kurtosis.yml file and a main.star file. The kurtosis.yml file is where you define your package. Open it and update it to something like the following:

    yaml
    name: github.com/rollkit/wordle
    +description: |-
    +  # github.com/rollkit/wordle
    +  A simple wordle chain for the Rollkit tutorial.
    +replace: {}

    You should replace github.com/rollkit/wordle with your own repository name.

    The main.star file is where we define the kurtosis package. Open it up and replace the contents with the following code:

    python
    # This Kurtosis package spins up a wordle chain that connects to a DA node
    +
    +# Import the local da kurtosis package
    +da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0")
    +
    +
    +def run(plan):
    +    # Start the DA node
    +    da_address = da_node.run(
    +        plan,
    +    )
    +    plan.print("connecting to da layer via {0}".format(da_address))
    +
    +    # Define the wordle start command
    +    wordle_start_cmd = [
    +        "rollkit",
    +        "start",
    +        "--rollkit.aggregator",
    +        "--rollkit.da_address {0}".format(da_address),
    +        "--rollkit.sequencer_address {0}".format(sequencer_address),
    +        "--rollkit.sequencer_rollup_id wordle",
    +    ]
    +    # Define the jsonrpc ports
    +    wordle_ports = {
    +        "jsonrpc": PortSpec(
    +            number=26657, transport_protocol="TCP", application_protocol="http"
    +        ),
    +    }
    +    # Start the wordle chain
    +    wordle = plan.add_service(
    +        name="wordle",
    +        config=ServiceConfig(
    +            # Use the wordle image we just built
    +            image="wordle",
    +            # Set the command to start the wordle chain in the docker container
    +            cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)],
    +            ports=wordle_ports,
    +            public_ports=wordle_ports,
    +        ),
    +    )

    We now have all we need to run the wordle chain and connect to a local DA node.

    🚀 Run Wordle chain

    Run your wordle chain by running the following command:

    bash
    kurtosis run .

    You'll see an output like the following:

    bash
    INFO[2024-07-16T14:56:39-04:00] No Kurtosis engine was found; attempting to start one... 
    +INFO[2024-07-16T14:56:39-04:00] Starting the centralized logs components...  
    +INFO[2024-07-16T14:56:39-04:00] Centralized logs components started.         
    +INFO[2024-07-16T14:56:40-04:00] Reverse proxy started.                       
    +INFO[2024-07-16T14:56:43-04:00] Successfully started Kurtosis engine         
    +INFO[2024-07-16T14:56:43-04:00] Creating a new enclave for Starlark to run inside... 
    +INFO[2024-07-16T14:56:46-04:00] Enclave 'yearning-bog' created successfully  
    +INFO[2024-07-16T14:56:46-04:00] Executing Starlark package at '/Users/matt/Code/test/wordle' as the passed argument '.' looks like a directory 
    +INFO[2024-07-16T14:56:46-04:00] Compressing package 'github.com/example-org/example-package' at '.' for upload 
    +INFO[2024-07-16T14:56:48-04:00] Uploading and executing package 'github.com/example-org/example-package' 
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached
    +> wordle - locally cached
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '775883b14f7f4db393addcebe3afe34d'
    +
    +Printing a message
    +connecting to da layer via http://172.16.0.5:7980
    +
    +Adding service with name 'wordle' and image 'wordle'
    +Service 'wordle' added with service UUID '5a969765174a47ada0727bd68e087f36'
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-16T14:56:54-04:00] ===================================================== 
    +INFO[2024-07-16T14:56:54-04:00] ||          Created enclave: yearning-bog          || 
    +INFO[2024-07-16T14:56:54-04:00] ===================================================== 
    +Name:            yearning-bog
    +UUID:            dc4026b38a60
    +Status:          RUNNING
    +Creation Time:   Tue, 16 Jul 2024 14:56:43 EDT
    +Flags:           
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                          Status
    +775883b14f7f   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980     RUNNING
    +5a969765174a   wordle     jsonrpc: 26657/tcp -> http://127.0.0.1:26657   RUNNING

    Congratulations! You have successfully run the wordle chain in Kurtosis.

    🚀 Interacting with the chain

    Since we used the docker image to run the chain in Kurtosis, we can interact with the chain by entering the docker container.

    You can see the docker containers running with the wordle chain and the local DA node by running the following command:

    bash
    docker ps

    You should see the following output:

    bash
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
    +cbf66a881cb2   wordle:latest                     "/bin/sh -c 'rollkit…"   5 seconds ago    Up 4 seconds    0.0.0.0:26657->26657/tcp                                                           wordle--5a969765174a47ada0727bd68e087f36
    +09bdf1e94862   ghcr.io/rollkit/local-da:v0.2.1   "local-da -listen-all"   6 seconds ago    Up 5 seconds    0.0.0.0:7980->7980/tcp                                                             local-da--775883b14f7f4db393addcebe3afe34d
    +2b50989f65cd   kurtosistech/core:0.90.1          "/bin/sh -c ./api-co…"   14 seconds ago   Up 13 seconds   0.0.0.0:57050->7443/tcp                                                            kurtosis-api--dc4026b38a604b82af88a0cd9bedb245
    +74b6708de48e   fluent/fluent-bit:1.9.7           "/fluent-bit/bin/flu…"   14 seconds ago   Up 13 seconds   2020/tcp                                                                           kurtosis-logs-collector--dc4026b38a604b82af88a0cd9bedb245
    +f1a64151bd29   kurtosistech/engine:0.90.1        "/bin/sh -c ./kurtos…"   18 seconds ago   Up 17 seconds   0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--089b9be758464668857fa46c2187bfe3
    +ce2291909a3d   traefik:2.10.6                    "/bin/sh -c 'mkdir -…"   19 seconds ago   Up 18 seconds   80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--089b9be758464668857fa46c2187bfe3
    +2e8da9bdf81f   timberio/vector:0.31.0-debian     "/bin/sh -c 'printf …"   19 seconds ago   Up 18 seconds                                                                                      kurtosis-logs-aggregator

    We can see the wordle chain running in container wordle--5a969765174a47ada0727bd68e087f36 and the local DA network running in container local-da--775883b14f7f4db393addcebe3afe34d.

    Let's hold on to the container name for the world chain as we will need it later.

    bash
    WORDLE=$(docker ps --format '{{.Names}}' | grep wordle)
    +echo $WORDLE

    You can verify the chain is running by checking the logs:

    bash
    docker logs $WORDLE

    You should see the following output:

    bash
    ...
    +6:56PM INF executed block app_hash=313F7C52E30B3DEE3511D66B3E2C1B2A56DF4CDE54A90B02AC79678D822B644A height=5 module=BlockManager
    +6:56PM INF indexed block events height=5 module=txindex
    +6:56PM INF Creating and publishing block height=6 module=BlockManager
    +6:56PM INF finalized block block_app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager num_txs_res=0 num_val_updates=0
    +6:56PM INF executed block app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager
    +6:56PM INF indexed block events height=6 module=txindex
    +6:57PM INF Creating and publishing block height=7 module=BlockManager
    +6:57PM INF finalized block block_app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager num_txs_res=0 num_val_updates=0
    +6:57PM INF executed block app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager
    +6:57PM INF indexed block events height=7 module=txindex
    +6:57PM INF Creating and publishing block height=8 module=BlockManager
    +6:57PM INF finalized block block_app_hash=C93D26AEE9B611952C8122DEB67DBAD95B3604F5C9C5DFBA95A3E7A4CF0AF641 height=8 module=BlockManager num_txs_res=0 num_val_updates=0
    +...

    Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it $WORDLE sh

    Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the Wordle tutorial.

    Once you are done interacting with your chain, you can exit out of your docker container with:

    bash
    exit

    Then you can shut down your chain and kurtosis by running:

    bash
    kurtosis clean -a

    🎉 Next steps

    Congratulations again! You now know how to run your chain with Kurtosis and interact with it using the Rollkit CLI in the docker container.

    `,60))]))}});export{o as __pageData,E as default}; diff --git a/pr-528/assets/tutorials_quick-start.md.y19er4dj.js b/pr-528/assets/tutorials_quick-start.md.y19er4dj.js new file mode 100644 index 000000000..53a1c9d8f --- /dev/null +++ b/pr-528/assets/tutorials_quick-start.md.y19er4dj.js @@ -0,0 +1,7 @@ +import{c as l}from"./chunks/constants.C1G_zmdY.js";import{c as n,j as i,a,a3 as t,t as e,k as h,o as k}from"./chunks/framework.B8-VHxRu.js";const p={class:"language-bash vp-adaptive-theme"},o={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},r={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},C=JSON.parse('{"title":"Quick start guide","description":"Quickly start a rollup node using the Rollkit CLI.","frontmatter":{"description":"Quickly start a rollup node using the Rollkit CLI.","head":[["meta",{"name":"og:title","content":"Quick start guide | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/quick-start.md","filePath":"tutorials/quick-start.md","lastUpdated":1733420866000}'),F={name:"tutorials/quick-start.md"},B=Object.assign(F,{setup(g){return(u,s)=>(k(),n("div",null,[s[3]||(s[3]=i("h1",{id:"quick-start-guide",tabindex:"-1"},[a("Quick start guide "),i("a",{class:"header-anchor",href:"#quick-start-guide","aria-label":'Permalink to "Quick start guide"'},"​")],-1)),s[4]||(s[4]=i("p",null,"Welcome to Rollkit, a sovereign rollup framework! The easiest way to launch your sovereign rollup node is by using the Rollkit CLI.",-1)),s[5]||(s[5]=i("h2",{id:"📦-install-rollkit-cli",tabindex:"-1"},[a("📦 Install Rollkit (CLI) "),i("a",{class:"header-anchor",href:"#📦-install-rollkit-cli","aria-label":'Permalink to "📦 Install Rollkit (CLI)"'},"​")],-1)),s[6]||(s[6]=i("p",null,"To install Rollkit, run the following command in your terminal:",-1)),i("div",p,[s[1]||(s[1]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[2]||(s[2]=i("span",{class:"lang"},"bash",-1)),i("pre",o,[i("code",null,[i("span",r,[s[0]||(s[0]=t('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),i("span",d," "+e(h(l).rollkitLatestTag),1)])])])]),s[7]||(s[7]=t(`

    Verify the installation by checking the Rollkit version:

    bash
    rollkit version

    A successful installation will display the version number and its associated git commit hash.

    🚀 Run your sovereign rollup node

    To start a basic sovereign rollup node, execute:

    bash
    rollkit start

    Upon execution, the CLI will output log entries that provide insights into the node's initialization and operation:

    bash
    I[2024-05-01|09:58:46.001] Found private validator                      module=main keyFile=/root/.rollkit/config/priv_validator_key.json stateFile=/root/.rollkit/data/priv_validator_state.json
    +I[2024-05-01|09:58:46.002] Found node key                               module=main path=/root/.rollkit/config/node_key.json
    +I[2024-05-01|09:58:46.002] Found genesis file                           module=main path=/root/.rollkit/config/genesis.json
    +...
    +I[2024-05-01|09:58:46.080] Started node                                 module=main
    +I[2024-05-01|09:58:46.081] Creating and publishing block                module=BlockManager height=223
    +I[2024-05-01|09:58:46.082] Finalized block                              module=BlockManager height=223 num_txs_res=0 num_val_updates=0 block_app_hash=

    🎉 Conclusion

    That's it! Your sovereign rollup node is now up and running. It's incredibly simple to start a blockchain (which is essentially what a rollup is) these days using Rollkit. Explore further and discover how you can build useful applications on Rollkit. Good luck!

    `,10))]))}});export{C as __pageData,B as default}; diff --git a/pr-528/assets/tutorials_quick-start.md.y19er4dj.lean.js b/pr-528/assets/tutorials_quick-start.md.y19er4dj.lean.js new file mode 100644 index 000000000..53a1c9d8f --- /dev/null +++ b/pr-528/assets/tutorials_quick-start.md.y19er4dj.lean.js @@ -0,0 +1,7 @@ +import{c as l}from"./chunks/constants.C1G_zmdY.js";import{c as n,j as i,a,a3 as t,t as e,k as h,o as k}from"./chunks/framework.B8-VHxRu.js";const p={class:"language-bash vp-adaptive-theme"},o={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},r={class:"line"},d={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},C=JSON.parse('{"title":"Quick start guide","description":"Quickly start a rollup node using the Rollkit CLI.","frontmatter":{"description":"Quickly start a rollup node using the Rollkit CLI.","head":[["meta",{"name":"og:title","content":"Quick start guide | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/quick-start.md","filePath":"tutorials/quick-start.md","lastUpdated":1733420866000}'),F={name:"tutorials/quick-start.md"},B=Object.assign(F,{setup(g){return(u,s)=>(k(),n("div",null,[s[3]||(s[3]=i("h1",{id:"quick-start-guide",tabindex:"-1"},[a("Quick start guide "),i("a",{class:"header-anchor",href:"#quick-start-guide","aria-label":'Permalink to "Quick start guide"'},"​")],-1)),s[4]||(s[4]=i("p",null,"Welcome to Rollkit, a sovereign rollup framework! The easiest way to launch your sovereign rollup node is by using the Rollkit CLI.",-1)),s[5]||(s[5]=i("h2",{id:"📦-install-rollkit-cli",tabindex:"-1"},[a("📦 Install Rollkit (CLI) "),i("a",{class:"header-anchor",href:"#📦-install-rollkit-cli","aria-label":'Permalink to "📦 Install Rollkit (CLI)"'},"​")],-1)),s[6]||(s[6]=i("p",null,"To install Rollkit, run the following command in your terminal:",-1)),i("div",p,[s[1]||(s[1]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[2]||(s[2]=i("span",{class:"lang"},"bash",-1)),i("pre",o,[i("code",null,[i("span",r,[s[0]||(s[0]=t('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),i("span",d," "+e(h(l).rollkitLatestTag),1)])])])]),s[7]||(s[7]=t(`

    Verify the installation by checking the Rollkit version:

    bash
    rollkit version

    A successful installation will display the version number and its associated git commit hash.

    🚀 Run your sovereign rollup node

    To start a basic sovereign rollup node, execute:

    bash
    rollkit start

    Upon execution, the CLI will output log entries that provide insights into the node's initialization and operation:

    bash
    I[2024-05-01|09:58:46.001] Found private validator                      module=main keyFile=/root/.rollkit/config/priv_validator_key.json stateFile=/root/.rollkit/data/priv_validator_state.json
    +I[2024-05-01|09:58:46.002] Found node key                               module=main path=/root/.rollkit/config/node_key.json
    +I[2024-05-01|09:58:46.002] Found genesis file                           module=main path=/root/.rollkit/config/genesis.json
    +...
    +I[2024-05-01|09:58:46.080] Started node                                 module=main
    +I[2024-05-01|09:58:46.081] Creating and publishing block                module=BlockManager height=223
    +I[2024-05-01|09:58:46.082] Finalized block                              module=BlockManager height=223 num_txs_res=0 num_val_updates=0 block_app_hash=

    🎉 Conclusion

    That's it! Your sovereign rollup node is now up and running. It's incredibly simple to start a blockchain (which is essentially what a rollup is) these days using Rollkit. Explore further and discover how you can build useful applications on Rollkit. Good luck!

    `,10))]))}});export{C as __pageData,B as default}; diff --git a/pr-528/assets/tutorials_sequencing_astria.md.CJuWRfLV.js b/pr-528/assets/tutorials_sequencing_astria.md.CJuWRfLV.js new file mode 100644 index 000000000..fc13e62b6 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_astria.md.CJuWRfLV.js @@ -0,0 +1 @@ +import{_ as n,c as r,j as e,a,o as s}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Astria Sequencing","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Astria Sequencing | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/astria.md","filePath":"tutorials/sequencing/astria.md","lastUpdated":1733420866000}'),i={name:"tutorials/sequencing/astria.md"};function o(c,t,l,u,d,p){return s(),r("div",null,t[0]||(t[0]=[e("h1",{id:"astria-sequencing",tabindex:"-1"},[a("Astria Sequencing "),e("a",{class:"header-anchor",href:"#astria-sequencing","aria-label":'Permalink to "Astria Sequencing"'},"​")],-1),e("p",null,"Coming soon ...",-1),e("p",null,[a("Track progress on the "),e("a",{href:"https://github.com/rollkit/astria-sequencer",target:"_blank",rel:"noreferrer"},"GitHub")],-1)]))}const f=n(i,[["render",o]]);export{m as __pageData,f as default}; diff --git a/pr-528/assets/tutorials_sequencing_astria.md.CJuWRfLV.lean.js b/pr-528/assets/tutorials_sequencing_astria.md.CJuWRfLV.lean.js new file mode 100644 index 000000000..fc13e62b6 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_astria.md.CJuWRfLV.lean.js @@ -0,0 +1 @@ +import{_ as n,c as r,j as e,a,o as s}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Astria Sequencing","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Astria Sequencing | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/astria.md","filePath":"tutorials/sequencing/astria.md","lastUpdated":1733420866000}'),i={name:"tutorials/sequencing/astria.md"};function o(c,t,l,u,d,p){return s(),r("div",null,t[0]||(t[0]=[e("h1",{id:"astria-sequencing",tabindex:"-1"},[a("Astria Sequencing "),e("a",{class:"header-anchor",href:"#astria-sequencing","aria-label":'Permalink to "Astria Sequencing"'},"​")],-1),e("p",null,"Coming soon ...",-1),e("p",null,[a("Track progress on the "),e("a",{href:"https://github.com/rollkit/astria-sequencer",target:"_blank",rel:"noreferrer"},"GitHub")],-1)]))}const f=n(i,[["render",o]]);export{m as __pageData,f as default}; diff --git a/pr-528/assets/tutorials_sequencing_based.md.B5l9xZtJ.js b/pr-528/assets/tutorials_sequencing_based.md.B5l9xZtJ.js new file mode 100644 index 000000000..5bb24a46d --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_based.md.B5l9xZtJ.js @@ -0,0 +1 @@ +import{_ as n,c as s,j as e,a as t,o as r}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Based Sequencing","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Based Sequencing | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/based.md","filePath":"tutorials/sequencing/based.md","lastUpdated":1733420866000}'),o={name:"tutorials/sequencing/based.md"};function i(c,a,d,l,u,p){return r(),s("div",null,a[0]||(a[0]=[e("h1",{id:"based-sequencing",tabindex:"-1"},[t("Based Sequencing "),e("a",{class:"header-anchor",href:"#based-sequencing","aria-label":'Permalink to "Based Sequencing"'},"​")],-1),e("p",null,"Coming soon ...",-1),e("p",null,[t("Track progress on the "),e("a",{href:"https://github.com/rollkit/based-sequencer",target:"_blank",rel:"noreferrer"},"GitHub")],-1)]))}const b=n(o,[["render",i]]);export{m as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_sequencing_based.md.B5l9xZtJ.lean.js b/pr-528/assets/tutorials_sequencing_based.md.B5l9xZtJ.lean.js new file mode 100644 index 000000000..5bb24a46d --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_based.md.B5l9xZtJ.lean.js @@ -0,0 +1 @@ +import{_ as n,c as s,j as e,a as t,o as r}from"./chunks/framework.B8-VHxRu.js";const m=JSON.parse('{"title":"Based Sequencing","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Based Sequencing | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/based.md","filePath":"tutorials/sequencing/based.md","lastUpdated":1733420866000}'),o={name:"tutorials/sequencing/based.md"};function i(c,a,d,l,u,p){return r(),s("div",null,a[0]||(a[0]=[e("h1",{id:"based-sequencing",tabindex:"-1"},[t("Based Sequencing "),e("a",{class:"header-anchor",href:"#based-sequencing","aria-label":'Permalink to "Based Sequencing"'},"​")],-1),e("p",null,"Coming soon ...",-1),e("p",null,[t("Track progress on the "),e("a",{href:"https://github.com/rollkit/based-sequencer",target:"_blank",rel:"noreferrer"},"GitHub")],-1)]))}const b=n(o,[["render",i]]);export{m as __pageData,b as default}; diff --git a/pr-528/assets/tutorials_sequencing_centralized.md.BGImpjo9.js b/pr-528/assets/tutorials_sequencing_centralized.md.BGImpjo9.js new file mode 100644 index 000000000..906ed5999 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_centralized.md.BGImpjo9.js @@ -0,0 +1,31 @@ +import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as t,a3 as a,j as i,t as n,k as l,o as h}from"./chunks/framework.B8-VHxRu.js";const r="/docs-preview/pr-528/assets/sequencing.DlIPdR1A.jpg",p={class:"language-sh vp-adaptive-theme"},d={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},k={class:"line"},o={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},C=JSON.parse('{"title":"Centralized Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Centralized Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/centralized.md","filePath":"tutorials/sequencing/centralized.md","lastUpdated":1733420866000}'),c={name:"tutorials/sequencing/centralized.md"},B=Object.assign(c,{setup(F){return(u,s)=>(h(),t("div",null,[s[5]||(s[5]=a('

    Centralized Sequencer

    A centralized sequencer is a sequencing middleware that receives rollup transactions and provides a local sequencing capabilities. Meaning, the transactions are ordered in the order they are received by the sequencer without any censorship. Further, the sequenced batches are made available in the DA network (such as Celestia). Under the hood, the centralized sequencer is a GRPC server that implements go-sequencing interface and the server is hosted by the same node that is running the aggregator for the Rollkit rollup.

    Rollkit with Centralized Sequencer

    Prerequisites

    This tutorial serves as a comprehensive guide for using the centralized-sequencer with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    TIP

    It is important to note that the centralized sequencer expects a DA layer to be running when it starts. This means that you need to launch your DA Layer before starting the centralized sequencer.

    Additionally, you should have completed one of the DA Layer tutorials and have your DA layer ready to use with the centralized sequencer. This tutorial will use the local-da layer as an example.

    Installation the Centralized Sequencer

    ',9)),i("div",p,[s[3]||(s[3]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[4]||(s[4]=i("span",{class:"lang"},"sh",-1)),i("pre",d,[i("code",null,[i("span",k,[s[0]||(s[0]=a('git clone --depth 1 --branch',5)),i("span",o," "+n(l(e).centralizedSequencerLatestTag),1),s[1]||(s[1]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," https://github.com/rollkit/centralized-sequencer.git",-1))]),s[2]||(s[2]=a(` +cd centralized-sequencer +make build +./build/centralized-sequencer -h`,6))])])]),s[6]||(s[6]=a(`

    You should see the following output:

    sh
    Usage:
    +  -host string
    +    	centralized sequencer host (default "localhost")
    +  -port string
    +    	centralized sequencer port (default "50051")
    +  -listen-all
    +    	listen on all network interfaces (0.0.0.0) instead of just localhost
    +  -rollup-id string
    +    	rollup id (default "rollupId")
    +  -batch-time duration
    +    	time in seconds to wait before generating a new batch (default 2s)
    +  -da_address string
    +    	DA address (default "http://localhost:26658")
    +  -da_auth_token string
    +    	auth token for the DA
    +  -da_namespace string
    +    	DA namespace where the sequencer submits transactions
    +  -db_path string
    +    	path to the database
    +...

    As shown by the help command, a centralized sequencer is configured to serve a rollup (via rollup_id). The DA network to persist the sequenced batches are specified using da_address, da_auth_token and da_namespace.

    Run the centralized sequencer

    TIP

    As mentioned in the prerequisities, you should have your DA layer running. These steps assume the local-da is running on http://localhost:7980.

    Start your centralized sequencer with the following command:

    sh
    ./build/centralized-sequencer -rollup-id my-rollup -da_address http://localhost:7980
    sh
    ./build/centralized-sequencer -rollup-id wordle -da_address http://localhost:7980

    Run your chain

    To connect your chain to the centralized sequencer, you need to pass the --rollkit.sequencer_address flag with the local sequencer address and the --rollkit.sequencer_rollup_id to ensure your rollup id matches what the sequencer is expecting.

    Start your chain with the following command, ensuring to include the sequencer flag:

    sh
    rollkit start \\
    +    --rollkit.da_address http://localhost:7980 \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id my-rollup
    sh
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_address http://localhost:7980 \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log messages indicating that your chain is connected to the local sequencer:

    sh
    I[2024-11-15|15:22:33.636] sequencer already running                 module=main address=localhost:50051
    +I[2024-11-15|15:22:33.636] make sure your rollupID matches your sequencer module=main rollupID=my-rollup

    Then after a few blocks you should see this message confirming that your sequencer is successfully submitting batches to the DA layer:

    sh
    I[2024-11-15|16:04:07.698] successfully submitted Rollkit headers to DA layer module=BlockManager gasPrice=-1 daHeight=1 headerCount=14

    Metrics

    The centralized-sequencer node reports Prometheus metrics when the -metrics flag is enabled.

    By default, metrics are exported to http://localhost:8080/metrics.

    The listening address and port can be configured with the -metrics-address flag.

    The following metrics are available:

    NameTypeTagsDescription
    sequencer_gas_priceGaugeGas price of the DA transaction
    sequencer_last_blob_sizeGaugeLast blob size submitted to the DA
    sequencer_transaction_statusGaugeTransaction status of the DA transaction
    sequencer_num_pending_blocksGaugeNumber of blocks pending DA submission
    sequencer_included_block_heightGaugeBlock height of the last DA transaction

    Summary

    By following these steps, you will have successfully set up and connected your chain to the centralized sequencer. You can now start submitting transactions to your chain.

    `,23))]))}});export{C as __pageData,B as default}; diff --git a/pr-528/assets/tutorials_sequencing_centralized.md.BGImpjo9.lean.js b/pr-528/assets/tutorials_sequencing_centralized.md.BGImpjo9.lean.js new file mode 100644 index 000000000..906ed5999 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_centralized.md.BGImpjo9.lean.js @@ -0,0 +1,31 @@ +import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as t,a3 as a,j as i,t as n,k as l,o as h}from"./chunks/framework.B8-VHxRu.js";const r="/docs-preview/pr-528/assets/sequencing.DlIPdR1A.jpg",p={class:"language-sh vp-adaptive-theme"},d={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},k={class:"line"},o={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},C=JSON.parse('{"title":"Centralized Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Centralized Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/centralized.md","filePath":"tutorials/sequencing/centralized.md","lastUpdated":1733420866000}'),c={name:"tutorials/sequencing/centralized.md"},B=Object.assign(c,{setup(F){return(u,s)=>(h(),t("div",null,[s[5]||(s[5]=a('

    Centralized Sequencer

    A centralized sequencer is a sequencing middleware that receives rollup transactions and provides a local sequencing capabilities. Meaning, the transactions are ordered in the order they are received by the sequencer without any censorship. Further, the sequenced batches are made available in the DA network (such as Celestia). Under the hood, the centralized sequencer is a GRPC server that implements go-sequencing interface and the server is hosted by the same node that is running the aggregator for the Rollkit rollup.

    Rollkit with Centralized Sequencer

    Prerequisites

    This tutorial serves as a comprehensive guide for using the centralized-sequencer with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    TIP

    It is important to note that the centralized sequencer expects a DA layer to be running when it starts. This means that you need to launch your DA Layer before starting the centralized sequencer.

    Additionally, you should have completed one of the DA Layer tutorials and have your DA layer ready to use with the centralized sequencer. This tutorial will use the local-da layer as an example.

    Installation the Centralized Sequencer

    ',9)),i("div",p,[s[3]||(s[3]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[4]||(s[4]=i("span",{class:"lang"},"sh",-1)),i("pre",d,[i("code",null,[i("span",k,[s[0]||(s[0]=a('git clone --depth 1 --branch',5)),i("span",o," "+n(l(e).centralizedSequencerLatestTag),1),s[1]||(s[1]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," https://github.com/rollkit/centralized-sequencer.git",-1))]),s[2]||(s[2]=a(` +cd centralized-sequencer +make build +./build/centralized-sequencer -h`,6))])])]),s[6]||(s[6]=a(`

    You should see the following output:

    sh
    Usage:
    +  -host string
    +    	centralized sequencer host (default "localhost")
    +  -port string
    +    	centralized sequencer port (default "50051")
    +  -listen-all
    +    	listen on all network interfaces (0.0.0.0) instead of just localhost
    +  -rollup-id string
    +    	rollup id (default "rollupId")
    +  -batch-time duration
    +    	time in seconds to wait before generating a new batch (default 2s)
    +  -da_address string
    +    	DA address (default "http://localhost:26658")
    +  -da_auth_token string
    +    	auth token for the DA
    +  -da_namespace string
    +    	DA namespace where the sequencer submits transactions
    +  -db_path string
    +    	path to the database
    +...

    As shown by the help command, a centralized sequencer is configured to serve a rollup (via rollup_id). The DA network to persist the sequenced batches are specified using da_address, da_auth_token and da_namespace.

    Run the centralized sequencer

    TIP

    As mentioned in the prerequisities, you should have your DA layer running. These steps assume the local-da is running on http://localhost:7980.

    Start your centralized sequencer with the following command:

    sh
    ./build/centralized-sequencer -rollup-id my-rollup -da_address http://localhost:7980
    sh
    ./build/centralized-sequencer -rollup-id wordle -da_address http://localhost:7980

    Run your chain

    To connect your chain to the centralized sequencer, you need to pass the --rollkit.sequencer_address flag with the local sequencer address and the --rollkit.sequencer_rollup_id to ensure your rollup id matches what the sequencer is expecting.

    Start your chain with the following command, ensuring to include the sequencer flag:

    sh
    rollkit start \\
    +    --rollkit.da_address http://localhost:7980 \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id my-rollup
    sh
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.da_address http://localhost:7980 \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log messages indicating that your chain is connected to the local sequencer:

    sh
    I[2024-11-15|15:22:33.636] sequencer already running                 module=main address=localhost:50051
    +I[2024-11-15|15:22:33.636] make sure your rollupID matches your sequencer module=main rollupID=my-rollup

    Then after a few blocks you should see this message confirming that your sequencer is successfully submitting batches to the DA layer:

    sh
    I[2024-11-15|16:04:07.698] successfully submitted Rollkit headers to DA layer module=BlockManager gasPrice=-1 daHeight=1 headerCount=14

    Metrics

    The centralized-sequencer node reports Prometheus metrics when the -metrics flag is enabled.

    By default, metrics are exported to http://localhost:8080/metrics.

    The listening address and port can be configured with the -metrics-address flag.

    The following metrics are available:

    NameTypeTagsDescription
    sequencer_gas_priceGaugeGas price of the DA transaction
    sequencer_last_blob_sizeGaugeLast blob size submitted to the DA
    sequencer_transaction_statusGaugeTransaction status of the DA transaction
    sequencer_num_pending_blocksGaugeNumber of blocks pending DA submission
    sequencer_included_block_heightGaugeBlock height of the last DA transaction

    Summary

    By following these steps, you will have successfully set up and connected your chain to the centralized sequencer. You can now start submitting transactions to your chain.

    `,23))]))}});export{C as __pageData,B as default}; diff --git a/pr-528/assets/tutorials_sequencing_forced-inclusion.md.B6396qIT.js b/pr-528/assets/tutorials_sequencing_forced-inclusion.md.B6396qIT.js new file mode 100644 index 000000000..07061cd10 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_forced-inclusion.md.B6396qIT.js @@ -0,0 +1 @@ +import{_ as o,c as t,j as e,a,o as c}from"./chunks/framework.B8-VHxRu.js";const p=JSON.parse('{"title":"Forced Inclusion","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Forced Inclusion | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/forced-inclusion.md","filePath":"tutorials/sequencing/forced-inclusion.md","lastUpdated":1733420866000}'),s={name:"tutorials/sequencing/forced-inclusion.md"};function i(r,n,l,d,u,f){return c(),t("div",null,n[0]||(n[0]=[e("h1",{id:"forced-inclusion",tabindex:"-1"},[a("Forced Inclusion "),e("a",{class:"header-anchor",href:"#forced-inclusion","aria-label":'Permalink to "Forced Inclusion"'},"​")],-1),e("p",null,"Coming soon ...",-1)]))}const _=o(s,[["render",i]]);export{p as __pageData,_ as default}; diff --git a/pr-528/assets/tutorials_sequencing_forced-inclusion.md.B6396qIT.lean.js b/pr-528/assets/tutorials_sequencing_forced-inclusion.md.B6396qIT.lean.js new file mode 100644 index 000000000..07061cd10 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_forced-inclusion.md.B6396qIT.lean.js @@ -0,0 +1 @@ +import{_ as o,c as t,j as e,a,o as c}from"./chunks/framework.B8-VHxRu.js";const p=JSON.parse('{"title":"Forced Inclusion","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Forced Inclusion | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/forced-inclusion.md","filePath":"tutorials/sequencing/forced-inclusion.md","lastUpdated":1733420866000}'),s={name:"tutorials/sequencing/forced-inclusion.md"};function i(r,n,l,d,u,f){return c(),t("div",null,n[0]||(n[0]=[e("h1",{id:"forced-inclusion",tabindex:"-1"},[a("Forced Inclusion "),e("a",{class:"header-anchor",href:"#forced-inclusion","aria-label":'Permalink to "Forced Inclusion"'},"​")],-1),e("p",null,"Coming soon ...",-1)]))}const _=o(s,[["render",i]]);export{p as __pageData,_ as default}; diff --git a/pr-528/assets/tutorials_sequencing_local.md.Cfaq013P.js b/pr-528/assets/tutorials_sequencing_local.md.Cfaq013P.js new file mode 100644 index 000000000..7770689ac --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_local.md.Cfaq013P.js @@ -0,0 +1,7 @@ +import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as n,a3 as a,j as i,t,k as l,o as h}from"./chunks/framework.B8-VHxRu.js";const o={class:"vp-code-group vp-adaptive-theme"},r={class:"blocks"},p={class:"language-bash vp-adaptive-theme active"},d={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},c={class:"line"},k={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},u={class:"language-bash vp-adaptive-theme"},g={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},F={class:"line"},y={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},v=JSON.parse('{"title":"Local Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Local Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/local.md","filePath":"tutorials/sequencing/local.md","lastUpdated":1733420866000}'),C={name:"tutorials/sequencing/local.md"},f=Object.assign(C,{setup(b){return(m,s)=>(h(),n("div",null,[s[9]||(s[9]=a('

    Local Sequencer

    Introduction

    This tutorial serves as a comprehensive guide for using the local-sequencer with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    Setting Up a Local Local Sequencer

    To set up a local sequencer on your machine, run the following script to install and start the local sequencer:

    ',6)),i("div",o,[s[8]||(s[8]=a('
    ',1)),i("div",r,[i("div",p,[s[2]||(s[2]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[3]||(s[3]=i("span",{class:"lang"},"bash",-1)),i("pre",d,[i("code",null,[i("span",c,[s[0]||(s[0]=a('curl -sSL https://rollkit.dev/install-local-sequencer.sh | bash -s',6)),i("span",k," "+t(l(e).goSequencingLatestTag),1),s[1]||(s[1]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," my-rollup",-1))])])])]),i("div",u,[s[6]||(s[6]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[7]||(s[7]=i("span",{class:"lang"},"bash",-1)),i("pre",g,[i("code",null,[i("span",F,[s[4]||(s[4]=a('curl -sSL https://rollkit.dev/install-local-sequencer.sh | bash -s',6)),i("span",y," "+t(l(e).goSequencingLatestTag),1),s[5]||(s[5]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," wordle",-1))])])])])])]),s[10]||(s[10]=a(`

    This script will build and run the sequencer, which will then listen on port 50051 with the rollup-id of your chain.

    Configuring your chain to connect to the local sequencer

    To connect your chain to the local sequencer, you need to pass the --rollkit.sequencer_address flag with the centralized sequencer address and the --rollkit.sequencer_rollup_id to ensure your rollup id matches what the sequencer is expecting.

    Run your chain

    Start your chain with the following command, ensuring to include the sequencer flag:

    sh
    rollkit start \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id my-rollup
    sh
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log messages indicating that your chain is connected to the local sequencer:

    sh
    I[2024-11-15|15:22:33.636] sequencer already running                 module=main address=localhost:50051
    +I[2024-11-15|15:22:33.636] make sure your rollupID matches your sequencer module=main rollupID=my-rollup

    Summary

    By following these steps, you will have successfully set up and connected your chain to the local sequencer. You can now start submitting transactions to your chain.

    `,10))]))}});export{v as __pageData,f as default}; diff --git a/pr-528/assets/tutorials_sequencing_local.md.Cfaq013P.lean.js b/pr-528/assets/tutorials_sequencing_local.md.Cfaq013P.lean.js new file mode 100644 index 000000000..7770689ac --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_local.md.Cfaq013P.lean.js @@ -0,0 +1,7 @@ +import{c as e}from"./chunks/constants.C1G_zmdY.js";import{c as n,a3 as a,j as i,t,k as l,o as h}from"./chunks/framework.B8-VHxRu.js";const o={class:"vp-code-group vp-adaptive-theme"},r={class:"blocks"},p={class:"language-bash vp-adaptive-theme active"},d={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},c={class:"line"},k={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},u={class:"language-bash vp-adaptive-theme"},g={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},F={class:"line"},y={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},v=JSON.parse('{"title":"Local Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Local Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/local.md","filePath":"tutorials/sequencing/local.md","lastUpdated":1733420866000}'),C={name:"tutorials/sequencing/local.md"},f=Object.assign(C,{setup(b){return(m,s)=>(h(),n("div",null,[s[9]||(s[9]=a('

    Local Sequencer

    Introduction

    This tutorial serves as a comprehensive guide for using the local-sequencer with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    Setting Up a Local Local Sequencer

    To set up a local sequencer on your machine, run the following script to install and start the local sequencer:

    ',6)),i("div",o,[s[8]||(s[8]=a('
    ',1)),i("div",r,[i("div",p,[s[2]||(s[2]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[3]||(s[3]=i("span",{class:"lang"},"bash",-1)),i("pre",d,[i("code",null,[i("span",c,[s[0]||(s[0]=a('curl -sSL https://rollkit.dev/install-local-sequencer.sh | bash -s',6)),i("span",k," "+t(l(e).goSequencingLatestTag),1),s[1]||(s[1]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," my-rollup",-1))])])])]),i("div",u,[s[6]||(s[6]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[7]||(s[7]=i("span",{class:"lang"},"bash",-1)),i("pre",g,[i("code",null,[i("span",F,[s[4]||(s[4]=a('curl -sSL https://rollkit.dev/install-local-sequencer.sh | bash -s',6)),i("span",y," "+t(l(e).goSequencingLatestTag),1),s[5]||(s[5]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," wordle",-1))])])])])])]),s[10]||(s[10]=a(`

    This script will build and run the sequencer, which will then listen on port 50051 with the rollup-id of your chain.

    Configuring your chain to connect to the local sequencer

    To connect your chain to the local sequencer, you need to pass the --rollkit.sequencer_address flag with the centralized sequencer address and the --rollkit.sequencer_rollup_id to ensure your rollup id matches what the sequencer is expecting.

    Run your chain

    Start your chain with the following command, ensuring to include the sequencer flag:

    sh
    rollkit start \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id my-rollup
    sh
    rollkit start \\
    +    --rollkit.aggregator \\
    +    --rollkit.sequencer_address localhost:50051 \\
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log messages indicating that your chain is connected to the local sequencer:

    sh
    I[2024-11-15|15:22:33.636] sequencer already running                 module=main address=localhost:50051
    +I[2024-11-15|15:22:33.636] make sure your rollupID matches your sequencer module=main rollupID=my-rollup

    Summary

    By following these steps, you will have successfully set up and connected your chain to the local sequencer. You can now start submitting transactions to your chain.

    `,10))]))}});export{v as __pageData,f as default}; diff --git a/pr-528/assets/tutorials_sequencing_overview.md.C1mSL5p8.js b/pr-528/assets/tutorials_sequencing_overview.md.C1mSL5p8.js new file mode 100644 index 000000000..f6c030815 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_overview.md.C1mSL5p8.js @@ -0,0 +1,5 @@ +import{_ as t,c as i,a3 as a,o as n}from"./chunks/framework.B8-VHxRu.js";const p=JSON.parse('{"title":"Sequencing","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Sequencing | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/overview.md","filePath":"tutorials/sequencing/overview.md","lastUpdated":1733420866000}'),s={name:"tutorials/sequencing/overview.md"};function r(o,e,l,c,h,u){return n(),i("div",null,e[0]||(e[0]=[a(`

    Sequencing

    The next step after choosing your DA layer is to choose your sequencing scheme.

    Rollkit prior to Sequencing

    Rollkit's aggregator node was responsible for selecting and ordering transactions for including in the rollup blocks. The Rollkit aggregator used to follow a FCFS strategy, where every transaction submitted gets included in the block in order without any censorship. Use of a different sequencing strategy or connecting to a sequencing network (e.g., Astria) was not possible. Rollkit v0.14.0 onwards makes it possible for rollkit to connect to a sequencing network and communicate via grpc.

    Sequencing Interface

    go-sequencing defines a sequencing interface for communicating between any sequencing network and Rollkit. The key functions of the interface are defined as shown below.

    go
    SubmitRollupTransaction(rollupId, data) returns (error)
    +
    +GetNextBatch(rollupId, lastBatchHash, maxBytes) returns (batch, timestamp)
    +
    +VerifyBatch(rollupId, batchHash) returns (status)

    It mainly consists of:

    • SubmitRollupTransaction relays the rollup transactions from Rollkit rollup to the sequencing network
    • GetNextBatch returns the next batch of transactions along with a deterministic timestamp
    • VerifyBatch validates the sequenced batch

    Mock Sequencer

    You might have noticed that we did not define a specific sequencer during the quick start or build a chain tutorials. This is because we used a mock sequencer that is built into Rollkit.

    If you revisit the logs from those tutorials, you will see one of the first lines being:

    shell
    I[2024-11-15|14:54:19.843] Starting mock sequencer    module=main address=localhost:50051 rollupID=test-rollup-a736683c

    The mock sequencer is a simple in-memory sequencer that is great for testing and development. It is not suitable for production use.

    Sequencing Implementations

    An implementation of the sequencing interface mainly acts as a middleware that connects Rollkit rollup and the sequencing layer. It implements the sequencing interface functions described above. For example, centralized-sequencer is the refactored functionality from the Rollkit prior to v0.14.0. The centralized sequencer is the middleware run by the aggregator node of the Rollkit rollup. The aggregator node relays rollup transactions to centralized sequencer which then submits them to the DA network (such as Celestia). The header producer node then retrieves (via GetNextBatch) the batched transaction from the centralized sequencer to execute the transactions and produce the updated rollup state. Similarly, there are other sequencing middlewares which can be built for various sequencing strategies or even for connecting to different third-party sequencing networks.

    The sequencing implementations that are currently work in progress:

    `,18)]))}const g=t(s,[["render",r]]);export{p as __pageData,g as default}; diff --git a/pr-528/assets/tutorials_sequencing_overview.md.C1mSL5p8.lean.js b/pr-528/assets/tutorials_sequencing_overview.md.C1mSL5p8.lean.js new file mode 100644 index 000000000..f6c030815 --- /dev/null +++ b/pr-528/assets/tutorials_sequencing_overview.md.C1mSL5p8.lean.js @@ -0,0 +1,5 @@ +import{_ as t,c as i,a3 as a,o as n}from"./chunks/framework.B8-VHxRu.js";const p=JSON.parse('{"title":"Sequencing","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Sequencing | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/sequencing/overview.md","filePath":"tutorials/sequencing/overview.md","lastUpdated":1733420866000}'),s={name:"tutorials/sequencing/overview.md"};function r(o,e,l,c,h,u){return n(),i("div",null,e[0]||(e[0]=[a(`

    Sequencing

    The next step after choosing your DA layer is to choose your sequencing scheme.

    Rollkit prior to Sequencing

    Rollkit's aggregator node was responsible for selecting and ordering transactions for including in the rollup blocks. The Rollkit aggregator used to follow a FCFS strategy, where every transaction submitted gets included in the block in order without any censorship. Use of a different sequencing strategy or connecting to a sequencing network (e.g., Astria) was not possible. Rollkit v0.14.0 onwards makes it possible for rollkit to connect to a sequencing network and communicate via grpc.

    Sequencing Interface

    go-sequencing defines a sequencing interface for communicating between any sequencing network and Rollkit. The key functions of the interface are defined as shown below.

    go
    SubmitRollupTransaction(rollupId, data) returns (error)
    +
    +GetNextBatch(rollupId, lastBatchHash, maxBytes) returns (batch, timestamp)
    +
    +VerifyBatch(rollupId, batchHash) returns (status)

    It mainly consists of:

    • SubmitRollupTransaction relays the rollup transactions from Rollkit rollup to the sequencing network
    • GetNextBatch returns the next batch of transactions along with a deterministic timestamp
    • VerifyBatch validates the sequenced batch

    Mock Sequencer

    You might have noticed that we did not define a specific sequencer during the quick start or build a chain tutorials. This is because we used a mock sequencer that is built into Rollkit.

    If you revisit the logs from those tutorials, you will see one of the first lines being:

    shell
    I[2024-11-15|14:54:19.843] Starting mock sequencer    module=main address=localhost:50051 rollupID=test-rollup-a736683c

    The mock sequencer is a simple in-memory sequencer that is great for testing and development. It is not suitable for production use.

    Sequencing Implementations

    An implementation of the sequencing interface mainly acts as a middleware that connects Rollkit rollup and the sequencing layer. It implements the sequencing interface functions described above. For example, centralized-sequencer is the refactored functionality from the Rollkit prior to v0.14.0. The centralized sequencer is the middleware run by the aggregator node of the Rollkit rollup. The aggregator node relays rollup transactions to centralized sequencer which then submits them to the DA network (such as Celestia). The header producer node then retrieves (via GetNextBatch) the batched transaction from the centralized sequencer to execute the transactions and produce the updated rollup state. Similarly, there are other sequencing middlewares which can be built for various sequencing strategies or even for connecting to different third-party sequencing networks.

    The sequencing implementations that are currently work in progress:

    `,18)]))}const g=t(s,[["render",r]]);export{p as __pageData,g as default}; diff --git a/pr-528/assets/tutorials_wordle.md.C5a70n_Y.js b/pr-528/assets/tutorials_wordle.md.C5a70n_Y.js new file mode 100644 index 000000000..fd4ce5541 --- /dev/null +++ b/pr-528/assets/tutorials_wordle.md.C5a70n_Y.js @@ -0,0 +1,196 @@ +import{C as l}from"./chunks/callout.CtmRa3nB.js";import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as p,j as i,a as n,G as k,a3 as a,t as e,k as h,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const d="/docs-preview/pr-528/wordle/wordle.png",o={class:"tip custom-block"},g={class:"language-bash vp-adaptive-theme"},E={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},F={class:"line"},c={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y={class:"language-bash vp-adaptive-theme"},u={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},m={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},b={class:"language-bash vp-adaptive-theme"},B={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},f={class:"line"},w={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},T=JSON.parse('{"title":"🕹️ Wordle app","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🕹️ Wordle app | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/wordle.md","filePath":"tutorials/wordle.md","lastUpdated":1733420866000}'),v={name:"tutorials/wordle.md"},I=Object.assign(v,{setup(A){return(D,s)=>(r(),p("div",null,[s[14]||(s[14]=i("h1",{id:"🕹️-wordle-app",tabindex:"-1"},[n("🕹️ Wordle app "),i("a",{class:"header-anchor",href:"#🕹️-wordle-app","aria-label":'Permalink to "🕹️ Wordle app"'},"​")],-1)),s[15]||(s[15]=i("p",null,[i("img",{src:d,alt:"wordle-app"})],-1)),s[16]||(s[16]=i("p",null,[n("This tutorial guide will go over building a cosmos-sdk app for Rollkit, the Sovereign-Rollup implementation of CometBFT, for the popular game "),i("a",{href:"https://www.nytimes.com/games/wordle/index.html",target:"_blank",rel:"noreferrer"},"Wordle"),n(".")],-1)),s[17]||(s[17]=i("p",null,"This tutorial will go over how to setup Rollkit in the Ignite CLI and use it to build the game. The tutorial will go over the simple design, as well as conclude with future implementations and ideas to extend this codebase.",-1)),i("div",o,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),k(l)]),s[18]||(s[18]=a('

    💻 Pre-requisites

    This tutorial is targeted for developers who have some experience in the Cosmos-SDK. We will go through the steps to build the chain, but for more information on how the Cosmos-SDK components work, check out the Cosmos-SDK Docs.

    Additionally, we recommend that you have gone over the quick start guide first to see an example of a running chain.

    You also need to have Rollkit CLI installed. You can install it by running:

    ',4)),i("div",g,[s[2]||(s[2]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[3]||(s[3]=i("span",{class:"lang"},"bash",-1)),i("pre",E,[i("code",null,[i("span",F,[s[1]||(s[1]=a('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),i("span",c," "+e(h(t).rollkitLatestTag),1)])])])]),s[19]||(s[19]=a('

    📖 Design implementation

    The rules of Wordle are simple: You have to guess the word of the day.

    Key Points to Consider:

    • The word is a five-letter word.
    • You have 6 guesses.
    • Every 24 hours, there’s a new word.

    The GUI for Wordle shows you a few indicators: a green highlight on a letter in a certain position means that’s the correct letter for the Wordle in the right position. A yellow highlight means it’s a correct letter for the Wordle included in the wrong position. A grey highlight means the letter isn’t part of the Wordle.

    For simplicity of the design, we will avoid those hints, although there are ways to extend this codebase to implement that, which we will show at the end.

    In this current design, we implement the following rules:

    • 1 Wordle can be submitted per day
    • Every address will have 6 tries to guess the word
    • It must be a five-letter word.
    • Whoever guesses the word correctly before their 6 tries are over gets an award of 100 WORDLE tokens.

    We will go over the architecture to achieve this further in the guide. But for now, we will get started setting up our development environment.

    ⛓️ Ignite and scaffolding the wordle chain

    🔥 Ignite

    Ignite is an amazing CLI tool to help us get started building our own blockchains for cosmos-sdk apps. It provides lots of power toolings and scaffoldings for adding messages, types, and modules with a host of cosmos-sdk libraries provided.

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    ',14)),i("div",y,[s[7]||(s[7]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[8]||(s[8]=i("span",{class:"lang"},"bash",-1)),i("pre",u,[i("code",null,[i("span",C,[s[4]||(s[4]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"curl",-1)),i("span",m," https://get.ignite.com/cli@"+e(h(t).igniteVersionTag)+"!",1),s[5]||(s[5]=i("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}}," |",-1)),s[6]||(s[6]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}}," bash",-1))])])])]),s[20]||(s[20]=a('

    This installs Ignite CLI in your local machine. This tutorial uses a macOS but it should work for Windows. For Windows users, check out the Ignite docs on installation for Windows machines.

    Now, refresh your terminal using source or open a new terminal session for the change to take place.

    If you run the following:

    bash
    ignite --help

    You should see an output of help commands meaning Ignite was installed successfully!

    ⛓️ Scaffolding the wordle chain

    Now, comes the fun part, creating a new blockchain! With Ignite, the process is pretty easy and straightforward.

    Ignite CLI comes with several scaffolding commands that are designed to make development more straightforward by creating everything you need to build your blockchain.

    First, we will use Ignite CLI to build the foundation of a fresh Cosmos SDK blockchain. Ignite minimizes how much blockchain code you must write yourself. If you are coming from the EVM-world, think of Ignite as a Cosmos-SDK version of Foundry or Hardhat but specifically designed to build blockchains.

    we first run the following command to set up our project for our new blockchain, wordle.

    bash
    ignite scaffold chain wordle --no-module

    This command scaffolds a new chain directory called wordle in your local directory from which you ran the command. Notice that we passed the --no-module flag, this is because we will be creating the module after.

    🗂️ Wordle directory

    Now, it’s time to enter the directory:

    bash
    cd wordle

    Inside you will see several directories and architecture for your cosmos-sdk blockchain.

    File/directoryPurpose
    app/Files that wire together the blockchain. The most important file is app.go that contains type definition of the blockchain and functions to create and initialize it.
    cmd/The main package responsible for the CLI of compiled binary.
    docs/Directory for project documentation. By default, an OpenAPI spec is generated.
    proto/Protocol buffer files describing the data structure.
    testutil/Helper functions for testing.
    vue/A Vue 3 web app template.
    x/Cosmos SDK modules and custom modules.
    config.ymlA configuration file for customizing a chain in development.
    readme.mdA readme file for your sovereign application-specific blockchain project.

    Going over each one is outside the scope of this guide, but we encourage you to read about it here.

    Most of the tutorial work will happen inside the x directory.

    🛠️ Setting up Rollkit

    Before we continue with building our Wordle App, we need to set up Rollkit on our codebase.

    🗞️ Installing Rollkit

    To install the Rollkit app to Ignite, run the following command:

    ',23)),i("div",b,[s[12]||(s[12]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[13]||(s[13]=i("span",{class:"lang"},"bash",-1)),i("pre",B,[i("code",null,[i("span",f,[s[9]||(s[9]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"ignite",-1)),s[10]||(s[10]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," app",-1)),s[11]||(s[11]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install",-1)),i("span",w," github.com/ignite/apps/rollkit@"+e(h(t).rollkitIgniteAppVersion),1)])])])]),s[21]||(s[21]=a(`

    Next, add Rollkit to your project by running:

    bash
    ignite rollkit add

    ✨ Creating the wordle module

    For the Wordle module, we can add dependencies offered by Cosmos-SDK.

    From the Cosmos-SDK docs, a module is defined as the following:

    In a Cosmos SDK blockchain, application-specific logic is implemented in separate modules. Modules keep code easy to understand and reuse. Each module contains its own message and transaction processor, while the Cosmos SDK is responsible for routing each message to its respective module.

    Many modules exist for slashing, validating, auth.

    🔖 Scaffolding a module

    We will be using the bank module dependency for transactions.

    From the Cosmos-SDK docs, the bank module is defined as the following:

    The bank module is responsible for handling multi-asset coin transfers between accounts and tracking special-case pseudo-transfers which must work differently with particular kinds of accounts (notably delegating/undelegating for vesting accounts). It exposes several interfaces with varying capabilities for secure interaction with other modules which must alter user balances.

    We build the module with the bank dependency with the following command:

    bash
    ignite scaffold module wordle --dep bank -y

    This will scaffold the Wordle module to our Wordle Chain project.

    ✉️ Messages

    Messages allow us to process and submit information to our specific module.

    From the Cosmos-SDK docs, messages are:

    In the Cosmos SDK, messages are objects that are contained in transactions to trigger state transitions. Each Cosmos SDK module defines a list of messages and how to handle them.

    For messages for Wordle, given our initial design, we will make 2 messages with ignite.

    • The first one is: SubmitWordle and it only passes the Wordle of the Day.
    • The second one is: SubmitGuess and it attempts to guess the submitted wordle. It also passes a word as a guess.

    With these initial designs, we can start creating our messages!

    💬 Scaffolding a message

    To create the SubmitWordle message, we run the following command:

    bash
    ignite scaffold message submit-wordle word -y

    This creates the submit-wordle message that takes in word as a parameter.

    We now create the final message, SubmitGuess:

    bash
    ignite scaffold message submit-guess word -y

    Here, we are passing a word as a guess with submit-guess.

    🎨 Wordle types

    For the next steps, we will be creating types to be used by the messages we created.

    🏗️ Scaffolding wordle types

    bash
    ignite scaffold map wordle word submitter --no-message -y

    This type is a map called Wordle with two values of word and submitter. submitter is the address of the person that submitted the Wordle.

    The second type is the Guess type. It allows us to store the latest guess for each address that submitted a solution.

    bash
    ignite scaffold map guess word submitter count --no-message -y

    Here, we are also storing count to count how many guesses this address submitted.

    🔐 Keeper functions

    Now it’s time to implement the Keeper functions for each message. From the Cosmos-SDK docs, Keeper is defined as the following:

    The main core of a Cosmos SDK module is a piece called the keeper. The keeper handles interactions with the store, has references to other keepers for cross-module interactions, and contains most of the core functionality of a module.

    Keeper is an abstraction on Cosmos that allows us to interact with the Key-Value store and change the state of the blockchain.

    Here, it will help us outline the logic for each message we create.

    📤 SubmitWordle function

    We first start with the SubmitWordle function.

    Open up the following file: x/wordle/keeper/msg_server_submit_wordle.go

    Inside the following, replace the current code with the following code, which we will go over in a bit:

    go
    package keeper
    +
    +import (
    +  "context"
    +  "crypto/sha256"
    +  "encoding/hex"
    +  "wordle/x/wordle/types"
    +  "cosmossdk.io/errors"
    +  sdk "github.com/cosmos/cosmos-sdk/types"
    +  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
    +  "time"
    +  "unicode"
    +)
    +
    +func (k msgServer) SubmitWordle(goCtx context.Context, msg *types.MsgSubmitWordle) (*types.MsgSubmitWordleResponse, error) {
    +  ctx := sdk.UnwrapSDKContext(goCtx)
    +  // Check to See the Wordle is 5 letters
    +  if len(msg.Word) != 5 {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle Must Be A 5 Letter Word")
    +  }
    +  // Check to See Only Alphabets Are Passed for the Wordle
    +  if !(IsLetter(msg.Word)) {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle Must Only Consist Of Letters In The Alphabet")
    +  }
    +
    +  // Use Current Day to Create The Index of the Newly-Submitted Wordle of the Day
    +  currentTime := time.Now().Local()
    +  var currentTimeBytes = []byte(currentTime.Format("2006-01-02"))
    +  var currentTimeHash = sha256.Sum256(currentTimeBytes)
    +  var currentTimeHashString = hex.EncodeToString(currentTimeHash[:])
    +  // Hash The Newly-Submitted Wordle of the Day
    +  var submittedSolutionHash = sha256.Sum256([]byte(msg.Word))
    +  var submittedSolutionHashString = hex.EncodeToString(submittedSolutionHash[:])
    +
    +  var wordle = types.Wordle{
    +    Index:     currentTimeHashString,
    +    Word:      submittedSolutionHashString,
    +    Submitter: msg.Creator,
    +  }
    +
    +  // Try to Get Wordle From KV Store Using Current Day as Key
    +  // This Helps ensure only one Wordle is submitted per day
    +  _, isFound := k.GetWordle(ctx, currentTimeHashString)
    +  if isFound {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle of the Day is Already Submitted")
    +  }
    +  // Write Wordle to KV Store
    +  k.SetWordle(ctx, wordle)
    +  reward := sdk.Coins{sdk.NewInt64Coin("token", 100)}
    +  // Escrow Reward
    +  submitterAddress, _ := sdk.AccAddressFromBech32(msg.Creator)
    +  err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, submitterAddress, types.ModuleName, reward)
    +  if err != nil {
    +    return nil, err
    +  }
    +  return &types.MsgSubmitWordleResponse{}, nil
    +}
    +
    +func IsLetter(s string) bool {
    +  for _, r := range s {
    +    if !unicode.IsLetter(r) {
    +      return false
    +    }
    +  }
    +  return true
    +}

    Here in the SubmitWordle Keeper function, we are doing a few things:

    • We first ensure that a word submitted for Wordle of the Day is 5 letters long and only uses alphabets. That means no integers can be submitted in the string.
    • We then create a hash from the current day the moment the Wordle was submitted. We set this hash to the index of the Wordle type. This allows us to look up any guesses for this Wordle for subsequent guesses, which we will go over next.
    • We then check if the index for today’s date is currently empty or not. If it’s not empty, this means a Wordle has already been submitted. Remember, only one wordle can be submitted per day. Everyone else has to guess the submitted wordle.
    • We also have a helper function in there to check if a string only contains alphabet characters.

    SubmitGuess function

    The next Keeper function we will add is the following: x/wordle/keeper/msg_server_submit_guess.go

    Open that file and replace its contents with the following code, which we will explain in a bit:

    go
    package keeper
    +
    +import (
    +  "context"
    +  "crypto/sha256"
    +  "encoding/hex"
    +  "wordle/x/wordle/types"
    +  "cosmossdk.io/errors"
    +  sdk "github.com/cosmos/cosmos-sdk/types"
    +  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
    +  "strconv"
    +  "time"
    +)
    +
    +func (k msgServer) SubmitGuess(goCtx context.Context, msg *types.MsgSubmitGuess) (*types.MsgSubmitGuessResponse, error) {
    +  ctx := sdk.UnwrapSDKContext(goCtx)
    +  // Check Word is 5 Characters Long
    +  if len(msg.Word) != 5 {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Guess Must Be A 5 Letter Word!")
    +  }
    + 
    +  // Check String Contains Alphabet Letters Only
    +  if !(IsLetter(msg.Word)) {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Guess Must Only Consist of Alphabet Letters!")
    +  }
    +
    +  // Get Current Day to Pull Up Wordle of That Day As A Hash
    +  currentTime := time.Now().Local()
    +  var currentTimeBytes = []byte(currentTime.Format("2006-01-02"))
    +  var currentTimeHash = sha256.Sum256(currentTimeBytes)
    +  var currentTimeHashString = hex.EncodeToString(currentTimeHash[:])
    +  wordle, isFound := k.GetWordle(ctx, currentTimeHashString)
    +  if !isFound {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle of The Day Hasn't Been Submitted Yet. Feel Free to Submit One!")
    +  }
    +
    +  // We Convert Current Day and Guesser to A Hash To Use As An Index For Today's Guesses For That Guesser
    +  // That Way, A Person Can Guess 6 Times A Day For Each New Wordle Created
    +  var currentTimeGuesserBytes = []byte(currentTime.Format("2006-01-02") + msg.Creator)
    +  var currentTimeGuesserHash = sha256.Sum256(currentTimeGuesserBytes)
    +  var currentTimeGuesserHashString = hex.EncodeToString(currentTimeGuesserHash[:])
    +  // Hash The Guess To The Wordle
    +  var submittedSolutionHash = sha256.Sum256([]byte(msg.Word))
    +  var submittedSolutionHashString = hex.EncodeToString(submittedSolutionHash[:])
    +
    +  // Get the Latest Guess entry for this Submitter for the current Wordle of the Day
    +  var count int
    +  guess, isFound := k.GetGuess(ctx, currentTimeGuesserHashString)
    +  if isFound {
    +    // Check if Submitter Reached 6 Tries
    +    if guess.Count == strconv.Itoa(6) {
    +      return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "You Have Guessed The Maximum Amount of Times for The Day! Try Again Tomorrow With A New Wordle.")
    +    }
    +    currentCount, err := strconv.Atoi(guess.Count)
    +    if err != nil {
    +      panic(err)
    +    }
    +    count = currentCount
    +  } else {
    +    // Initialize Count Value If No Entry Exists for this Submitter for Today's Wordle
    +    count = 0
    +  }
    +  // Increment Guess Count
    +  count += 1
    +  var newGuess = types.Guess{
    +    Index:     currentTimeGuesserHashString,
    +    Submitter: msg.Creator,
    +    Word:      submittedSolutionHashString,
    +    Count:     strconv.Itoa(count),
    +  }
    +  // Remove Current Guess Entry to be Updated With New Entry
    +  k.RemoveGuess(ctx, currentTimeGuesserHashString)
    +  // Add New Guess Entry
    +  k.SetGuess(ctx, newGuess)
    +  if !(wordle.Word == submittedSolutionHashString) {
    +    return &types.MsgSubmitGuessResponse{Title: "Wrong Answer", Body: "Your Guess Was Wrong. Try Again"}, nil
    +  } else {
    +    // Setup Reward 
    +    reward := sdk.Coins{sdk.NewInt64Coin("token", 100)}
    +    // If Submitter Guesses Correctly
    +    guesserAddress, _ := sdk.AccAddressFromBech32(msg.Creator)
    +    // Send Reward
    +    err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, guesserAddress, reward)
    +    if err !=nil {
    +      return nil, err
    +    }
    +    return &types.MsgSubmitGuessResponse{Title: "Correct", Body: "You Guessed The Wordle Correctly!"}, nil
    +  }
    +}

    In the above code, we are doing the following things:

    • Here, we are doing initial checks again on the word to ensure it’s 5 characters and only alphabet characters are used, which can be refactored in the future or checked within the CLI commands.
    • We then get the Wordle of the Day by getting the hash string of the current day.
    • Next we create a hash string of current day and the Submitter. This allows us to create a Guess type with an index that uses the current day and the address of the submitter. This helps us when we face a new day and an address wants to guess the new wordle of the day. The index setup ensures they can continue guessing a new wordle every day up to the max of 6 tries per day.
    • We then check if that Guess type for the Submitter for today’s wordle did reach 6 counts. If it hasn’t, we increment the count. We then check if the guess is correct. We store the Guess type with the updated count to the state.

    📦 Protobuf file

    A few files need to be modified for this to work.

    The first is proto/wordle/wordle/tx.proto.

    Inside this file, fill in the empty MsgSubmitGuessResponse with the following code:

    go
    message MsgSubmitGuessResponse {
    +  string title = 1;
    +  string body = 2;
    +}

    Next file is x/wordle/types/expected_keepers.go

    Here, we need to add the SendCoins method to the BankKeeper interface in order to allow sending the reward to the right guesser.

    go
    type BankKeeper interface {
    +  ...
    +  // Methods imported from bank should be defined here
    +  SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
    +  SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
    +}

    With that, we implemented all our Keeper functions! Time to compile the blockchain and take it out for a test drive.

    ⛓️ Run the wordle chain

    🟢 Building and running wordle chain

    Initialize the Rollkit chain configuration for a local DA network with this command:

    bash
    ignite chain build && ignite rollkit init

    This will create a ~/.wordle directory with all the necessary files to run a chain.

    It will also initialize 2 accounts alice and bob:

    bash
    Initializing accounts...
    + Added account alice ...
    +
    + Added account bob ...

    We will use these accounts to submit transactions.

    Now let's initialize a rollkit.toml file in the worldle directory by running:

    bash
    rollkit toml init

    To start running the Wordle chain, run the following command:

    bash
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id wordle

    With that, we have kickstarted our wordle network!

    🚀 Interacting with the chain

    In another window, from the ~/wordle directory (where rollkit.toml is located) run the following command to submit a Wordle from alice:

    bash
    rollkit tx wordle submit-wordle giant --from alice --keyring-backend test --chain-id wordle -b async

    NOTE: We are submitting a transaction asynchronously to avoid any timeout errors. With Rollkit as a replacement to CometBFT, we need to wait for the data availability network to ensure a block was included from Wordle, before proceeding to the next block. Currently, in Rollkit, the single aggregator is not moving forward with the next block production as long as it is trying to submit the current block to the DA network. In the future, with leader selection, block production and sync logic improves dramatically.

    This will ask you to confirm the transaction with the following message:

    bash
    auth_info:
    +  fee:
    +    amount: []
    +    gas_limit: "200000"
    +    granter: ""
    +    payer: ""
    +  signer_infos: []
    +  tip: null
    +body:
    +  extension_options: []
    +  memo: ""
    +  messages:
    +  - '@type': /wordle.wordle.MsgSubmitWordle
    +    creator: cosmos1mr9p6wql4mmtp9xvsuklpw7fxx6g0qte7qd5q9
    +    word: giant
    +  non_critical_extension_options: []
    +  timeout_height: "0"
    +signatures: []
    +confirm transaction before signing and broadcasting [y/N]:

    Confirm with a y.

    You will then get a response with a transaction hash as shown here:

    bash
    code: 0
    +codespace: ""
    +data: ""
    +events: []
    +gas_used: "0"
    +gas_wanted: "0"
    +height: "0"
    +info: ""
    +logs: []
    +raw_log: ""
    +timestamp: ""
    +tx: null
    +txhash: F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Let's grab the txhash for later:

    bash
    TX_HASH=F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Note, this does not mean the transaction was included in the block yet. Let's query the transaction hash to check whether it has been included in the block yet or if there are any errors.

    bash
    rollkit query tx --type=hash $TX_HASH --output json | jq -r '.raw_log'

    This should display an output like the following:

    json
    [{"events":[{"type":"message","attributes":[{"key":"action","value":"submit_wordle"
    +}]}]}]

    Test out a few things for fun:

    bash
    rollkit tx wordle submit-guess 12345 --from bob --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted integers.

    Now try:

    bash
    rollkit  tx wordle submit-guess ABCDEFG --from bob --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted a word larger than 5 characters.

    Now try to submit another wordle even though one was already submitted

    bash
    rollkit tx wordle submit-wordle meter --from bob --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. You will get an error that a wordle has already been submitted for the day.

    Now let’s try to guess a five letter word:

    bash
    rollkit tx wordle submit-guess least --from bob --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. Given you didn’t guess the correct word, it will increment the guess count for bob's account.

    We can verify this by querying the list:

    bash
    rollkit q wordle list-guess --output json

    This outputs all Guess objects submitted so far, with the index being today’s date and the address of the submitter.

    With that, we implemented a basic example of Wordle using Cosmos-SDK and Ignite and Rollkit. Read on to how you can extend the code base.

    🔮 Extending in the future

    There are many ways this codebase can be extended:

    1. You can improve messaging around when you guess the correct word.
    2. You can hash the word prior to submitting it to the chain, ensuring the hashing is local so that it’s not revealed via front-running by others monitoring the plaintext string when it’s submitted on-chain.
    3. You can improve the UI in terminal using a nice interface for Wordle. Some examples are here.
    4. You can improve current date to stick to a specific timezone.
    5. You can create a bot that submits a wordle every day at a specific time.
    6. You can create a vue.js front-end with Ignite using example open-source repositories here and here.

    🎉 Next steps

    Congratulations! You've built a Wordle app using Cosmos-SDK and Rollkit. Now, explore connecting your chain to DA networks like Celestia.

    `,112))]))}});export{T as __pageData,I as default}; diff --git a/pr-528/assets/tutorials_wordle.md.C5a70n_Y.lean.js b/pr-528/assets/tutorials_wordle.md.C5a70n_Y.lean.js new file mode 100644 index 000000000..fd4ce5541 --- /dev/null +++ b/pr-528/assets/tutorials_wordle.md.C5a70n_Y.lean.js @@ -0,0 +1,196 @@ +import{C as l}from"./chunks/callout.CtmRa3nB.js";import{c as t}from"./chunks/constants.C1G_zmdY.js";import{c as p,j as i,a as n,G as k,a3 as a,t as e,k as h,o as r}from"./chunks/framework.B8-VHxRu.js";/* empty css */const d="/docs-preview/pr-528/wordle/wordle.png",o={class:"tip custom-block"},g={class:"language-bash vp-adaptive-theme"},E={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},F={class:"line"},c={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},y={class:"language-bash vp-adaptive-theme"},u={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},C={class:"line"},m={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},b={class:"language-bash vp-adaptive-theme"},B={class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},f={class:"line"},w={style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},T=JSON.parse('{"title":"🕹️ Wordle app","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🕹️ Wordle app | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/wordle.md","filePath":"tutorials/wordle.md","lastUpdated":1733420866000}'),v={name:"tutorials/wordle.md"},I=Object.assign(v,{setup(A){return(D,s)=>(r(),p("div",null,[s[14]||(s[14]=i("h1",{id:"🕹️-wordle-app",tabindex:"-1"},[n("🕹️ Wordle app "),i("a",{class:"header-anchor",href:"#🕹️-wordle-app","aria-label":'Permalink to "🕹️ Wordle app"'},"​")],-1)),s[15]||(s[15]=i("p",null,[i("img",{src:d,alt:"wordle-app"})],-1)),s[16]||(s[16]=i("p",null,[n("This tutorial guide will go over building a cosmos-sdk app for Rollkit, the Sovereign-Rollup implementation of CometBFT, for the popular game "),i("a",{href:"https://www.nytimes.com/games/wordle/index.html",target:"_blank",rel:"noreferrer"},"Wordle"),n(".")],-1)),s[17]||(s[17]=i("p",null,"This tutorial will go over how to setup Rollkit in the Ignite CLI and use it to build the game. The tutorial will go over the simple design, as well as conclude with future implementations and ideas to extend this codebase.",-1)),i("div",o,[s[0]||(s[0]=i("p",{class:"custom-block-title"},"TIP",-1)),k(l)]),s[18]||(s[18]=a('

    💻 Pre-requisites

    This tutorial is targeted for developers who have some experience in the Cosmos-SDK. We will go through the steps to build the chain, but for more information on how the Cosmos-SDK components work, check out the Cosmos-SDK Docs.

    Additionally, we recommend that you have gone over the quick start guide first to see an example of a running chain.

    You also need to have Rollkit CLI installed. You can install it by running:

    ',4)),i("div",g,[s[2]||(s[2]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[3]||(s[3]=i("span",{class:"lang"},"bash",-1)),i("pre",E,[i("code",null,[i("span",F,[s[1]||(s[1]=a('curl -sSL https://rollkit.dev/install.sh | sh -s',6)),i("span",c," "+e(h(t).rollkitLatestTag),1)])])])]),s[19]||(s[19]=a('

    📖 Design implementation

    The rules of Wordle are simple: You have to guess the word of the day.

    Key Points to Consider:

    • The word is a five-letter word.
    • You have 6 guesses.
    • Every 24 hours, there’s a new word.

    The GUI for Wordle shows you a few indicators: a green highlight on a letter in a certain position means that’s the correct letter for the Wordle in the right position. A yellow highlight means it’s a correct letter for the Wordle included in the wrong position. A grey highlight means the letter isn’t part of the Wordle.

    For simplicity of the design, we will avoid those hints, although there are ways to extend this codebase to implement that, which we will show at the end.

    In this current design, we implement the following rules:

    • 1 Wordle can be submitted per day
    • Every address will have 6 tries to guess the word
    • It must be a five-letter word.
    • Whoever guesses the word correctly before their 6 tries are over gets an award of 100 WORDLE tokens.

    We will go over the architecture to achieve this further in the guide. But for now, we will get started setting up our development environment.

    ⛓️ Ignite and scaffolding the wordle chain

    🔥 Ignite

    Ignite is an amazing CLI tool to help us get started building our own blockchains for cosmos-sdk apps. It provides lots of power toolings and scaffoldings for adding messages, types, and modules with a host of cosmos-sdk libraries provided.

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    ',14)),i("div",y,[s[7]||(s[7]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[8]||(s[8]=i("span",{class:"lang"},"bash",-1)),i("pre",u,[i("code",null,[i("span",C,[s[4]||(s[4]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"curl",-1)),i("span",m," https://get.ignite.com/cli@"+e(h(t).igniteVersionTag)+"!",1),s[5]||(s[5]=i("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}}," |",-1)),s[6]||(s[6]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}}," bash",-1))])])])]),s[20]||(s[20]=a('

    This installs Ignite CLI in your local machine. This tutorial uses a macOS but it should work for Windows. For Windows users, check out the Ignite docs on installation for Windows machines.

    Now, refresh your terminal using source or open a new terminal session for the change to take place.

    If you run the following:

    bash
    ignite --help

    You should see an output of help commands meaning Ignite was installed successfully!

    ⛓️ Scaffolding the wordle chain

    Now, comes the fun part, creating a new blockchain! With Ignite, the process is pretty easy and straightforward.

    Ignite CLI comes with several scaffolding commands that are designed to make development more straightforward by creating everything you need to build your blockchain.

    First, we will use Ignite CLI to build the foundation of a fresh Cosmos SDK blockchain. Ignite minimizes how much blockchain code you must write yourself. If you are coming from the EVM-world, think of Ignite as a Cosmos-SDK version of Foundry or Hardhat but specifically designed to build blockchains.

    we first run the following command to set up our project for our new blockchain, wordle.

    bash
    ignite scaffold chain wordle --no-module

    This command scaffolds a new chain directory called wordle in your local directory from which you ran the command. Notice that we passed the --no-module flag, this is because we will be creating the module after.

    🗂️ Wordle directory

    Now, it’s time to enter the directory:

    bash
    cd wordle

    Inside you will see several directories and architecture for your cosmos-sdk blockchain.

    File/directoryPurpose
    app/Files that wire together the blockchain. The most important file is app.go that contains type definition of the blockchain and functions to create and initialize it.
    cmd/The main package responsible for the CLI of compiled binary.
    docs/Directory for project documentation. By default, an OpenAPI spec is generated.
    proto/Protocol buffer files describing the data structure.
    testutil/Helper functions for testing.
    vue/A Vue 3 web app template.
    x/Cosmos SDK modules and custom modules.
    config.ymlA configuration file for customizing a chain in development.
    readme.mdA readme file for your sovereign application-specific blockchain project.

    Going over each one is outside the scope of this guide, but we encourage you to read about it here.

    Most of the tutorial work will happen inside the x directory.

    🛠️ Setting up Rollkit

    Before we continue with building our Wordle App, we need to set up Rollkit on our codebase.

    🗞️ Installing Rollkit

    To install the Rollkit app to Ignite, run the following command:

    ',23)),i("div",b,[s[12]||(s[12]=i("button",{title:"Copy Code",class:"copy"},null,-1)),s[13]||(s[13]=i("span",{class:"lang"},"bash",-1)),i("pre",B,[i("code",null,[i("span",f,[s[9]||(s[9]=i("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"ignite",-1)),s[10]||(s[10]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," app",-1)),s[11]||(s[11]=i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install",-1)),i("span",w," github.com/ignite/apps/rollkit@"+e(h(t).rollkitIgniteAppVersion),1)])])])]),s[21]||(s[21]=a(`

    Next, add Rollkit to your project by running:

    bash
    ignite rollkit add

    ✨ Creating the wordle module

    For the Wordle module, we can add dependencies offered by Cosmos-SDK.

    From the Cosmos-SDK docs, a module is defined as the following:

    In a Cosmos SDK blockchain, application-specific logic is implemented in separate modules. Modules keep code easy to understand and reuse. Each module contains its own message and transaction processor, while the Cosmos SDK is responsible for routing each message to its respective module.

    Many modules exist for slashing, validating, auth.

    🔖 Scaffolding a module

    We will be using the bank module dependency for transactions.

    From the Cosmos-SDK docs, the bank module is defined as the following:

    The bank module is responsible for handling multi-asset coin transfers between accounts and tracking special-case pseudo-transfers which must work differently with particular kinds of accounts (notably delegating/undelegating for vesting accounts). It exposes several interfaces with varying capabilities for secure interaction with other modules which must alter user balances.

    We build the module with the bank dependency with the following command:

    bash
    ignite scaffold module wordle --dep bank -y

    This will scaffold the Wordle module to our Wordle Chain project.

    ✉️ Messages

    Messages allow us to process and submit information to our specific module.

    From the Cosmos-SDK docs, messages are:

    In the Cosmos SDK, messages are objects that are contained in transactions to trigger state transitions. Each Cosmos SDK module defines a list of messages and how to handle them.

    For messages for Wordle, given our initial design, we will make 2 messages with ignite.

    • The first one is: SubmitWordle and it only passes the Wordle of the Day.
    • The second one is: SubmitGuess and it attempts to guess the submitted wordle. It also passes a word as a guess.

    With these initial designs, we can start creating our messages!

    💬 Scaffolding a message

    To create the SubmitWordle message, we run the following command:

    bash
    ignite scaffold message submit-wordle word -y

    This creates the submit-wordle message that takes in word as a parameter.

    We now create the final message, SubmitGuess:

    bash
    ignite scaffold message submit-guess word -y

    Here, we are passing a word as a guess with submit-guess.

    🎨 Wordle types

    For the next steps, we will be creating types to be used by the messages we created.

    🏗️ Scaffolding wordle types

    bash
    ignite scaffold map wordle word submitter --no-message -y

    This type is a map called Wordle with two values of word and submitter. submitter is the address of the person that submitted the Wordle.

    The second type is the Guess type. It allows us to store the latest guess for each address that submitted a solution.

    bash
    ignite scaffold map guess word submitter count --no-message -y

    Here, we are also storing count to count how many guesses this address submitted.

    🔐 Keeper functions

    Now it’s time to implement the Keeper functions for each message. From the Cosmos-SDK docs, Keeper is defined as the following:

    The main core of a Cosmos SDK module is a piece called the keeper. The keeper handles interactions with the store, has references to other keepers for cross-module interactions, and contains most of the core functionality of a module.

    Keeper is an abstraction on Cosmos that allows us to interact with the Key-Value store and change the state of the blockchain.

    Here, it will help us outline the logic for each message we create.

    📤 SubmitWordle function

    We first start with the SubmitWordle function.

    Open up the following file: x/wordle/keeper/msg_server_submit_wordle.go

    Inside the following, replace the current code with the following code, which we will go over in a bit:

    go
    package keeper
    +
    +import (
    +  "context"
    +  "crypto/sha256"
    +  "encoding/hex"
    +  "wordle/x/wordle/types"
    +  "cosmossdk.io/errors"
    +  sdk "github.com/cosmos/cosmos-sdk/types"
    +  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
    +  "time"
    +  "unicode"
    +)
    +
    +func (k msgServer) SubmitWordle(goCtx context.Context, msg *types.MsgSubmitWordle) (*types.MsgSubmitWordleResponse, error) {
    +  ctx := sdk.UnwrapSDKContext(goCtx)
    +  // Check to See the Wordle is 5 letters
    +  if len(msg.Word) != 5 {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle Must Be A 5 Letter Word")
    +  }
    +  // Check to See Only Alphabets Are Passed for the Wordle
    +  if !(IsLetter(msg.Word)) {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle Must Only Consist Of Letters In The Alphabet")
    +  }
    +
    +  // Use Current Day to Create The Index of the Newly-Submitted Wordle of the Day
    +  currentTime := time.Now().Local()
    +  var currentTimeBytes = []byte(currentTime.Format("2006-01-02"))
    +  var currentTimeHash = sha256.Sum256(currentTimeBytes)
    +  var currentTimeHashString = hex.EncodeToString(currentTimeHash[:])
    +  // Hash The Newly-Submitted Wordle of the Day
    +  var submittedSolutionHash = sha256.Sum256([]byte(msg.Word))
    +  var submittedSolutionHashString = hex.EncodeToString(submittedSolutionHash[:])
    +
    +  var wordle = types.Wordle{
    +    Index:     currentTimeHashString,
    +    Word:      submittedSolutionHashString,
    +    Submitter: msg.Creator,
    +  }
    +
    +  // Try to Get Wordle From KV Store Using Current Day as Key
    +  // This Helps ensure only one Wordle is submitted per day
    +  _, isFound := k.GetWordle(ctx, currentTimeHashString)
    +  if isFound {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle of the Day is Already Submitted")
    +  }
    +  // Write Wordle to KV Store
    +  k.SetWordle(ctx, wordle)
    +  reward := sdk.Coins{sdk.NewInt64Coin("token", 100)}
    +  // Escrow Reward
    +  submitterAddress, _ := sdk.AccAddressFromBech32(msg.Creator)
    +  err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, submitterAddress, types.ModuleName, reward)
    +  if err != nil {
    +    return nil, err
    +  }
    +  return &types.MsgSubmitWordleResponse{}, nil
    +}
    +
    +func IsLetter(s string) bool {
    +  for _, r := range s {
    +    if !unicode.IsLetter(r) {
    +      return false
    +    }
    +  }
    +  return true
    +}

    Here in the SubmitWordle Keeper function, we are doing a few things:

    • We first ensure that a word submitted for Wordle of the Day is 5 letters long and only uses alphabets. That means no integers can be submitted in the string.
    • We then create a hash from the current day the moment the Wordle was submitted. We set this hash to the index of the Wordle type. This allows us to look up any guesses for this Wordle for subsequent guesses, which we will go over next.
    • We then check if the index for today’s date is currently empty or not. If it’s not empty, this means a Wordle has already been submitted. Remember, only one wordle can be submitted per day. Everyone else has to guess the submitted wordle.
    • We also have a helper function in there to check if a string only contains alphabet characters.

    SubmitGuess function

    The next Keeper function we will add is the following: x/wordle/keeper/msg_server_submit_guess.go

    Open that file and replace its contents with the following code, which we will explain in a bit:

    go
    package keeper
    +
    +import (
    +  "context"
    +  "crypto/sha256"
    +  "encoding/hex"
    +  "wordle/x/wordle/types"
    +  "cosmossdk.io/errors"
    +  sdk "github.com/cosmos/cosmos-sdk/types"
    +  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
    +  "strconv"
    +  "time"
    +)
    +
    +func (k msgServer) SubmitGuess(goCtx context.Context, msg *types.MsgSubmitGuess) (*types.MsgSubmitGuessResponse, error) {
    +  ctx := sdk.UnwrapSDKContext(goCtx)
    +  // Check Word is 5 Characters Long
    +  if len(msg.Word) != 5 {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Guess Must Be A 5 Letter Word!")
    +  }
    + 
    +  // Check String Contains Alphabet Letters Only
    +  if !(IsLetter(msg.Word)) {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Guess Must Only Consist of Alphabet Letters!")
    +  }
    +
    +  // Get Current Day to Pull Up Wordle of That Day As A Hash
    +  currentTime := time.Now().Local()
    +  var currentTimeBytes = []byte(currentTime.Format("2006-01-02"))
    +  var currentTimeHash = sha256.Sum256(currentTimeBytes)
    +  var currentTimeHashString = hex.EncodeToString(currentTimeHash[:])
    +  wordle, isFound := k.GetWordle(ctx, currentTimeHashString)
    +  if !isFound {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle of The Day Hasn't Been Submitted Yet. Feel Free to Submit One!")
    +  }
    +
    +  // We Convert Current Day and Guesser to A Hash To Use As An Index For Today's Guesses For That Guesser
    +  // That Way, A Person Can Guess 6 Times A Day For Each New Wordle Created
    +  var currentTimeGuesserBytes = []byte(currentTime.Format("2006-01-02") + msg.Creator)
    +  var currentTimeGuesserHash = sha256.Sum256(currentTimeGuesserBytes)
    +  var currentTimeGuesserHashString = hex.EncodeToString(currentTimeGuesserHash[:])
    +  // Hash The Guess To The Wordle
    +  var submittedSolutionHash = sha256.Sum256([]byte(msg.Word))
    +  var submittedSolutionHashString = hex.EncodeToString(submittedSolutionHash[:])
    +
    +  // Get the Latest Guess entry for this Submitter for the current Wordle of the Day
    +  var count int
    +  guess, isFound := k.GetGuess(ctx, currentTimeGuesserHashString)
    +  if isFound {
    +    // Check if Submitter Reached 6 Tries
    +    if guess.Count == strconv.Itoa(6) {
    +      return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "You Have Guessed The Maximum Amount of Times for The Day! Try Again Tomorrow With A New Wordle.")
    +    }
    +    currentCount, err := strconv.Atoi(guess.Count)
    +    if err != nil {
    +      panic(err)
    +    }
    +    count = currentCount
    +  } else {
    +    // Initialize Count Value If No Entry Exists for this Submitter for Today's Wordle
    +    count = 0
    +  }
    +  // Increment Guess Count
    +  count += 1
    +  var newGuess = types.Guess{
    +    Index:     currentTimeGuesserHashString,
    +    Submitter: msg.Creator,
    +    Word:      submittedSolutionHashString,
    +    Count:     strconv.Itoa(count),
    +  }
    +  // Remove Current Guess Entry to be Updated With New Entry
    +  k.RemoveGuess(ctx, currentTimeGuesserHashString)
    +  // Add New Guess Entry
    +  k.SetGuess(ctx, newGuess)
    +  if !(wordle.Word == submittedSolutionHashString) {
    +    return &types.MsgSubmitGuessResponse{Title: "Wrong Answer", Body: "Your Guess Was Wrong. Try Again"}, nil
    +  } else {
    +    // Setup Reward 
    +    reward := sdk.Coins{sdk.NewInt64Coin("token", 100)}
    +    // If Submitter Guesses Correctly
    +    guesserAddress, _ := sdk.AccAddressFromBech32(msg.Creator)
    +    // Send Reward
    +    err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, guesserAddress, reward)
    +    if err !=nil {
    +      return nil, err
    +    }
    +    return &types.MsgSubmitGuessResponse{Title: "Correct", Body: "You Guessed The Wordle Correctly!"}, nil
    +  }
    +}

    In the above code, we are doing the following things:

    • Here, we are doing initial checks again on the word to ensure it’s 5 characters and only alphabet characters are used, which can be refactored in the future or checked within the CLI commands.
    • We then get the Wordle of the Day by getting the hash string of the current day.
    • Next we create a hash string of current day and the Submitter. This allows us to create a Guess type with an index that uses the current day and the address of the submitter. This helps us when we face a new day and an address wants to guess the new wordle of the day. The index setup ensures they can continue guessing a new wordle every day up to the max of 6 tries per day.
    • We then check if that Guess type for the Submitter for today’s wordle did reach 6 counts. If it hasn’t, we increment the count. We then check if the guess is correct. We store the Guess type with the updated count to the state.

    📦 Protobuf file

    A few files need to be modified for this to work.

    The first is proto/wordle/wordle/tx.proto.

    Inside this file, fill in the empty MsgSubmitGuessResponse with the following code:

    go
    message MsgSubmitGuessResponse {
    +  string title = 1;
    +  string body = 2;
    +}

    Next file is x/wordle/types/expected_keepers.go

    Here, we need to add the SendCoins method to the BankKeeper interface in order to allow sending the reward to the right guesser.

    go
    type BankKeeper interface {
    +  ...
    +  // Methods imported from bank should be defined here
    +  SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
    +  SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
    +}

    With that, we implemented all our Keeper functions! Time to compile the blockchain and take it out for a test drive.

    ⛓️ Run the wordle chain

    🟢 Building and running wordle chain

    Initialize the Rollkit chain configuration for a local DA network with this command:

    bash
    ignite chain build && ignite rollkit init

    This will create a ~/.wordle directory with all the necessary files to run a chain.

    It will also initialize 2 accounts alice and bob:

    bash
    Initializing accounts...
    + Added account alice ...
    +
    + Added account bob ...

    We will use these accounts to submit transactions.

    Now let's initialize a rollkit.toml file in the worldle directory by running:

    bash
    rollkit toml init

    To start running the Wordle chain, run the following command:

    bash
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id wordle

    With that, we have kickstarted our wordle network!

    🚀 Interacting with the chain

    In another window, from the ~/wordle directory (where rollkit.toml is located) run the following command to submit a Wordle from alice:

    bash
    rollkit tx wordle submit-wordle giant --from alice --keyring-backend test --chain-id wordle -b async

    NOTE: We are submitting a transaction asynchronously to avoid any timeout errors. With Rollkit as a replacement to CometBFT, we need to wait for the data availability network to ensure a block was included from Wordle, before proceeding to the next block. Currently, in Rollkit, the single aggregator is not moving forward with the next block production as long as it is trying to submit the current block to the DA network. In the future, with leader selection, block production and sync logic improves dramatically.

    This will ask you to confirm the transaction with the following message:

    bash
    auth_info:
    +  fee:
    +    amount: []
    +    gas_limit: "200000"
    +    granter: ""
    +    payer: ""
    +  signer_infos: []
    +  tip: null
    +body:
    +  extension_options: []
    +  memo: ""
    +  messages:
    +  - '@type': /wordle.wordle.MsgSubmitWordle
    +    creator: cosmos1mr9p6wql4mmtp9xvsuklpw7fxx6g0qte7qd5q9
    +    word: giant
    +  non_critical_extension_options: []
    +  timeout_height: "0"
    +signatures: []
    +confirm transaction before signing and broadcasting [y/N]:

    Confirm with a y.

    You will then get a response with a transaction hash as shown here:

    bash
    code: 0
    +codespace: ""
    +data: ""
    +events: []
    +gas_used: "0"
    +gas_wanted: "0"
    +height: "0"
    +info: ""
    +logs: []
    +raw_log: ""
    +timestamp: ""
    +tx: null
    +txhash: F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Let's grab the txhash for later:

    bash
    TX_HASH=F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Note, this does not mean the transaction was included in the block yet. Let's query the transaction hash to check whether it has been included in the block yet or if there are any errors.

    bash
    rollkit query tx --type=hash $TX_HASH --output json | jq -r '.raw_log'

    This should display an output like the following:

    json
    [{"events":[{"type":"message","attributes":[{"key":"action","value":"submit_wordle"
    +}]}]}]

    Test out a few things for fun:

    bash
    rollkit tx wordle submit-guess 12345 --from bob --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted integers.

    Now try:

    bash
    rollkit  tx wordle submit-guess ABCDEFG --from bob --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted a word larger than 5 characters.

    Now try to submit another wordle even though one was already submitted

    bash
    rollkit tx wordle submit-wordle meter --from bob --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. You will get an error that a wordle has already been submitted for the day.

    Now let’s try to guess a five letter word:

    bash
    rollkit tx wordle submit-guess least --from bob --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. Given you didn’t guess the correct word, it will increment the guess count for bob's account.

    We can verify this by querying the list:

    bash
    rollkit q wordle list-guess --output json

    This outputs all Guess objects submitted so far, with the index being today’s date and the address of the submitter.

    With that, we implemented a basic example of Wordle using Cosmos-SDK and Ignite and Rollkit. Read on to how you can extend the code base.

    🔮 Extending in the future

    There are many ways this codebase can be extended:

    1. You can improve messaging around when you guess the correct word.
    2. You can hash the word prior to submitting it to the chain, ensuring the hashing is local so that it’s not revealed via front-running by others monitoring the plaintext string when it’s submitted on-chain.
    3. You can improve the UI in terminal using a nice interface for Wordle. Some examples are here.
    4. You can improve current date to stick to a specific timezone.
    5. You can create a bot that submits a wordle every day at a specific time.
    6. You can create a vue.js front-end with Ignite using example open-source repositories here and here.

    🎉 Next steps

    Congratulations! You've built a Wordle app using Cosmos-SDK and Rollkit. Now, explore connecting your chain to DA networks like Celestia.

    `,112))]))}});export{T as __pageData,I as default}; diff --git a/pr-528/bitcoin-rollkit/rollkit-bitcoin-1.png b/pr-528/bitcoin-rollkit/rollkit-bitcoin-1.png new file mode 100644 index 000000000..a6e6635f2 Binary files /dev/null and b/pr-528/bitcoin-rollkit/rollkit-bitcoin-1.png differ diff --git a/pr-528/bitcoin-rollkit/rollkit-bitcoin-2.png b/pr-528/bitcoin-rollkit/rollkit-bitcoin-2.png new file mode 100644 index 000000000..15302188e Binary files /dev/null and b/pr-528/bitcoin-rollkit/rollkit-bitcoin-2.png differ diff --git a/pr-528/bitcoin-rollkit/rollkit-bitcoin.png b/pr-528/bitcoin-rollkit/rollkit-bitcoin.png new file mode 100644 index 000000000..115d5f50d Binary files /dev/null and b/pr-528/bitcoin-rollkit/rollkit-bitcoin.png differ diff --git a/pr-528/blog/overview.html b/pr-528/blog/overview.html new file mode 100644 index 000000000..37ee13867 --- /dev/null +++ b/pr-528/blog/overview.html @@ -0,0 +1,73 @@ + + + + + + Blog | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Blog

    Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

    Table of contents

    Stay tuned for more exciting content!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/blog/rollkit-the-first-sovereign-rollup-framework.html b/pr-528/blog/rollkit-the-first-sovereign-rollup-framework.html new file mode 100644 index 000000000..b338ae1e4 --- /dev/null +++ b/pr-528/blog/rollkit-the-first-sovereign-rollup-framework.html @@ -0,0 +1,75 @@ + + + + + + Rollkit: The First Sovereign Rollup Framework | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Rollkit: The First Sovereign Rollup Framework

    By Rollkit

    Rollkit blog cover

    Bitcoin to Ethereum took 7 years. Ethereum to more scalable alt-L1s took 1–2 years. And then Cosmos SDK and CometBFT brought down time-to-launch a sovereign L1 to months.

    Now, Rollkit makes deploying any VM or application on its own sovereign chain as easy as typing rollkit start.

    Rollkit provides a path to one-click sovereignty for any crypto application, enabling any developer to launch their own sovereign rollups within seconds.

    Sovereign rollups combine the self-governance of a Layer 1 with the ease of deploying a rollup. They remove the need to recruit a secure validator set or bootstrap security by prematurely launching a token. Just like an independent L1, sovereign rollups retain the ability to hard fork which allows them to protect against hacks or bugs. This provides its community the ability to enforce social consensus and be sovereign.

    Without the overhead of a settlement layer, sovereign rollups can directly interoperate with shared security when using the same DA layer.

    By using a generic application interface like ABCI++, Rollkit is compatible with the Cosmos SDK, the leading framework for building sovereign blockchains. This enables all Cosmos SDK developers to build a sovereign rollup and tap into all the powerful cosmos ecosystem tooling they’re used to including IBC, ABCI++, and Skip Protocol's Slinky and BlockSDK.

    Developers have full-freedom to deploy a VM or define their own execution environment, unconstrained by the overhead of an enshrined settlement layer that must process fraud or ZK proofs for their rollups. This means that instead of a canonical on-chain light client that comes with an enshrined settlement layer, sovereign rollups can define how they interoperate with other blockchains by having on-chain light clients of each other as needed.

    Take Control

    In the past, developers have been compelled to accept a degree of trust in convincing validators to organize and independently run nodes that secure a new blockchain. This requires launching premature tokens, inflating away their token supply in order to maintain incentive alignment with validators and offset their operational costs. This does not let developers focus on the core product they’re building. Sovereign rollups empower developers to get rid of this need to launch a token prematurely for bootstrapping a validator set and spending an excessively high amount of internal resources on blockchain development.

    Existing settled rollups come with the overhead of an enshrined settlement layer like Ethereum L1 where it is difficult and expensive to unwind a token on an L2 and move to another L2 without relying on trusted liquidity bridging intermediaries. This also comes with becoming subordinate to the social consensus of an enshrined settlement layer, which they may or may not align with.

    Sovereign rollups don’t need to settle to an external blockchain and can instead fully own their settlement. This allows them to protect against hacks and bugs, and facilitate upgrades via hard forks. They introduce rollup light clients that verify DA directly through data availability sampling and verify execution state proofs allowing asynchronous composability as needed. This in turn paves the path forward for trust-minimized interoperability between sovereign chains that share the same DA layer.

    Sovereign rollups remove the need to have a bridge contract that is upgradeable by an offchain council and instead allows the sovereign community to define rules via fully onchain governance.

    Build with the Best

    Cosmos SDK’s rich array of developer tooling, battle-tested and refined over the past several years, is available to Rollkit developers from day one. Developers can use popular wallet infrastructure, block explorers and indexers supporting CometBFT RPCs, speak IBC across the interchain, have Cosmwasm smart contracts along with Abstract SDK, utilize MEV and free lanes via the BlockSDK and enshrine oracles in block production with Slinky from Skip Protocol. More cosmos related resources.

    Rollkit rollups interact with a state machine via the Application Blockchain Interface (ABCI++). This allows it to be used as an alternative to CometBFT for any ABCI application. Rollkit comes with a custom start handler that can be used by Cosmos SDK blockchains to use it as its ABCI client while still following the release branches of upstream Cosmos SDK. This compatibility enables developers to use tools like abci-cli to test and debug rollups.

    Optimize for your needs

    Rollkit allows developers to optimize between the different modular components of a sovereign chain as needed. Rollkit allows you to:

    • Choose between data availability layers that implement the go-da interface.

    • Choose any ABCI++ compatible virtual machine.

    • Utilize the Sequencing API to delegate sequencing to the shared sequencer network of your choice or even delegate sequencing to the DA layer to go based. Choose between state validity modes: Pessimistic, Optimistic, or ZK or use a combination of both zk and optimistic schemes. Eliminate the need to launch a token or designate the native token or any token for gas fees.

    • Customize block time to just a couple hundred milliseconds and produce blocks only when needed.

    • Configure the fork choice rule.

    Rollkit rollups pay only for data availability on demand. There is no sequencer split required, nor will there ever be any kind of rent seeking model imposed on Rollkit rollups. Rollkit rollups preserve the advantages of a Cosmos SDK blockchain but reduce the overhead of deploying and maintaining a validator set.

    Break Free. Be Sovereign.

    Get started with launching your own sovereign chain with Rollkit. If you’re thinking of building a sovereign chain, we’d love to hear from you. Fill out this form.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/blog/sovereign-rollups-on-bitcoin.html b/pr-528/blog/sovereign-rollups-on-bitcoin.html new file mode 100644 index 000000000..9efd8b5cb --- /dev/null +++ b/pr-528/blog/sovereign-rollups-on-bitcoin.html @@ -0,0 +1,76 @@ + + + + + + Sovereign rollups on Bitcoin with Rollkit | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Sovereign rollups on Bitcoin with Rollkit

    By Rollkit

    rollkit-bitcoinOriginally published on 5 March 2023

    Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. An early research implementation allows Rollkit rollups to use Bitcoin for data availability.

    Rollkit is opening the door for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and re-org resistance. With the new integration it is now possible to run the EVM on Bitcoin as a Rollkit sovereign rollup. Sovereign rollups on Bitcoin not only expand the possibilities for rollups, but also have the potential to help bootstrap a healthy blockspace fee market on Bitcoin, enabling a more sustainable security budget.

    Tl;dr

    • Sovereign rollups using Bitcoin for data availability are now a reality with Rollkit’s new early research integration.
    • Follow along with a demo of the EVM running on Bitcoin as a sovereign Rollkit rollup.
    • The implementation was possible due to Bitcoin's Taproot upgrade and Ordinals' usage of Bitcoin for publishing arbitrary data.

    Posting data on Bitcoin with Taproot

    On Feb. 1, 2023, the Luxor mining pool mined the largest Bitcoin block (#774628) ever, approximately 4 MB. Most of the blockspace was used to inscribe a Taproot Wizards NFT with Ordinals, a project that implements NFTs on Bitcoin by publishing the image data on-chain.

    Bitcoin NFTs use Taproot witnesses to inscribe arbitrary data, enabled by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can include up to around 390kB of arbitrary data while still passing through the public mempool. A non-standard transaction, included by a miner directly without passing through the mempool, can include close to 4MB of arbitrary data. In short, with SegWit, it became viable to post big blobs of data to the Bitcoin blockchain.

    Since then, the usage of Ordinals for NFT inscriptions and Taproot utilization has kicked off. Eric Wall found that at the time of his tweet, posting data on Bitcoin was 7x cheaper than Ethereum. Now that there are thousands of inscriptions on Bitcoin, it has become clear that sovereign rollups and an ecosystem of dapps on Bitcoin could become a reality. The missing piece: a rollup framework for easily integrating Bitcoin as a data availability layer.

    Integrating Bitcoin as a data availability layer into Rollkit

    Rollkit is a modular framework for rollups, where developers can plug-in custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, Bitcoin is an option, thanks to an early research implementation of a Bitcoin data availability module for Rollkit. In this case, sovereign rollups manage their own execution and settlement while offloading consensus and data availability to Bitcoin.

    rollkit-bitcoin-rollup

    How Rollkit posts data to Bitcoin

    To write and read data on Bitcoin, we make use of Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da that provides a reader/writer interface to Bitcoin. For details of how the interface works and how it uses Taproot, see the specs. The package can be re-used by any project that wants to read or write data on Bitcoin.

    Rollkit was built with modularity at its core. It has a data availability interface so that developers can simply implement specific methods to add a new data availability layer. To add a data availability layer, implementers need to satisfy the DataAvailabilityLayerClient interface which defines the behavior of the data availability client, and the BlockRetriever interface which defines how blocks can be synced. These interfaces live in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing the blocks.

    After implementing the Taproot reader/writer interface for Bitcoin (bitcoin-da), adding it as a data availability module for Rollkit took less than a day. We mostly only had to implement the SubmitBlock and RetrieveBlocks functions for Rollkit to call the Read and Write methods in bitcoin-da.

    rollkit-bitcoin-rollup-2

    EVM on Bitcoin demo

    Rollkit supports custom execution layers, including EVM, CosmWasm, or the Cosmos SDK. To test the integration, we used Rollkit to run the EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network. See below for a demo.

    Conclusion

    As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. Sovereign rollups fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.

    Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around Rollkit and build sovereign rollups on Bitcoin, or customize Rollkit with different execution environments and data availability layers. For details on how to run Rollkit with the Bitcoin data availability module, see the instructions here. Keep in mind that the integration is an early research implementation and it is not yet production-ready!

    Modularism, not maximalism.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/cosmwasm/init.sh b/pr-528/cosmwasm/init.sh new file mode 100644 index 000000000..01de6f219 --- /dev/null +++ b/pr-528/cosmwasm/init.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +# set variables for the chain +VALIDATOR_NAME=validator1 +CHAIN_ID=localwasm +KEY_NAME=localwasm-key +TOKEN_AMOUNT="10000000000000000000000000uwasm" +STAKING_AMOUNT=1000000000uwasm +CHAINFLAG="--chain-id ${CHAIN_ID}" +TXFLAG="--chain-id ${CHAIN_ID} --gas-prices 0uwasm --gas auto --gas-adjustment 1.3" + +# reset any existing genesis/chain data +wasmd tendermint unsafe-reset-all +wasmd init $VALIDATOR_NAME --chain-id $CHAIN_ID + +# update wasmd configuration files to set chain details and enable necessary settings +# the sed commands here are editing various configuration settings for the wasmd instance +# such as setting minimum gas prices, enabling the api, setting the chain id, setting the rpc address, +# adjusting time constants, and setting the denomination for bonds and minting. +sed -i'' -e 's/^minimum-gas-prices *= .*/minimum-gas-prices = "0uwasm"/' "$HOME"/.wasmd/config/app.toml +sed -i'' -e '/\[api\]/,+3 s/enable *= .*/enable = true/' "$HOME"/.wasmd/config/app.toml +sed -i'' -e "s/^chain-id *= .*/chain-id = \"$CHAIN_ID\"/" "$HOME"/.wasmd/config/client.toml +sed -i'' -e '/\[rpc\]/,+3 s/laddr *= .*/laddr = "tcp:\/\/0.0.0.0:26657"/' "$HOME"/.wasmd/config/config.toml +sed -i'' -e 's/"time_iota_ms": "1000"/"time_iota_ms": "10"/' "$HOME"/.wasmd/config/genesis.json +sed -i'' -e 's/bond_denom": ".*"/bond_denom": "uwasm"/' "$HOME"/.wasmd/config/genesis.json +sed -i'' -e 's/mint_denom": ".*"/mint_denom": "uwasm"/' "$HOME"/.wasmd/config/genesis.json + +# add a key to keyring-backend test +wasmd keys add $KEY_NAME --keyring-backend test + +# add a genesis account +wasmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test + +# set the staking amounts in the genesis transaction +wasmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test + +# collect gentxs +wasmd genesis collect-gentxs + +# copy centralized sequencer address into genesis.json +# Note: validator and sequencer are used interchangeably here +ADDRESS=$(jq -r '.address' ~/.wasmd/config/priv_validator_key.json) +PUB_KEY=$(jq -r '.pub_key' ~/.wasmd/config/priv_validator_key.json) +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.wasmd/config/genesis.json > temp.json && mv temp.json ~/.wasmd/config/genesis.json + +echo "wasmd start --rollkit.aggregator --rollkit.da_address http://localhost:7980 --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025uwasm"" >> restart-wasmd.sh + +# start the chain +wasmd start --rollkit.aggregator --rollkit.da_address http://localhost:7980 --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025uwasm" diff --git a/pr-528/frontend-evm.png b/pr-528/frontend-evm.png new file mode 100644 index 000000000..7ad9248a6 Binary files /dev/null and b/pr-528/frontend-evm.png differ diff --git a/pr-528/gm/gm.png b/pr-528/gm/gm.png new file mode 100644 index 000000000..8fdc4b750 Binary files /dev/null and b/pr-528/gm/gm.png differ diff --git a/pr-528/gm/init-arabica-testnet.sh b/pr-528/gm/init-arabica-testnet.sh new file mode 100644 index 000000000..b3e2f93a5 --- /dev/null +++ b/pr-528/gm/init-arabica-testnet.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# set variables for the chain +VALIDATOR_NAME=validator1 +CHAIN_ID=gm +KEY_NAME=gm-key +KEY_2_NAME=gm-key-2 +CHAINFLAG="--chain-id ${CHAIN_ID}" +TOKEN_AMOUNT="10000000000000000000000000stake" +STAKING_AMOUNT="1000000000stake" + +# query the DA Layer start height, in this case we are querying +# an RPC endpoint provided by Celestia Labs. The RPC endpoint is +# to allow users to interact with Celestia's core network by querying +# the node's state and broadcasting transactions on the Celestia +# network. This is for Arabica, if using another network, change the RPC. +DA_BLOCK_HEIGHT=$(curl https://rpc.celestia-arabica-11.com/block | jq -r '.result.block.header.height') +echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n" + +AUTH_TOKEN=$(celestia light auth write --p2p.network arabica) +echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n" + +# build the gm chain with Rollkit +ignite chain build + +# reset any existing genesis/chain data +gmd tendermint unsafe-reset-all + +# initialize the validator with the chain ID you set +gmd init $VALIDATOR_NAME --chain-id $CHAIN_ID + +# add keys for key 1 and key 2 to keyring-backend test +gmd keys add $KEY_NAME --keyring-backend test +gmd keys add $KEY_2_NAME --keyring-backend test + +# add these as genesis accounts +gmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test +gmd genesis add-genesis-account $KEY_2_NAME $TOKEN_AMOUNT --keyring-backend test + +# set the staking amounts in the genesis transaction +gmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test + +# collect genesis transactions +gmd genesis collect-gentxs + +# copy centralized sequencer address into genesis.json +# Note: validator and sequencer are used interchangeably here +ADDRESS=$(jq -r '.address' ~/.gm/config/priv_validator_key.json) +PUB_KEY=$(jq -r '.pub_key' ~/.gm/config/priv_validator_key.json) +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json && mv temp.json ~/.gm/config/genesis.json + +# create a restart-testnet.sh file to restart the chain later +[ -f restart-testnet.sh ] && rm restart-testnet.sh +echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-testnet.sh +echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-testnet.sh + +echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:26657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-testnet.sh + +# start the chain +gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:26657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/pr-528/gm/init-full-node.sh b/pr-528/gm/init-full-node.sh new file mode 100644 index 000000000..df43d2159 --- /dev/null +++ b/pr-528/gm/init-full-node.sh @@ -0,0 +1,56 @@ +CHAIN_ID=gm +BASE_DIR="$HOME/.gm_fn" +P2P_ID="your-p2p-id" + +# notice that this will remove the existing rollkit.toml that was used to run sequencing node +# if you need to run sequencing node again, you should update config_dir to the $HOME/gm/.gm +rm -rf $BASE_DIR rollkit.toml + +cat << EOF > rollkit.toml +entrypoint = "$HOME/gm/cmd/gmd/main.go" + +[chain] + config_dir = "$BASE_DIR" +EOF + +rollkit rebuild + +rollkit init FullNode --chain-id $CHAIN_ID + +cp -R "$HOME/gm/.gm/config/genesis.json" "$BASE_DIR/config/genesis.json" + +# rollkit logo +cat <<'EOF' + + :=+++=. + -++- .-++: + .=+=. :++-. + -++- .=+=: . + .=+=: -%@@@* + +%- .=#@@@@@@* + -++- -*%@@@@@@%+: + .=*=. .=#@@@@@@@%=. + -++-.-++: =*#@@@@@%+:.-++-=- + .=+=. :=+=.-: @@#=. .-*@@@@% + =*=: .-==+- :+#@@@@@@%- + :++- -*@@@@@@@#=: + =%+=. .=#@@@@@@@#%: + -++: -++- *+=@@@@%+: =#*##- + =*=. :=+=---@*=. .=*@@@@@% + .-+=: :-: :+%@@@@@@%+. + :=+- -*@@@@@@@#=. + .=+=: .=#@@@@@@%*- + -++- *=.@@@#+: + .====+*-. + + ______ _ _ _ _ _ + | ___ \ | || || | (_)| | + | |_/ / ___ | || || | __ _ | |_ + | / / _ \ | || || |/ /| || __| + | |\ \ | (_) || || || < | || |_ + \_| \_| \___/ |_||_||_|\_\|_| \__| + + +EOF + +rollkit start --rollkit.da_address http://127.0.0.1:7980 --rpc.laddr tcp://127.0.0.1:46657 --grpc.address 127.0.0.1:9390 --p2p.seeds $P2P_ID@127.0.0.1:36656 --p2p.laddr "0.0.0.0:46656" --log_level debug --minimum-gas-prices="0.025stake" diff --git a/pr-528/gm/init-local.sh b/pr-528/gm/init-local.sh new file mode 100644 index 000000000..0f94c1889 --- /dev/null +++ b/pr-528/gm/init-local.sh @@ -0,0 +1,96 @@ +#!/bin/sh + +# set variables for the chain +VALIDATOR_NAME=validator1 +CHAIN_ID=gm +KEY_NAME=gm-key +KEY_2_NAME=gm-key-2 +KEY_RELAY=gm-relay +CHAINFLAG="--chain-id ${CHAIN_ID}" +TOKEN_AMOUNT="10000000000000000000000000stake" +STAKING_AMOUNT="1000000000stake" + +# query the DA Layer start height, in this case we are querying +# our local devnet at port 26657, the RPC. The RPC endpoint is +# to allow users to interact with Celestia's nodes by querying +# the node's state and broadcasting transactions on the Celestia +# network. The default port is 26657. +DA_BLOCK_HEIGHT=$(curl http://0.0.0.0:26657/block | jq -r '.result.block.header.height') + +AUTH_TOKEN=$(docker exec $(docker ps -q) celestia bridge auth admin --node.store /home/celestia/bridge) + +# rollkit logo +cat <<'EOF' + + :=+++=. + -++- .-++: + .=+=. :++-. + -++- .=+=: . + .=+=: -%@@@* + +%- .=#@@@@@@* + -++- -*%@@@@@@%+: + .=*=. .=#@@@@@@@%=. + -++-.-++: =*#@@@@@%+:.-++-=- + .=+=. :=+=.-: @@#=. .-*@@@@% + =*=: .-==+- :+#@@@@@@%- + :++- -*@@@@@@@#=: + =%+=. .=#@@@@@@@#%: + -++: -++- *+=@@@@%+: =#*##- + =*=. :=+=---@*=. .=*@@@@@% + .-+=: :-: :+%@@@@@@%+. + :=+- -*@@@@@@@#=. + .=+=: .=#@@@@@@%*- + -++- *=.@@@#+: + .====+*-. + + ______ _ _ _ _ _ + | ___ \ | || || | (_)| | + | |_/ / ___ | || || | __ _ | |_ + | / / _ \ | || || |/ /| || __| + | |\ \ | (_) || || || < | || |_ + \_| \_| \___/ |_||_||_|\_\|_| \__| +EOF + +# echo variables for the chain +echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n" + +# build the gm chain with Rollkit +ignite chain build + +# reset any existing genesis/chain data +gmd tendermint unsafe-reset-all + +# initialize the validator with the chain ID you set +gmd init $VALIDATOR_NAME --chain-id $CHAIN_ID + +# add keys for key 1 and key 2 to keyring-backend test +gmd keys add $KEY_NAME --keyring-backend test +gmd keys add $KEY_2_NAME --keyring-backend test +echo "milk verify alley price trust come maple will suit hood clay exotic" | gmd keys add $KEY_RELAY --keyring-backend test --recover + +# add these as genesis accounts +gmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test +gmd genesis add-genesis-account $KEY_2_NAME $TOKEN_AMOUNT --keyring-backend test +gmd genesis add-genesis-account $KEY_RELAY $TOKEN_AMOUNT --keyring-backend test + +# set the staking amounts in the genesis transaction +gmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test + +# collect genesis transactions +gmd genesis collect-gentxs + +# copy centralized sequencer address into genesis.json +# Note: validator and sequencer are used interchangeably here +ADDRESS=$(jq -r '.address' ~/.gm/config/priv_validator_key.json) +PUB_KEY=$(jq -r '.pub_key' ~/.gm/config/priv_validator_key.json) +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json && mv temp.json ~/.gm/config/genesis.json + +# create a restart-local.sh file to restart the chain later +[ -f restart-local.sh ] && rm restart-local.sh +echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-local.sh +echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-local.sh + +echo "gmd start --rollkit.aggregator --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-local.sh + +# start the chain +gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/pr-528/gm/init-mainnet.sh b/pr-528/gm/init-mainnet.sh new file mode 100644 index 000000000..f0ed0e67c --- /dev/null +++ b/pr-528/gm/init-mainnet.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# set variables for the chain +VALIDATOR_NAME=validator1 +CHAIN_ID=gm +KEY_NAME=gm-key +KEY_2_NAME=gm-key-2 +CHAINFLAG="--chain-id ${CHAIN_ID}" +TOKEN_AMOUNT="10000000000000000000000000stake" +STAKING_AMOUNT="1000000000stake" + +# query the DA Layer start height, in this case we are querying +# an RPC endpoint provided by Celestia Labs. The RPC endpoint is +# to allow users to interact with Celestia's core network by querying +# the node's state and broadcasting transactions on the Celestia +# network. This is for Arabica, if using another network, change the RPC. +DA_BLOCK_HEIGHT=$(curl https://rpc.lunaroasis.net/block | jq -r '.result.block.header.height') +echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n" + +AUTH_TOKEN=$(celestia light auth write --p2p.network celestia) +echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n" + +# build the gm chain with Rollkit +ignite chain build + +# reset any existing genesis/chain data +gmd tendermint unsafe-reset-all + +# initialize the validator with the chain ID you set +gmd init $VALIDATOR_NAME --chain-id $CHAIN_ID + +# add keys for key 1 and key 2 to keyring-backend test +gmd keys add $KEY_NAME --keyring-backend test +gmd keys add $KEY_2_NAME --keyring-backend test + +# add these as genesis accounts +gmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test +gmd genesis add-genesis-account $KEY_2_NAME $TOKEN_AMOUNT --keyring-backend test + +# set the staking amounts in the genesis transaction +gmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test + +# collect genesis transactions +gmd genesis collect-gentxs + +# copy centralized sequencer address into genesis.json +# Note: validator and sequencer are used interchangeably here +ADDRESS=$(jq -r '.address' ~/.gm/config/priv_validator_key.json) +PUB_KEY=$(jq -r '.pub_key' ~/.gm/config/priv_validator_key.json) +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json && mv temp.json ~/.gm/config/genesis.json + +# create a restart-mainnet.sh file to restart the chain later +[ -f restart-mainnet.sh ] && rm restart-mainnet.sh +echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-mainnet.sh +echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-mainnet.sh + +echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-mainnet.sh + +# start the chain +gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/pr-528/gm/init-mocha-testnet.sh b/pr-528/gm/init-mocha-testnet.sh new file mode 100644 index 000000000..221723519 --- /dev/null +++ b/pr-528/gm/init-mocha-testnet.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# set variables for the chain +VALIDATOR_NAME=validator1 +CHAIN_ID=gm +KEY_NAME=gm-key +KEY_2_NAME=gm-key-2 +CHAINFLAG="--chain-id ${CHAIN_ID}" +TOKEN_AMOUNT="10000000000000000000000000stake" +STAKING_AMOUNT="1000000000stake" + +# query the DA Layer start height, in this case we are querying +# an RPC endpoint provided by Celestia Labs. The RPC endpoint is +# to allow users to interact with Celestia's core network by querying +# the node's state and broadcasting transactions on the Celestia +# network. This is for Arabica, if using another network, change the RPC. +DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block | jq -r '.result.block.header.height') +echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n" + +AUTH_TOKEN=$(celestia light auth write --p2p.network mocha) +echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n" + +# build the gm chain with Rollkit +ignite chain build + +# reset any existing genesis/chain data +gmd tendermint unsafe-reset-all + +# initialize the validator with the chain ID you set +gmd init $VALIDATOR_NAME --chain-id $CHAIN_ID + +# add keys for key 1 and key 2 to keyring-backend test +gmd keys add $KEY_NAME --keyring-backend test +gmd keys add $KEY_2_NAME --keyring-backend test + +# add these as genesis accounts +gmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test +gmd genesis add-genesis-account $KEY_2_NAME $TOKEN_AMOUNT --keyring-backend test + +# set the staking amounts in the genesis transaction +gmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test + +# collect genesis transactions +gmd genesis collect-gentxs + +# copy centralized sequencer address into genesis.json +# Note: validator and sequencer are used interchangeably here +ADDRESS=$(jq -r '.address' ~/.gm/config/priv_validator_key.json) +PUB_KEY=$(jq -r '.pub_key' ~/.gm/config/priv_validator_key.json) +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json && mv temp.json ~/.gm/config/genesis.json + +# create a restart-testnet.sh file to restart the chain later +[ -f restart-testnet.sh ] && rm restart-testnet.sh +echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-testnet.sh +echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-testnet.sh + +echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-testnet.sh + +# start the chain +gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/pr-528/guides/block-times.html b/pr-528/guides/block-times.html new file mode 100644 index 000000000..16c4ff6f1 --- /dev/null +++ b/pr-528/guides/block-times.html @@ -0,0 +1,75 @@ + + + + + + How to change speed of block production | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to change speed of block production

    If you have gone through both the quick start tutorial and the Full and sequencer node rollup setup already, you're now ready to experiment with faster block times.

    In your rollkit start [args...] command, you will need to add a flag and then the argument for block time.

    The flag is:

    bash
    --rollkit.block_time 1s

    Where 1s can be adjusted to the speed of your choosing.

    Here is an example:

    bash
    # start the chain
    +rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.block_time 1s // [!code ++]

    In the above example, we've changed it to one second blocks. Alternatively, you could slow your rollup down to 30 seconds:

    bash
    --rollkit.block_time 30s

    Or speed it up even more, to sub-second block times (100 milliseconds):

    bash
    --rollkit.block_time 100ms

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/cometbft-to-rollkit.html b/pr-528/guides/cometbft-to-rollkit.html new file mode 100644 index 000000000..0792f3efb --- /dev/null +++ b/pr-528/guides/cometbft-to-rollkit.html @@ -0,0 +1,74 @@ + + + + + + How to Turn Your CometBFT App into a Rollkit App | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to Turn Your CometBFT App into a Rollkit App

    This guide will walk you through the process of turning your existing CometBFT app into a Rollkit app. By integrating Rollkit into your CometBFT-based blockchain, you can leverage enhanced modularity and data availability features.

    This guide assumes you have a CometBFT app set up and Ignite CLI installed.

    Install Rollkit

    You need to install Rollkit in your CometBFT app. Open a terminal in the directory where your app is located and run the following command:

    bash
    ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.1

    Add Rollkit Features to Your CometBFT App

    Now that Rollkit is installed, you can add Rollkit features to your existing blockchain app. Run the following command to integrate Rollkit:

    bash
    ignite rollkit add

    Initialize Rollkit

    To prepare your app for Rollkit, you'll need to initialize it.

    Run the following command to initialize Rollkit:

    bash
    ignite rollkit init

    Initialize Rollkit CLI Configuration

    Next, you'll need to initialize the Rollkit CLI configuration by generating the rollkit.toml file. This file is crucial for Rollkit to understand the structure of your rollup.

    To create the rollkit.toml configuration, use this command:

    bash
    rollkit toml init

    This command sets up the rollkit.toml file, where you can further customize configuration parameters as needed.

    Start Your Rollkit App

    Once everything is configured, you can start your Rollkit-enabled CometBFT app or (simply rollkit app). Use the following command to start your blockchain:

    bash
    rollkit start --rollkit.aggregator <insert your flags>

    Summary

    By following this guide, you've successfully converted your CometBFT app into a Rollkit app.

    To learn more about how to config your DA, Sequencing, and Execution, please check out those tutorial sections.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/create-genesis.html b/pr-528/guides/create-genesis.html new file mode 100644 index 000000000..0b9e4a297 --- /dev/null +++ b/pr-528/guides/create-genesis.html @@ -0,0 +1,82 @@ + + + + + + How to create a genesis for your rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to create a genesis for your rollup

    This guide will walk you through the process of setting up a genesis for your rollup. Follow the steps below to initialize your rollup chain, add a genesis account, and start the chain.

    0. Pre-requisities

    For this guide you need to have a chain directory where you have created and built your chain.

    If you don't have a chain directory yet, you can initialize a simple ignite chain by following this guide

    TIP

    This guide will use the simple ignite chain created in linked guide. Make sure to update any relevant variables to match your chain.

    1. Setting variables

    First, set the necessary variables for your chain in the terminal, here is an example:

    sh
    VALIDATOR_NAME=validator1
    +CHAIN_ID=gm
    +KEY_NAME=rollup-key
    +CHAINFLAG="--chain-id ${CHAIN_ID}"
    +TOKEN_AMOUNT="10000000000000000000000000stake"
    +STAKING_AMOUNT="1000000000stake"

    2. Rebuild your chain

    Ensure that rollkit.toml is present in the root of your rollup directory (if not, follow a Guide to set it up) and run the following command to (re)generate an entrypoint binary out of the code:

    sh
    rollkit rebuild

    This (re)creates an entrypoint binary in the root of your rollup directory. which is used to run all the operations on the rollup chain.

    Ensure that the chain configuration directory is set correctly in the rollkit.toml file.

    For example:

    sh
    [chain]
    +  config_dir = "/Users/you/.gm"

    TIP

    You can always recreate the rollkit.toml file by deleting it and re-running the following command:

    sh
    rollkit toml init

    3. Resetting existing genesis/chain data

    Reset any existing chain data:

    sh
    rollkit tendermint unsafe-reset-all

    Reset any existing genesis data:

    sh
    rm -rf $HOME/.$CHAIN_ID/config/gentx
    +rm $HOME/.$CHAIN_ID/config/genesis.json

    4. Initializing the validator

    Initialize the validator with the chain ID you set:

    sh
    rollkit init $VALIDATOR_NAME --chain-id $CHAIN_ID

    5. Adding a key to keyring backend

    Add a key to the keyring-backend:

    sh
    rollkit keys add $KEY_NAME --keyring-backend test

    6. Adding a genesis account

    Add a genesis account with the specified token amount:

    sh
    rollkit genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test

    7. Setting the staking amount in the genesis transaction

    Set the staking amount in the genesis transaction:

    sh
    rollkit genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test

    8. Collecting genesis transactions

    Collect the genesis transactions:

    sh
    rollkit genesis collect-gentxs

    9. Configuring the genesis file

    Copy the centralized sequencer address into genesis.json:

    sh
    ADDRESS=$(jq -r '.address' ~/.$CHAIN_ID/config/priv_validator_key.json)
    +PUB_KEY=$(jq -r '.pub_key' ~/.$CHAIN_ID/config/priv_validator_key.json)
    +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.$CHAIN_ID/config/genesis.json > temp.json && mv temp.json ~/.$CHAIN_ID/config/genesis.json

    10. Starting the chain

    Finally, start the chain with your start command.

    For example, start the simple ignite chain with the following command:

    sh
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id $CHAIN_ID

    Summary

    By following these steps, you will set up the genesis for your rollup, initialize the validator, add a genesis account, and started the chain. This guide provides a basic framework for configuring and starting your rollup using the Rollkit CLI. Make sure rollkit.toml is present in the root of your rollup directory, and use the rollkit command for all operations.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/cw-orch.html b/pr-528/guides/cw-orch.html new file mode 100644 index 000000000..6e8bf27b5 --- /dev/null +++ b/pr-528/guides/cw-orch.html @@ -0,0 +1,163 @@ + + + + + + Speed up your development with cw-orchestrator | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Speed up your development with cw-orchestrator

    Introduction

    cw-orchestrator is the most advanced scripting, testing, and deployment framework for CosmWasm smart-contracts. It makes it easy to write cross-environment compatible code for cw-multi-test, Test Tube, Starship (alpha), and live networks, significantly reducing code duplication and test-writing time.

    Get ready to change the way you interact with contracts and simplify you smart-contracts journey. The following steps will allow you to integrate cw-orch and write clean code such as:

    rust
    counter.upload()?;
    +counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
    +counter.increment()?;
    +let count = counter.get_count()?;
    +assert_eq!(count.count, 1);

    In this quick-start guide, we will review the necessary steps in order to integrate cw-orch into a simple contract crate. We review integration of rust-workspaces (multiple contracts) at the end of this page.

    NOTE: Quicker than the quick start

    If you're moving quicker than everybody else, we suggest looking at a before-after review of this example integration. This will help you catch the additions you need to make to your contract to be able to interact with it using cw-orchestrator.

    NOTE: If you want to go more in depth, browse the full cw-orch documentation.

    Summary

    Single Contract Integration

    Throughout this example, we will be using cw-orch to interact with a simple counter contract. All the steps below apply to any smart contract, no matter the complexity.

    Adding cw-orch to your Cargo.toml file

    To use cw-orchestrator, you need to add cw-orch to your contract's TOML file. Run the command below in your contract's directory:

    shell
    cargo add cw-orch

    Alternatively, you can add it manually in your Cargo.toml file as shown below:

    toml
    [dependencies]
    +cw-orch = {version = "0.21.2" } # Latest version at time of writing

    Creating an Interface

    When using a single contract, we advise creating an interface.rs file inside your contract's directory. You then need to add this module to your lib.rs file. In order for this interface code to not land in your WASM smart-contracts you need to target-flag it like so:

    rust
    #[cfg(not(target_arch = "wasm32"))]
    +mod interface;

    Then, inside that interface.rs file, you can define the interface for your contract:

    rust
    use cw_orch::{interface, prelude::*};
    +use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
    +pub const CONTRACT_ID: &str = "counter_contract";
    +#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg, id = CONTRACT_ID)]
    +pub struct CounterContract;
    +impl<Chain: CwEnv> Uploadable for CounterContract<Chain> {
    +    /// Return the path to the wasm file corresponding to the contract
    +    fn wasm(&self) -> WasmPath {
    +        artifacts_dir_from_workspace!()
    +            .find_wasm_path("counter_contract")
    +            .unwrap()
    +    }
    +    /// Returns a CosmWasm contract wrapper
    +    fn wrapper(&self) -> Box<dyn MockContract<Empty>> {
    +        Box::new(
    +            ContractWrapper::new_with_empty(
    +                crate::contract::execute,
    +                crate::contract::instantiate,
    +                crate::contract::query,
    +            )
    +            .with_migrate(crate::contract::migrate),
    +        )
    +    }
    +}

    Learn more about the content of the interface creation specifics in the cw-orch documentation

    NOTE: It can be useful to re-export this struct to simplify usage (in lib.rs):

    rust
    #[cfg(not(target_arch = "wasm32"))]
    +pub use crate::interface::CounterContract;

    Interaction helpers

    cw-orchestrator provides a additional macros that simplify contract calls and queries. The macro implements functions on the interface for each variant of the contract's ExecuteMsg and QueryMsg.

    Enabling this functionality is very straightforward. Find your ExecuteMsg and QueryMsg definitions (in msg.rs in our example) and add the ExecuteFns and QueryFns derive macros to them like below:

    rust
    #[cw_serde]
    +#[derive(cw_orch::ExecuteFns)] // Function generation
    +/// Execute methods for counter
    +pub enum ExecuteMsg {
    +    /// Increment count by one
    +    Increment {},
    +    /// Reset count
    +    Reset {
    +        /// Count value after reset
    +        count: i32,
    +    },
    +}
    +#[cw_serde]
    +#[derive(cw_orch::QueryFns)] // Function generation
    +#[derive(QueryResponses)]
    +/// Query methods for counter
    +pub enum QueryMsg {
    +    /// GetCount returns the current count as a json-encoded number
    +    #[returns(GetCountResponse)]
    +    GetCount {},
    +}
    +// Custom response for the query
    +#[cw_serde]
    +/// Response from get_count query
    +pub struct GetCountResponse {
    +    /// Current count in the state
    +    pub count: i32,
    +}

    Find out more about the interaction helpers in the cw-orch documentation

    NOTE: Again, it can be useful to re-export these generated traits to simplify usage (in lib.rs):

    rust
    pub use crate::msg::{ExecuteMsgFns as CounterExecuteMsgFns, QueryMsgFns as CounterQueryMsgFns};

    Using the integration

    Now that all the setup is done, you can use your contract in tests, integration-tests or scripts.

    Start by importing your crate in [dependencies] or [dev-dependencies]:

    toml
    counter-contract = { path = "../counter-contract" }

    You can now use:

    rust
    use counter_contract::{
    +    msg::InstantiateMsg, CounterContract, CounterExecuteMsgFns, CounterQueryMsgFns,
    +};
    +use cw_orch::{anyhow, prelude::*, tokio};
    +use tokio::runtime::Runtime;
    +const LOCAL_MNEMONIC: &str = "clip hire initial neck maid actor venue client foam budget lock catalog sweet steak waste crater broccoli pipe steak sister coyote moment obvious choose";
    +pub fn main() -> anyhow::Result<()> {
    +    std::env::set_var("LOCAL_MNEMONIC", LOCAL_MNEMONIC);
    +    dotenv::dotenv().ok(); // Used to load the `.env` file if any
    +    pretty_env_logger::init(); // Used to log contract and chain interactions
    +    let rt = Runtime::new()?;
    +    let network = networks::LOCAL_JUNO;
    +    let chain = DaemonBuilder::default()
    +        .handle(rt.handle())
    +        .chain(network)
    +        .build()?;
    +    let counter = CounterContract::new(chain);
    +    counter.upload()?;
    +    counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
    +    counter.increment()?;
    +    let count = counter.get_count()?;
    +    assert_eq!(count.count, 1);
    +    Ok(())
    +}

    Integration in a workspace

    In this paragraph, we will use the cw-plus repository as an example. You can review:

    Handling dependencies and features

    When using workspaces, you need to add cw-orch to all crates that include ExecuteMsg and QueryMsg used in your contracts and derive the ExecuteFns and QueryFns on them.

    Refer above to Interaction helpers for more details on how to do that.

    For instance, for the cw20_base contract, you need to execute those 2 steps on the cw20-base contract (where the QueryMsg are defined) as well as on the cw20 package (where the ExecuteMsg are defined).

    Creating an interface crate

    When using a workspace, we advise you to create a new crate inside your workspace for defining your contract's interfaces. In order to do that, use:

    shell
    cargo new interface --lib
    +cargo add cw-orch --package interface

    Add the interface package to your workspace Cargo.toml file

    toml
    [workspace]
    +members = ["packages/*", "contracts/*", "interface"]

    Inside this interface crate, we advise to integrate all your contracts 1 by 1 in separate files. Here is the structure of the cw-plus integration for reference:

    bash
    interface (interface collection)
    +├── Cargo.toml
    +└── src
    +    ├── cw1_subkeys.rs
    +    ├── cw1_whitelist.rs
    +    ├── cw20_base.rs
    +    ├── cw20_ics20.rs
    +    └── ..

    When importing your crates to get the messages types, you can use the following command in the interface folder.

    shell
    cargo add cw20-base --path ../contracts/cw20-base/
    +cargo add cw20 --path ../packages/cw20

    Integrating single contracts

    Now that you workspace is setup, you can integrate with single contracts using the above section

    More examples and scripts

    You can find more example interactions on the counter-contract example directly in the cw-orchestrator repo:

    FINAL ADVICE: Learn more and explore our full cw-orch documentation !.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/da-block-time.html b/pr-528/guides/da-block-time.html new file mode 100644 index 000000000..c4f8ebe2b --- /dev/null +++ b/pr-528/guides/da-block-time.html @@ -0,0 +1,74 @@ + + + + + + How to configure DA chain block syncing time | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to configure DA chain block syncing time

    The --rollkit.da_block_time flag is used to configure the time in seconds that the rollup will wait for a block to be synced from the DA chain.

    bash
    --rollkit.da_block_time duration

    An example command would look like this:

    bash
    rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.da_block_time=30s // [!code ++]

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/full-node.html b/pr-528/guides/full-node.html new file mode 100644 index 000000000..ce751e698 --- /dev/null +++ b/pr-528/guides/full-node.html @@ -0,0 +1,86 @@ + + + + + + Rollup Full Node Setup Guide | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Rollup Full Node Setup Guide

    Introduction

    This guide covers how to set up a full node to run alongside a sequencer node in a Rollkit-based blockchain network. A full node maintains a complete copy of the blockchain and helps validate transactions, improving the network's decentralization and security.

    Prerequisites

    Before starting, ensure you have:

    • A local Data Availability (DA) network node running on port 7980.
    • A Rollkit sequencer node running and posting blocks to the DA network.
    • The Rollkit CLI installed on your system.

    Setting Up Your Full Node

    Initialize Chain Config and Copy Genesis File

    First, update the config_dir in the rollkit.toml file:

    bash
    [chain]
    +  config_dir = "/root/.yourrollupd" // [!code --]
    +  config_dir = "/root/.yourrollupd_fn" // [!code ++]

    Let's set a terminal variable for the chain ID.

    sh
    CHAIN_ID=gm

    Initialize the chain config for the full node, lets call it FullNode and set the chain ID to your rollup chain ID:

    bash
    rollkit init FullNode --chain-id=$CHAIN_ID

    Copy the genesis file from the sequencer node:

    bash
    cp $HOME/.$CHAIN_ID/config/genesis.json $HOME/.${CHAIN_ID}_fn/config/genesis.json

    Set Up P2P Connection to Sequencer Node

    Identify the sequencer node's P2P address from its logs. It will look similar to:

    1:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh

    Create an environment variable with the P2P address:

    bash
    export P2P_ID="12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh"

    Start the Full Node

    We are now ready to run our full node. If we are running the full node on the same machine as the sequencer, we need to make sure we update the ports to avoid conflicts.

    Make sure to include these flags with your start command:

    sh
      --rpc.laddr tcp://127.0.0.1:46657 \
    +  --grpc.address 127.0.0.1:9390 \
    +  --p2p.laddr "0.0.0.0:46656" \
    +  --api.address tcp://localhost:1318

    Run your full node with the following command:

    bash
    rollkit start --rollkit.aggregator=false \
    +  --rollkit.da_address http://127.0.0.1:7980 \
    +  --p2p.seeds $P2P_ID@127.0.0.1:26656 \
    +  --minimum-gas-prices 0stake \
    +  --rpc.laddr tcp://127.0.0.1:46657 \
    +  --grpc.address 127.0.0.1:9390 \
    +  --p2p.laddr "0.0.0.0:46656" \
    +  --api.address tcp://localhost:1318

    Key points about this command:

    • --rollkit.aggregator=false indicates this is not an aggregator node.
    • The ports and addresses are different from the sequencer node to avoid conflicts. Not everything may be necessary for your setup.
    • We use the P2P_ID environment variable to set the seed node.

    Verifying Full Node Operation

    After starting your full node, you should see output similar to:

    2:33PM DBG indexed transactions height=1 module=txindex num_txs=0
    +2:33PM INF block marked as DA included blockHash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC blockHeight=5532 module=BlockManager

    This output indicates that your full node is successfully connecting to the network and processing blocks.

    TIP

    If your rollup uses EVM as an execution layar and you see an error like datadir already used by another process, it means you have to remove all the state from rollup data directory (/root/.yourrollup_fn/data/) and specify a different data directory for the EVM client.

    Conclusion

    You've now set up a full node running alongside your Rollkit sequencer.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/gas-price.html b/pr-528/guides/gas-price.html new file mode 100644 index 000000000..efee2e59e --- /dev/null +++ b/pr-528/guides/gas-price.html @@ -0,0 +1,73 @@ + + + + + + How to configure gas price | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    rollkit start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    rollkit start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/ibc-connection.html b/pr-528/guides/ibc-connection.html new file mode 100644 index 000000000..82fdf2ea6 --- /dev/null +++ b/pr-528/guides/ibc-connection.html @@ -0,0 +1,179 @@ + + + + + + IBC connection tutorial | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    IBC connection tutorial

    In this tutorial, we'll learn how to use an Inter-Blockchain Communication (IBC) Protocol relayer to create an IBC connection between a GM world rollup and an Osmosis local testnet.

    Disclaimer

    This initial version of IBC has high trust assumptions where receiving chains only verify the signature of the single rollup node. For use in production, it's recommended to wait for trust-minimized IBC support which includes state proofs and conditional clients. Learn more about how conditional clients work in ibc-go issue 5112 and a tracking issue for state proofs in rollkit issue 1632.

    💻 Pre-requisites

    Software requirements

    • Docker running on your machine
    • Go version ≥ 1.21.0
    • Ignite version ≥ v28.2.0

    Run a GM rollup chain

    Before you can create an IBC connection, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.13.1

    WARNING

    You will need to use Ignite v28.2.0, which you can install with:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    Scaffold the GM chain:

    bash
    cd $HOME
    +ignite scaffold chain gm --address-prefix gm

    Change into the gm directory and install Rollkit with IBC compatibility:

    bash
    cd gm
    +go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.6-rollkit-v0.13.3-no-fraud-proofs
    +go mod tidy
    +go mod download

    Now download the script to run the GM chain:

    bash
    wget https://rollkit.dev/gm/init-local.sh

    Run the GM rollup:

    bash
    bash init-local.sh

    Run your local-osmosis-testnet

    Install Osmosis binary

    bash
    cd $HOME
    +git clone https://github.com/osmosis-labs/osmosis
    +cd osmosis
    +git checkout v21.0.1
    +make install

    Run local-osmosis-testnet

    You also need to start local-osmosis-testnet in a separate terminal by downloading and running this script:

    bash
    wget https://rollkit.dev/ibc/init-osmosis-local.sh

    Run the script:

    bash
    bash init-osmosis-local.sh

    This will start your local Osmosis testnet, we'll create IBC connection between this testnet and GM chain in the next step.

    NOTE: Here, the key's name from init-osmosis-local.sh is mykey and osmosis-relay but you can modify this script to change the name of your key.

    TIP

    We're using the --rpc.addr [ip:port] flag to point to port 46657, which is the custom port to avoid conflicts with other running chains.

    Funds

    The following private key has funds on your Osmosis chain:

    bash
    Keyname: osmosis-relay
    +Address: osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll
    +Mnemonic: "milk verify alley price trust come maple will suit hood clay exotic"

    The following private key has funds on your GM rollup chain:

    bash
    Keyname: gm-relay
    +Address: gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
    +Mnemonic: "milk verify alley price trust come maple will suit hood clay exotic"

    Setup relayer, create IBC connection and start relaying packets

    A relayer is like a middleman for blockchains in the IBC protocol. Instead of directly talking to each other, blockchains communicate through relayers. These relayers keep an eye on the paths that are open between different blockchains. When there's something new or changed, the relayer makes sure the message gets sent to the right place on the other blockchain.

    Apart from just passing messages, a relayer can also set up new paths between blockchains. This involves creating clients, connections, and channels, which are like communication channels between the blockchains. So, in simpler terms, a relayer makes sure blockchains can talk to each other smoothly.

    Install relayer

    bash
    cd $HOME
    +git clone https://github.com/cosmos/relayer
    +cd relayer
    +git checkout v2.4.2
    +make install

    Verify your rly version with rly version:

    bash
    rly version

    It should return:

    bash
    version: 2.4.2
    +commit: 259b1278264180a2aefc2085f1b55753849c4815
    +cosmos-sdk: v0.47.5
    +go: go1.21.4 darwin/arm64

    Setup relayer config

    Firstly, generate an empty config file with this command:

    bash
    rly config init

    Afterward, replace the content of the file at $HOME/.relayer/config/config.yaml with the following configuration using any text editor you prefer.

    yaml
    global:
    +    api-listen-addr: :5183
    +    timeout: 10s
    +    memo: ""
    +    light-cache-size: 20
    +chains:
    +    osmo-local:
    +        type: cosmos
    +        value:
    +            key-directory: /root/.relayer/keys/osmosis-testnet-1
    +            key: default
    +            chain-id: osmosis-testnet-1
    +            rpc-addr: http://localhost:46657 
    +            account-prefix: osmo
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.1uosmo
    +            min-gas-amount: 100000
    +            max-gas-amount: 1000000
    +            debug: true
    +            timeout: 20s
    +            block-timeout: ""
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ""
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +    gm-local:
    +        type: cosmos
    +        value:
    +            key-directory: /root/.relayer/keys/test
    +            key: default
    +            chain-id: gm
    +            rpc-addr: http://localhost:36657
    +            account-prefix: gm
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.1stake
    +            min-gas-amount: 100000
    +            max-gas-amount: 1000000
    +            debug: true
    +            timeout: 20s
    +            block-timeout: ""
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ""
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +paths: {}

    Create relayer account

    Add keys for each chain with this command

    The mnemonic-words are the mnemonics you received when initializing the local node. Ensure that each wallet has tokens to start relaying.

    bash
    rly keys restore osmo-local default "milk verify alley price trust come maple will suit hood clay exotic"
    +rly keys restore gm-local default "milk verify alley price trust come maple will suit hood clay exotic"

    Create IBC channel

    Create a new blank path to be used in generating a new path (connection and client) between two chains

    bash
    rly paths new osmosis-testnet-1 gm osmo-gm

    and then you can create channel with this command

    bash
    rly transact link osmo-gm

    This is a triple whammy; it creates a client, connection, and channel all in one command.

    Alternatively, you may create them one by one using these commands:

    bash
    rly transact clients osmo-local gm-local osmo-gm
    +rly transact connection osmo-gm
    +rly transact channel osmo-gm --src-port transfer --dst-port transfer --order unordered --version ics20-1

    At the end, it should return something like this :

    bash
    2024-02-15T09:22:04.062649Z info Connection handshake termination candidate {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0", "termination_client_id": "07-tendermint-0", "observed_client_id": "07-tendermint-0", "termination_counterparty_client_id": "07-tendermint-0", "observed_counterparty_client_id": "07-tendermint-0"}
    +2024-02-15T09:22:04.062667Z info Found termination condition for connection handshake {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0"}
    +2024-02-15T09:22:04.069040Z info Starting event processor for channel handshake {"src_chain_id": "osmosis-testnet-1", "src_port_id": "transfer", "dst_chain_id": "gm", "dst_port_id": "transfer"}
    +2024-02-15T09:22:04.070364Z info Chain is in sync {"chain_name": "gm-local", "chain_id": "gm"}
    +2024-02-15T09:22:04.070389Z info Chain is in sync {"chain_name": "osmo-local", "chain_id": "osmosis-testnet-1"}
    +2024-02-15T09:22:10.310493Z info Successful transaction {"provider_type": "cosmos", "chain_id": "osmosis-testnet-1", "gas_used": 165662, "fees": "24023uosmo", "fee_payer": "osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll", "height": 12, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenInit"], "tx_hash": "D7E7E6EC0299C120C0E32167C11F0B60921EF88CC6524345BCEB3B266EF727AA"}
    +2024-02-15T09:22:15.293348Z info Successful transaction {"provider_type": "cosmos", "chain_id": "gm", "gas_used": 171590, "fees": "6510stake", "fee_payer": "gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy", "height": 61, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenTry"], "tx_hash": "DE5F15D2CEB85278FA916185A01FBA5DA604563462893288EC7A8745FB597B96"}
    +2024-02-15T09:22:18.300397Z info Successful transaction {"provider_type": "cosmos", "chain_id": "osmosis-testnet-1", "gas_used": 126689, "fees": "18177uosmo", "fee_payer": "osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll", "height": 14, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenAck"], "tx_hash": "CB1FA1D3309513FC6C8599606DEFE75164F4CAE2ABD101D78133B287862A5ACA"}
    +2024-02-15T09:22:19.078583Z info Successfully created new channel {"chain_name": "osmo-local", "chain_id": "osmosis-testnet-1", "channel_id": "channel-0", "connection_id": "connection-0", "port_id": "transfer"}
    +2024-02-15T09:22:23.296353Z info Successful transaction {"provider_type": "cosmos", "chain_id": "gm", "gas_used": 124972, "fees": "4762stake", "fee_payer": "gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy", "height": 69, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgChannelOpenConfirm"], "tx_hash": "B917289EC7566B57B2D0EC759F2E703DBD652F9044362E78C05C4F6DF8FD7AC7"}
    +2024-02-15T09:22:24.080924Z info Successfully created new channel {"chain_name": "gm-local", "chain_id": "gm", "channel_id": "channel-0", "connection_id": "connection-0", "port_id": "transfer"}[!code focus]
    +2024-02-15T09:22:24.080992Z info Channel handshake termination candidate {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0", "termination_port_id": "transfer", "observed_port_id": "transfer", "termination_counterparty_port_id": "transfer", "observed_counterparty_port_id": "transfer"}//[!code focus]
    +2024-02-15T09:22:24.080998Z info Found termination condition for channel handshake {"path_name": "osmo-gm", "chain_id": "gm", "client_id": "07-tendermint-0"}//[!code focus]

    TIP

    Notice your channel_id, you need to specify it when you make the IBC transfer transaction in next step!

    Start relaying packets

    After completing all these steps, you can start relaying with:

    bash
    rly start

    IBC transfer of tokens between osmosis-testnet-1 and gm is now possible.

    Transfer token from rollup chain to osmosis-local

    Make an ibc-transfer transaction. This tx will transfer 1000000stake from gm-key to receiver address in your local-osmosis chain.

    Set your keys and channel ID as variables:

    bash
    OSMO_KEY=osmo1vvl79phavqruppr6f5zy4ypxy7znshrqm390ll
    +GM_KEY=gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
    +CHANNEL_ID=channel-0
    bash
    gmd tx ibc-transfer transfer transfer $CHANNEL_ID $OSMO_KEY 42069stake --node tcp://localhost:36657 --chain-id gm --from gm-key --keyring-backend test --fees 5000stake

    Then check the balance of the receiver address to see if the token has been relayed or not.

    bash
    osmosisd query bank balances $OSMO_KEY --node tcp://localhost:46657 --chain-id osmosis-testnet-1

    The balances query command should return something like this:

    bash
    balances:
    +- amount: "42069"
    +  denom: ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878
    +- amount: "100000000999876914"
    +  denom: uosmo
    +- amount: "100000000000000"
    +  denom: utest
    +pagination:
    +  next_key: null
    +  total: "0"

    TIP

    ibc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273 is corresponding IBC denom in osmosis-testnet for native denom stake in GM chain. Your hash will be different than this and specific to your channel.

    Transfer token back from osmosis-local to rollup chain

    Set your channel hash from the last step like this:

    bash
    IBC_DENOM_STRING=youribc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273

    Make an ibc-transfer transaction:

    bash
    osmosisd tx ibc-transfer transfer transfer $CHANNEL_ID $GM_KEY 42069$IBC_DENOM_STRING --node tcp://localhost:46657 --chain-id osmosis-testnet-1 --from osmosis-relay --fees 500uosmo

    And then check the balances of the receiver address to see if the token has been relayed or not:

    bash
    gmd query bank balances $GM_KEY --node tcp://localhost:36657

    The balances query command should return something like this, which is close to the original balance, minus some gas fees:

    bash
    gmd query bank balances $GM_KEY --node tcp://localhost:36657
    +balances:
    +- amount: "9999999999999999999897679"
    +  denom: stake
    +pagination:
    +  total: "1"

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/ignite-rollkit.html b/pr-528/guides/ignite-rollkit.html new file mode 100644 index 000000000..1655e0c7c --- /dev/null +++ b/pr-528/guides/ignite-rollkit.html @@ -0,0 +1,74 @@ + + + + + + How to Use Ignite to Create a Rollkit App | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to Use Ignite to Create a Rollkit App

    This guide will walk you through the process of using Ignite to create a Rollkit app.

    Install Ignite

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    bash
    curl https://get.ignite.com/cli@v28.5.3! | bash

    Once Ignite is installed, scaffold a new blockchain with the following command:

    bash
    ignite scaffold chain gm --address-prefix gm --minimal --skip-proto

    This will create the gm blockchain. Navigate to the blockchain directory:

    bash
    cd gm

    Install Ignite App Rollkit

    In a new terminal window, you'll now install and run the Ignite App Rollkit.

    Run the following command to install the Rollkit App:

    bash
    ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.1

    This installs the Rollkit application, which will be integrated into your blockchain.

    Add Rollkit Features

    Enhance your blockchain by adding Rollkit features. Use the following command:

    bash
    ignite rollkit add

    Build your chain

    Build your chain using the following command:

    bash
    ignite chain build

    Initialize Your Blockchain

    Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows:

    bash
    ignite rollkit init

    Initialize Rollkit CLI Configuration

    To initialize the Rollkit CLI configuration, generate the rollkit.toml file by running the following command:

    bash
    rollkit toml init

    This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain.

    Start your chain

    Now you are ready to start your chain. We need to include 2 flags:

    1. --rollkit.aggregator to signal that this node is the block producer
    2. --rollkit.sequencer_rollup_id gm to share the chain ID with the sequencer.

    Start your chain using the following command:

    bash
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id gm

    Your rollkit chain is now up and running.

    Summary

    By following these steps, you've successfully installed Ignite, integrated Rollkit features into your blockchain, and configured the Rollkit CLI to run your chain against a mock DA and mock sequencer.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/lazy-sequencing.html b/pr-528/guides/lazy-sequencing.html new file mode 100644 index 000000000..1fa14bf7e --- /dev/null +++ b/pr-528/guides/lazy-sequencing.html @@ -0,0 +1,75 @@ + + + + + + How to Use Lazy Sequencing (Aggregation) | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to Use Lazy Sequencing (Aggregation)

    In this guide, we'll go over how to use lazy sequencing.

    This feature was introduced in Rollkit v0.7.0 (with custom buffer time later in v0.13.7) and allows rollup operators to wait for transactions before building blocks. This prevents the rollup from building empty blocks.

    To turn on lazy sequencing, add the following flag to your start command:

    bash
    --rollkit.lazy_aggregator

    Additionally, if you want to specify the time interval used for block production even if there are no transactions, use:

    bash
    --rollkit.lazy_block_time <duration>

    An example command with a custom block time of 1 minute:

    bash
    # start the chain
    +rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.lazy_aggregator --rollkit.lazy_block_time=1m0s // [!code ++]

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/max-pending-blocks.html b/pr-528/guides/max-pending-blocks.html new file mode 100644 index 000000000..e8014806f --- /dev/null +++ b/pr-528/guides/max-pending-blocks.html @@ -0,0 +1,74 @@ + + + + + + How to configure the maximum number of blocks pending DA submission | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to configure the maximum number of blocks pending DA submission

    The --rollkit.max_pending_blocks flag is used to configure the maximum limit of blocks pending DA submission (0 for no limit)

    bash
    --rollkit.max_pending_blocks uint

    An example command would look like this:

    bash
    rollkit start [existing flags...] // [!code --]
    +rollkit start [existing flags...] --rollkit.max_pending_blocks=100 // [!code ++]

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/metrics.html b/pr-528/guides/metrics.html new file mode 100644 index 000000000..9ca857ad1 --- /dev/null +++ b/pr-528/guides/metrics.html @@ -0,0 +1,73 @@ + + + + + + How to configure metrics | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to configure metrics

    Rollkit can report and serve the Prometheus metrics, which in their turn can be consumed by Prometheus collector(s).

    This functionality is disabled by default.

    To enable the Prometheus metrics, set instrumentation.prometheus=true in your CometBFT node's config file located at $CMTHOME/config/config.toml.

    Metrics will be served under /metrics on 26660 port by default. The listening address (default: localhost:26660) can be changed in the config file using instrumentation.prometheus_listen_addr.

    List of available metrics

    The following metrics are available, grouped by their subsystem:

    ABCI

    NameTypeTagsDescription
    cometbft_abci_connection_method_timing_secondsHistogramchain_id, method, typeTiming for each ABCI method.

    sequencer

    NameTypeTagsDescription
    cometbft_sequencer_heightGaugechain_idHeight of the chain.
    cometbft_sequencer_num_txsGaugechain_idNumber of transactions.
    cometbft_sequencer_block_size_bytesGaugechain_idSize of the block.
    cometbft_sequencer_total_txsGaugechain_idTotal number of transactions.
    cometbft_sequencer_latest_block_heightGaugechain_idThe latest block height.

    mempool

    NameTypeTagsDescription
    cometbft_mempool_sizeGaugechain_idSize of the mempool (number of uncommitted transactions).
    cometbft_mempool_size_bytesGaugechain_idTotal size of the mempool in bytes.
    cometbft_mempool_tx_size_bytesHistogramchain_idTransaction sizes in bytes.
    cometbft_mempool_failed_txsCounterchain_idNumber of failed transactions.
    cometbft_mempool_rejected_txsCounterchain_idNumber of rejected transactions.
    cometbft_mempool_evicted_txsCounterchain_idNumber of evicted transactions.
    cometbft_mempool_recheck_timesCounterchain_idNumber of times transactions are rechecked in the mempool.

    p2p

    NameTypeTagsDescription
    cometbft_p2p_peersGaugechain_idNumber of peers.
    cometbft_p2p_peer_receive_bytes_totalCounterpeer_id, chIDNumber of bytes received from a given peer.
    cometbft_p2p_peer_send_bytes_totalCounterpeer_id, chIDNumber of bytes sent to a given peer.
    cometbft_p2p_peer_pending_send_bytesGaugepeer_idPending bytes to be sent to a given peer.
    cometbft_p2p_num_txsGaugepeer_idNumber of transactions submitted by each peer.
    cometbft_p2p_message_receive_bytes_totalCountermessage_typeNumber of bytes of each message type received.
    cometbft_p2p_message_send_bytes_totalCountermessage_typeNumber of bytes of each message type sent.

    In addition to these, go-libp2p metrics are exported as well.

    state

    NameTypeTagsDescription
    cometbft_state_block_processing_timeHistogramchain_idTime spent processing FinalizeBlock.
    cometbft_state_consensus_param_updatesCounterchain_idNumber of consensus parameter updates returned by the application since process start.

    centralized-sequencer

    The centralized-sequencer has its own metrics and configuration, see the centralized sequencer docs for details.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/overview.html b/pr-528/guides/overview.html new file mode 100644 index 000000000..a2cd2ce5b --- /dev/null +++ b/pr-528/guides/overview.html @@ -0,0 +1,73 @@ + + + + + + How To Guides | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How To Guides

    Welcome to the Rollkit guides section! Here, you'll find a wide range of guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Hopefully you've gone through some of the tutorials and are ready to dive deeper. These guides will go into detail on some specific topics that will make your life easier when developing with Rollkit.

    In this section, you'll find:

    💻 Support

    The guides will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a GitHub issue or let us know in our Telegram.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/reset-state.html b/pr-528/guides/reset-state.html new file mode 100644 index 000000000..e41ad57d9 --- /dev/null +++ b/pr-528/guides/reset-state.html @@ -0,0 +1,127 @@ + + + + + + How to reset the state of your chain | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to reset the state of your chain

    This guide will walk you through how you reset the state of your chain.

    Disclaimer

    By definition, reseting the state is deleting your chain's data. Make sure you understand the implications of this prior to completion this guide.

    Some reason you might need to reset the state of your chain are:

    • During testing and development
    • During upgrades with breaking changes
    • Hardforks

    Prerequisities

    In order to complete this guide, you will need to have completed either the quick start tutorial or the build our chain tutorial.

    Quick Start

    When you run your chain with rollkit start you will create a .rollkit directory in your root directory.

    This directory will look like the following.

    bash
    tree $HOME/.rollkit
    +
    +├── config
    +│   ├── config.toml
    +│   ├── genesis.json
    +│   ├── node_key.json
    +│   └── priv_validator_key.json
    +└── data
    +    ├── priv_validator_state.json
    +    └── rollkit
    +        ├── 000001.sst
    +        ├── 000001.vlog
    +        ├── 000002.sst
    +        ├── 000002.vlog
    +        ├── DISCARD
    +        ├── KEYREGISTRY
    +        └── MANIFEST

    To reset the state of the chain, delete the entire .rollkit directory.

    bash
    rm -rf $HOME/.rollkit

    When you launch your chain again with rollkit start your .rollkit directory will be re-created and you will see your chain starting at block height 1 again.

    Wordle

    When you ran your wordle chain in the build your chain turtorial, it created a .wordle directory.

    This directory will look like the following:

    bash
    tree $HOME/.wordle
    +
    +├── config
    +│   ├── app.toml
    +│   ├── client.toml
    +│   ├── config.toml
    +│   ├── genesis.json
    +│   ├── gentx
    +│   │   └── gentx-6e46bd1f53acead98b43e63fcf2bd5435499350d.json
    +│   ├── node_key.json
    +│   └── priv_validator_key.json
    +├── data
    +│   ├── application.db
    +│   │   ├── 000001.log
    +│   │   ├── CURRENT
    +│   │   ├── LOCK
    +│   │   ├── LOG
    +│   │   └── MANIFEST-000000
    +│   ├── priv_validator_state.json
    +│   ├── rollkit
    +│   │   ├── 000001.sst
    +│   │   ├── 000001.vlog
    +│   │   ├── DISCARD
    +│   │   ├── KEYREGISTRY
    +│   │   └── MANIFEST
    +│   └── snapshots
    +│       └── metadata.db
    +│           ├── 000001.log
    +│           ├── CURRENT
    +│           ├── LOCK
    +│           ├── LOG
    +│           └── MANIFEST-000000
    +└── keyring-test
    +    ├── 4a90e750914792c2d7f98775c13a588d9d304bd0.address
    +    ├── 53dab037ac3bd380f4a9192b2c6eedbe95fce180.address
    +    ├── alice.info
    +    └── bob.info

    The directories you need to delete to reset your state are in the .wordle/data directory.

    bash
    $HOME/.wordle/data/application.db
    +$HOME/.wordle/data/rollkit
    +$HOME/.wordle/data/snapshots

    You can delete them with the following command:

    bash
    rollkit tendermint unsafe-reset-all

    When you launch your chain again with your rollkit start <flags> command, these data directories will be re-created and you will see your chain starting at block height 1 again.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/restart-rollup.html b/pr-528/guides/restart-rollup.html new file mode 100644 index 000000000..8ec3b9a3d --- /dev/null +++ b/pr-528/guides/restart-rollup.html @@ -0,0 +1,84 @@ + + + + + + 🔄 How to restart your rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    🔄 How to restart your rollup

    This guide will teach you how to restart your Rollkit rollup.

    Restart rollup

    This section covers the case where you need to restart your rollup.

    In order to restart your rollup, you simply need to run the <your-binary>d start [...args] command for your rollup.

    For example, if you ran the quick start tutorial, you started your rollup with:

    bash
    rollkit start

    You would have see output similar to:

    bash
    I[2024-10-17|14:52:12.845] Creating and publishing block                module=BlockManager height=7
    +I[2024-10-17|14:52:12.845] finalized block                              module=BlockManager height=7 num_txs_res=0 num_val_updates=0 block_app_hash=
    +I[2024-10-17|14:52:12.845] executed block                               module=BlockManager height=7 app_hash=
    +I[2024-10-17|14:52:12.846] indexed block events                         module=txindex height=7

    If you need to restart your rollup, you can run the same command again:

    bash
    rollkit start

    You will see that the block height will continue from where it left off:

    bash
    I[2024-10-17|14:52:13.845] Creating and publishing block                module=BlockManager height=8
    +I[2024-10-17|14:52:13.845] finalized block                              module=BlockManager height=8 num_txs_res=0 num_val_updates=0 block_app_hash=
    +I[2024-10-17|14:52:13.845] executed block                               module=BlockManager height=8 app_hash=
    +I[2024-10-17|14:52:13.845] indexed block events                         module=txindex height=8

    It is important to include any additional flags that you used when you first started your rollup. For example, if you used the --rollkit.da_namespace flag, you will need to include that flag when restarting your rollup to ensure your rollup continues to publish blobs to the same namespace.

    Restart rollup after running out of funds

    This section covers the case that the node that you are using to post blocks to your DA and consensus layer runs out of funds (tokens), and you need to restart your rollup.

    In this example, we're using Celestia's Mocha testnet and running the quick start. In this example, our Celestia DA light node ran out of Mocha testnet TIA and we are unable to post new blocks to Celestia due to a Code: 19 error. This error is defined by Cosmos SDK as:

    go
    // ErrTxInMempoolCache defines an ABCI typed error where a tx already exists in the mempool.
    +ErrTxInMempoolCache = Register(RootCodespace, 19, "tx already in mempool")

    In order to get around this error, and the same error on other Rollkit rollups, you will need to re-fund your Celestia account and increase the gas fee. This will override the transaction that is stuck in the mempool.

    If you top up the balance of your node and don't increase the gas fee, you will still encounter the Code: 19 error because there is a transaction (posting block to DA) that is duplicate to one that already exists. In order to get around this, you'll need to increase the gas fee and restart the chain.

    🟠 Errors in this example

    This is what the errors will look like if your DA node runs out of funding or you restart the chain without changing the gas fee:

    bash
    4:51PM INF submitting block to DA layer height=28126 module=BlockManager
    +4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=1 module=BlockManager
    +4:51PM ERR DA layer submission failed Error="Codespace: 'sdk', Code: 19, Message: " attempt=2 module=BlockManager
    +4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=3 module=BlockManager

    💰 Re-fund your account

    First, you'll need to send more tokens to the account running your Celestia node. If you didn't keep track of your key, you can run the following to get your address:

    bash
    cd $HOME && cd celestia-node
    +./cel-key list --keyring-backend test --node.type light --p2p.network <network>

    🛑 Stopping your rollup

    You can stop your rollup by using Control + C in your terminal where the node is running.

    ⛽ Increase the gas fee

    To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a Code: 19 error. See the How to configure gas price guide for more information.

    🔁 Restarting your rollup

    Follow the restart rollup section above.

    🛢️ Reduce gas fee & restart again

    In order to save your TIA, we also recommend stopping the chain with Control + C, changing the gas fee back to the default (in our case, 8000 utia) and restarting the chain:

    🎊 Congrats! You've successfully restarted your Rollkit rollup after running out of TIA.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/rollkit-monitoring.html b/pr-528/guides/rollkit-monitoring.html new file mode 100644 index 000000000..4c1172598 --- /dev/null +++ b/pr-528/guides/rollkit-monitoring.html @@ -0,0 +1,73 @@ + + + + + + How to integrate Range with your rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to integrate Range with your rollup

    This section illustrates how Rollkit developers can leverage the Range platform to monitor their rollup activity and explore relevant addresses and transactions in less than 5 minutes.

    Overview

    In this guide, we’ll go over the steps of the integration of our sample rollup GM, which is divided into three sections:

    1. Integrate your rollup with Range and start the indexing.
    2. Add your addresses and contracts.
    3. Create your first alert and explore transactions.

    Prerequisites

    You need to have an operational rollkit rollup. If you haven't done so, you'll need to complete the GM world tutorial first.

    1. Integrate Your Rollup

    We’ll integrate our rollup GM into Range and start indexing blocks and transactions in real-time.

    custom-network

    Steps

    • Create an account in Range
    • Make sure you have a public RPC endpoint of your Rollkit rollup
    • Go to the settings tab on your account profile in the top-right corner
    • Click the Add Network button in the Custom Network section
    • Choose Rollkit and fill out the form
    • Congrats! Your rollup should be integrated in Range in less than 15 seconds.

    2. Add Your Addresses and Contracts

    Now that your rollup is integrated into Range, you can customize your workspace. The first step is adding addresses and contracts that you want to monitor. For that, head to the Address section:

    import-address

    Once you’ve added one or multiple addresses, you can start looking at the real-time transactions explorer in the Transactions tab.

    3. Creating Your First Alert Rule

    Now, you can set up alerts to monitor specific events or transactions in your rollup. As an example, we can create an alert that notifies us every time our address is involved in a successful transaction:

    alert-rules

    After executing a sample transaction:

    bash
    gmd tx bank send gm-991hesf7xgmjwttag2n2wzk43rvxh47nn4ckh3e6s gm-991rcctqc5l4px95k6tdg4pjrms70m2a9t35rl50t 4039stake --keyring-backend test --node tcp://127.0.0.1:36657 --chain-id gm --fees 5000stake

    The alert events will appear both in the Overview tab and the Alerting section:

    alert-events

    🎊 Congrats! You've detected the first monitored transaction in your GM rollup.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/use-rollkit-cli.html b/pr-528/guides/use-rollkit-cli.html new file mode 100644 index 000000000..ce1c90703 --- /dev/null +++ b/pr-528/guides/use-rollkit-cli.html @@ -0,0 +1,84 @@ + + + + + + How to Use Rollkit CLI | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to Use Rollkit CLI

    This guide will walk you through the basics of installing and using Rollkit CLI. You'll learn how to install the CLI, initialize a configuration file (rollkit.toml), and run rollup commands.

    1. Installing Rollkit CLI

    To install Rollkit CLI, execute the following command:

    bash
    curl -sSL https://rollkit.dev/install.sh | sh -s v0.14.1

    This command downloads and installs the Rollkit CLI of specified version.

    2. Initializing rollkit.toml

    The rollkit.toml file is a configuration file that Rollkit uses to understand the structure and entry point of your rollup. To initialize this file, follow these steps:

    Steps to Generate rollkit.toml:

    1. Run the following command to generate the rollkit.toml file:

      bash
      rollkit toml init
    2. You should see an output similar to this (example taken from GM world tutorial):

      bash
      Found rollup entrypoint: /root/gm/cmd/gmd/main.go, adding to rollkit.toml
      +Could not find rollup config under gm. Please put the chain.config_dir in the rollkit.toml file manually.
      +Initialized rollkit.toml file in the current directory.
    3. The output indicates that the rollup entrypoint is ~/gm/cmd/gmd/main.go.

    4. Open the rollkit.toml file, and under the [chain] section, set config_dir to the appropriate directory where your chain configuration is. For GM World tutorial, rollkit.toml file looks like this:

      toml
      entrypoint = "./cmd/gmd/main.go"
      +
      +[chain]
      +  config_dir = "./.gm"

      Adjust entrypoint and config_dir according to your project structure.

    3. Running Rollup Commands Using Rollkit CLI

    Once you have the rollkit.toml file set up, you can run any rollup command using the Rollkit CLI. Ensure you are in the directory containing the rollkit.toml file when executing commands.

    Example:

    1. Navigate to the directory containing the rollkit.toml file.

    2. Now you could do:

      bash
      # instead of <rollup>d start
      +rollkit start 
      +# instead of <rollup>d tx
      +rollkit tx
      +# for any <rollup>d <command>
      +rollkit <command>

    Summary

    By following these steps, you can install the Rollkit CLI, initialize the rollkit.toml configuration file, and run rollup commands. This setup helps you manage and interact with your rollup project efficiently.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/use-tia-for-gas.html b/pr-528/guides/use-tia-for-gas.html new file mode 100644 index 000000000..db8537964 --- /dev/null +++ b/pr-528/guides/use-tia-for-gas.html @@ -0,0 +1,199 @@ + + + + + + How to use IBC token (TIA) as gas token in your rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    How to use IBC token (TIA) as gas token in your rollup

    🌞 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup using Rollkit, with TIA as the gas token. Unlike the quick start guide, which uses a native rollup token for gas, this tutorial demonstrates how to integrate an IBC-enabled token, TIA, as the gas token within the rollup, providing a deeper exploration of sovereign rollup development.

    We will cover:

    • Building and configuring a Cosmos-SDK application-specific rollup blockchain.
    • Posting rollup data to a Data Availability (DA) network.
    • Executing transactions using TIA as the gas token (the end goal).

    No prior understanding of the build process is required, just that it utilizes the Cosmos SDK for blockchain applications.

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    🛠️ Dependencies

    Rollkit uses the Go programming language. Here's how to install it:

    • Linux or macOS: Run the provided script:

      bash
      curl -sSL https://rollkit.dev/install-go.sh | bash -s go1.22.3

    📦 Install Rollkit (CLI)

    To install Rollkit, run the following command in your terminal:

    bash
    curl -sSL https://rollkit.dev/install.sh | sh -s v0.14.1

    Verify the installation by checking the Rollkit version:

    bash
    rollkit version

    A successful installation will display the version number and its associated git commit hash.

    🌐 Running a Local DA Network

    Learn to run a local DA network, designed for educational purposes, on your machine.

    To set up a local DA network node:

    bash
    (cd /tmp && curl -sSL https://rollkit.dev/install-local-da.sh | bash -s v0.3.1)

    This script builds and runs the node, now listening on port 7980.

    🏗️ Building Your Sovereign Rollup

    With the local DA network running, let’s prepare your rollup blockchain.

    To make it simple, we will download a repository with a gm-world rollup that includes an init.sh script to handle all the setup for you.

    Download and build a gm-world rollup with an interactive script in a new terminal:

    WARNING

    Ensure the jq command line tool is installed before proceeding. Install it using sudo apt-get install jq on Ubuntu or brew install jq on macOS.

    TIP

    If you get errors of gmd not found, you may need to add the go/bin directory to your PATH. You can do this by running export PATH=$PATH:$HOME/go/bin and then running the init.sh script manually again.

    bash
    curl -sSL https://rollkit.dev/install-gm-rollup.sh | sh

    🛠️ Initialize Rollkit TOML Configuration

    Change to the gm directory and initialize the rollkit toml configuration:

    bash
    cd ./gm && rollkit toml init

    Edit the rollkit.toml file to include the following configuration:

    toml
    entrypoint = "/root/gm/cmd/gmd/main.go"
    +
    +[chain]
    +  config_dir = "./.gm"

    🚀 Starting your rollup

    Start the rollup, posting to the local DA network:

    bash
    rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 --minimum-gas-prices="0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA,0.025stake"

    Note that we specified the gas token to be IBC TIA. We still haven't made an IBC connection to Celestia's Mocha testnet, however, if we assume our first channel will be an ICS-20 transfer channel to Celestia, we can already calculate the token denom using this formula:

    js
    "ibc/" + toHex(sha256(toUtf8("transfer/channel-0/utia"))).toUpperCase();

    Now you should see the logs of the running node:

    bash
    12:21PM INF starting node with ABCI CometBFT in-process module=server
    +12:21PM INF starting node with Rollkit in-process module=server
    +12:21PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
    +12:21PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start impl=EventBus module=events msg="Starting EventBus service"
    +12:21PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
    +12:21PM INF Using default mempool ttl MempoolTTL=25 module=BlockManager
    +12:21PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
    +12:21PM INF service start impl=RPC module=server msg="Starting RPC service"
    +12:21PM INF service start impl=Node module=server msg="Starting Node service"
    +12:21PM INF starting P2P client module=server
    +12:21PM INF serving HTTP listen address=127.0.0.1:26657 module=server
    +12:21PM INF listening on address=/ip4/127.0.0.1/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF listening on address=/ip4/163.172.162.109/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF no seed nodes - only listening for connections module=p2p
    +12:21PM INF working in aggregator mode block time=1000 module=server
    +12:21PM INF Creating and publishing block height=22 module=BlockManager
    +12:21PM INF starting gRPC server... address=127.0.0.1:9290 module=grpc-server
    +12:21PM INF finalized block block_app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager num_txs_res=0 num_val_updates=0
    +12:21PM INF executed block app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager
    +12:21PM INF indexed block events height=22 module=txindex
    +...

    ✨ Connecting to Celestia Mocha testnet using IBC

    Next, we will establish an IBC connection with the Celestia Mocha testnet to enable TIA transfers for gas usage on our rollup.

    Install the IBC relayer:

    bash
    git clone --depth 1 --branch v2.5.2 https://github.com/cosmos/relayer.git /tmp/relayer
    +cd /tmp/relayer
    +make install

    Configure the relayer:

    bash
    rly config init
    +
    +mkdir -p "$HOME/.relayer/keys/{gm,mocha-4}"
    +
    +echo "global:
    +    api-listen-addr: :5183
    +    timeout: 10s
    +    memo: ''
    +    light-cache-size: 20
    +    log-level: info
    +    ics20-memo-limit: 0
    +    max-receiver-size: 150
    +chains:
    +    gm_rollup:
    +        type: cosmos
    +        value:
    +            key-directory: '$HOME/.relayer/keys/gm'
    +            key: a
    +            chain-id: gm
    +            rpc-addr: http://localhost:26657
    +            account-prefix: gm
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.025stake
    +            min-gas-amount: 0
    +            max-gas-amount: 0
    +            debug: false
    +            timeout: 20s
    +            block-timeout: ''
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ''
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +    mocha:
    +        type: cosmos
    +        value:
    +            key-directory: '$HOME/.relayer/keys/mocha-4'
    +            key: a
    +            chain-id: mocha-4
    +            rpc-addr: https://celestia-testnet-rpc.publicnode.com:443
    +            account-prefix: celestia
    +            keyring-backend: test
    +            gas-adjustment: 1.5
    +            gas-prices: 0.15utia
    +            min-gas-amount: 0
    +            max-gas-amount: 0
    +            debug: false
    +            timeout: 20s
    +            block-timeout: ''
    +            output-format: json
    +            sign-mode: direct
    +            extra-codecs: []
    +            coin-type: 118
    +            signing-algorithm: ''
    +            broadcast-mode: batch
    +            min-loop-duration: 0s
    +            extension-options: []
    +            feegrants: null
    +paths:
    +    gm_mocha-4:
    +        src:
    +            chain-id: gm
    +        dst:
    +            chain-id: mocha-4
    +        src-channel-filter:
    +            rule: ''
    +            channel-list: []
    +" > "$HOME/.relayer/config/config.yaml"
    +
    +rly keys restore gm_rollup a "regret resist either bid upon yellow leaf early symbol win market vital"
    +rly keys restore mocha     a "regret resist either bid upon yellow leaf early symbol win market vital"

    Get the relayer accounts:

    bash
    rly address gm_rollup a # => gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc
    +rly address mocha     a # => celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu

    Note: These accounts should always be the same because of the hardcoded mnemonics that we've loaded in the rly keys restore step.

    Fund the relayer on our rollup:

    bash
    rollkit tx bank send gm-key-2 gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc 10000000stake --keyring-backend test --chain-id gm --fees 5000stake -y

    Fund the relayer on the Celestia Mocha testnet:

    Mocha Testnet Faucet Instructions.

    Verify the relayer is funded:

    bash
    rly q balance mocha     a # => address {celestia1jqevcsld0dqpjp3csfg7alkv3lehvn8u04ymsu} balance {10000000utia}
    +rly q balance gm_rollup a # => address {gm1jqevcsld0dqpjp3csfg7alkv3lehvn8uswknrc} balance {10000000stake}

    Create IBC clients:

    bash
    rly tx client gm_rollup mocha gm_mocha-4 --override
    +rly tx client mocha gm_rollup gm_mocha-4 --override

    Create IBC connection:

    bash
    rly tx connection gm_mocha-4

    Create IBC channel:

    bash
    rly tx channel gm_mocha-4 --src-port transfer --dst-port transfer --version ics20-1

    Start the relayer:

    bash
    rly start gm_mocha-4

    Transfer TIA from Mocha to our rollup:

    bash
    ACCOUNT_ON_ROLLUP="$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +CHANNEL_ID_ON_MOCHA="$(rly q channels mocha gm_rollup | jq -r .channel_id | tail -1)"
    +
    +rly tx transfer mocha gm_rollup 1000000utia "$ACCOUNT_ON_ROLLUP" "$CHANNEL_ID_ON_MOCHA" --path gm_mocha-4

    Verify the account on our rollup is funded with IBC TIA:

    bash
    rollkit q bank balances "$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +# =>
    +# balances:
    +# - amount: "1000000"
    +#   denom: ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA
    +# - amount: "9999999999999999989995000"
    +#   denom: stake
    +# pagination:
    +#   total: "2"

    💸 Transactions

    Finally, send a transaction on our rollup using IBC TIA as the gas token:

    bash
    ACCOUNT_ON_ROLLUP="$(rollkit keys show -a --keyring-backend test gm-key-2)"
    +
    +# Send the transaction
    +TX_HASH=$(rollkit tx bank send "$ACCOUNT_ON_ROLLUP" "$ACCOUNT_ON_ROLLUP" 1stake --keyring-backend test --chain-id gm --gas-prices 0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA -y --output json | jq -r .txhash)
    +
    +# Verify success
    +rollkit q tx "$TX_HASH" --output json | jq .code # => 0

    🎉 Next steps

    Congratulations! You've built a local rollup that posts to a local DA network and uses TIA as the gas token!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/guides/zkml.html b/pr-528/guides/zkml.html new file mode 100644 index 000000000..5b65a769c --- /dev/null +++ b/pr-528/guides/zkml.html @@ -0,0 +1,158 @@ + + + + + + zkML Rollup Tutorial with Sindri | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    zkML Rollup Tutorial with Sindri

    Introduction - Code Once, Verify Anywhere

    This guide will show you how to build verifiable machine learning inference into your Rollkit rollup using zero-knowledge proofs generated on Sindri. The rollup will rely on a local Celestia devnet for consensus and ensuring data availability.

    We will focus on using a ZK circuit that incorporates a compact deep neural network model to enable verifiable ML inference. In this guide, we will deploy the circuit on Sindri, obtain a smart contract verifier (automatically generated by Sindri) for that circuit, deploy it on Rollkit, create a proof of ML inference on Sindri, and verify the proof on-chain.

    This approach not only secures the verification process of machine learning models, but also leverages the decentralized security and scalability of Celestia's architecture.

    Prerequisites

    • An operational EVM using Rollkit (see next step)
    • A Sindri API key, which can be obtained here
    • Python 3.10+ installed as well as the Sindri Python SDK (more information below)

    Setting Up the Polaris EVM using Rollkit

    This walkthrough assumes you started the Polaris EVM using Rollkit and should be interpreted as a direct continuation of this Polaris EVM and Rollkit guide.

    Installing the Sindri Python SDK

    Because we're working with ML, we're going to build with Sindri's Python SDK because Python is widely used in ML development. The Sindri Python SDK Quickstart Guide contains installation instructions and a high-level walkthrough of the functionality of this package, but the following will suffice if you have pip installed:

    bash
    pip install sindri

    Deploying and Proving a Cool zkML Circuit to Sindri

    For this tutorial, we'll be working with a pre-built zkML circuit built by Sindri. For a more in-depth description of this circuit and its corresponding ML model's behavior and design, please see here.

    Clone

    Clone the Sindri Resources GitHub repo.

    bash
    cd $HOME
    +git clone https://github.com/Sindri-Labs/sindri-resources.git

    Navigate to the food_ml circuit tutorial directory.

    bash
    cd sindri-resources/circuit_tutorials/circom/food_ml/

    Here, you will find a handful of files. The circuit/ directory contains the circuit code that we will upload to Sindri. The circuit/sindri.json file is the Sindri manifest for your upload. Within it, you can modify the circuit's "name" value to whatever you like.

    Modify

    Open the compile_and_prove.py script and append the following lines to the very bottom.

    python
    # Obtain smart contract verifier for our circuit and save it to a file
    +smart_contract_code: str = sindri.get_circuit_smart_contract_verifier(circuit_id)
    +verifier_code_file: str = "Verifier.sol"
    +with open(verifier_code_file, "w") as f:
    +    f.write(smart_contract_code)
    +print(f"Smart contract verifier code written to {verifier_code_file}\n")
    +
    +# Obtain our proof's proof+public formatted as calldata for our circuit's
    +# smart contract verifier
    +proof = sindri.get_proof(proof_id, include_smart_contract_calldata=True)
    +calldata_file: str = "calldata.txt"
    +calldata: str  = proof["smart_contract_calldata"]
    +
    +# Fix formatting so it works with Rollkit
    +import json
    +a = json.loads("["+calldata_str+"]")
    +calldata_objects = []
    +for i in a:
    +    calldata_objects.append(json.dumps(i).replace("\"", "").replace(" ",""))
    +rollkit_calldata_str = " ".join(calldata_objects)
    +
    +# Save calldata to file
    +with open(calldata_file, "w") as f:
    +    f.write(rollkit_calldata_str)
    +print(f"Proof calldata written to {calldata_file}\n")

    These additions will allow us to fetch and save the following to files:

    • the circuit's smart contract verifier code that is generated by Sindri when we deployed our circuit
    • the proof's proof+public formatted as calldata to run with the smart contract verifier on Rollkit

    Deploy and Prove your zkML Circuit on Sindri

    Export your Sindri API Key to an environment variable (or prepend it to the run command in the next step).

    bash
    export SINDRI_API_KEY=<YOUR_API_KEY>

    Run the compile_and_prove.py script. This will upload the circuit/ directory to Sindri, where Sindri will compile and host your circuit. Then, it will run a single proof for the circuit. Finally, it will save the circuit's smart contract verifier code that is generated by Sindri to the Verifier.sol file and it will save the proof's proof+public formatted as calldata for that smart contract to calldata.txt.

    bash
    python3 compile_and_prove.py

    Congratulations! You just deployed a zkML circuit to Sindri and proved it on Sindri's production-quality infrastructure with built-in, custom GPU-accelerated proving techniques. Furthermore, you now have smart contract verifier code (and some calldata) for verifying proofs of that circuit on-chain.

    Deploy Smart Contract Verifier to Rollkit

    Next, we will deploy this smart contract to Rollkit and verify our zkML proof on-chain. This section assumes you have an operational Rollkit instance of Polaris EVM running and your gm-portal/ directory is located in the $HOME directory on your machine.

    Deploy

    Copy your new Verifier.sol smart contract to the ~/gm-portal/contracts/src/. directory in your Polaris EVM.

    bash
    cd $HOME
    +cp sindri-resources/circuit_tutorials/circom/food_ml/Verifier.sol gm-portal/contracts/src/Verifier.sol

    Next, let's make a copy of the example ~/gm-portal/contracts/script/GmPortal.s.sol and modify it to reference your new Verifier.sol contract.

    bash
    cd gm-portal/contracts/script/
    +cp GmPortal.s.sol Verifier.s.sol

    Open up the new Verifier.s.sol and modify it to interact with your new Verifier.sol instead of the example GmPortal.sol.

    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Script.sol";
    +
    +import {Verifier} from "src/Verifier.sol";
    +
    +contract VerifierScript is Script {
    +    function setUp() public {}
    +
    +    function run() public {
    +        vm.startBroadcast();
    +        new Verifier();
    +        vm.stopBroadcast();
    +    }
    +}

    Then, deploy the contract to your Rollkit environment. Your PRIVATE_KEY and RPC_URL are for your Rollkit Polaris EVM.

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545
    bash
    cd ..
    +forge script script/Verifier.s.sol:VerifierScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to the following.

    forge script script/Verifier.s.sol:VerifierScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠆] Compiling 20 files with 0.8.24
    +[⠰] Solc 0.8.24 finished in 101.99ms
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on Polaris EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    +⠉ [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 80085
    +✅  [Success]Hash: 0xa06a4585af436e2271fc9f697488ce49771c6480e72caac76739e286564c0fc3
    +Contract Address: 0x5C59C83c099F72FcE832208f96a23a1E43737a14
    +Block: 5699
    +Paid: 0.002924172006823068 ETH (974724 gas * 3.000000007 gwei)
    +
    +[...]

    From your contract deployment output, export your contract address: Contract Address: 0x5C59C83c099F72FcE832208f96a23a1E43737a14. Note that the address will be different.

    bash
    export CONTRACT_ADDRESS=0x5C59C83c099F72FcE832208f96a23a1E43737a14

    Interact with the Contract - Verify your zkML Proof On-Chain

    Now, we will send your zkML circuit's proof to the contract and verify it on-chain. Keep in mind that your verifier contract can be used across any EVM-compatible environment. Thus, we can compare the cost of execution across multiple environments.

    First, grab the contents of your proof calldata and save it in a variable.

    bash
    CALLDATA=$(cat $HOME/sindri-resources/circuit_tutorials/circom/food_ml/calldata.txt)

    Then, interact with the smart contract using the calldata.

    bash
    cast send $CONTRACT_ADDRESS \
    +"verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])" \
    +$CALLDATA \
    +--private-key $PRIVATE_KEY \
    +--rpc-url $RPC_URL

    The output will look like the following.

    bash
    cast send $CONTRACT_ADDRESS "verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])" $CALLDATA --private-key $PRIVATE_KEY --rpc-url $RPC_URL
    +
    +blockHash               0xbbd872d0c37fe889c2456daf80505c20f262b001842d919d06e48c163319af3d
    +blockNumber             11544
    +contractAddress
    +cumulativeGasUsed       231649
    +effectiveGasPrice       3000000007
    +from                    0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4
    +gasUsed                 231649
    +logs                    []
    +logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    +root
    +status                  1
    +transactionHash         0x58096aabd3cb58bdef28501bda01b6cf4a37ed0ba482f81462bc1043bb91f996
    +transactionIndex        0
    +type                    2
    +to                      0x5C59C83c099F72FcE832208f96a23a1E43737a14

    TIP

    Note: To see the decoded output of the contract call (to check if the proof was verified), you will need to view the call in a block explorer.

    Congratulations

    Congratulations, you've just verified a zkML circuit on Rollkit.

    For further reading, check out Sindri's blog post explaining how using Sindri + Rollkit x Celestia means verifiable ML doesn’t have to be prohibitively expensive for operators or end users.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/hashmap.json b/pr-528/hashmap.json new file mode 100644 index 000000000..021bf62d7 --- /dev/null +++ b/pr-528/hashmap.json @@ -0,0 +1 @@ +{"blog_overview.md":"BkoGr0eX","blog_rollkit-the-first-sovereign-rollup-framework.md":"3iTSfbJu","blog_sovereign-rollups-on-bitcoin.md":"3SYCE1yS","guides_block-times.md":"ZtYvVHR2","guides_cometbft-to-rollkit.md":"DP9f6eId","guides_create-genesis.md":"7ARA_dEB","guides_cw-orch.md":"BbD81cbc","guides_da-block-time.md":"CcLl9c93","guides_full-node.md":"B9sXEJu3","guides_gas-price.md":"CkEYB_xd","guides_ibc-connection.md":"CtgAqtY-","guides_ignite-rollkit.md":"BTB38Ddl","guides_lazy-sequencing.md":"CC98QQJ5","guides_max-pending-blocks.md":"Cb9ZY4Ix","guides_metrics.md":"J4sWEr9K","guides_overview.md":"etpN25W8","guides_reset-state.md":"CS-R_2m6","guides_restart-rollup.md":"ebiKBW3L","guides_rollkit-monitoring.md":"BZWQ7VSE","guides_use-rollkit-cli.md":"CRirDB19","guides_use-tia-for-gas.md":"K3Str4v3","guides_zkml.md":"DJQB_pUq","index.md":"DES0RmPy","learn_about.md":"BlW1EOC5","learn_building-and-deploying-a-rollup.md":"6i8iJaOC","learn_intro.md":"DPoRa93Y","learn_specifications.md":"BQuKD7Aj","learn_stack.md":"CAr6XwiN","learn_transaction-flow.md":"BlnJIkpx","readme.md":"BTNvMC_a","testnets_cosmwasm-testnet.md":"BqquMyrO","tutorials_bitcoin.md":"gblAdhNv","tutorials_da_avail-da.md":"CNxn6ngQ","tutorials_da_celestia-da.md":"bErwepps","tutorials_da_local-da.md":"Cyup0Whx","tutorials_da_overview.md":"D8MH92i5","tutorials_deploy-overview.md":"Bj3ZxHuP","tutorials_docker-compose.md":"BvDnivbM","tutorials_execution_artela-evm-plus-plus.md":"COcivXff","tutorials_execution_beaconkit.md":"SR_e-FYk","tutorials_execution_cosmwasm.md":"B988wSVS","tutorials_execution_evm-contract-interaction.md":"Br9sP-5f","tutorials_execution_octane-evm.md":"HsEF3TEL","tutorials_execution_polaris-evm.md":"C0Bj_-Ui","tutorials_gm-world.md":"Z6jfcI3H","tutorials_kurtosis.md":"DOF3pkOI","tutorials_quick-start.md":"y19er4dj","tutorials_sequencing_astria.md":"CJuWRfLV","tutorials_sequencing_based.md":"B5l9xZtJ","tutorials_sequencing_centralized.md":"BGImpjo9","tutorials_sequencing_forced-inclusion.md":"B6396qIT","tutorials_sequencing_local.md":"Cfaq013P","tutorials_sequencing_overview.md":"C1mSL5p8","tutorials_wordle.md":"C5a70n_Y"} diff --git a/pr-528/ibc/init-osmosis-local.sh b/pr-528/ibc/init-osmosis-local.sh new file mode 100644 index 000000000..ba06e5020 --- /dev/null +++ b/pr-528/ibc/init-osmosis-local.sh @@ -0,0 +1,53 @@ +KEY="mykey" +CHAINID="osmosis-testnet-1" +MONIKER="localtestnet" +KEYALGO="secp256k1" +KEYRING="test" +LOGLEVEL="info" +# to trace evm +#TRACE="--trace" +TRACE="" +KEY_RELAY="osmosis-relay" +# remove existing daemon +rm -rf ~/.osmosis* + + +# validate dependencies are installed +command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; } + +update_test_genesis () { + cat $HOME/.osmosisd/config/genesis.json | jq "$1" > $HOME/.osmosisd/config/tmp_genesis.json && mv $HOME/.osmosisd/config/tmp_genesis.json $HOME/.osmosisd/config/genesis.json +} + +# if $KEY exists it should be deleted +osmosisd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO +echo "milk verify alley price trust come maple will suit hood clay exotic" | osmosisd keys add $KEY_RELAY --keyring-backend $KEYRING --algo $KEYALGO --recover + +# Set moniker and chain-id for Evmos (Moniker can be anything, chain-id must be an integer) +osmosisd init $MONIKER --chain-id $CHAINID + +# Allocate genesis accounts (cosmos formatted addresses) +osmosisd add-genesis-account $KEY_RELAY 100000001000009000uosmo,100000000000000utest --keyring-backend $KEYRING +osmosisd add-genesis-account $KEY 100000001000000000uosmo --keyring-backend $KEYRING + +# Sign genesis transaction +osmosisd gentx $KEY 100000001000000000uosmo --keyring-backend $KEYRING --chain-id $CHAINID + +# Collect genesis tx +osmosisd collect-gentxs +update_test_genesis '.app_state["mint"]["params"]["mint_denom"]="uosmo"' +update_test_genesis '.app_state["staking"]["params"]["bond_denom"]="uosmo"' +update_test_genesis '.app_state["txfees"]["basedenom"]="uosmo"' + +# Run this to ensure everything worked and that the genesis file is setup correctly +osmosisd validate-genesis + +if [[ $1 == "pending" ]]; then + echo "pending mode is on, please wait for the first block committed." +fi + +osmosisd config chain-id $CHAINID +osmosisd config keyring-backend $KEYRING + +# Start the node (remove the --pruning=nothing flag if historical queries are not needed) +osmosisd start --pruning-keep-recent 10000 --minimum-gas-prices=0.0001uosmo --rpc.laddr tcp://0.0.0.0:46657 --p2p.laddr tcp://0.0.0.0:2240 --grpc.address 0.0.0.0:2242 --grpc-web.address 0.0.0.0:2243 --api.address tcp://127.0.0.1:2317 diff --git a/pr-528/img/Rollkit-cover.jpg b/pr-528/img/Rollkit-cover.jpg new file mode 100644 index 000000000..5904aed2f Binary files /dev/null and b/pr-528/img/Rollkit-cover.jpg differ diff --git a/pr-528/img/color-scheme.png b/pr-528/img/color-scheme.png new file mode 100644 index 000000000..67ee71709 Binary files /dev/null and b/pr-528/img/color-scheme.png differ diff --git a/pr-528/img/favicon-dark.ico b/pr-528/img/favicon-dark.ico new file mode 100644 index 000000000..214b8332d Binary files /dev/null and b/pr-528/img/favicon-dark.ico differ diff --git a/pr-528/img/favicon-dark.png b/pr-528/img/favicon-dark.png new file mode 100644 index 000000000..4f9269bcf Binary files /dev/null and b/pr-528/img/favicon-dark.png differ diff --git a/pr-528/img/favicon-dark.svg b/pr-528/img/favicon-dark.svg new file mode 100644 index 000000000..142b30530 --- /dev/null +++ b/pr-528/img/favicon-dark.svg @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/pr-528/img/favicon.png b/pr-528/img/favicon.png new file mode 100644 index 000000000..66e865511 Binary files /dev/null and b/pr-528/img/favicon.png differ diff --git a/pr-528/img/favicon.svg b/pr-528/img/favicon.svg new file mode 100644 index 000000000..53a4767ca --- /dev/null +++ b/pr-528/img/favicon.svg @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/pr-528/img/gm-world-frontend-wallet-connected.png b/pr-528/img/gm-world-frontend-wallet-connected.png new file mode 100644 index 000000000..b460841b8 Binary files /dev/null and b/pr-528/img/gm-world-frontend-wallet-connected.png differ diff --git a/pr-528/img/logo-big.svg b/pr-528/img/logo-big.svg new file mode 100644 index 000000000..d0fa8289b --- /dev/null +++ b/pr-528/img/logo-big.svg @@ -0,0 +1,26 @@ + + + + + diff --git a/pr-528/img/logo-dark.svg b/pr-528/img/logo-dark.svg new file mode 100644 index 000000000..afbf351cb --- /dev/null +++ b/pr-528/img/logo-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/pr-528/img/logo.svg b/pr-528/img/logo.svg new file mode 100644 index 000000000..bf1049f53 --- /dev/null +++ b/pr-528/img/logo.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/pr-528/img/sequencing.jpg b/pr-528/img/sequencing.jpg new file mode 100644 index 000000000..32f759730 Binary files /dev/null and b/pr-528/img/sequencing.jpg differ diff --git a/pr-528/img/transaction-flow.png b/pr-528/img/transaction-flow.png new file mode 100644 index 000000000..50137bc26 Binary files /dev/null and b/pr-528/img/transaction-flow.png differ diff --git a/pr-528/index.html b/pr-528/index.html new file mode 100644 index 000000000..f6ff6bdc7 --- /dev/null +++ b/pr-528/index.html @@ -0,0 +1,73 @@ + + + + + + Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pr-528/install-gm-rollup.sh b/pr-528/install-gm-rollup.sh new file mode 100644 index 000000000..e8d0300ba --- /dev/null +++ b/pr-528/install-gm-rollup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "Downloading GM tutorial rollup source code..." +git clone https://github.com/rollkit/gm.git +cd gm || { echo "Failed to find the downloaded repository"; exit 1; } +git fetch && git checkout remotes/origin/tutorial-local-da-rollkit diff --git a/pr-528/install-go.sh b/pr-528/install-go.sh new file mode 100644 index 000000000..a31cba966 --- /dev/null +++ b/pr-528/install-go.sh @@ -0,0 +1,125 @@ +#!/bin/bash -e + +# This script installs or updates to the latest version of Go. +# Multi-platform (Linux and macOS) +# Multi-architecture (amd64, arm64, arm) support + +# if curl is not installed then install it +if ! command -v curl &> /dev/null; then + echo "curl is not installed. Please install curl and try again." + exit 1 +fi + +# if jq is not installed then install it using the script +if ! command -v jq &> /dev/null; then + echo "jq is not installed. Downloading and executing the script to install jq..." + curl -sSL https://rollkit.dev/install-jq.sh | bash +fi + +# Define the Go binary path +GO_BIN_PATH="/usr/local/go/bin" +GO_UNTAR_PATH="/usr/local" + +version="${1:-$(curl -sSL 'https://go.dev/dl/?mode=json' | jq -r '.[0].version')}" + +current="$($GO_BIN_PATH/go version 2>/dev/null | awk '{print $3}')" +if [[ "$current" == "$version" ]]; then + echo "Go is already up-to-date at version ${version}" + exit 0 +fi + +update_go() { + local arch="$1" + local os="$2" + + local go_url="https://golang.org/dl/${version}.${os}-${arch}.tar.gz" + + echo "Downloading Go from ${go_url}" + + curl -so "/tmp/${version}.${os}-${arch}.tar.gz" -L "$go_url" + if [ $? -eq 0 ]; then + tar -C $GO_UNTAR_PATH -xzf "/tmp/${version}.${os}-${arch}.tar.gz" + if [ $? -ne 0 ]; then + echo "Failed to extract Go. Possibly corrupted download." + rm "/tmp/${version}.${os}-${arch}.tar.gz" + exit 1 + else + echo "Go updated to version ${version}" + fi + else + echo "Failed to download Go from ${go_url}" + exit 1 + fi + + rm "/tmp/${version}.${os}-${arch}.tar.gz" +} + +# Function to add path to the specific shell config file +add_path_to_config() { + local config_file="$1" + + if ! grep -q "export PATH=.*$GO_BIN_PATH" "$config_file" ; then + echo "export PATH=\"\$PATH:$GO_BIN_PATH\"" >> "$config_file" + echo "Added $GO_BIN_PATH to $config_file" + else + echo "$GO_BIN_PATH is already in $config_file" + fi +} + +case "$(uname -s)" in + Linux) + OS="linux" + ;; + Darwin) + OS="darwin" + ;; + *) + echo "Unsupported operating system: $(uname -s)" >&2 + exit 1 + ;; +esac + +# Determine the architecture +case "$(uname -m)" in + armv6l) + ARCH="armv6l" + ;; + armv7l) + ARCH="armv7l" + ;; + arm64) + ARCH="arm64" + ;; + x86_64) + ARCH="amd64" + ;; + *) + echo "Unsupported architecture: $(uname -m)" >&2 + exit 1 + ;; +esac + +update_go "$ARCH" "$OS" + +# Determine shell and appropriate config file +if [[ -n "$ZSH_VERSION" ]]; then + # Assuming the user is using Zsh + CONFIG_FILE="$HOME/.zshenv" +elif [[ -n "$BASH_VERSION" ]]; then + if [[ -f "$HOME/.bashrc" ]]; then + CONFIG_FILE="$HOME/.bashrc" + elif [[ -f "$HOME/.bash_profile" ]]; then + CONFIG_FILE="$HOME/.bash_profile" + else + CONFIG_FILE="$HOME/.profile" + fi +else + echo "Unsupported shell. Only Bash and Zsh are supported." + exit 1 +fi + +add_path_to_config "$CONFIG_FILE" + +$(which go) version + +echo "Now run 'source $CONFIG_FILE' to update your environment" diff --git a/pr-528/install-jq.sh b/pr-528/install-jq.sh new file mode 100644 index 000000000..b1b10a994 --- /dev/null +++ b/pr-528/install-jq.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +if [[ "$OSTYPE" == "darwin"* ]]; then + echo "Detected macOS. Installing jq..." + if ! command -v brew &> /dev/null; then + echo "Homebrew is not installed. Installing Homebrew..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + # adding /opt/homebrew/bin to the $PATH variable based on the shell + if [[ -f "$HOME/.bash_profile" ]]; then + echo "export PATH=\"/opt/homebrew/bin:\$PATH\"" >> "$HOME/.bash_profile" + source "$HOME/.bash_profile" + elif [[ -f "$HOME/.bashrc" ]]; then + echo "export PATH=\"/opt/homebrew/bin:\$PATH\"" >> "$HOME/.bashrc" + source "$HOME/.bashrc" + elif [[ -f "$HOME/.zshrc" ]]; then + echo "export PATH=\"/opt/homebrew/bin:\$PATH\"" >> "$HOME/.zshrc" + source "$HOME/.zshrc" + else + echo "Unsupported shell. Please add /opt/homebrew/bin to your PATH manually." + exit 1 + fi + fi # Closing the brew installation check + brew install jq + echo "jq has been installed successfully." +elif [[ "$OSTYPE" == "linux-gnu"* ]]; then + echo "Detected Linux. Installing jq..." + if command -v apt &> /dev/null; then + sudo apt update + sudo apt install -y jq + elif command -v yum &> /dev/null; then + sudo yum install -y epel-release + sudo yum install -y jq + else + echo "Unsupported package manager. Please install jq manually." + exit 1 + fi + echo "jq has been installed successfully." +else + echo "Unsupported operating system." + exit 1 +fi # Closing the OS type check + diff --git a/pr-528/install-local-da.sh b/pr-528/install-local-da.sh new file mode 100644 index 000000000..a16d7f334 --- /dev/null +++ b/pr-528/install-local-da.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Downloading Local-DA source code..." +git clone https://github.com/rollkit/local-da.git +cd local-da || { echo "Failed to find the downloaded repository"; exit 1; } +git checkout $1 +echo "Building and installing Local DA..." +make build +echo "Starting Local DA..." +./build/local-da diff --git a/pr-528/install-local-sequencer.sh b/pr-528/install-local-sequencer.sh new file mode 100644 index 000000000..b3b91f9ca --- /dev/null +++ b/pr-528/install-local-sequencer.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Downloading local sequencer source code..." +git clone https://github.com/rollkit/go-sequencing.git +cd go-sequencing || { echo "Failed to find the downloaded repository"; exit 1; } +git fetch --all --tags +git checkout $1 +echo "Building and installing Local Sequencer..." +make build +echo "Starting Local Sequencer..." +./build/local-sequencer -rollup-id $2 diff --git a/pr-528/install-yarn.sh b/pr-528/install-yarn.sh new file mode 100644 index 000000000..1c8867ec9 --- /dev/null +++ b/pr-528/install-yarn.sh @@ -0,0 +1,66 @@ +#!/bin/sh + +set -e + +INSTALL_NODE_VER=21.7.2 +INSTALL_NVM_VER=0.39.7 +INSTALL_YARN_VER=1.22.19 + +# You can pass node and yarn versions as arguments to this script +if [ "$1" != '' ]; then + echo "==> Using specified node version - $1" + INSTALL_NODE_VER=$1 +fi +if [ "$2" != '' ]; then + echo "==> Using specified yarn version - $2" + INSTALL_YARN_VER=$2 +fi + +echo "==> Ensuring .bashrc exists and is writable" +touch ~/.bashrc + +echo "==> Installing node version manager (NVM). Version $INSTALL_NVM_VER" +# Removed if already installed +rm -rf ~/.nvm +# Unset exported variable +export NVM_DIR= + +# Install nvm +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$INSTALL_NVM_VER/install.sh | bash +# Make nvm command available to terminal +source ~/.nvm/nvm.sh + +echo "==> Installing node js version $INSTALL_NODE_VER" +nvm install $INSTALL_NODE_VER + +echo "==> Make this version system default" +nvm alias default $INSTALL_NODE_VER +nvm use default + +echo "==> Installing Yarn package manager" +rm -rf ~/.yarn +curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $INSTALL_YARN_VER + +echo "==> Adding Yarn and Node to environment path" +# Yarn configurations +mv $HOME/.nvm/versions/node/v$INSTALL_NODE_VER/bin/node $HOME/.yarn/bin + +export PATH="$HOME/.yarn/bin:$PATH" +yarn config set prefix ~/.yarn -g + +echo "==> Checking for versions" +nvm --version +node --version +npm --version +yarn --version + +echo "==> Print binary paths" +which npm +which node +which yarn + +echo "==> List installed node versions" +nvm ls + +nvm cache clear +echo "==> Now you're all setup and ready for development. If changes are yet to take effect, I suggest you restart your computer" diff --git a/pr-528/install.sh b/pr-528/install.sh new file mode 100755 index 000000000..fa6fe850a --- /dev/null +++ b/pr-528/install.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +# Define colors for output +RED="\033[31m" +GREEN="\033[32m" +YELLOW="\033[33m" +CYAN="\033[36m" +BOLD="\033[1m" +RESET="\033[0m" + +# Function to print headers +print_header() { + echo -e "${CYAN}${BOLD}--> $1${RESET}" +} + +# Function to print success messages +print_success() { + echo -e "${GREEN}${BOLD}$1${RESET}" +} + +# Function to print warnings +print_warning() { + echo -e "${YELLOW}${BOLD}$1${RESET}" +} + +# Function to print errors +print_error() { + echo -e "${RED}${BOLD}$1${RESET}" +} + +# Function to compare versions +compare_versions() { + if [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$1" ]; then + if [ "$1" = "$2" ]; then + return 0 # Equal + else + return 1 # First is less + fi + else + return 2 # First is greater + fi +} + +print_header "Downloading Rollkit source code..." +git clone https://github.com/rollkit/rollkit.git +echo "" + +cd rollkit || { print_error "Failed to find the downloaded repository."; exit 1; } + +print_header "Extracting Go version from go.mod..." +go_mod_version=$(grep "^go " go.mod | cut -d' ' -f2) + +if [ -z "$go_mod_version" ]; then + print_error "Error: Could not find a Go version in go.mod." + exit 1 +fi +formatted_go_version="go${go_mod_version}" +echo -e " Required Go version: ${BOLD}${formatted_go_version}${RESET}\n" + +print_header "Checking if Go is installed..." +if ! which go > /dev/null; then + print_warning "Go is not installed. Attempting to install Go..." + curl -sL "https://rollkit.dev/install-go.sh" | sh -s "$formatted_go_version" +fi + +installed_version=$(go version | awk '{print $3}' | sed 's/go//') +echo -e " Installed Go version: ${BOLD}${installed_version}${RESET}\n" + +print_header "Validating installed Go version..." +compare_versions "$installed_version" "$go_mod_version" +comparison_result=$? + +if [ $comparison_result -eq 1 ]; then + print_error "ERROR: The installed Go version ($installed_version) is less than the required version ($go_mod_version)." + echo " Please upgrade your version of Go." + exit 1 +elif [ $comparison_result -eq 2 ]; then + print_warning "INFO: The installed Go version ($installed_version) is greater than the required version ($go_mod_version)." + echo " If you run into issues, try downgrading your version of Go." +fi +echo "" + +print_header "Fetching and checking out the specified branch or tag..." +git fetch && git checkout "$1" +echo "" + +print_header "Building and installing Rollkit..." +make install +print_success "Rollkit CLI installed successfully!" + +cd .. +print_header "Cleaning up downloads..." +rm -rf rollkit + +print_success "Installation completed successfully." diff --git a/pr-528/learn/about.html b/pr-528/learn/about.html new file mode 100644 index 000000000..089776847 --- /dev/null +++ b/pr-528/learn/about.html @@ -0,0 +1,73 @@ + + + + + + About Rollkit | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    About Rollkit

    Our mission is to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

    TIP

    In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

    If you're familiar with Rollkit, you may want to skip to the tutorials section.

    What is Rollkit?

    Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

    Read more on the Celestia blog to learn more about the concept of sovereign rollups.

    Rollkit is an open-source framework. It features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application.

    Rollkit uses data availability (DA) layers by having a unified client interface which can be implemented for use with different DA networks, such as Celestia.

    Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

    What problems is Rollkit solving?

    1. Scalability and customizability

    Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

    Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

    2. Security and time to market

    Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

    Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

    In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

    In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

    Why Rollkit?

    Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

    With Rollkit, developers can benefit from:

    • Shared security: Rollups inherit security from a data availability layer, by posting blocks to it. Rollups reduce the trust assumptions placed on rollup sequencers by allowing full nodes to download and verify the transactions in the blocks posted by the sequencer. For optimistic or zk rollups, in case of fraudulent blocks, full nodes can generate fraud or zk proofs, which they can share with the rest of the network, including light nodes. Our roadmap includes the ability for light clients to receive and verify proofs, so that everyday users can enjoy high security guarantees.

    • Scalability: Rollkit rollups are deployed on specialized data availability layers like Celestia, which directly leverages the scalability of the DA layer. Additionally, rollup transactions are executed off-chain rather than the data availability layer. This means rollups have their own dedicated computational resources, rather than sharing computational resources with other applications.

    • Customizability: Rollkit is built as an open source modular framework, to make it easier for developers to reuse the four main components and customize their rollups. These components are data availability layers, execution environments, proof systems, and sequencer schemes. The components used by the Rollkit stack are customizable.

    • Faster time to market: Rollkit eliminates the need to bootstrap a validator set, manage a consensus network, incur high economic costs, and face other trade-offs that come with deploying a new layer 1. Rollkit's goal is to make deploying a rollup as easy as it is to deploy a smart contract, cutting the time it takes to bring blockchain products to market from months or even years to just minutes.

    • Sovereignty: Rollkit also enables developers to deploy sovereign rollups for cases where communities require sovereignty.

    How can you use Rollkit?

    As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

    Rollup with any execution environment

    Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

    Sovereign rollup with Cosmos SDK

    Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

    Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

    Build a settlement layer

    Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

    When can you use Rollkit?

    As of today, Rollkit is still in the alpha stage. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer.

    We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

    Head down to the next section to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

    Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/learn/building-and-deploying-a-rollup.html b/pr-528/learn/building-and-deploying-a-rollup.html new file mode 100644 index 000000000..b78b2fa4b --- /dev/null +++ b/pr-528/learn/building-and-deploying-a-rollup.html @@ -0,0 +1,73 @@ + + + + + + 🗞️ Building a rollup and testnet deployment | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    🗞️ Building a rollup and testnet deployment

    The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

    You can get started with the following tutorials:

    1. Beginner

    2️. Intermediate

    3️. Advanced

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a GitHub issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/learn/intro.html b/pr-528/learn/intro.html new file mode 100644 index 000000000..d4c9d09c4 --- /dev/null +++ b/pr-528/learn/intro.html @@ -0,0 +1,73 @@ + + + + + + Introduction | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Introduction

    Welcome to the Rollkit docs. We're happy you made it here! Rollkit allows anyone to launch an unstoppable blockchain as easily as a smart contract.

    Rollkit is the unstoppable stack.

    We're setting the bar high for developers' flexibility and ability to customize blockchains however they see fit.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/learn/specifications.html b/pr-528/learn/specifications.html new file mode 100644 index 000000000..0c7343520 --- /dev/null +++ b/pr-528/learn/specifications.html @@ -0,0 +1,73 @@ + + + + + + Technical specifications | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Technical specifications

    Rollkit specifications - is comprehensive documentation on the inner components of Rollkit, including data storage, transaction processing, and more. It’s an essential resource for developers looking to understand, contribute to and leverage the full capabilities of Rollkit.

    Additional Rollkit documentation can be found in the Rollkit godocs.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/learn/stack.html b/pr-528/learn/stack.html new file mode 100644 index 000000000..d8031cb0c --- /dev/null +++ b/pr-528/learn/stack.html @@ -0,0 +1,75 @@ + + + + + + Rollkit stack | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Rollkit stack

    This page will cover the main components of Rollkit.

    Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.

    Application structure

    ABCI interface

    Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

    Cosmos SDK

    Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

    Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

    And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

    Data availability

    Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

    The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

    The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

    Celestia

    Celestia is a prominent example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

    New DA layer integrations can be added by using the go-da interface.

    Node components

    Mempool

    The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

    Block manager

    The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

    All nodes run SyncLoop which looks for the following operations:

    • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
    • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
    • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

    All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

    RPC

    Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

    • Information about the rollup node: information such as node's health, status, and network info.
    • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
    • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
    • ABCI: rollup application information.

    The following RPC protocols are currently supported:

    • URI over HTTP
    • JSON-RPC over HTTP
    • JSON-RPC over WebSockets

    The RPC provides an additional query for DA included blocks using the height parameter:

    sh
    curl http://127.0.0.1:26657/block?height=1
    +
    +curl http://127.0.0.1:26657/block?height=included

    Parameters

    • height (integer or string): height of the requested block. If no height is specified the latest block will be used. If height is set to the string "included", the latest DA included block will be returned.

    P2P layer

    Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

    Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

    Rollkit node types

    Rollkit nodes are implemented in the node package.

    Full node

    Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

    Light node (work in progress)

    Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

    Sequencer node

    Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

    Rollkit plans to support multiple different pluggable sequencer schemes:

    Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
    Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
    Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
    Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
    Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

    "Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

    * implementation of this property is in progress.

    State validity modes

    Pessimistic (full nodes only)

    A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

    Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

    Optimistic (fraud proofs) (work in progress)

    Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

    Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

    Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

    Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

    You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

    Validity (ZK proofs)

    Validity (ZK) rollups are planned, but not currently supported by Rollkit.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/learn/transaction-flow.html b/pr-528/learn/transaction-flow.html new file mode 100644 index 000000000..6ae8b810d --- /dev/null +++ b/pr-528/learn/transaction-flow.html @@ -0,0 +1,73 @@ + + + + + + Transaction flow | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Transaction flow

    Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

    • submitting transactions
    • gossipping headers and fraud proofs

    WARNING

    Light nodes are still a work in progress.

    Here's what the typical transaction flow looks like:

    Transaction submission

    Transaction validation and processing

    Block processing

    Fraud proof gossip and forking

    To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.

    If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.

    After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.

    As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes here.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/polaris-evm/polaris-evm.png b/pr-528/polaris-evm/polaris-evm.png new file mode 100644 index 000000000..7ad9248a6 Binary files /dev/null and b/pr-528/polaris-evm/polaris-evm.png differ diff --git a/pr-528/polaris-evm/polaris-start-site.png b/pr-528/polaris-evm/polaris-start-site.png new file mode 100644 index 000000000..a3bab7ce2 Binary files /dev/null and b/pr-528/polaris-evm/polaris-start-site.png differ diff --git a/pr-528/range-rollkit/alert-events.png b/pr-528/range-rollkit/alert-events.png new file mode 100644 index 000000000..690abdd64 Binary files /dev/null and b/pr-528/range-rollkit/alert-events.png differ diff --git a/pr-528/range-rollkit/alert-rule.png b/pr-528/range-rollkit/alert-rule.png new file mode 100644 index 000000000..f15953758 Binary files /dev/null and b/pr-528/range-rollkit/alert-rule.png differ diff --git a/pr-528/range-rollkit/custom-network.png b/pr-528/range-rollkit/custom-network.png new file mode 100644 index 000000000..63ad8c82d Binary files /dev/null and b/pr-528/range-rollkit/custom-network.png differ diff --git a/pr-528/range-rollkit/import-address.png b/pr-528/range-rollkit/import-address.png new file mode 100644 index 000000000..ce372438c Binary files /dev/null and b/pr-528/range-rollkit/import-address.png differ diff --git a/pr-528/sitemap.xml b/pr-528/sitemap.xml new file mode 100644 index 000000000..2d988159b --- /dev/null +++ b/pr-528/sitemap.xml @@ -0,0 +1 @@ +https://rollkit.dev/README2024-12-05T17:47:46.000Zhttps://rollkit.dev/blog/overview2024-12-05T17:47:46.000Zhttps://rollkit.dev/blog/rollkit-the-first-sovereign-rollup-framework2024-12-05T17:47:46.000Zhttps://rollkit.dev/blog/sovereign-rollups-on-bitcoin2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/block-times2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/cometbft-to-rollkit2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/create-genesis2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/cw-orch2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/da-block-time2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/full-node2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/gas-price2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/ibc-connection2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/ignite-rollkit2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/lazy-sequencing2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/max-pending-blocks2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/metrics2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/overview2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/reset-state2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/restart-rollup2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/rollkit-monitoring2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/use-rollkit-cli2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/use-tia-for-gas2024-12-05T17:47:46.000Zhttps://rollkit.dev/guides/zkml2024-12-05T17:47:46.000Zhttps://rollkit.dev/2024-12-05T17:47:46.000Zhttps://rollkit.dev/learn/about2024-12-05T17:47:46.000Zhttps://rollkit.dev/learn/building-and-deploying-a-rollup2024-12-05T17:47:46.000Zhttps://rollkit.dev/learn/intro2024-12-05T17:47:46.000Zhttps://rollkit.dev/learn/specifications2024-12-05T17:47:46.000Zhttps://rollkit.dev/learn/stack2024-12-05T17:47:46.000Zhttps://rollkit.dev/learn/transaction-flow2024-12-05T17:47:46.000Zhttps://rollkit.dev/testnets/cosmwasm-testnet2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/bitcoin2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/da/avail-da2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/da/celestia-da2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/da/local-da2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/da/overview2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/deploy-overview2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/docker-compose2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/execution/artela-evm-plus-plus2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/execution/beaconkit2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/execution/cosmwasm2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/execution/evm-contract-interaction2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/execution/octane-evm2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/execution/polaris-evm2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/gm-world2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/kurtosis2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/quick-start2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/sequencing/astria2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/sequencing/based2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/sequencing/centralized2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/sequencing/forced-inclusion2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/sequencing/local2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/sequencing/overview2024-12-05T17:47:46.000Zhttps://rollkit.dev/tutorials/wordle2024-12-05T17:47:46.000Z \ No newline at end of file diff --git a/pr-528/testnets/cosmwasm-testnet.html b/pr-528/testnets/cosmwasm-testnet.html new file mode 100644 index 000000000..3610929f0 --- /dev/null +++ b/pr-528/testnets/cosmwasm-testnet.html @@ -0,0 +1,145 @@ + + + + + + CosmWasm Testnet | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    CosmWasm Testnet

    Our CosmWasm testnet is deployed by following the cosmwasm tutorial. The rollkit/wasmd contains the code for the same.

    Details of ROSM testnet

    • Chain ID: rosm
    • Address Prefix: wasm
      • e.g., wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
    • Rollkit version: v0.13.1
    • RPC: https://rpc.rosm.rollkit.dev/
      • Example: https://rpc.rosm.rollkit.dev/block?height=1

        json
        {
        +    "jsonrpc": "2.0",
        +    "result": {
        +        "block_id": {
        +        "hash": "9D5C710CD64D031752A7DB86E09C8EA8CE4CAE4E30878C6D0487C57806060A47",
        +        "parts": {
        +            "total": 0,
        +            "hash": ""
        +        }
        +        },
        +        "block": {
        +        "header": {
        +            "version": {
        +            "block": "11"
        +            },
        +            "chain_id": "rosm",
        +            "height": "1",
        +            "time": "2024-04-09T15:48:50.464427035Z",
        +            "last_block_id": {
        +            "hash": "",
        +            "parts": {
        +                "total": 0,
        +                "hash": ""
        +            }
        +            },
        +            "last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "data_hash": "6E340B9CFFB37A989CA544E6BB780A2C78901D3FB33738768511A30617AFA01D",
        +            "validators_hash": "036DA1AB230A4CE8654358F77CB426BA2F8EF9B81EA06FACA32085B0B0D25C2A",
        +            "next_validators_hash": "036DA1AB230A4CE8654358F77CB426BA2F8EF9B81EA06FACA32085B0B0D25C2A",
        +            "consensus_hash": "0000000000000000000000000000000000000000000000000000000000000000",
        +            "app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        +            "proposer_address": "D7D4C5A2AC271061512789BEE3718305BEAA519B"
        +        },
        +        "data": {
        +            "txs": []
        +        },
        +        "evidence": {
        +            "evidence": null
        +        },
        +        "last_commit": {
        +            "height": "1",
        +            "round": 0,
        +            "block_id": {
        +            "hash": "9D5C710CD64D031752A7DB86E09C8EA8CE4CAE4E30878C6D0487C57806060A47",
        +            "parts": {
        +                "total": 0,
        +                "hash": ""
        +            }
        +            },
        +            "signatures": [
        +            {
        +                "block_id_flag": 2,
        +                "validator_address": "D7D4C5A2AC271061512789BEE3718305BEAA519B",
        +                "timestamp": "2024-04-09T15:48:50.464427035Z",
        +                "signature": "FWSRXEOvry/FC0KERmqyLP8voIVw8QFywgELDfLBAuFcMpm7TB7pTLb4OPwzjAoSt6Hbo/uIIny/pRhw8RoHDQ=="
        +            }
        +            ]
        +        }
        +        }
        +    },
        +    "id": -1
        +}
    • Tendermint API endpoint (uses default 1317 port): https://api.rosm.rollkit.dev
      • Example: https://api.rosm.rollkit.dev/cosmos/auth/v1beta1/accounts/wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
      json
      {
      +    "account": {
      +        "@type": "/cosmos.auth.v1beta1.BaseAccount",
      +        "address": "wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5",
      +        "pub_key": null,
      +        "account_number": "7",
      +        "sequence": "0"
      +    }
      +}
    • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm

    WARNING

    The modular.cloud explorer is work in progress. In the meanwhile, the wasm CLI can be used to query the accounts. For example: to collect the transactions for any account, following command can be used.

    wasmd query txs --query "message.sender='wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5'" --node https://rpc.rosm.rollkit.dev

    Add Rosm to Keplr

    Don't have the Keplr Browser extension? Add Keplr Wallet Here

    Click to add Rosm testnet to your Keplr wallet

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/bitcoin.html b/pr-528/tutorials/bitcoin.html new file mode 100644 index 000000000..29b288dbf --- /dev/null +++ b/pr-528/tutorials/bitcoin.html @@ -0,0 +1,194 @@ + + + + + + Bitcoin rollup tutorial | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Bitcoin rollup tutorial

    ☀️Introduction

    In this tutorial, we will explore how to use Rollkit to create sovereign rollups on Bitcoin. First, we will install Bitcoin Core to run a local testnet. Then, we will install and set up a Rollkit node to work with Bitcoin as a data availability layer. Lastly, we'll look at how to create a custom EVM execution environment and how to deploy a sovereign rollup on Bitcoin using Rollkit.

    By the end of this tutorial, you will have a good understanding of how Rollkit works and how to create sovereign rollups on Bitcoin using Rollkit. You will also have the knowledge and skills needed to customize Rollkit with different execution environments and data availability layers, opening up new possibilities for creating scalable and efficient blockchain applications.

    Read more in our blog post.

    rollkit-bitcoin

    📖 The stack

    Sovereign rollups on Bitcoin are made possible through a module that allows Rollkit rollups to use Bitcoin for data availability. This integration opens up possibilities for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and security guarantees.

    The Taproot upgrade and Ordinals usage of Bitcoin for publishing arbitrary data made it possible to integrate Bitcoin as a data availability layer into Rollkit. The modular design of Rollkit allows for easy integration of new data availability layers, making it possible to deploy sovereign rollups on Bitcoin.

    The goal of Rollkit is to make it easy to build and customize rollups, enabling developers to build sovereign rollups on Bitcoin or customize Rollkit with different execution environments and data availability layers.

    💻 Prerequisites

    An Ubuntu machine with:

    • 8GB RAM
    • 160 GB SSD
    • Ubuntu 22.10
    • 4 core AMD CPU

    🛠️ Dependency setup

    First, make sure to update and upgrade the OS:

    bash
    sudo apt update && sudo apt upgrade -y

    These are essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the nodes:

    bash
    sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu snapd npm -y

    Now, we will install the remaining dependencies.

    🏃 Golang

    We will use golang to build and run our test networks. Install it for AMD with these commands:

    bash
    ver="1.19.1"
    +cd $HOME
    +wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
    +sudo rm -rf /usr/local/go
    +sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
    +rm "go$ver.linux-amd64.tar.gz"
    +echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
    +source $HOME/.bash_profile
    +go version

    ⚒️ Foundry

    Install Foundry:

    bash
    curl -L https://foundry.paradigm.xyz/ | bash

    Set the path:

    bash
    source /root/.bashrc

    Run this to finish the installation of Foundry:

    bash
    foundryup

    🪙 Install Bitcoin

    Running the rollup requires a local regtest Bitcoin node. You can set this up by running the following commands.

    Install Bitcoin Core:

    bash
    sudo snap install bitcoin-core

    Check version:

    bash
    bitcoin-core.cli --version

    🟢 Running a local Bitcoin network

    Set up the config for regtest (local network):

    bash
    bitcoin-core.daemon "-chain=regtest" "-rpcport=18332" "-rpcuser=rpcuser" "-rpcpassword=rpcpass" "-fallbackfee=0.000001" "-txindex=1"

    👛 Create a wallet for the chain

    Open up a new terminal and run the following to create a wallet:

    bash
    bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass createwallet w1

    Your output will look like:

    console
    {
    +  "name": "w1",
    +  "warning": ""
    +}

    🎬 Start generating blocks

    Now, generate a new address and mine 101 blocks:

    bash
    export COINBASE=$(bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getnewaddress)
    +bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass generatetoaddress 101 $COINBASE

    Next, we'll mine a block every second.

    Add this script and remember where you placed it, I am putting it in my root directory:

    shell
    # Script to generate a new block every second
    +# Put this script at the root of your unpacked folder
    +#!/bin/bash
    +
    +echo "Generating a block every second. Press [CTRL+C] to stop.."
    +
    +address=`bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getnewaddress`
    +
    +while :
    +do
    +        echo "Generate a new block `date '+%d/%m/%Y %H:%M:%S'`"
    +        bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass generatetoaddress 1 $address
    +        sleep 1
    +done

    Run the following from where you placed your start.sh script. Start generating blocks by running:

    bash
    bash start.sh

    🧊 Block height

    Check the current block height:

    bash
    bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass getblockcount

    Your output will look similar to below:

    bash
    4980

    Set a variable for the common flags being used:

    bash
    export FLAGS="-regtest -rpcport=18332 -rpcuser=rpcuser -rpcpassword=rpcpass"

    🧊 Block hash

    Check the latest block hash:

    bash
    bitcoin-core.cli $FLAGS getblockhash 4980

    Your output will be the block hash of the height you first queried:

    bash
    1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5

    Set the block hash as a variable:

    bash
    export HASH=1d7e98aec3085b615c7c71659768fa42e774a87ab5981597e99794d240fb3db5

    🧊 Block header

    Now to get the block header, run the following command (be sure to replace the hash with yours):

    bash
    bitcoin-core.cli $FLAGS getblockheader $HASH

    Now to finish the exercise, query the height from the block header and the hash:

    bash
    bitcoin-core.cli $FLAGS getblockheader $HASH | jq '.height'

    🎬 Restarting the local network

    In the case that you are starting your regtest network again, you can use the following command to clear the old chain history:

    bash
    rm -rf ${LOCATION OF .bitcoin folder}

    🏃‍♀️ Running the Ethermint rollup

    DANGER

    The Ethermint tutorial is currently not supported.

    Clone Ethermint:

    bash
    git clone https://github.com/celestiaorg/ethermint.git
    +cd ethermint
    +git checkout bitcoin-da
    +make install

    Initialize the chain:

    bash
    bash init.sh

    Set variables for starting the chain:

    bash
    export NAMESPACE=$(openssl rand -hex 8)

    Start the chain:

    bash
    ethermintd start --rollkit.aggregator --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height 1

    Congratulations! Now that you have your Ethermint and Bitcoin rollup running, you're ready to deploy some smart contracts to the EVM!

    ⚡️ Initialize development environment

    First, be sure you have installed Foundry on your local development environment.

    Next, create a new project and change into the directory:

    bash
    forge init bitcoin-ethermint-app
    +cd bitcoin-ethermint-app

    Foundry has created an example smart contract located at src/Counter.sol.

    TIP

    We will run the commands for the Foundry portion of this tutorial in the ~/bitcoin-ethermint-app/ directory.

    📒 Updating the contract and tests

    Let's update the contracts to include a basic counter example. Open the Counter.sol file in the src directory and add the following code:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +contract Counter {
    +    int private count;
    +    
    +    constructor(int _count) {
    +        count = _count;
    +    }
    +
    +    function incrementCounter() public {
    +        count += 1;
    +    }
    +    function decrementCounter() public {
    +        count -= 1;
    +    }
    +
    +    function getCount() public view returns (int) {
    +        return count;
    +    }
    +}

    Next, let's create a test for this contract.

    Open test/Counter.T.Sol and update the code with the following:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Test.sol";
    +import 'src/Counter.sol';
    +
    +contract CounterTest is Test {
    +    Counter counter;
    +    function setUp() public {
    +        counter = new Counter(10);
    +    }
    +
    +    function testGetCount() public {
    +        int value = counter.getCount();
    +        assertEq(value, 10);
    +        emit log_int(value);
    +    }
    +
    +    function testIncrement() public {
    +        counter.incrementCounter();
    +        counter.incrementCounter();
    +        int value = counter.getCount();
    +        assertEq(value, 12);
    +        emit log_int(value);
    +    }
    +
    +    function testDecrement() public {
    +        counter.decrementCounter();
    +        int value = counter.getCount();
    +        assertEq(value, 9);
    +        emit log_int(value);
    +    }
    +}

    Foundry uses Dappsys Test to provide basic logging and assertion functionality. It's included in the Forge Standard Library.

    Here, we are using assertEq to assert equality. You can view all of the assertion functions available here.

    Next, we can test the contract using Forge with the following command:

    bash
    forge test -vv

    A successful test will have output similar to the following:

    bash
    [⠊] Compiling...
    +[⠰] Installing solc version 0.8.17
    +[⠒] Successfully installed solc 0.8.17
    +[⠆] Compiling 18 files with 0.8.17
    +[⠑] Solc 0.8.17 finished in 3.59s
    +Compiler run successful
    +
    +Running 3 tests for test/Counter.t.sol:ContractTest
    +[PASS] testDecrement() (gas: 12350)
    +Logs:
    +  9
    +
    +[PASS] testGetCount() (gas: 8510)
    +Logs:
    +  10
    +
    +[PASS] testIncrement() (gas: 13285)
    +Logs:
    +  12
    +
    +Test result: ok. 3 passed; 0 failed; finished in 2.24ms

    📜 Updating the deployment script

    Now that we've tested the contract, let's try deploying it locally using Solidity Scripting.

    To do so, update the deloyment script at script/Counter.s.sol with the following code:

    solidity
    // SPDX-License-Identifier: MIT
    +pragma solidity ^0.8.13;
    +
    +import "forge-std/Script.sol";
    +
    +import {Counter} from "src/Counter.sol";
    +
    +contract CounterScript is Script {
    +    function setUp() public {}
    +
    +    function run() public {
    +        vm.startBroadcast();
    +        new Counter(10);
    +        vm.stopBroadcast();
    +    }
    +}

    Now we can use this script to deploy our smart contract to either a live or test network.

    🏠 Deploying locally

    Next start Anvil, the local testnet:

    bash
    anvil --port 9545

    Once started, Anvil will give you a local RPC endpoint as well as a handful of Private Keys and Accounts that you can use.

    Set ANVIL_KEY with one of the private keys generated by running:

    bash
    export ANVIL_KEY=<anvil-private-key>

    And set the RPC URL as an environment variable:

    bash
    export RPC_URL=http://127.0.0.1:9545

    We can now use the local RPC along with one of the private keys to deploy locally:

    bash
    forge script script/Counter.s.sol:CounterScript --fork-url \
    +$RPC_URL  --private-key $ANVIL_KEY --broadcast

    Once the contract has been deployed locally, Anvil will log out the contract address.

    Next, set the contract address as an environment variable:

    bash
    export CONTRACT_ADDRESS=<contract-address>

    We can then test sending transactions to it with cast send.

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \
    +--private-key $ANVIL_KEY --rpc-url $RPC_URL

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url $RPC_URL

    🧪 Deploying to the Ethermint sovereign rollup

    Now that we've deployed and tested locally, we can deploy to our Ethermint chain.

    First, we will need to export the private key generated by the ethermint init.sh script:

    bash
    PRIVATE_KEY=$(ethermintd keys unsafe-export-eth-key mykey --keyring-backend test)

    NOTE: Here, the key name from init.sh is mykey but you can modify the init.sh to change the name of your key.

    Now, we can start deploying the smart contract to our Ethermint chain.

    To do so, run the following script:

    bash
    forge script script/Counter.s.sol:CounterScript \
    +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast

    Set the contract address in the output as the CONTRACT_ADDRESS variable:

    bash
    export CONTRACT_ADDRESS=<new-contract-address>

    Once the contract has been deployed to the Ethermint rollup, we can use cast send to test sending transactions to it:

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \
    +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url http://127.0.0.1:8545

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/da/avail-da.html b/pr-528/tutorials/da/avail-da.html new file mode 100644 index 000000000..a425c1393 --- /dev/null +++ b/pr-528/tutorials/da/avail-da.html @@ -0,0 +1,81 @@ + + + + + + Using Avail as DA | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Using Avail as DA

    🌞 Introduction

    Disclaimer

    This tutorial is currently broken. Follow the work to fix this tutorial in rollkit/avail-da issue 57

    Avail DA offers scalable data availability that underpins the Avail ecosystem and ensures instantaneous and reliable data integrity, enabling rollups to grow, through the use of cutting-edge zero knowledge and KZG Polynomial commitments.

    This tutorial serves as a comprehensive guide for deploying your GM world rollup on Avail's data availability (DA) network.

    Before proceeding, ensure that you have completed the GM World rollup setup.

    Note : If you want to go through gm world setup docs for more information, you can refer GM world rollup tutorial, which covers setting up a local sovereign gm-world rollup and connecting it to a local (mock) DA node.

    🪶 Running an Avail light node

    Before you can start your rollup node, you need to initiate, sync, and possibly fund a light node on Turing Testnet which is the test network of Avail

    🚀 Using Turing Testnet

    • To fund your wallet address for using Turing Testnet: get AVAIL tokens from the faucet
    • Paste your mnemonic in the identity.toml file by creating a identity.toml with the following command: touch identity.toml Example:
    bash
    avail_secret_uri = '<paste your mnemonic here>'

    Running just an Avail light node is enough for Turing testnet. Run the Avail light node using the following command

    bash
    cargo run --release -- --network turing --app-id 1 --clean --identity identity.toml

    If you want to sync Avail light node with your desired block number, you can add the following config in your config.yaml file from here

    bash
    http_server_host = '127.0.0.1'
    +http_server_port = 8000
    +port = 38000
    +sync_start_block = 322264

    After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates.

    🧹 Cleaning previous chain history

    From the GM world rollup tutorial, you should already have the gmd binary and the $HOME/.gm directory.

    To clear old rollup data:

    bash
    rm -r $(which gmd) && rm -rf $HOME/.gm

    🏗️ Building your rollup

    Now we need to rebuild our rollup by simply running the existing init.sh script:

    bash
    cd $HOME/gm && bash init.sh

    This process creates a new $HOME/.gm directory and a new gmd binary. Next, we need to connect our rollup to the running Avail light node.

    🛠️ Configuring flags for DA

    Now we're prepared to initiate our rollup and establish a connection with the Avail light node. The gmd start command requires two DA configuration flags:

    • --rollkit.da_start_height
    • --rollkit.da_address

    TIP

    Optionally, you could also set the --rollkit.da_block_time flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.

    Let's determine what to provide for each of them.

    First, let's query the DA Layer start height using an RPC endpoint provided by Avail Labs. For local, it would be - https://localhost:8000/v1/latest_block, and for Turing Testnet - https://avail-turing-rpc.publicnode.com

    Here is an example for the local development (replace URL for Turing Testnet if needed):

    bash
    DA_BLOCK_HEIGHT=$(curl https://localhost:8000/v1/latest_block | jq -r '.result.block.header.height')
    +echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n"

    You will see the output like this:

    bash
     Your DA_BLOCK_HEIGHT is 35

    🔥 Running your rollup connected to an avail light node

    Now let's run our rollup node with all DA flags:

    bash
        gmd start \
    +    --rollkit.aggregator \
    +    --rollkit.da_address="grpc://localhost:3000" \   
    +    --rollkit.da_start_height $DA_BLOCK_HEIGHT \
    +    --minimum-gas-prices="0.1stake"

    Now, the rollup is running and posting blocks (aggregated in batches) to Avail. You can view your rollup by finding your account on Turing testnet

    INFO

    For details on configuring gas prices specifically for the DA network, see our DA Network Gas Price Guide. This is separate from the --minimum-gas-prices="0.025stake" setting, which is used for rollup network operations.

    🎉 Next steps

    Congratulations! You've built a local rollup that posts to Avail's testnets as well as locally. Well done! Now, go forth and build something great! Good luck!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/da/celestia-da.html b/pr-528/tutorials/da/celestia-da.html new file mode 100644 index 000000000..63309e535 --- /dev/null +++ b/pr-528/tutorials/da/celestia-da.html @@ -0,0 +1,86 @@ + + + + + + Using Celestia as DA | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Using Celestia as DA

    🌞 Introduction

    This tutorial serves as a comprehensive guide for deploying your rollup on Celestia's data availability (DA) network. From the Rollkit perspective, there's no difference in posting blocks to Celestia's testnets or Mainnet Beta.

    Before proceeding, ensure that you have completed the quick start tutorial, which covers installing the rollkit CLI and running a rollup against a local DA network.

    🪶 Running a Celestia light node

    Before you can start your rollup node, you need to initiate, sync, and fund a light node on one of Celestia's networks on a compatible version:

    sh
    Rollkit Version: v0.14.1
    +Celestia Node Version: v0.20.2-arabica
    sh
    Rollkit Version: v0.14.1
    +Celestia Node Version: v0.20.2-mocha
    sh
    Rollkit Version: v0.13.7
    +Celestia Node Version: v0.17.2

    The main difference lies in how you fund your wallet address: using testnet TIA or TIA for Mainnet Beta.

    After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates to Celestia.

    🏗️ Prerequisites

    🛠️ Configuring flags for DA

    Now that we are posting to the Celestia DA instead of the local DA, the rollkit start command requires three DA configuration flags:

    • --rollkit.da_start_height
    • --rollkit.da_auth_token
    • --rollkit.da_namespace

    TIP

    Optionally, you could also set the --rollkit.da_block_time flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.

    Let's determine which values to provide for each of them.

    First, let's query the DA layer start height using our light node.

    bash
    DA_BLOCK_HEIGHT=$(celestia header network-head | jq -r '.result.header.height')
    +echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n"

    The output of the command above will look similar to this:

    bash
     Your DA_BLOCK_HEIGHT is 2127672

    Now, let's obtain the authentication token of your light node using the following command:

    bash
    AUTH_TOKEN=$(celestia light auth write --p2p.network arabica)
    +echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n"
    bash
    AUTH_TOKEN=$(celestia light auth write --p2p.network mocha)
    +echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n"
    bash
    AUTH_TOKEN=$(celestia light auth write)
    +echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n"

    The output of the command above will look similar to this:

    bash
     Your DA AUTH_TOKEN is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiXX0.cSrJjpfUdTNFtzGho69V0D_8kyECn9Mzv8ghJSpKRDE

    Next, let's set up the namespace to be used for posting data on Celestia:

    bash
    DA_NAMESPACE=00000000000000000000000000000000000000000008e5f679bf7116cb

    TIP

    00000000000000000000000000000000000000000008e5f679bf7116cb is a default namespace for Mocha testnet. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 20 characters (10 bytes) in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 bytes.

    Learn more about namespaces.

    Lastly, set your DA address for your light node, which by default runs at port 26658:

    bash
    DA_ADDRESS=http://localhost:26658

    🔥 Running your rollup connected to Celestia light node

    Finally, let's initiate the rollup node with all the flags:

    bash
    rollkit start \
    +    --rollkit.aggregator \
    +    --rollkit.da_auth_token $AUTH_TOKEN \
    +    --rollkit.da_namespace $DA_NAMESPACE \
    +    --rollkit.da_start_height $DA_BLOCK_HEIGHT \
    +    --rollkit.da_address $DA_ADDRESS

    Now, the rollup is running and posting blocks (aggregated in batches) to Celestia. You can view your rollup by using your namespace or account on one of Celestia's block explorers.

    For example, here on Celenium for Arabica.

    Other explorers:

    🎉 Next steps

    Congratulations! You've built a local rollup that posts data to Celestia's DA layer. Well done! Now, go forth and build something great! Good luck!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/da/local-da.html b/pr-528/tutorials/da/local-da.html new file mode 100644 index 000000000..ae2895a85 --- /dev/null +++ b/pr-528/tutorials/da/local-da.html @@ -0,0 +1,77 @@ + + + + + + Using Local DA | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Using Local DA

    Introduction

    This tutorial serves as a comprehensive guide for using the local-da with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    Setting Up a Local DA Network

    To set up a local DA network node on your machine, run the following script to install and start the local DA node:

    bash
    curl -sSL https://rollkit.dev/install-local-da.sh | bash -s v0.3.1

    This script will build and run the node, which will then listen on port 7980.

    Configuring your rollup to connect to the local DA network

    To connect your rollup to the local DA network, you need to pass the --rollkit.da_address flag with the local DA node address.

    Run your rollup

    Start your rollup node with the following command, ensuring to include the DA address flag:

    sh
    rollkit start --rollkit.da_address http://localhost:7980
    sh
    rollkit start \
    +    --rollkit.aggregator \
    +    --rollkit.da_address http://localhost:7980 \
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log message indicating that your rollup is connected to the local DA network:

    shell
    I[2024-11-15|14:54:19.842] DA server is already running                 module=main address=http://localhost:7980

    Summary

    By following these steps, you will set up a local DA network node and configure your rollup to post data to it. This setup is useful for testing and development in a controlled environment.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/da/overview.html b/pr-528/tutorials/da/overview.html new file mode 100644 index 000000000..5983a755d --- /dev/null +++ b/pr-528/tutorials/da/overview.html @@ -0,0 +1,80 @@ + + + + + + DA | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    DA

    Now that you have the foundations of running and building a rollup with Rollkit, it is time to start customizing it to fit your needs.

    The first choice you need to make is which data availability (DA) layer to use. The DA layer is a critical component of a blockchain, as it provides the data availability and finality guarantees that your chain needs to operate securely.

    Rollkit uses the go-da interface to communicate to DA layers. Any DA layer that implements this interface can be used with Rollkit.

    Go DA

    The go-da interface defines the core functions required to interact with a DA layer. Probably the two most important functions being Get and Submit.

    go
    // DA defines very generic interface for interaction with Data Availability layers.
    +type DA interface {
    +	// Get returns Blob for each given ID, or an error.
    +	Get(ctx context.Context, ids []ID, namespace Namespace) ([]Blob, error)
    +
    +	// Submit submits the Blobs to Data Availability layer.
    +	Submit(ctx context.Context, blobs []Blob, gasPrice float64, namespace Namespace) ([]ID, error)
    +}

    DA layers can integrate the go-da interface directly into their node like Celestia, or they can define a middleware service like Avail.

    Mock DA

    You might have noticed that we did not define any DA layer during the quick start or build a chain tutorials. This is because we used a mock DA layer that is built into Rollkit.

    If you revisit the logs from those tutorials, you will see one of the first lines being:

    shell
    I[2024-11-15|14:09:41.735] Starting mock DA server                      module=main address=http://localhost:26658

    The mock DA layer is a simple in-memory DA layer that is great for testing and development. It is not suitable for production use, as it does not provide the data availability and finality guarantees that a real DA layer would.

    DA Layers

    Now that you have a better understanding of what a DA layer is, you can start to explore the different DA layers that are available to use with Rollkit.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/deploy-overview.html b/pr-528/tutorials/deploy-overview.html new file mode 100644 index 000000000..360e9b539 --- /dev/null +++ b/pr-528/tutorials/deploy-overview.html @@ -0,0 +1,73 @@ + + + + + + Deploying Your Rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Deploying Your Rollup

    One of the benefits of building rollups with Rollkit is the flexibility you have as a developer to choose things like the DA layer, the settlement scheme, and the execution environment.

    The challenge that comes with this flexibility is that there are more services that now need to be deployed and managed while running your rollup.

    In the tutorials so far, you've seen various helper scripts used to make things easier. While great for tutorials, there are better ways to deploy and manage rollups than using various bash scripts.

    In this section, you'll see a few examples of how you can deploy your rollup environment with all your services running in a more production-ready way.

    Disclaimer

    These examples are for educational purposes only. Before deploying your rollup for production use you should fully understand the services you are deploying and your choice in deployment method.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/docker-compose.html b/pr-528/tutorials/docker-compose.html new file mode 100644 index 000000000..91776b8cf --- /dev/null +++ b/pr-528/tutorials/docker-compose.html @@ -0,0 +1,195 @@ + + + + + + 🐳 Docker Compose | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    🐳 Docker Compose

    This tutorial is going to show you how to deploy the wordle chain using Docker Compose.

    You can learn more about Docker Compose here.

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    💻 Pre-requisites

    Make sure you have your wordle chain ready by completing the Build your chain tutorial.

    🛠️ Dependencies

    💻 Docker Compose

    You can install docker compose here.

    Once installed, you can verify the installation by running:

    bash
    docker compose version
    bash
    Docker Compose version v2.23.0-desktop.1

    🛠️ Setting up your environment

    In addition to our chain, we need to run a DA and Sequencer node.

    We will use the local-da and local-sequencer for this tutorial and run it with our chain.

    To save time, we can use their respective Dockerfiles:

    This will allow us to focus on how we can run the wordle chain with Docker Compose.

    🐳 Dockerfile

    First, we need to create a Dockerfile for our wordle chain. Create a new file called Dockerfile in the root of the wordle directory and add the following code:

    dockerfile
    # Stage 1: Install ignite CLI and rollkit
    +FROM golang as base
    +
    +# Install dependencies
    +RUN apt update && \
    +	apt-get install -y \
    +	build-essential \
    +	ca-certificates \
    +	curl
    +
    +# Install rollkit
    +RUN curl -sSL https://rollkit.dev/install.sh | sh -s v0.14.1
    +
    +# Install ignite
    +RUN curl https://get.ignite.com/cli@v28.5.3! | bash
    +
    +# Set the working directory
    +WORKDIR /app
    +
    +# cache dependencies.
    +COPY ./go.mod . 
    +COPY ./go.sum . 
    +RUN go mod download
    +
    +# Copy all files from the current directory to the container
    +COPY . .
    +
    +# Remove the rollkit.toml and entrypoint files if they exist. This is to avoid cross OS issues.
    +RUN rm entrypoint rollkit.toml
    +
    +# Build the chain
    +RUN ignite chain build && ignite rollkit init
    +
    +# Initialize the rollkit.toml file
    +RUN rollkit toml init
    +
    +# Run rollkit command to initialize the entrypoint executable
    +RUN rollkit
    +
    +# Stage 2: Set up the runtime environment
    +FROM debian:bookworm-slim
    +
    +# Install jq
    +RUN apt update && \
    +	apt-get install -y \
    +	jq
    +
    +# Set the working directory
    +WORKDIR /root
    +
    +# Copy over the rollkit binary from the build stage
    +COPY --from=base /go/bin/rollkit /usr/bin
    +
    +# Copy the entrypoint and rollkit.toml files from the build stage
    +COPY --from=base /app/entrypoint ./entrypoint
    +COPY --from=base /app/rollkit.toml ./rollkit.toml
    +
    +# Copy the $HOME/.wordle directory from the build stage.
    +# This directory contains all your chain config.
    +COPY --from=base /root/.wordle /root/.wordle
    +
    +# Ensure the entrypoint script is executable
    +RUN chmod +x ./entrypoint
    +
    +# Keep the container running after it has been started
    +# CMD tail -f /dev/null
    +
    +ENTRYPOINT [ "rollkit" ]
    +CMD [ "start", "--rollkit.aggregator", "--rollkit.sequencer_rollup_id", "wordle"]

    This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain.

    Build the docker image by running the following command:

    bash
    docker build -t wordle .

    You can then see the built image by running:

    bash
    docker images

    You should see the following output:

    bash
    REPOSITORY  TAG     IMAGE ID       CREATED         SIZE
    +wordle      latest  5d3533c1ea1c   8 seconds ago   443MB

    🐳 Docker Compose file

    Next we need to create our compose.yaml file for docker compose to use.

    In the root of the wordle directory, create a new file called compose.yaml and add the following code:

    yml
    services:
    +  # Define the wordle chain service
    +  wordle:
    +    # Set the name of the docker container for ease of use
    +    container_name: wordle
    +    # Use the image we just built
    +    image: wordle
    +    # Used for networking between the two services
    +    network_mode: host
    +    # The command config is used for launching the chain once the Docker container is running
    +    command:
    +      [
    +        "start",
    +        "--rollkit.aggregator",
    +        "--rollkit.da_address",
    +        "http://0.0.0.0:7980",
    +        "--rollkit.sequencer_address",
    +        "0.0.0.0:50051",
    +        "--rollkit.sequencer_rollup_id",
    +        "wordle",
    +      ]
    +    # Ensures the local-da service is up and running before starting the chain
    +    depends_on:
    +      - local-da
    +      - local-sequencer
    +
    +  # Define the local DA service
    +  local-da:
    +    # Use the published image from rollkit
    +    image:
    +      ghcr.io/rollkit/local-da:v0.3.1
    +      # Set the name of the docker container for ease of use
    +    container_name: local-da
    +    # Publish the ports to connect
    +    ports:
    +      - "7980:7980"
    +
    +  # Define the local sequencer service
    +  local-sequencer:
    +    # Use the published image from rollkit
    +    image:
    +      ghcr.io/rollkit/go-sequencing:v0.4.1
    +      # Set the name of the docker container for ease of use
    +    container_name: local-sequencer
    +    # Start the sequencer with the listen all flag and the rollup id set to wordle
    +    command: ["-listen-all", "-rollup-id=wordle"]
    +    # Publish the ports to connect
    +    ports:
    +      - "50051:50051"

    We now have all we need to run the wordle chain and connect to a local DA node.

    🚀 Run Wordle chain

    Run your wordle chain by running the following command:

    bash
    docker compose up

    You'll see logs of your chain being output.

    Congratulations! You have successfully run the wordle chain with Docker Compose.

    🚀 Interacting with the chain

    Since we are using docker images, we can interact with the chain by entering the docker container.

    You can see the docker containers running with the wordle chain and the local DA node by running the following command:

    bash
    docker ps

    You should see output like the following:

    bash
    CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS         PORTS                      NAMES
    +86f9bfa5b6d2   wordle            "rollkit start --rol…"   7 minutes ago    Up 3 seconds                              wordle
    +67a2c3058e01   local-sequencer   "local-sequencer -li…"   11 minutes ago   Up 3 seconds   0.0.0.0:50051->50051/tcp   local-sequencer
    +dae3359665f8   local-da          "local-da -listen-all"   2 hours ago      Up 3 seconds   0.0.0.0:7980->7980/tcp     local-da

    We can see the wordle chain running in container wordle and the local DA network running in container local-da.

    Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it wordle sh

    Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the Wordle tutorial.

    Once you are done interacting with your chain, you can exit out of your docker container with:

    bash
    exit

    Then you can shut down your chain environment by running CRTL+C in your terminal.

    🎉 Next steps

    Congratulations again! You now know how to run your chain with docker compose and interact with it using the Rollkit CLI in the docker container.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/execution/artela-evm-plus-plus.html b/pr-528/tutorials/execution/artela-evm-plus-plus.html new file mode 100644 index 000000000..67b500dc0 --- /dev/null +++ b/pr-528/tutorials/execution/artela-evm-plus-plus.html @@ -0,0 +1,83 @@ + + + + + + Quick Start Guide for Artela EVM++ with Rollkit | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Quick Start Guide for Artela EVM++ with Rollkit

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    WARNING

    Rollkit is currently undergoing an execution overhaul with the creation of the go-execution interface. In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub issue ticket or reach out in our Telegram group.

    This guide will assist you to quickly set up a rollup node with Artela EVM++ execution layer using Rollkit and local-DA.

    artela-evm-rollkit

    EVM++ is a modular dual-VM execution layer that supports the dynamic creation of native extension modules for blockchain at runtime. It enables developers to leverage WasmVM to build native extensions that co-process with EVM, offering enhanced customization capabilities. More than just a dual-VM setup, these native extensions facilitate blockchain-level customization. They allow for the integration of custom logic throughout the transaction lifecycle, providing access to an expanded runtime context.

    📦 Clone the Artela Rollkit Repository

    Start by cloning the Artela Rollkit repository:

    bash
    git clone https://github.com/artela-network/artela-rollkit.git
    +cd artela-rollkit

    🛥️ Run with Docker Compose

    Ensure Docker is installed on your system before setting up the Artela rollup node. If not already installed, download and follow the setup instructions available here.

    TIP

    Make sure you meet these prerequisites of enabling host network mode in Docker.

    After installing Docker, run the following command to start a local development node:

    bash
    docker compose up -d

    This command launches the Artela rollup node with Rollkit and local-DA. To monitor the logs, use this command:

    bash
    docker logs artroll -f

    If you observe the following output, the local development node is running properly:

    bash
    ...
    +7:09AM INF finalized block block_app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager num_txs_res=0 num_val_updates=0
    +7:09AM INF executed block app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager
    +7:09AM INF indexed block events height=3 module=txindex
    +7:09AM INF Creating and publishing block height=4 module=BlockManager
    +...

    🔑 Get prefunded test accounts

    Access testing accounts by entering the artroll Docker container:

    bash
    docker exec -ti artroll /bin/bash

    Retrieve the address and private key of testing accounts using:

    bash
    # 👇 Alternatively, you can use myKey2.info, myKey3.info, myKey4.info
    +./entrypoint keyinfo --file ~/.artroll/keyring-test/mykey.info --passwd test

    This will display the testing private key and its address:

    bash
    private key: { Plain Private Key in Hex Format }
    +address: { Address Associated with the Private Key }

    There are four testing accounts available in the local development node for interacting with the EVM chain.

    ⚙️ Configuring the Node

    You can modify runtime parameters of the Artela development node by adjusting its configuration files. Follow the steps below to make these changes.

    To configure the development node, first access the Docker container by running the following command:

    bash
    docker exec -it artroll /bin/bash

    Inside the container, you will need to modify the following configuration files:

    • /root/.artroll/config/app.toml
    • /root/.artroll/config/config.toml

    After making the necessary changes, return to the Docker host and restart the container to apply the new configuration:

    bash
    docker compose restart artroll

    🧪 Build on EVM++

    Let’s dive into Artela EVM++ by kicking off with the Hello World project, the following code will guide you through the essentials:

    👉 Contract interaction tutorial: Get hands-on experience with deploying and interacting with smart contracts on the Artela rollup node.

    TIP

    When you are following the Contract interaction tutorial, you need to make the following replacements:

    1. Use https://github.com/artela-network/gm-portal.git instead of the original gm-portal repo.
    2. Use the private key you obtained from the previous step in this tutorial instead of the one used in the Contract interaction tutorial.
    3. The contract address should be 0x9fcEbD70654D360b41ccD123dADAAad6ce13C788 instead of the one starts with 0x18D....

    👉 Quick Start for Aspect on EVM++: Try your first Aspect with Artela rollup node.

    TIP

    Please note that when you are following the Aspect on EVM++ tutorial, you need to make the following replacements:

    1. Replace npm install -g @artela/aspect-tool with npm install -g @artela-next/aspect-tool
    2. Replace the Artela Testnet node URL in project.config.json with http://localhost:8545 to connect to your local rollup node.
    3. Use the private key you obtained from the previous step in this tutorial instead of creating a new account.

    By now, we assume that you:

    • Have a basic understanding of Artela technology.
    • Have installed and played with Artela development tools.
    • Understand how Aspect functions and its impact on making dApps distinct and superior.
    • May already have numerous innovative ideas for building on Artela.

    📖 More to know

    If you want to gain a deeper understanding of Aspect’s capabilities and limitations to fully grasp how it can enhance or constrain your project, make sure not to overlook these essential concepts:

    💥 Build with examples

    Our community has built numbers of projects with Aspect, you can refer to these projects and modify them to learn how to use Aspect more effectively.

    Simple examples that use the basic functionalities of Aspect:

    Real-world use cases that show how to build more complex projects with Aspect:

    🛑 Stopping the Node

    To cease operations and shutdown the Artela rollup node, use:

    bash
    docker compose down

    This command halts all running containers and clears the environment.

    🎉 Conclusion

    Congratulations! You have successfully learnt some basic knowledge of EVM++ and have set up an Artela EVM++ rollup using Rollkit and local-DA. This setup enables you to test the integrated capabilities of Artela’s EVM++ with Rollkit.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/execution/beaconkit.html b/pr-528/tutorials/execution/beaconkit.html new file mode 100644 index 000000000..053fd5ad4 --- /dev/null +++ b/pr-528/tutorials/execution/beaconkit.html @@ -0,0 +1,114 @@ + + + + + + Building a Sovereign Rollup with BeaconKit and Rollkit | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Building a Sovereign Rollup with BeaconKit and Rollkit

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    WARNING

    Rollkit is currently undergoing an execution overhaul with the creation of the go-execution interface. In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub issue ticket or reach out in our Telegram group.

    beaconkit

    Introduction

    This tutorial guides developers through the process of building and running a sovereign rollup using BeaconKit and Rollkit. BeaconKit is a modular framework for building EVM-based consensus clients, while Rollkit is a modular framework for building sovereign rollups. By combining these tools, you can create your own customizable rollup chain using the Ethereum Virtual Machine (EVM).

    Prerequisites

    Before you begin, ensure you have the following software installed on your machine:

    Rollkit

    Rollkit is a modular framework for sovereign rollups. Follow our Quick Start Guide to walk through the installation process. The installation script will install the Rollkit CLI, Golang, and jq if they are not already present on your machine.

    Docker

    Docker is essential for running containerized applications. Follow the provided link to install Docker on your system.

    Run a local Data Availability (DA) node

    First, set up a local data availability network node:

    bash
    cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s v0.3.1

    This script builds and runs a DA node, which will listen on port 7980.

    Clone the BeaconKit repository

    Clone the BeaconKit repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +git clone -b rollkit https://github.com/rollkit/beacon-kit.git
    +cd beacon-kit && git checkout rollkit

    Start the Go Ethereum (Geth) client

    Start local ephemeral Go Ethereum client to provide the execution layer:

    bash
    cd $HOME/beacon-kit
    +make start-geth

    Notice within logs indicating that your Geth client is running the RPC server is listening on port 8545. You will need that port to deploy and interact with smart contracts on the BeaconKit EVM.

    Build and run the BeaconKit node

    Open a new terminal and run:

    bash
    cd $HOME/beacon-kit
    +make start

    This command builds, configures, and starts an ephemeral beacond node as a Rollkit sequencer.

    You should now see output indicating that your Rollkit node is running, with log messages about creating and publishing blocks, computing state roots, and other node activities:

    bash
    ...
    +11:45AM INF indexed block events height=39 module=txindex
    +11:45AM INF Creating and publishing block height=40 module=BlockManager
    +11:45AM INF requesting beacon block assembly 🙈 module=server service=validator slot=40
    +11:45AM INF payload retrieved from local builder 🏗️  for_slot=40 module=server num_blobs=0 override_builder=false parent_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 service=payload-builder
    +11:45AM INF computing state root for block 🌲 module=server service=validator slot=40
    +11:45AM INF state root computed for block 💻  module=server service=validator slot=40 state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF beacon block successfully built 🛠️  duration=46.93036ms module=server service=validator slot=40 state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF received proposal with beacon_block=true blob_sidecars=true module=baseapp service=prepare-proposal
    +11:45AM INF no blob sidecars to verify, skipping verifier 🧢 module=server service=blockchain slot=0x28
    +11:45AM INF received proposal with beacon_block=true blob_sidecars=true module=baseapp service=prepare-proposal
    +11:45AM INF no blob sidecars to verify, skipping verifier 🧢 module=server service=blockchain slot=0x28
    +11:45AM INF received incoming beacon block 📫 module=server service=blockchain state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF calling new payload is_optimistic=false module=server payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 payload_parent_block_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF state root verification succeeded - accepting incoming beacon block 🏎️ module=server service=blockchain state_root=0x5f75afde5c6a596fa11c17e8c60ca291ffb31ae5c9a40392e0ceb4d45ab42037
    +11:45AM INF optimistically triggering payload build for next slot 🛩️  module=server next_slot=41 service=blockchain
    +11:45AM INF notifying forkchoice update  finalized_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 has_attributes=true head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server safe_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM WRN suggested fee recipient is not configured 🔆 fee-recipent="0x000000...000000 (20B)" module=server service=engine.client
    +11:45AM INF calling new payload is_optimistic=true module=server payload_block_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 payload_parent_block_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF bob the builder; can we forkchoice update it?; bob the builder; yes we can 🚧 for_slot=41 head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server parent_block_root=0x9676648a3c292540562b082c20c4b6663986182f5d8733f84fb3f1445b66a4ce payload_id=0x03bc2b46dc4bef55 service=payload-builder
    +11:45AM INF finalized block block_app_hash=004216246AE7750D578035EA1C6CD13330BD91A0C3FDD628F96D514ACF691BE5 height=40 module=BlockManager num_txs_res=2 num_val_updates=0
    +11:45AM INF executed block app_hash=004216246AE7750D578035EA1C6CD13330BD91A0C3FDD628F96D514ACF691BE5 height=40 module=BlockManager
    +11:45AM INF notifying forkchoice update  finalized_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 has_attributes=false head_eth1_hash=0x2ff9329ffecc7f395cb72acb9fd81a6085e5d75101ab14b508f6418fbcd7d0b4 module=server safe_eth1_hash=0x88081d5e4c48de2f82464f2c8b4b46df8892fe921e5e9b13113ed2a62081d843 service=execution-engine
    +11:45AM INF indexed block events height=40 module=txindex
    +11:45AM INF successfully refreshed engine auth token module=server service=engine.client
    +11:45AM INF Creating and publishing block height=41 module=BlockManager
    +...

    Smart Contract Deployment and Interaction

    To deploy and interact with smart contracts on the BeaconKit EVM, you can use the tools you are already familiar with, follow our Contract interaction tutorial to get a hands on experience.

    To fund your account with some tokens, modify a Geth genesis file and restart the Geth client: Open $HOME/beacon-kit/testing/files/eth-genesis.json, and add your account address and balance:

    bash
    "nonce": "0x0000000000000000",
    +"timestamp": "0x0",
    +"alloc": {
    +  "<your address>": { // [!code focus]
    +    "balance": "0x12345000000000000000000" // [!code focus]
    +  }, // [!code focus]
    +  "0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4": {
    +    "balance": "0x123450000000000000000"
    +  },

    Conclusion

    Congratulations! You've successfully set up a BeaconKit node using Rollkit, creating your own sovereign rollup. This setup demonstrates the basic functionality of combining BeaconKit with Rollkit.

    Next Steps

    To further customize your rollup chain:

    1. Experiment with different Rollkit settings to optimize performance.
    2. Consider implementing custom smart contracts on your rollup.
    3. Test the scalability and performance of your rollup under various conditions.

    Troubleshooting

    If you encounter issues:

    • Ensure all prerequisites are correctly installed and up to date.
    • Check that your local DA node is running correctly on port 7980.
    • Verify that the Geth client is properly initialized and running.
    • Review the BeaconKit logs for any specific error messages.

    For more detailed information and updates, visit the BeaconKit GitHub repository and the Rollkit documentation.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/execution/cosmwasm.html b/pr-528/tutorials/execution/cosmwasm.html new file mode 100644 index 000000000..2ab233d7f --- /dev/null +++ b/pr-528/tutorials/execution/cosmwasm.html @@ -0,0 +1,174 @@ + + + + + + 🗞️ CosmWasm rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    🗞️ CosmWasm rollup

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    WARNING

    Rollkit is currently undergoing an execution overhaul with the creation of the go-execution interface. In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub issue ticket or reach out in our Telegram group.

    CosmWasm is a smart contracting platform built for the Cosmos ecosystem by making use of WebAssembly (Wasm) to build smart contracts for Cosmos-SDK. In this tutorial, we will be exploring how to integrate CosmWasm with local DA layer using Rollkit.

    The smart contract we will use for this tutorial is one provided by the CosmWasm team for Nameservice purchasing.

    You can check out the contract here.

    How to write the Rust smart contract for Nameservice is outside the scope of this tutorial.

    💻 CosmWasm dependency

    As with the GM Rollup, we use kurtosis to help with managing all the services we need to run. You can install kurtosis here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   0.90.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🚀 Starting your rollup

    Now that we have kurtosis installed, we can launch our CosmWasm rollup along with the local DA by running the following command:

    bash
    kurtosis run github.com/rollkit/cosmwasm@v0.2.0

    You should see an output like this:

    bash
    INFO[2024-07-02T11:15:43-04:00] Creating a new enclave for Starlark to run inside...
    +INFO[2024-07-11T11:53:13-04:00] Enclave 'forgotten-fen' created successfully 
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/local-da:v0.2.1 - remotely downloaded
    +> ghcr.io/rollkit/cosmwasm:v0.1.0 - remotely downloaded
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '96d04bc472c9455d88d046128fbdefa6'
    +
    +Printing a message
    +connecting to da layer via http://172.16.0.5:7980
    +
    +Printing a message
    +Adding CosmWasm service
    +
    +Adding service with name 'wasm' and image 'ghcr.io/rollkit/cosmwasm:3b5a25b'
    +Service 'wasm' added with service UUID 'c71b0308616d40ad919ad24c3d14f35b'
    +
    +Printing a message
    +CosmWasm service is available at http://172.16.0.6:36657
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-11T11:53:27-04:00] ====================================================== 
    +INFO[2024-07-11T11:53:27-04:00] ||          Created enclave: forgotten-fen          || 
    +INFO[2024-07-11T11:53:27-04:00] ====================================================== 
    +Name:            forgotten-fen
    +UUID:            8cd936e91ada
    +Status:          RUNNING
    +Creation Time:   Thu, 11 Jul 2024 11:53:00 EDT
    +Flags:           
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                            Status
    +96d04bc472c9   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980       RUNNING
    +c71b0308616d   wasm       grpc-addr: 9290/tcp -> http://127.0.0.1:9290     RUNNING
    +                          p2p-laddr: 36656/tcp -> http://127.0.0.1:36656   
    +                          rpc-laddr: 36657/tcp -> http://127.0.0.1:36657

    Kurtosis has successfully launched the CosmWasm rollup and the local DA network. You can see the services running in docker as well:

    bash
    docker ps
    bash
    CONTAINER ID   IMAGE                              COMMAND                  CREATED              STATUS              PORTS                                                                              NAMES
    +5bfeda0a871f   ghcr.io/rollkit/cosmwasm:v0.1.0    "/bin/sh -c 'wasmd s…"   About a minute ago   Up About a minute   0.0.0.0:9290->9290/tcp, 0.0.0.0:36656-36657->36656-36657/tcp                       wasm--c71b0308616d40ad919ad24c3d14f35b
    +782dec73fcf8   ghcr.io/rollkit/local-da:v0.2.1    "local-da -listen-all"   About a minute ago   Up About a minute   0.0.0.0:7980->7980/tcp                                                             local-da--96d04bc472c9455d88d046128fbdefa6
    +62da89015918   kurtosistech/core:0.90.1           "/bin/sh -c ./api-co…"   About a minute ago   Up About a minute   0.0.0.0:55500->7443/tcp                                                            kurtosis-api--8cd936e91ada45beab50f0d19be8c57f
    +1eb6366a5e16   fluent/fluent-bit:1.9.7            "/fluent-bit/bin/flu…"   About a minute ago   Up About a minute   2020/tcp                                                                           kurtosis-logs-collector--8cd936e91ada45beab50f0d19be8c57f
    +8bfee95b49ee   kurtosistech/engine:0.90.1         "/bin/sh -c ./kurtos…"   39 minutes ago       Up 39 minutes       0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--cee974a1c2b141478c9eb2a9b1e4f87f
    +d532fc82579f   traefik:2.10.6                     "/bin/sh -c 'mkdir -…"   39 minutes ago       Up 39 minutes       80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--cee974a1c2b141478c9eb2a9b1e4f87f
    +7700c0b72195   timberio/vector:0.31.0-debian      "/bin/sh -c 'printf …"   39 minutes ago       Up 39 minutes                                                                                          kurtosis-logs-aggregator

    We can see the CosmWasm rollup running in container wasm--c71b0308616d40ad919ad24c3d14f35b and the local DA network running in container local-da--96d04bc472c9455d88d046128fbdefa6.

    Let's hold on to the container name for the CosmWasm rollup, as we will need it later.

    bash
    CW=$(docker ps --format '{{.Names}}' | grep wasm)
    +echo $CW

    You can verify the rollup is running by checking the logs:

    bash
    docker logs $CW
    bash
    ...
    +3:55PM INF Creating and publishing block height=137 module=BlockManager
    +3:55PM INF finalized block block_app_hash=E71622A57B08D28613A34E3D7AD36BF294CF5A88F4CDD5DD18E6FB65C76F7209 height=137 module=BlockManager num_txs_res=0 num_val_updates=0
    +3:55PM INF executed block app_hash=E71622A57B08D28613A34E3D7AD36BF294CF5A88F4CDD5DD18E6FB65C76F7209 height=137 module=BlockManager
    +3:55PM INF indexed block events height=137 module=txindex
    +3:55PM INF Creating and publishing block height=138 module=BlockManager
    +3:55PM INF finalized block block_app_hash=E09F4A71E216D85F4CCB9FCBCEE53D82BCA597451C1D4B4FCE0E4081B5FA40E3 height=138 module=BlockManager num_txs_res=0 num_val_updates=0
    +3:55PM INF executed block app_hash=E09F4A71E216D85F4CCB9FCBCEE53D82BCA597451C1D4B4FCE0E4081B5FA40E3 height=138 module=BlockManager
    +...

    Good work so far, we have a Rollup node, DA network node, now we can move onto the contract deployment.

    📒 Contract deployment on CosmWasm with Rollkit

    🤖 Compile the smart contract

    To compile the smart contract, you can use our docker image.

    First download the image:

    bash
    docker pull ghcr.io/rollkit/contract:v0.2.0

    Then run the container:

    bash
    docker run --rm -d --name cw ghcr.io/rollkit/contract:v0.2.0

    The container is now running and has the pre-built nameservice contract for us. Let's copy it out of the container.

    bash
    docker cp cw:/root/cw-contracts/contracts/nameservice .

    We now have the nameservice contract in the nameservice directory.

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/nameservice directory you just copied:

    bash
    sudo docker run --rm -v "$(pwd)":/code \
    +  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
    +  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
    +  cosmwasm/rust-optimizer:0.12.6

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    We will need to do this in the docker container that the CosmWasm rollup is running. So first let's move the compiled contract to the container:

    bash
    docker cp artifacts/cw_nameservice.wasm $CW:/root/cw_nameservice.wasm

    Now let's jump into the container:

    bash
    docker exec -it $CW sh

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    bash
    TX_HASH=$(wasmd tx wasm store cw_nameservice.wasm --from localwasm-key --keyring-backend test --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    🔎 Contract querying

    Now, let's query our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
    +echo $CODE_ID

    This will give us back the Code ID of the deployed contract.

    In our case, since it's the first contract deployed on our local network, the value is 1.

    Now, we can take a look at the contracts instantiated by this Code ID:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --node http://127.0.0.1:36657 --output json

    We get the following output:

    json
    {"contracts":[],"pagination":{"next_key":null,"total":"0"}}

    📃 Contract instantiation

    We start instantiating the contract by writing up the following INIT message for nameservice contract. Here, we are specifying that purchase_price of a name is 100uwasm and transfer_price is 999uwasm.

    bash
    INIT='{"purchase_price":{"amount":"100","denom":"uwasm"},"transfer_price":{"amount":"999","denom":"uwasm"}}'
    +wasmd tx wasm instantiate $CODE_ID "$INIT" --from localwasm-key --keyring-backend test --label "name service" --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 -y --no-admin --node http://127.0.0.1:36657

    📄 Contract interaction

    Now that we instantiated it, we can interact further with the contract:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657
    +CONTRACT=$(wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657 | jq -r '.contracts[-1]')
    +echo $CONTRACT
    +
    +wasmd query wasm contract --node http://127.0.0.1:36657 $CONTRACT
    +wasmd query bank balances --node http://127.0.0.1:36657 $CONTRACT

    This allows us to see the contract address, contract details, and bank balances.

    Your output will look similar to below:

    bash
    {"contracts":["wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d"],"pagination":{"next_key":null,"total":"0"}}
    +wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d
    +address: wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d
    +contract_info:
    +  admin: ""
    +  code_id: "1"
    +  created: null
    +  creator: wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z
    +  extension: null
    +  ibc_port_id: ""
    +  label: name service
    +balances: []
    +pagination:
    +  next_key: null
    +  total: "0"

    Now, let's register a name to the contract for our wallet address:

    bash
    REGISTER='{"register":{"name":"fred"}}'
    +wasmd tx wasm execute $CONTRACT "$REGISTER" --amount 100uwasm --from localwasm-key --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --keyring-backend test -y

    Your output will look similar to below:

    bash
    gas estimate: 167533
    +code: 0
    +codespace: ""
    +data: ""
    +events: []
    +gas_used: "0"
    +gas_wanted: "0"
    +height: "0"
    +info: ""
    +logs: []
    +raw_log: '[]'
    +timestamp: ""
    +tx: null
    +txhash: C147257485B72E7FFA5FDB943C94CE951A37817554339586FFD645AD2AA397C3

    If you try to register the same name again, you'll see an expected error:

    bash
    Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: Name has been taken (name fred): execute wasm contract failed [CosmWasm/wasmd/x/wasm/keeper/keeper.go:364] With gas wanted: '0' and gas used: '123809' : unknown request

    Next, query the owner of the name record:

    bash
    NAME_QUERY='{"resolve_record": {"name": "fred"}}'
    +wasmd query wasm contract-state smart $CONTRACT "$NAME_QUERY" --node http://127.0.0.1:36657 --output json

    You'll see the owner's address in a JSON response:

    bash
    {"data":{"address":"wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z"}}

    With that, we have instantiated and interacted with the CosmWasm nameservice smart contract on our local DA network using Rollkit!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/execution/evm-contract-interaction.html b/pr-528/tutorials/execution/evm-contract-interaction.html new file mode 100644 index 000000000..f783ffd0d --- /dev/null +++ b/pr-528/tutorials/execution/evm-contract-interaction.html @@ -0,0 +1,108 @@ + + + + + + Smart Contract Interaction on EVM Rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Smart Contract Interaction on EVM Rollup

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    WARNING

    Rollkit is currently undergoing an execution overhaul with the creation of the go-execution interface. In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub issue ticket or reach out in our Telegram group.

    In this tutorial, you will deploy a smart contract to your EVM rollup and interact with it on a frontend. This tutorial assumes that you spinned up an EVM rollup, know it's RPC URL, and have funded an account on it.

    Install Foundry

    To install Foundry, run the following commands:

    bash
    curl -L https://foundry.paradigm.xyz | bash
    +foundryup

    Funds

    Here is the private key and derived address of the account for you to be used in this tutorial (make sure to fund it with some ETH):

    bash
    PrivateKey: 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +Address: 0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4

    Frontend

    Now we will make a frontend with a smart contract on our EVM rollup. First, clone the GM Portal repository:

    bash
    cd $HOME
    +git clone https://github.com/rollkit/gm-portal.git
    +cd gm-portal

    Deploy the ooga booga portal contract

    Next, you will deploy the smart contract. Export the funded private key and RPC URL:

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545 // or for Octane EVM the port is 8000

    Use Foundry to deploy the contract to your EVM:

    bash
    cd contracts
    +forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to:

    bash
    forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠑] Compiling 18 files with 0.8.20
    +[⠘] Solc 0.8.20 finished in 1.52s
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    + [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 2061
    +  [Success]Hash: 0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860
    +Contract Address: 0x18Df82C7E422A42D47345Ed86B0E935E9718eBda // [!code focus]
    +Block: 682
    +Paid: 0.001528707003566983 ETH (509569 gas * 3.000000007 gwei)
    +
    +[...]

    From the contract deployment output, export your contract address:

    bash
    export CONTRACT_ADDRESS=0x18Df82C7E422A42D47345Ed86B0E935E9718eBda

    Interact with the contract

    Send an "ooga booga" to the contract:

    bash
    cast send $CONTRACT_ADDRESS \
    +"gm(string)" "ooga booga" \
    +--private-key $PRIVATE_KEY \
    +--rpc-url $RPC_URL

    Get total (hex-encoded) GMs (ooga boogas):

    bash
    cast call $CONTRACT_ADDRESS "getTotalGms()" --rpc-url $RPC_URL

    Start and update the frontend

    Now, change into the frontend directory:

    bash
    cd $HOME/gm-portal/frontend
    +yarn && yarn dev

    Now, your frontend is running! We'll display and interact with our smart contract on our frontend.

    First, you will need to change the contract address on gm-portal/frontend/src/App.tsx to your contract address from above before you can interact with the contract on the frontend:

    TIP

    Only if you changed the contract, you will need to update the ABI in gm-portal/frontend/GmPortal.json from gm-portal/contracts/out/GmPortal.sol/GmPortal.json. This can be done with:

    bash
    cd $HOME
    +cp gm-portal/contracts/out/GmPortal.sol/GmPortal.json gm-portal/frontend

    Interact with the frontend

    In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.

    To transfer to an external account, use this command:

    bash
    export RECEIVER=<receiver ETH address>
    +cast send --private-key $PRIVATE_KEY $RECEIVER --value 1ether --rpc-url $RPC_URL

    If you are in a different terminal than the one you set the private key in originally, you may need to set it again.

    Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!

    frontend-evm

    Conclusion

    You have successfully deployed a smart contract to your EVM rollup and interacted with it on a frontend. You can now build more complex applications on your EVM rollup!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/execution/octane-evm.html b/pr-528/tutorials/execution/octane-evm.html new file mode 100644 index 000000000..143377450 --- /dev/null +++ b/pr-528/tutorials/execution/octane-evm.html @@ -0,0 +1,77 @@ + + + + + + Quick start guide for Omni Octane with Rollkit | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Quick start guide for Omni Octane with Rollkit

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    WARNING

    Rollkit is currently undergoing an execution overhaul with the creation of the go-execution interface. In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub issue ticket or reach out in our Telegram group.

    This guide will help you quickly set up and run an Omni node using Rollkit and local-DA.

    📦 Clone the Omni repository

    To get started, clone the Omni repository with the Rollkit branch:

    bash
    git clone -b rollkit https://github.com/rollkit/omni.git
    +cd omni

    🏗️ Build Docker images

    Before running Omni, you need to build the Docker images. This step requires GoReleaser to be installed on your system. If you don't have GoReleaser, you'll need to install it first:

    • On macOS with Homebrew:
      bash
      brew install goreleaser
    • On Linux or Windows with Go installed:
      bash
      go install github.com/goreleaser/goreleaser@latest

    Make sure GoReleaser is in your PATH after installation.

    Once GoReleaser is installed, run the following command to build the Docker images:

    bash
    make build-docker

    This command will build all the necessary Docker images for running Omni with Rollkit.

    If you encounter any issues with GoReleaser or the build process, make sure you have sufficient free space on your machine. You can check your available disk space using the df -h command on Linux/macOS or powershell -command "Get-PSDrive -PSProvider 'FileSystem'" on Windows.

    🚀 Deploy Omni with Rollkit and local-DA

    To start your Omni node with Rollkit and local-DA, execute:

    bash
    make devnet-zero-deploy

    Upon execution, the command will set up and start your Omni node. You should see output indicating the progress and status of your node. Notice the EVM Chain RPC available message, which indicates that the Omni node is ready to accept EVM transactions:

    bash
    24-07-22 20:29:03.655 INFO EVM Chain RPC available                  chain_id=1651 chain_name=omni_evm url=http://127.0.0.1:8000

    🧪 Smart Contract Deployment and Interaction

    To deploy and interact with smart contracts on the Omni EVM, you can use the tools you are already familiar with, follow our Contract interaction tutorial to get a hands on experience.

    To fund your account with some tokens, you can use the omni-cli, which needs to be installed first:

    bash
    make install-cli # install omni cli 
    +omni devnet fund --rpc-url http://127.0.0.1:8000 --address=<your address>

    🛑 Stopping the node

    When you're done and want to stop the Omni node, use the following command:

    bash
    make devnet-zero-clean

    This will stop all running containers and clean up the environment.

    🎉 Conclusion

    That's it! You've successfully set up and run an Omni node with Rollkit and local-DA. This setup allows you to experiment with Omni's capabilities integrated with Rollkit.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/execution/polaris-evm.html b/pr-528/tutorials/execution/polaris-evm.html new file mode 100644 index 000000000..47d093882 --- /dev/null +++ b/pr-528/tutorials/execution/polaris-evm.html @@ -0,0 +1,135 @@ + + + + + + Polaris EVM and Rollkit | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Polaris EVM and Rollkit

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    WARNING

    Rollkit is currently undergoing an execution overhaul with the creation of the go-execution interface. In the meantime, the execution tutorials should be considered out of date until they have been updated to use the new execution API. If you have question about a specific execution environment, please create a GitHub issue ticket or reach out in our Telegram group.

    DANGER

    We regret to inform that Polaris V1 and Rollkit integration is not fully functional. Current issues are tracked in https://github.com/rollkit/rollkit/issues/1594. We are expecting Polaris V2 release soon and Rollkit support will be added along with update tutorial.

    This tutorial provides step-by-step instructions for running the Polaris EVM using Rollkit. Polaris EVM is a version of the Ethereum Virtual Machine (EVM) that is designed to run the Berachain network. This version has been modified to use Celestia as a data availability layer. This integration uses a local-celestia-devnet. Rollkit is used to deploy a Polaris EVM rollup without needing to set up a data availability and consensus network.

    Prerequisites

    Before you can run Polaris EVM using Rollkit, you need to have the following software installed on your machine:

    • Docker running on your machine
    • Go version >= 1.21.0

    Run a local-celestia-devnet

    Before you can start Polaris EVM, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.12.6

    Clone the repo

    To get started, clone the Polaris repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +git clone https://github.com/berachain/polaris.git
    +cd polaris && git checkout rollkit

    Install Foundry

    bash
    curl -L https://foundry.paradigm.xyz | bash

    Start the Polaris EVM using Rollkit

    Then start the chain in your first terminal:

    bash
    cd $HOME/polaris && foundryup
    +make start

    Congratulations

    You now have a Polaris EVM Rollkit rollup running! The rollup logs will begin to look similar to this:

    bash
    7:58PM INF submitting block to DA layer height=11 module=BlockManager // [!code focus]
    +7:58PM INF successfully submitted Rollkit block to DA layer daHeight=30 module=BlockManager rollkitHeight=11 // [!code focus]
    +7:58PM INF prune start height=11 module=server
    +7:58PM INF prune end height=11 module=server
    +7:58PM INF indexed block events height=11 module=txindex
    +7:58PM INF Creating and publishing block height=12 module=BlockManager // [!code focus]
    +7:58PM INF preparing evm block module=polaris-geth seal_hash=0x314b131b1d4117445091b25240eaf420cdbdcf9f653eabd1d95aa0dab3cd1359
    +7:58PM INF finalizing evm block block_hash=0x5207a1ff35540dafe70565d3a95ed07f6c9b1ed9114f93c6c47ee0a1c0d4cc2e module=polaris-geth num_txs=0
    +7:58PM INF finalized block block_app_hash=AC959F089C21DC617275E0AB35E77DC3839C9597ECFDECDAD6C924EC49B1EB07 height=12 module=BlockManager num_txs_res=0 num_val_updates=0
    +7:58PM INF executed block app_hash="���\b�!�aru��5�}���������$�I��\a" height=12 module=BlockManager

    Funds

    The following private key has funds on your Polaris chain:

    bash
    Address: 0x20f33CE90A13a4b5E7697E3544c3083B8F8A51D4
    +PrivateKey: 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306

    Just deploy a smart contract to get started! If you'd like to learn how to deploy your own GM Portal (as an ooga booga portal) you can follow the remainder of this tutorial.

    Frontend

    Now we will make a frontend with a smart contract on our Polaris EVM rollup. First, clone the GM Portal repository and check out to the Polaris branch (ooga booga portal):

    bash
    cd $HOME
    +git clone https://github.com/jcstein/gm-portal.git
    +cd gm-portal && git checkout polaris

    Deploy the ooga booga portal contract

    Next, you will deploy the smart contract. Export the funded private key and RPC URL:

    bash
    export PRIVATE_KEY=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306
    +export RPC_URL=http://localhost:8545

    Use Foundry to deploy the contract to your EVM:

    bash
    cd contracts
    +forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

    A successful deployment's output will look similar to:

    bash
    forge script script/GmPortal.s.sol:GmPortalScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
    +[⠒] Compiling...
    +[⠑] Compiling 18 files with 0.8.20
    +[⠘] Solc 0.8.20 finished in 1.52s
    +Compiler run successful!
    +Script ran successfully.
    +
    +== Logs ==
    +  i am a smart contract on Polaris EVM x Rollkit. gm!
    +
    +[...]
    +
    +##
    +Waiting for receipts.
    + [00:00:00] [######################] 1/1 receipts (0.0s)
    +##### 2061
    +  [Success]Hash: 0xa174e9389633972458e6dce431d84736e0709e9406c1c3b14b5fa9ae0cdd6860
    +Contract Address: 0x18Df82C7E422A42D47345Ed86B0E935E9718eBda // [!code focus]
    +Block: 682
    +Paid: 0.001528707003566983 ETH (509569 gas * 3.000000007 gwei)
    +
    +[...]

    From the contract deployment output, export your contract address:

    bash
    export CONTRACT_ADDRESS=0x18Df82C7E422A42D47345Ed86B0E935E9718eBda

    Interact with the contract

    Send an "ooga booga" to the contract:

    bash
    cast send $CONTRACT_ADDRESS \
    +"gm(string)" "ooga booga" \
    +--private-key $PRIVATE_KEY \
    +--rpc-url $RPC_URL

    Get total (hex-encoded) GMs (ooga boogas):

    bash
    cast call $CONTRACT_ADDRESS "getTotalGms()" --rpc-url $RPC_URL

    Start and update the frontend

    Now, change into the frontend directory:

    bash
    cd $HOME/gm-portal/frontend
    +yarn && yarn dev

    polaris-evm

    Now, your frontend is running! We'll display and interact with our smart contract on our frontend.

    First, you will need to change the contract address on gm-portal/frontend/src/App.tsx to your contract address from above before you can interact with the contract on the frontend:

    TIP

    Only if you changed the contract, you will need to update the ABI in gm-portal/frontend/GmPortal.json from gm-portal/contracts/out/GmPortal.sol/GmPortal.json. This can be done with:

    bash
    cd $HOME
    +cp gm-portal/contracts/out/GmPortal.sol/GmPortal.json gm-portal/frontend

    Interact with the frontend

    In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.

    To transfer to an external account, use this command:

    bash
    export RECEIVER=<receiver ETH address>
    +cast send --private-key $PRIVATE_KEY $RECEIVER --value 1ether --rpc-url $RPC_URL

    If you are in a different terminal than the one you set the private key in originally, you may need to set it again.

    Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!

    polaris-evm

    Running Polaris EVM with a Celestia light node

    In this portion of the tutorial, we will go over running Polaris x Rollkit using a Celestia light node to post data to Mocha testnet. These steps can be used for Mainnet Beta and Arabica devnet, too, you'll just need to change the network in the --p2p.network string flag and your RPC.

    TIP

    Before using RPC methods through the CLI, you'll need to set your auth token.

    In order to successfully post and retrieve data to and from Celestia's Mocha testnet, your light node will need to be fully synced. You can check the status by using the das.SamplingStats method using the CLI.

    Your node will also need to be funded with testnet TIA, which you can obtain by retrieving your account address and visiting a faucet.

    Start your light node

    1. Fully sync and fund a light node on Celestia's Mocha testnet (mocha-4). Follow instructions to install and start your Celestia data availability layer light node selecting the Mocha network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    2. Use celestia-da to connect to Rollkit. Your node does not need to be running when you start celestia-da. To start celestia-da and your light node, run this command:

    TIP

    You can either use the default 000000506f6c61726973 namespace below, or set your own by using a command similar to this to generate one (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Learn more about namespaces .

    bash
    docker run -d \
    +-e NODE_TYPE=light \
    +-e P2P_NETWORK=mocha \
    +-p 26650:26650 \
    +-p 26658:26658 \
    +-p 26659:26659 \
    +-v $HOME/.celestia-light-mocha-4/:/home/celestia/.celestia-light-mocha-4/ \
    +ghcr.io/rollkit/celestia-da:v0.12.10 \
    +celestia-da light start \
    +--p2p.network=mocha \
    +--da.grpc.namespace=000000506f6c61726973 \
    +--da.grpc.listen=0.0.0.0:26650 \
    +--core.ip rpc-mocha.pops.one \
    +--gateway

    Setup Polaris script

    First, ensure you're on the correct branch of Polaris:

    bash
    cd $HOME/polaris && git checkout rollkit

    Before starting your rollup, you'll want to make a change in $HOME/polaris/e2e/testapp/entrypoint.sh to point to the right DA start height:

    bash
    # set the data availability layer's block height from local-celestia-devnet
    +DA_BLOCK_HEIGHT=$(docker exec $(docker ps -q) celestia header local-head --token $AUTH_TOKEN | jq '.result.header.height' -r) // [!code --]
    +DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block |jq -r '.result.block.header.height') // [!code ++]

    Start the EVM rollup

    Change into the Polaris directory in your terminal:

    bash
    cd $HOME/polaris
    +make start

    Congratulations! Your light node is now posting your rollup's data to Celestia's Mocha testnet.

    Find an explorer to view the default namespace in the tutorial or search for your own namespace on Celenium.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/gm-world.html b/pr-528/tutorials/gm-world.html new file mode 100644 index 000000000..f2de93077 --- /dev/null +++ b/pr-528/tutorials/gm-world.html @@ -0,0 +1,193 @@ + + + + + + GM world rollup | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    GM world rollup

    🌞 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup (gm stands for "good morning") using Rollkit. Unlike the quick start guide, this tutorial provides a more practical approach to understanding sovereign rollup development.

    We will cover:

    • Building and configuring a Cosmos-SDK application-specific rollup blockchain.
    • Posting rollup data to a Data Availability (DA) network.
    • Executing transactions (the end goal).

    No prior understanding of the build process is required, just that it utilizes the Cosmos SDK for blockchain applications.

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    🛠️ Dependencies

    As we move into more advanced use cases, we use kurtosis to help with managing all the services we need to run. You can install kurtosis here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   0.90.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🚀 Starting your rollup

    Now that we have kurtosis installed, we can launch our GM rollup along with the local DA by running the following command:

    bash
    kurtosis run github.com/rollkit/gm@v0.3.1

    You should see an output like this:

    bash
    INFO[2024-07-02T11:15:43-04:00] Creating a new enclave for Starlark to run inside...
    +INFO[2024-07-02T11:15:46-04:00] Enclave 'sparse-grotto' created successfully
    +INFO[2024-07-02T11:15:46-04:00] Executing Starlark package at '/Users/matt/Code/rollkit/gm' as the passed argument '.' looks like a directory
    +INFO[2024-07-02T11:15:46-04:00] Compressing package 'github.com/rollkit/gm' at '.' for upload
    +INFO[2024-07-02T11:15:46-04:00] Uploading and executing package 'github.com/rollkit/gm'
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/gm:05bd40e - locally cached
    +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached
    +
    +Printing a message
    +Adding Local DA service
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '990942dc84ab4b3ab2c8d64002a5bafa'
    +
    +Printing a message
    +Adding GM service
    +
    +Printing a message
    +NOTE: This can take a few minutes to start up...
    +
    +Adding service with name 'gm' and image 'ghcr.io/rollkit/gm:05bd40e'
    +Service 'gm' added with service UUID 'ed0233f8291d4a42bdd0e173393af809'
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-02T11:15:50-04:00] ======================================================
    +INFO[2024-07-02T11:15:50-04:00] ||          Created enclave: sparse-grotto          ||
    +INFO[2024-07-02T11:15:50-04:00] ======================================================
    +Name:            sparse-grotto
    +UUID:            49dd471ac3bb
    +Status:          RUNNING
    +Creation Time:   Tue, 02 Jul 2024 11:15:43 EDT
    +Flags:
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                          Status
    +ed0233f8291d   gm         jsonrpc: 26657/tcp -> http://127.0.0.1:26657   RUNNING
    +990942dc84ab   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980     RUNNING

    Kurtosis has successfully launched the GM rollup and the local DA network. The GM rollup is running on port 26657 and the local DA network is running on port 7980. You can see the services running in docker as well:

    bash
    docker ps
    bash
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
    +af16c1a5e68c   ghcr.io/rollkit/gm:05bd40e        "/bin/sh -c 'rollkit…"   46 seconds ago   Up 45 seconds   0.0.0.0:26657->26657/tcp                                                           gm--ed0233f8291d4a42bdd0e173393af809
    +9db601efd92b   ghcr.io/rollkit/local-da:v0.2.1   "local-da -listen-all"   46 seconds ago   Up 46 seconds   0.0.0.0:7980->7980/tcp                                                             local-da--990942dc84ab4b3ab2c8d64002a5bafa
    +7fec3d659452   kurtosistech/core:0.90.1          "/bin/sh -c ./api-co…"   50 seconds ago   Up 50 seconds   0.0.0.0:59855->7443/tcp                                                            kurtosis-api--49dd471ac3bb413d96932d4020c20b21
    +198f7873bbec   fluent/fluent-bit:1.9.7           "/fluent-bit/bin/flu…"   51 seconds ago   Up 51 seconds   2020/tcp                                                                           kurtosis-logs-collector--49dd471ac3bb413d96932d4020c20b21
    +f921884f4132   kurtosistech/engine:0.90.1        "/bin/sh -c ./kurtos…"   2 hours ago      Up 2 hours      0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--1657ab3f1c3942658a3993a0e3b54327
    +c5363b77b543   traefik:2.10.6                    "/bin/sh -c 'mkdir -…"   2 hours ago      Up 2 hours      80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--1657ab3f1c3942658a3993a0e3b54327
    +39eb05e1c693   timberio/vector:0.31.0-debian     "/bin/sh -c 'printf …"   2 hours ago      Up 2 hours                                                                                         kurtosis-logs-aggregator

    We can see the GM rollup running in container gm--ed0233f8291d4a42bdd0e173393af809 and the local DA network running in container local-da--990942dc84ab4b3ab2c8d64002a5bafa.

    Let's hold on to the container name for the GM rollup as we will need it later.

    bash
    GM=$(docker ps --format '{{.Names}}' | grep gm)
    +echo $GM

    You can verify the rollup is running by checking the logs:

    bash
    docker logs $GM
    bash
    ...
    +12:21PM INF starting node with ABCI CometBFT in-process module=server
    +12:21PM INF starting node with Rollkit in-process module=server
    +12:21PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
    +12:21PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
    +12:21PM INF service start impl=EventBus module=events msg="Starting EventBus service"
    +12:21PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
    +12:21PM INF Using default mempool ttl MempoolTTL=25 module=BlockManager
    +12:21PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
    +12:21PM INF service start impl=RPC module=server msg="Starting RPC service"
    +12:21PM INF service start impl=Node module=server msg="Starting Node service"
    +12:21PM INF starting P2P client module=server
    +12:21PM INF serving HTTP listen address=127.0.0.1:26657 module=server
    +12:21PM INF listening on address=/ip4/127.0.0.1/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF listening on address=/ip4/163.172.162.109/tcp/26656/p2p/12D3KooWSicdPmMTLf9fJbSSHZc9UVP1CbNqKPpbYVbgxHvbhAUY module=p2p
    +12:21PM INF no seed nodes - only listening for connections module=p2p
    +12:21PM INF working in aggregator mode block time=1000 module=server
    +12:21PM INF Creating and publishing block height=22 module=BlockManager
    +12:21PM INF starting gRPC server... address=127.0.0.1:9290 module=grpc-server
    +12:21PM INF finalized block block_app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager num_txs_res=0 num_val_updates=0
    +12:21PM INF executed block app_hash=235D3710D61F347DBBBDD6FD63AA7687842D1EF9CB475C712856D7DA32F82F09 height=22 module=BlockManager
    +12:21PM INF indexed block events height=22 module=txindex
    +...

    Good work so far, we have a Rollup node, DA network node, now we can start submitting transactions.

    💸 Transactions

    Since our rollup is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it $GM sh

    First, list your keys:

    bash
    rollkit keys list --keyring-backend test

    You should see an output like the following

    bash
    - address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +  name: alice
    +  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A5WPM5WzfNIPrGyha/TlHt0okdlzS1O4Gb1d1kU+xuG+"}'
    +  type: local
    +- address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
    +  name: bob
    +  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A+jOX/CWInFer2IkqgXGo0da9j7Ubq+e1LJWzTMDjwdt"}'
    +  type: local

    For convenience we export two of our keys like this:

    bash
    export KEY1=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +export KEY2=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3

    Now let's submit a transaction that sends coins from one account to another (don't worry about all the flags, for now, we just want to submit transaction from a high-level perspective):

    bash
    rollkit tx bank send $KEY2 $KEY1 42069stake --keyring-backend test --chain-id gm --fees 5000stake

    You'll be prompted to accept the transaction:

    bash
    auth_info:
    +  fee:
    +    amount: []
    +    gas_limit: "200000"
    +    granter: ""
    +    payer: ""
    +  signer_infos: []
    +  tip: null
    +body:
    +  extension_options: []
    +  memo: ""
    +  messages:
    +  - '@type': /cosmos.bank.v1beta1.MsgSend
    +    amount:
    +    - amount: "42069"
    +      denom: stake
    +    from_address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
    +    to_address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
    +  non_critical_extension_options: []
    +  timeout_height: "0"
    +signatures: []
    +confirm transaction before signing and broadcasting [y/N]: // [!code focus]

    Confirm and sign the transaction as prompted. now you see the transaction hash at the output:

    bash
    //...
    +
    +txhash: 677CAF6C80B85ACEF6F9EC7906FB3CB021322AAC78B015FA07D5112F2F824BFF

    ⚖️ Checking Balances

    Query balances after the transaction:

    bash
    rollkit query bank balances $KEY1

    The receiver’s balance should show an increase.

    bash
    balances: // [!code focus]
    +- amount: "42069" // [!code focus]
    +  denom: stake
    +pagination:
    +  next_key: null
    +  total: "0"

    For the sender’s balance:

    bash
    rollkit query bank balances $KEY2

    Output:

    bash
    balances: // [!code focus]
    +- amount: "99957931" // [!code focus]
    +  denom: stake
    +pagination:
    +  next_key: null
    +  total: "0"

    📦 GM world UI app

    Now that you have an idea of how to interact with the rollup with the rollkit CLI, let's look at the user interface (UI) application aspect of connecting a wallet to a rollup.

    Connecting your wallet to your rollup is as straightforward as connecting to any other blockchain. It assumes you have the Keplr wallet extension installed in your browser.

    🔗 Connecting your wallet

    Kurtosis spun up a UI app alongside your rollup already, so to connect your Keplr wallet to the application, simply open your browser and go to http://localhost:3000.

    Click the "Connect Wallet" button on the page, and approve the connection request in the Keplr prompt.

    Once authorized, your wallet address will be displayed, confirming that your wallet is successfully connected.

    gm-world-frontend-connected

    TIP

    If you run into any issues, make sure your Keplr wallet is updated and set to connect to your local environment.

    🎉 Next steps

    Congratulations! You've experienced connecting to a rollup from the user side — simple and straightforward. Now, you might consider exploring how to add more application logic to your rollup using the Cosmos SDK, as demonstrated in our Wordle App tutorial.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/kurtosis.html b/pr-528/tutorials/kurtosis.html new file mode 100644 index 000000000..df4f87245 --- /dev/null +++ b/pr-528/tutorials/kurtosis.html @@ -0,0 +1,183 @@ + + + + + + 🟩 Kurtosis | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    🟩 Kurtosis

    This tutorial is going to show you how to deploy the wordle chain using Kurtosis.

    You can learn more about Kurtosis here.

    Disclaimer

    Kurtosis currently does not fully support data persistence across runs, because of this it is not recommended for production use.

    This tutorial is WIP and does not currently support the new sequencing API introduced in rollkit v0.14.0

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    💻 Pre-requisites

    Make sure you have your wordle chain ready by completing the Build your chain tutorial.

    🛠️ Dependencies

    💻 Kurtosis CLI

    You can install the kurtosis cli here.

    Once installed, you can verify the installation by running:

    bash
    kurtosis version
    bash
    CLI Version:   1.3.1
    +
    +To see the engine version (provided it is running): kurtosis engine status

    🛠️ Setting up your environment

    The wordle chain is a relatively simple chain in that there are just 2 nodes involved: the chain and the data availability network (DA) node.

    We will use a local DA node for this tutorial and run it in the same Kurtosis enclave as our chain.

    To save time, we can use the local DA kurtosis package found here.

    This will allow us to focus on how we can run the wordle chain in Kurtosis.

    🐳 Dockerfile

    First, we need to create a Dockerfile for our wordle chain.

    Create a new file called Dockerfile in the root of the wordle directory and add the following code from the Docker Compose tutorial.

    This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain.

    Build the docker image by running the following command:

    bash
    docker build -t wordle .

    You can then see the built image by running:

    bash
    docker images

    You should see the following output:

    bash
    REPOSITORY  TAG     IMAGE ID       CREATED         SIZE
    +wordle      latest  5d3533c1ea1c   8 seconds ago   443MB

    🟢 Kurtosis

    To initialize a kurtosis package, run the following command:

    bash
    kurtosis package init

    This will create a kurtosis.yml file and a main.star file. The kurtosis.yml file is where you define your package. Open it and update it to something like the following:

    yaml
    name: github.com/rollkit/wordle
    +description: |-
    +  # github.com/rollkit/wordle
    +  A simple wordle chain for the Rollkit tutorial.
    +replace: {}

    You should replace github.com/rollkit/wordle with your own repository name.

    The main.star file is where we define the kurtosis package. Open it up and replace the contents with the following code:

    python
    # This Kurtosis package spins up a wordle chain that connects to a DA node
    +
    +# Import the local da kurtosis package
    +da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0")
    +
    +
    +def run(plan):
    +    # Start the DA node
    +    da_address = da_node.run(
    +        plan,
    +    )
    +    plan.print("connecting to da layer via {0}".format(da_address))
    +
    +    # Define the wordle start command
    +    wordle_start_cmd = [
    +        "rollkit",
    +        "start",
    +        "--rollkit.aggregator",
    +        "--rollkit.da_address {0}".format(da_address),
    +        "--rollkit.sequencer_address {0}".format(sequencer_address),
    +        "--rollkit.sequencer_rollup_id wordle",
    +    ]
    +    # Define the jsonrpc ports
    +    wordle_ports = {
    +        "jsonrpc": PortSpec(
    +            number=26657, transport_protocol="TCP", application_protocol="http"
    +        ),
    +    }
    +    # Start the wordle chain
    +    wordle = plan.add_service(
    +        name="wordle",
    +        config=ServiceConfig(
    +            # Use the wordle image we just built
    +            image="wordle",
    +            # Set the command to start the wordle chain in the docker container
    +            cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)],
    +            ports=wordle_ports,
    +            public_ports=wordle_ports,
    +        ),
    +    )

    We now have all we need to run the wordle chain and connect to a local DA node.

    🚀 Run Wordle chain

    Run your wordle chain by running the following command:

    bash
    kurtosis run .

    You'll see an output like the following:

    bash
    INFO[2024-07-16T14:56:39-04:00] No Kurtosis engine was found; attempting to start one... 
    +INFO[2024-07-16T14:56:39-04:00] Starting the centralized logs components...  
    +INFO[2024-07-16T14:56:39-04:00] Centralized logs components started.         
    +INFO[2024-07-16T14:56:40-04:00] Reverse proxy started.                       
    +INFO[2024-07-16T14:56:43-04:00] Successfully started Kurtosis engine         
    +INFO[2024-07-16T14:56:43-04:00] Creating a new enclave for Starlark to run inside... 
    +INFO[2024-07-16T14:56:46-04:00] Enclave 'yearning-bog' created successfully  
    +INFO[2024-07-16T14:56:46-04:00] Executing Starlark package at '/Users/matt/Code/test/wordle' as the passed argument '.' looks like a directory 
    +INFO[2024-07-16T14:56:46-04:00] Compressing package 'github.com/example-org/example-package' at '.' for upload 
    +INFO[2024-07-16T14:56:48-04:00] Uploading and executing package 'github.com/example-org/example-package' 
    +
    +Container images used in this run:
    +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached
    +> wordle - locally cached
    +
    +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1'
    +Service 'local-da' added with service UUID '775883b14f7f4db393addcebe3afe34d'
    +
    +Printing a message
    +connecting to da layer via http://172.16.0.5:7980
    +
    +Adding service with name 'wordle' and image 'wordle'
    +Service 'wordle' added with service UUID '5a969765174a47ada0727bd68e087f36'
    +
    +Starlark code successfully run. No output was returned.
    +
    + us on GitHub - https://github.com/kurtosis-tech/kurtosis
    +INFO[2024-07-16T14:56:54-04:00] ===================================================== 
    +INFO[2024-07-16T14:56:54-04:00] ||          Created enclave: yearning-bog          || 
    +INFO[2024-07-16T14:56:54-04:00] ===================================================== 
    +Name:            yearning-bog
    +UUID:            dc4026b38a60
    +Status:          RUNNING
    +Creation Time:   Tue, 16 Jul 2024 14:56:43 EDT
    +Flags:           
    +
    +========================================= Files Artifacts =========================================
    +UUID   Name
    +
    +========================================== User Services ==========================================
    +UUID           Name       Ports                                          Status
    +775883b14f7f   local-da   jsonrpc: 7980/tcp -> http://127.0.0.1:7980     RUNNING
    +5a969765174a   wordle     jsonrpc: 26657/tcp -> http://127.0.0.1:26657   RUNNING

    Congratulations! You have successfully run the wordle chain in Kurtosis.

    🚀 Interacting with the chain

    Since we used the docker image to run the chain in Kurtosis, we can interact with the chain by entering the docker container.

    You can see the docker containers running with the wordle chain and the local DA node by running the following command:

    bash
    docker ps

    You should see the following output:

    bash
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
    +cbf66a881cb2   wordle:latest                     "/bin/sh -c 'rollkit…"   5 seconds ago    Up 4 seconds    0.0.0.0:26657->26657/tcp                                                           wordle--5a969765174a47ada0727bd68e087f36
    +09bdf1e94862   ghcr.io/rollkit/local-da:v0.2.1   "local-da -listen-all"   6 seconds ago    Up 5 seconds    0.0.0.0:7980->7980/tcp                                                             local-da--775883b14f7f4db393addcebe3afe34d
    +2b50989f65cd   kurtosistech/core:0.90.1          "/bin/sh -c ./api-co…"   14 seconds ago   Up 13 seconds   0.0.0.0:57050->7443/tcp                                                            kurtosis-api--dc4026b38a604b82af88a0cd9bedb245
    +74b6708de48e   fluent/fluent-bit:1.9.7           "/fluent-bit/bin/flu…"   14 seconds ago   Up 13 seconds   2020/tcp                                                                           kurtosis-logs-collector--dc4026b38a604b82af88a0cd9bedb245
    +f1a64151bd29   kurtosistech/engine:0.90.1        "/bin/sh -c ./kurtos…"   18 seconds ago   Up 17 seconds   0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp   kurtosis-engine--089b9be758464668857fa46c2187bfe3
    +ce2291909a3d   traefik:2.10.6                    "/bin/sh -c 'mkdir -…"   19 seconds ago   Up 18 seconds   80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp                                           kurtosis-reverse-proxy--089b9be758464668857fa46c2187bfe3
    +2e8da9bdf81f   timberio/vector:0.31.0-debian     "/bin/sh -c 'printf …"   19 seconds ago   Up 18 seconds                                                                                      kurtosis-logs-aggregator

    We can see the wordle chain running in container wordle--5a969765174a47ada0727bd68e087f36 and the local DA network running in container local-da--775883b14f7f4db393addcebe3afe34d.

    Let's hold on to the container name for the world chain as we will need it later.

    bash
    WORDLE=$(docker ps --format '{{.Names}}' | grep wordle)
    +echo $WORDLE

    You can verify the chain is running by checking the logs:

    bash
    docker logs $WORDLE

    You should see the following output:

    bash
    ...
    +6:56PM INF executed block app_hash=313F7C52E30B3DEE3511D66B3E2C1B2A56DF4CDE54A90B02AC79678D822B644A height=5 module=BlockManager
    +6:56PM INF indexed block events height=5 module=txindex
    +6:56PM INF Creating and publishing block height=6 module=BlockManager
    +6:56PM INF finalized block block_app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager num_txs_res=0 num_val_updates=0
    +6:56PM INF executed block app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager
    +6:56PM INF indexed block events height=6 module=txindex
    +6:57PM INF Creating and publishing block height=7 module=BlockManager
    +6:57PM INF finalized block block_app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager num_txs_res=0 num_val_updates=0
    +6:57PM INF executed block app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager
    +6:57PM INF indexed block events height=7 module=txindex
    +6:57PM INF Creating and publishing block height=8 module=BlockManager
    +6:57PM INF finalized block block_app_hash=C93D26AEE9B611952C8122DEB67DBAD95B3604F5C9C5DFBA95A3E7A4CF0AF641 height=8 module=BlockManager num_txs_res=0 num_val_updates=0
    +...

    Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running:

    bash
    docker exec -it $WORDLE sh

    Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the Wordle tutorial.

    Once you are done interacting with your chain, you can exit out of your docker container with:

    bash
    exit

    Then you can shut down your chain and kurtosis by running:

    bash
    kurtosis clean -a

    🎉 Next steps

    Congratulations again! You now know how to run your chain with Kurtosis and interact with it using the Rollkit CLI in the docker container.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/quick-start.html b/pr-528/tutorials/quick-start.html new file mode 100644 index 000000000..dbc213f62 --- /dev/null +++ b/pr-528/tutorials/quick-start.html @@ -0,0 +1,80 @@ + + + + + + Quick start guide | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Quick start guide

    Welcome to Rollkit, a sovereign rollup framework! The easiest way to launch your sovereign rollup node is by using the Rollkit CLI.

    📦 Install Rollkit (CLI)

    To install Rollkit, run the following command in your terminal:

    bash
    curl -sSL https://rollkit.dev/install.sh | sh -s v0.14.1

    Verify the installation by checking the Rollkit version:

    bash
    rollkit version

    A successful installation will display the version number and its associated git commit hash.

    🚀 Run your sovereign rollup node

    To start a basic sovereign rollup node, execute:

    bash
    rollkit start

    Upon execution, the CLI will output log entries that provide insights into the node's initialization and operation:

    bash
    I[2024-05-01|09:58:46.001] Found private validator                      module=main keyFile=/root/.rollkit/config/priv_validator_key.json stateFile=/root/.rollkit/data/priv_validator_state.json
    +I[2024-05-01|09:58:46.002] Found node key                               module=main path=/root/.rollkit/config/node_key.json
    +I[2024-05-01|09:58:46.002] Found genesis file                           module=main path=/root/.rollkit/config/genesis.json
    +...
    +I[2024-05-01|09:58:46.080] Started node                                 module=main
    +I[2024-05-01|09:58:46.081] Creating and publishing block                module=BlockManager height=223
    +I[2024-05-01|09:58:46.082] Finalized block                              module=BlockManager height=223 num_txs_res=0 num_val_updates=0 block_app_hash=

    🎉 Conclusion

    That's it! Your sovereign rollup node is now up and running. It's incredibly simple to start a blockchain (which is essentially what a rollup is) these days using Rollkit. Explore further and discover how you can build useful applications on Rollkit. Good luck!

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/sequencing/astria.html b/pr-528/tutorials/sequencing/astria.html new file mode 100644 index 000000000..5746e698b --- /dev/null +++ b/pr-528/tutorials/sequencing/astria.html @@ -0,0 +1,73 @@ + + + + + + Astria Sequencing | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pr-528/tutorials/sequencing/based.html b/pr-528/tutorials/sequencing/based.html new file mode 100644 index 000000000..67bff7ebb --- /dev/null +++ b/pr-528/tutorials/sequencing/based.html @@ -0,0 +1,73 @@ + + + + + + Based Sequencing | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pr-528/tutorials/sequencing/centralized.html b/pr-528/tutorials/sequencing/centralized.html new file mode 100644 index 000000000..c8d1f4fab --- /dev/null +++ b/pr-528/tutorials/sequencing/centralized.html @@ -0,0 +1,104 @@ + + + + + + Centralized Sequencer | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Centralized Sequencer

    A centralized sequencer is a sequencing middleware that receives rollup transactions and provides a local sequencing capabilities. Meaning, the transactions are ordered in the order they are received by the sequencer without any censorship. Further, the sequenced batches are made available in the DA network (such as Celestia). Under the hood, the centralized sequencer is a GRPC server that implements go-sequencing interface and the server is hosted by the same node that is running the aggregator for the Rollkit rollup.

    Rollkit with Centralized Sequencer

    Prerequisites

    This tutorial serves as a comprehensive guide for using the centralized-sequencer with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    TIP

    It is important to note that the centralized sequencer expects a DA layer to be running when it starts. This means that you need to launch your DA Layer before starting the centralized sequencer.

    Additionally, you should have completed one of the DA Layer tutorials and have your DA layer ready to use with the centralized sequencer. This tutorial will use the local-da layer as an example.

    Installation the Centralized Sequencer

    sh
    git clone --depth 1 --branch v0.4.0 https://github.com/rollkit/centralized-sequencer.git
    +cd centralized-sequencer
    +make build
    +./build/centralized-sequencer -h

    You should see the following output:

    sh
    Usage:
    +  -host string
    +    	centralized sequencer host (default "localhost")
    +  -port string
    +    	centralized sequencer port (default "50051")
    +  -listen-all
    +    	listen on all network interfaces (0.0.0.0) instead of just localhost
    +  -rollup-id string
    +    	rollup id (default "rollupId")
    +  -batch-time duration
    +    	time in seconds to wait before generating a new batch (default 2s)
    +  -da_address string
    +    	DA address (default "http://localhost:26658")
    +  -da_auth_token string
    +    	auth token for the DA
    +  -da_namespace string
    +    	DA namespace where the sequencer submits transactions
    +  -db_path string
    +    	path to the database
    +...

    As shown by the help command, a centralized sequencer is configured to serve a rollup (via rollup_id). The DA network to persist the sequenced batches are specified using da_address, da_auth_token and da_namespace.

    Run the centralized sequencer

    TIP

    As mentioned in the prerequisities, you should have your DA layer running. These steps assume the local-da is running on http://localhost:7980.

    Start your centralized sequencer with the following command:

    sh
    ./build/centralized-sequencer -rollup-id my-rollup -da_address http://localhost:7980
    sh
    ./build/centralized-sequencer -rollup-id wordle -da_address http://localhost:7980

    Run your chain

    To connect your chain to the centralized sequencer, you need to pass the --rollkit.sequencer_address flag with the local sequencer address and the --rollkit.sequencer_rollup_id to ensure your rollup id matches what the sequencer is expecting.

    Start your chain with the following command, ensuring to include the sequencer flag:

    sh
    rollkit start \
    +    --rollkit.da_address http://localhost:7980 \
    +    --rollkit.sequencer_address localhost:50051 \
    +    --rollkit.sequencer_rollup_id my-rollup
    sh
    rollkit start \
    +    --rollkit.aggregator \
    +    --rollkit.da_address http://localhost:7980 \
    +    --rollkit.sequencer_address localhost:50051 \
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log messages indicating that your chain is connected to the local sequencer:

    sh
    I[2024-11-15|15:22:33.636] sequencer already running                 module=main address=localhost:50051
    +I[2024-11-15|15:22:33.636] make sure your rollupID matches your sequencer module=main rollupID=my-rollup

    Then after a few blocks you should see this message confirming that your sequencer is successfully submitting batches to the DA layer:

    sh
    I[2024-11-15|16:04:07.698] successfully submitted Rollkit headers to DA layer module=BlockManager gasPrice=-1 daHeight=1 headerCount=14

    Metrics

    The centralized-sequencer node reports Prometheus metrics when the -metrics flag is enabled.

    By default, metrics are exported to http://localhost:8080/metrics.

    The listening address and port can be configured with the -metrics-address flag.

    The following metrics are available:

    NameTypeTagsDescription
    sequencer_gas_priceGaugeGas price of the DA transaction
    sequencer_last_blob_sizeGaugeLast blob size submitted to the DA
    sequencer_transaction_statusGaugeTransaction status of the DA transaction
    sequencer_num_pending_blocksGaugeNumber of blocks pending DA submission
    sequencer_included_block_heightGaugeBlock height of the last DA transaction

    Summary

    By following these steps, you will have successfully set up and connected your chain to the centralized sequencer. You can now start submitting transactions to your chain.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/sequencing/forced-inclusion.html b/pr-528/tutorials/sequencing/forced-inclusion.html new file mode 100644 index 000000000..b9562f391 --- /dev/null +++ b/pr-528/tutorials/sequencing/forced-inclusion.html @@ -0,0 +1,73 @@ + + + + + + Forced Inclusion | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pr-528/tutorials/sequencing/local.html b/pr-528/tutorials/sequencing/local.html new file mode 100644 index 000000000..918ebf311 --- /dev/null +++ b/pr-528/tutorials/sequencing/local.html @@ -0,0 +1,80 @@ + + + + + + Local Sequencer | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Local Sequencer

    Introduction

    This tutorial serves as a comprehensive guide for using the local-sequencer with your chain.

    Before proceeding, ensure that you have completed the quick start or build a chain tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.

    Setting Up a Local Local Sequencer

    To set up a local sequencer on your machine, run the following script to install and start the local sequencer:

    bash
    curl -sSL https://rollkit.dev/install-local-sequencer.sh | bash -s v0.4.1 my-rollup
    bash
    curl -sSL https://rollkit.dev/install-local-sequencer.sh | bash -s v0.4.1 wordle

    This script will build and run the sequencer, which will then listen on port 50051 with the rollup-id of your chain.

    Configuring your chain to connect to the local sequencer

    To connect your chain to the local sequencer, you need to pass the --rollkit.sequencer_address flag with the centralized sequencer address and the --rollkit.sequencer_rollup_id to ensure your rollup id matches what the sequencer is expecting.

    Run your chain

    Start your chain with the following command, ensuring to include the sequencer flag:

    sh
    rollkit start \
    +    --rollkit.sequencer_address localhost:50051 \
    +    --rollkit.sequencer_rollup_id my-rollup
    sh
    rollkit start \
    +    --rollkit.aggregator \
    +    --rollkit.sequencer_address localhost:50051 \
    +    --rollkit.sequencer_rollup_id wordle

    You should see the following log messages indicating that your chain is connected to the local sequencer:

    sh
    I[2024-11-15|15:22:33.636] sequencer already running                 module=main address=localhost:50051
    +I[2024-11-15|15:22:33.636] make sure your rollupID matches your sequencer module=main rollupID=my-rollup

    Summary

    By following these steps, you will have successfully set up and connected your chain to the local sequencer. You can now start submitting transactions to your chain.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/sequencing/overview.html b/pr-528/tutorials/sequencing/overview.html new file mode 100644 index 000000000..dd1a17942 --- /dev/null +++ b/pr-528/tutorials/sequencing/overview.html @@ -0,0 +1,77 @@ + + + + + + Sequencing | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Sequencing

    The next step after choosing your DA layer is to choose your sequencing scheme.

    Rollkit prior to Sequencing

    Rollkit's aggregator node was responsible for selecting and ordering transactions for including in the rollup blocks. The Rollkit aggregator used to follow a FCFS strategy, where every transaction submitted gets included in the block in order without any censorship. Use of a different sequencing strategy or connecting to a sequencing network (e.g., Astria) was not possible. Rollkit v0.14.0 onwards makes it possible for rollkit to connect to a sequencing network and communicate via grpc.

    Sequencing Interface

    go-sequencing defines a sequencing interface for communicating between any sequencing network and Rollkit. The key functions of the interface are defined as shown below.

    go
    SubmitRollupTransaction(rollupId, data) returns (error)
    +
    +GetNextBatch(rollupId, lastBatchHash, maxBytes) returns (batch, timestamp)
    +
    +VerifyBatch(rollupId, batchHash) returns (status)

    It mainly consists of:

    • SubmitRollupTransaction relays the rollup transactions from Rollkit rollup to the sequencing network
    • GetNextBatch returns the next batch of transactions along with a deterministic timestamp
    • VerifyBatch validates the sequenced batch

    Mock Sequencer

    You might have noticed that we did not define a specific sequencer during the quick start or build a chain tutorials. This is because we used a mock sequencer that is built into Rollkit.

    If you revisit the logs from those tutorials, you will see one of the first lines being:

    shell
    I[2024-11-15|14:54:19.843] Starting mock sequencer    module=main address=localhost:50051 rollupID=test-rollup-a736683c

    The mock sequencer is a simple in-memory sequencer that is great for testing and development. It is not suitable for production use.

    Sequencing Implementations

    An implementation of the sequencing interface mainly acts as a middleware that connects Rollkit rollup and the sequencing layer. It implements the sequencing interface functions described above. For example, centralized-sequencer is the refactored functionality from the Rollkit prior to v0.14.0. The centralized sequencer is the middleware run by the aggregator node of the Rollkit rollup. The aggregator node relays rollup transactions to centralized sequencer which then submits them to the DA network (such as Celestia). The header producer node then retrieves (via GetNextBatch) the batched transaction from the centralized sequencer to execute the transactions and produce the updated rollup state. Similarly, there are other sequencing middlewares which can be built for various sequencing strategies or even for connecting to different third-party sequencing networks.

    The sequencing implementations that are currently work in progress:

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/tutorials/wordle.html b/pr-528/tutorials/wordle.html new file mode 100644 index 000000000..9357c7562 --- /dev/null +++ b/pr-528/tutorials/wordle.html @@ -0,0 +1,270 @@ + + + + + + 🕹️ Wordle app | Rollkit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    🕹️ Wordle app

    wordle-app

    This tutorial guide will go over building a cosmos-sdk app for Rollkit, the Sovereign-Rollup implementation of CometBFT, for the popular game Wordle.

    This tutorial will go over how to setup Rollkit in the Ignite CLI and use it to build the game. The tutorial will go over the simple design, as well as conclude with future implementations and ideas to extend this codebase.

    TIP

    This tutorial explores Rollkit, currently in Alpha. If you encounter bugs, please report them via a GitHub issue ticket or reach out in our Telegram group.

    💻 Pre-requisites

    This tutorial is targeted for developers who have some experience in the Cosmos-SDK. We will go through the steps to build the chain, but for more information on how the Cosmos-SDK components work, check out the Cosmos-SDK Docs.

    Additionally, we recommend that you have gone over the quick start guide first to see an example of a running chain.

    You also need to have Rollkit CLI installed. You can install it by running:

    bash
    curl -sSL https://rollkit.dev/install.sh | sh -s v0.14.1

    📖 Design implementation

    The rules of Wordle are simple: You have to guess the word of the day.

    Key Points to Consider:

    • The word is a five-letter word.
    • You have 6 guesses.
    • Every 24 hours, there’s a new word.

    The GUI for Wordle shows you a few indicators: a green highlight on a letter in a certain position means that’s the correct letter for the Wordle in the right position. A yellow highlight means it’s a correct letter for the Wordle included in the wrong position. A grey highlight means the letter isn’t part of the Wordle.

    For simplicity of the design, we will avoid those hints, although there are ways to extend this codebase to implement that, which we will show at the end.

    In this current design, we implement the following rules:

    • 1 Wordle can be submitted per day
    • Every address will have 6 tries to guess the word
    • It must be a five-letter word.
    • Whoever guesses the word correctly before their 6 tries are over gets an award of 100 WORDLE tokens.

    We will go over the architecture to achieve this further in the guide. But for now, we will get started setting up our development environment.

    ⛓️ Ignite and scaffolding the wordle chain

    🔥 Ignite

    Ignite is an amazing CLI tool to help us get started building our own blockchains for cosmos-sdk apps. It provides lots of power toolings and scaffoldings for adding messages, types, and modules with a host of cosmos-sdk libraries provided.

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    bash
    curl https://get.ignite.com/cli@v28.5.3! | bash

    This installs Ignite CLI in your local machine. This tutorial uses a macOS but it should work for Windows. For Windows users, check out the Ignite docs on installation for Windows machines.

    Now, refresh your terminal using source or open a new terminal session for the change to take place.

    If you run the following:

    bash
    ignite --help

    You should see an output of help commands meaning Ignite was installed successfully!

    ⛓️ Scaffolding the wordle chain

    Now, comes the fun part, creating a new blockchain! With Ignite, the process is pretty easy and straightforward.

    Ignite CLI comes with several scaffolding commands that are designed to make development more straightforward by creating everything you need to build your blockchain.

    First, we will use Ignite CLI to build the foundation of a fresh Cosmos SDK blockchain. Ignite minimizes how much blockchain code you must write yourself. If you are coming from the EVM-world, think of Ignite as a Cosmos-SDK version of Foundry or Hardhat but specifically designed to build blockchains.

    we first run the following command to set up our project for our new blockchain, wordle.

    bash
    ignite scaffold chain wordle --no-module

    This command scaffolds a new chain directory called wordle in your local directory from which you ran the command. Notice that we passed the --no-module flag, this is because we will be creating the module after.

    🗂️ Wordle directory

    Now, it’s time to enter the directory:

    bash
    cd wordle

    Inside you will see several directories and architecture for your cosmos-sdk blockchain.

    File/directoryPurpose
    app/Files that wire together the blockchain. The most important file is app.go that contains type definition of the blockchain and functions to create and initialize it.
    cmd/The main package responsible for the CLI of compiled binary.
    docs/Directory for project documentation. By default, an OpenAPI spec is generated.
    proto/Protocol buffer files describing the data structure.
    testutil/Helper functions for testing.
    vue/A Vue 3 web app template.
    x/Cosmos SDK modules and custom modules.
    config.ymlA configuration file for customizing a chain in development.
    readme.mdA readme file for your sovereign application-specific blockchain project.

    Going over each one is outside the scope of this guide, but we encourage you to read about it here.

    Most of the tutorial work will happen inside the x directory.

    🛠️ Setting up Rollkit

    Before we continue with building our Wordle App, we need to set up Rollkit on our codebase.

    🗞️ Installing Rollkit

    To install the Rollkit app to Ignite, run the following command:

    bash
    ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.1

    Next, add Rollkit to your project by running:

    bash
    ignite rollkit add

    ✨ Creating the wordle module

    For the Wordle module, we can add dependencies offered by Cosmos-SDK.

    From the Cosmos-SDK docs, a module is defined as the following:

    In a Cosmos SDK blockchain, application-specific logic is implemented in separate modules. Modules keep code easy to understand and reuse. Each module contains its own message and transaction processor, while the Cosmos SDK is responsible for routing each message to its respective module.

    Many modules exist for slashing, validating, auth.

    🔖 Scaffolding a module

    We will be using the bank module dependency for transactions.

    From the Cosmos-SDK docs, the bank module is defined as the following:

    The bank module is responsible for handling multi-asset coin transfers between accounts and tracking special-case pseudo-transfers which must work differently with particular kinds of accounts (notably delegating/undelegating for vesting accounts). It exposes several interfaces with varying capabilities for secure interaction with other modules which must alter user balances.

    We build the module with the bank dependency with the following command:

    bash
    ignite scaffold module wordle --dep bank -y

    This will scaffold the Wordle module to our Wordle Chain project.

    ✉️ Messages

    Messages allow us to process and submit information to our specific module.

    From the Cosmos-SDK docs, messages are:

    In the Cosmos SDK, messages are objects that are contained in transactions to trigger state transitions. Each Cosmos SDK module defines a list of messages and how to handle them.

    For messages for Wordle, given our initial design, we will make 2 messages with ignite.

    • The first one is: SubmitWordle and it only passes the Wordle of the Day.
    • The second one is: SubmitGuess and it attempts to guess the submitted wordle. It also passes a word as a guess.

    With these initial designs, we can start creating our messages!

    💬 Scaffolding a message

    To create the SubmitWordle message, we run the following command:

    bash
    ignite scaffold message submit-wordle word -y

    This creates the submit-wordle message that takes in word as a parameter.

    We now create the final message, SubmitGuess:

    bash
    ignite scaffold message submit-guess word -y

    Here, we are passing a word as a guess with submit-guess.

    🎨 Wordle types

    For the next steps, we will be creating types to be used by the messages we created.

    🏗️ Scaffolding wordle types

    bash
    ignite scaffold map wordle word submitter --no-message -y

    This type is a map called Wordle with two values of word and submitter. submitter is the address of the person that submitted the Wordle.

    The second type is the Guess type. It allows us to store the latest guess for each address that submitted a solution.

    bash
    ignite scaffold map guess word submitter count --no-message -y

    Here, we are also storing count to count how many guesses this address submitted.

    🔐 Keeper functions

    Now it’s time to implement the Keeper functions for each message. From the Cosmos-SDK docs, Keeper is defined as the following:

    The main core of a Cosmos SDK module is a piece called the keeper. The keeper handles interactions with the store, has references to other keepers for cross-module interactions, and contains most of the core functionality of a module.

    Keeper is an abstraction on Cosmos that allows us to interact with the Key-Value store and change the state of the blockchain.

    Here, it will help us outline the logic for each message we create.

    📤 SubmitWordle function

    We first start with the SubmitWordle function.

    Open up the following file: x/wordle/keeper/msg_server_submit_wordle.go

    Inside the following, replace the current code with the following code, which we will go over in a bit:

    go
    package keeper
    +
    +import (
    +  "context"
    +  "crypto/sha256"
    +  "encoding/hex"
    +  "wordle/x/wordle/types"
    +  "cosmossdk.io/errors"
    +  sdk "github.com/cosmos/cosmos-sdk/types"
    +  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
    +  "time"
    +  "unicode"
    +)
    +
    +func (k msgServer) SubmitWordle(goCtx context.Context, msg *types.MsgSubmitWordle) (*types.MsgSubmitWordleResponse, error) {
    +  ctx := sdk.UnwrapSDKContext(goCtx)
    +  // Check to See the Wordle is 5 letters
    +  if len(msg.Word) != 5 {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle Must Be A 5 Letter Word")
    +  }
    +  // Check to See Only Alphabets Are Passed for the Wordle
    +  if !(IsLetter(msg.Word)) {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle Must Only Consist Of Letters In The Alphabet")
    +  }
    +
    +  // Use Current Day to Create The Index of the Newly-Submitted Wordle of the Day
    +  currentTime := time.Now().Local()
    +  var currentTimeBytes = []byte(currentTime.Format("2006-01-02"))
    +  var currentTimeHash = sha256.Sum256(currentTimeBytes)
    +  var currentTimeHashString = hex.EncodeToString(currentTimeHash[:])
    +  // Hash The Newly-Submitted Wordle of the Day
    +  var submittedSolutionHash = sha256.Sum256([]byte(msg.Word))
    +  var submittedSolutionHashString = hex.EncodeToString(submittedSolutionHash[:])
    +
    +  var wordle = types.Wordle{
    +    Index:     currentTimeHashString,
    +    Word:      submittedSolutionHashString,
    +    Submitter: msg.Creator,
    +  }
    +
    +  // Try to Get Wordle From KV Store Using Current Day as Key
    +  // This Helps ensure only one Wordle is submitted per day
    +  _, isFound := k.GetWordle(ctx, currentTimeHashString)
    +  if isFound {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle of the Day is Already Submitted")
    +  }
    +  // Write Wordle to KV Store
    +  k.SetWordle(ctx, wordle)
    +  reward := sdk.Coins{sdk.NewInt64Coin("token", 100)}
    +  // Escrow Reward
    +  submitterAddress, _ := sdk.AccAddressFromBech32(msg.Creator)
    +  err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, submitterAddress, types.ModuleName, reward)
    +  if err != nil {
    +    return nil, err
    +  }
    +  return &types.MsgSubmitWordleResponse{}, nil
    +}
    +
    +func IsLetter(s string) bool {
    +  for _, r := range s {
    +    if !unicode.IsLetter(r) {
    +      return false
    +    }
    +  }
    +  return true
    +}

    Here in the SubmitWordle Keeper function, we are doing a few things:

    • We first ensure that a word submitted for Wordle of the Day is 5 letters long and only uses alphabets. That means no integers can be submitted in the string.
    • We then create a hash from the current day the moment the Wordle was submitted. We set this hash to the index of the Wordle type. This allows us to look up any guesses for this Wordle for subsequent guesses, which we will go over next.
    • We then check if the index for today’s date is currently empty or not. If it’s not empty, this means a Wordle has already been submitted. Remember, only one wordle can be submitted per day. Everyone else has to guess the submitted wordle.
    • We also have a helper function in there to check if a string only contains alphabet characters.

    SubmitGuess function

    The next Keeper function we will add is the following: x/wordle/keeper/msg_server_submit_guess.go

    Open that file and replace its contents with the following code, which we will explain in a bit:

    go
    package keeper
    +
    +import (
    +  "context"
    +  "crypto/sha256"
    +  "encoding/hex"
    +  "wordle/x/wordle/types"
    +  "cosmossdk.io/errors"
    +  sdk "github.com/cosmos/cosmos-sdk/types"
    +  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
    +  "strconv"
    +  "time"
    +)
    +
    +func (k msgServer) SubmitGuess(goCtx context.Context, msg *types.MsgSubmitGuess) (*types.MsgSubmitGuessResponse, error) {
    +  ctx := sdk.UnwrapSDKContext(goCtx)
    +  // Check Word is 5 Characters Long
    +  if len(msg.Word) != 5 {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Guess Must Be A 5 Letter Word!")
    +  }
    + 
    +  // Check String Contains Alphabet Letters Only
    +  if !(IsLetter(msg.Word)) {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Guess Must Only Consist of Alphabet Letters!")
    +  }
    +
    +  // Get Current Day to Pull Up Wordle of That Day As A Hash
    +  currentTime := time.Now().Local()
    +  var currentTimeBytes = []byte(currentTime.Format("2006-01-02"))
    +  var currentTimeHash = sha256.Sum256(currentTimeBytes)
    +  var currentTimeHashString = hex.EncodeToString(currentTimeHash[:])
    +  wordle, isFound := k.GetWordle(ctx, currentTimeHashString)
    +  if !isFound {
    +    return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "Wordle of The Day Hasn't Been Submitted Yet. Feel Free to Submit One!")
    +  }
    +
    +  // We Convert Current Day and Guesser to A Hash To Use As An Index For Today's Guesses For That Guesser
    +  // That Way, A Person Can Guess 6 Times A Day For Each New Wordle Created
    +  var currentTimeGuesserBytes = []byte(currentTime.Format("2006-01-02") + msg.Creator)
    +  var currentTimeGuesserHash = sha256.Sum256(currentTimeGuesserBytes)
    +  var currentTimeGuesserHashString = hex.EncodeToString(currentTimeGuesserHash[:])
    +  // Hash The Guess To The Wordle
    +  var submittedSolutionHash = sha256.Sum256([]byte(msg.Word))
    +  var submittedSolutionHashString = hex.EncodeToString(submittedSolutionHash[:])
    +
    +  // Get the Latest Guess entry for this Submitter for the current Wordle of the Day
    +  var count int
    +  guess, isFound := k.GetGuess(ctx, currentTimeGuesserHashString)
    +  if isFound {
    +    // Check if Submitter Reached 6 Tries
    +    if guess.Count == strconv.Itoa(6) {
    +      return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "You Have Guessed The Maximum Amount of Times for The Day! Try Again Tomorrow With A New Wordle.")
    +    }
    +    currentCount, err := strconv.Atoi(guess.Count)
    +    if err != nil {
    +      panic(err)
    +    }
    +    count = currentCount
    +  } else {
    +    // Initialize Count Value If No Entry Exists for this Submitter for Today's Wordle
    +    count = 0
    +  }
    +  // Increment Guess Count
    +  count += 1
    +  var newGuess = types.Guess{
    +    Index:     currentTimeGuesserHashString,
    +    Submitter: msg.Creator,
    +    Word:      submittedSolutionHashString,
    +    Count:     strconv.Itoa(count),
    +  }
    +  // Remove Current Guess Entry to be Updated With New Entry
    +  k.RemoveGuess(ctx, currentTimeGuesserHashString)
    +  // Add New Guess Entry
    +  k.SetGuess(ctx, newGuess)
    +  if !(wordle.Word == submittedSolutionHashString) {
    +    return &types.MsgSubmitGuessResponse{Title: "Wrong Answer", Body: "Your Guess Was Wrong. Try Again"}, nil
    +  } else {
    +    // Setup Reward 
    +    reward := sdk.Coins{sdk.NewInt64Coin("token", 100)}
    +    // If Submitter Guesses Correctly
    +    guesserAddress, _ := sdk.AccAddressFromBech32(msg.Creator)
    +    // Send Reward
    +    err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, guesserAddress, reward)
    +    if err !=nil {
    +      return nil, err
    +    }
    +    return &types.MsgSubmitGuessResponse{Title: "Correct", Body: "You Guessed The Wordle Correctly!"}, nil
    +  }
    +}

    In the above code, we are doing the following things:

    • Here, we are doing initial checks again on the word to ensure it’s 5 characters and only alphabet characters are used, which can be refactored in the future or checked within the CLI commands.
    • We then get the Wordle of the Day by getting the hash string of the current day.
    • Next we create a hash string of current day and the Submitter. This allows us to create a Guess type with an index that uses the current day and the address of the submitter. This helps us when we face a new day and an address wants to guess the new wordle of the day. The index setup ensures they can continue guessing a new wordle every day up to the max of 6 tries per day.
    • We then check if that Guess type for the Submitter for today’s wordle did reach 6 counts. If it hasn’t, we increment the count. We then check if the guess is correct. We store the Guess type with the updated count to the state.

    📦 Protobuf file

    A few files need to be modified for this to work.

    The first is proto/wordle/wordle/tx.proto.

    Inside this file, fill in the empty MsgSubmitGuessResponse with the following code:

    go
    message MsgSubmitGuessResponse {
    +  string title = 1;
    +  string body = 2;
    +}

    Next file is x/wordle/types/expected_keepers.go

    Here, we need to add the SendCoins method to the BankKeeper interface in order to allow sending the reward to the right guesser.

    go
    type BankKeeper interface {
    +  ...
    +  // Methods imported from bank should be defined here
    +  SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
    +  SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
    +}

    With that, we implemented all our Keeper functions! Time to compile the blockchain and take it out for a test drive.

    ⛓️ Run the wordle chain

    🟢 Building and running wordle chain

    Initialize the Rollkit chain configuration for a local DA network with this command:

    bash
    ignite chain build && ignite rollkit init

    This will create a ~/.wordle directory with all the necessary files to run a chain.

    It will also initialize 2 accounts alice and bob:

    bash
    Initializing accounts...
    + Added account alice ...
    +
    + Added account bob ...

    We will use these accounts to submit transactions.

    Now let's initialize a rollkit.toml file in the worldle directory by running:

    bash
    rollkit toml init

    To start running the Wordle chain, run the following command:

    bash
    rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id wordle

    With that, we have kickstarted our wordle network!

    🚀 Interacting with the chain

    In another window, from the ~/wordle directory (where rollkit.toml is located) run the following command to submit a Wordle from alice:

    bash
    rollkit tx wordle submit-wordle giant --from alice --keyring-backend test --chain-id wordle -b async

    NOTE: We are submitting a transaction asynchronously to avoid any timeout errors. With Rollkit as a replacement to CometBFT, we need to wait for the data availability network to ensure a block was included from Wordle, before proceeding to the next block. Currently, in Rollkit, the single aggregator is not moving forward with the next block production as long as it is trying to submit the current block to the DA network. In the future, with leader selection, block production and sync logic improves dramatically.

    This will ask you to confirm the transaction with the following message:

    bash
    auth_info:
    +  fee:
    +    amount: []
    +    gas_limit: "200000"
    +    granter: ""
    +    payer: ""
    +  signer_infos: []
    +  tip: null
    +body:
    +  extension_options: []
    +  memo: ""
    +  messages:
    +  - '@type': /wordle.wordle.MsgSubmitWordle
    +    creator: cosmos1mr9p6wql4mmtp9xvsuklpw7fxx6g0qte7qd5q9
    +    word: giant
    +  non_critical_extension_options: []
    +  timeout_height: "0"
    +signatures: []
    +confirm transaction before signing and broadcasting [y/N]:

    Confirm with a y.

    You will then get a response with a transaction hash as shown here:

    bash
    code: 0
    +codespace: ""
    +data: ""
    +events: []
    +gas_used: "0"
    +gas_wanted: "0"
    +height: "0"
    +info: ""
    +logs: []
    +raw_log: ""
    +timestamp: ""
    +tx: null
    +txhash: F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Let's grab the txhash for later:

    bash
    TX_HASH=F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Note, this does not mean the transaction was included in the block yet. Let's query the transaction hash to check whether it has been included in the block yet or if there are any errors.

    bash
    rollkit query tx --type=hash $TX_HASH --output json | jq -r '.raw_log'

    This should display an output like the following:

    json
    [{"events":[{"type":"message","attributes":[{"key":"action","value":"submit_wordle"
    +}]}]}]

    Test out a few things for fun:

    bash
    rollkit tx wordle submit-guess 12345 --from bob --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted integers.

    Now try:

    bash
    rollkit  tx wordle submit-guess ABCDEFG --from bob --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted a word larger than 5 characters.

    Now try to submit another wordle even though one was already submitted

    bash
    rollkit tx wordle submit-wordle meter --from bob --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. You will get an error that a wordle has already been submitted for the day.

    Now let’s try to guess a five letter word:

    bash
    rollkit tx wordle submit-guess least --from bob --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. Given you didn’t guess the correct word, it will increment the guess count for bob's account.

    We can verify this by querying the list:

    bash
    rollkit q wordle list-guess --output json

    This outputs all Guess objects submitted so far, with the index being today’s date and the address of the submitter.

    With that, we implemented a basic example of Wordle using Cosmos-SDK and Ignite and Rollkit. Read on to how you can extend the code base.

    🔮 Extending in the future

    There are many ways this codebase can be extended:

    1. You can improve messaging around when you guess the correct word.
    2. You can hash the word prior to submitting it to the chain, ensuring the hashing is local so that it’s not revealed via front-running by others monitoring the plaintext string when it’s submitted on-chain.
    3. You can improve the UI in terminal using a nice interface for Wordle. Some examples are here.
    4. You can improve current date to stick to a specific timezone.
    5. You can create a bot that submits a wordle every day at a specific time.
    6. You can create a vue.js front-end with Ignite using example open-source repositories here and here.

    🎉 Next steps

    Congratulations! You've built a Wordle app using Cosmos-SDK and Rollkit. Now, explore connecting your chain to DA networks like Celestia.

    Released under the APACHE-2.0 License

    + + + + \ No newline at end of file diff --git a/pr-528/vp-icons.css b/pr-528/vp-icons.css new file mode 100644 index 000000000..cb3632f11 --- /dev/null +++ b/pr-528/vp-icons.css @@ -0,0 +1 @@ +.vpi-social-github{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-twitter{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M21.543 7.104c.015.211.015.423.015.636c0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041a4.93 4.93 0 0 1-4.6-3.42a4.9 4.9 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.9 4.9 0 0 0 2.235.616A4.93 4.93 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144a4.929 4.929 0 0 1 8.39-4.49a9.9 9.9 0 0 0 3.128-1.196a4.94 4.94 0 0 1-2.165 2.724A9.8 9.8 0 0 0 24 4.555a10 10 0 0 1-2.457 2.549'/%3E%3C/svg%3E")} \ No newline at end of file diff --git a/pr-528/wordle/init.sh b/pr-528/wordle/init.sh new file mode 100644 index 000000000..4babd29c2 --- /dev/null +++ b/pr-528/wordle/init.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# set variables for the chain +VALIDATOR_NAME=validator1 +CHAIN_ID=wordle +KEY_NAME=wordle-key +CHAINFLAG="--chain-id ${CHAIN_ID}" +TOKEN_AMOUNT="10000000000000000000000000stake" +STAKING_AMOUNT="1000000000stake" + +# build the wordle chain with Rollkit +ignite chain build + +# reset any existing genesis/chain data +wordled tendermint unsafe-reset-all + +# initialize the validator with the chain ID you set +wordled init $VALIDATOR_NAME --chain-id $CHAIN_ID + +# add key to keyring-backend test +wordled keys add $KEY_NAME --keyring-backend test + +# add a genesis account +wordled genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test + +# set the staking amount in the genesis transaction +wordled genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test + +# collect genesis transactions +wordled genesis collect-gentxs + +# copy centralized sequencer address into genesis.json +# Note: validator and sequencer are used interchangeably here +ADDRESS=$(jq -r '.address' ~/.wordle/config/priv_validator_key.json) +PUB_KEY=$(jq -r '.pub_key' ~/.wordle/config/priv_validator_key.json) +jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.wordle/config/genesis.json > temp.json && mv temp.json ~/.wordle/config/genesis.json + +# create a restart-testnet.sh file to restart the chain later +[ -f restart-wordle.sh ] && rm restart-wordle.sh + +echo "wordled start --rollkit.aggregator --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices=\"0.025stake\" --rollkit.da_address \"http://localhost:7980\"" >> restart-wordle.sh + +# start the chain +wordled start --rollkit.aggregator --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" --rollkit.da_address "http://localhost:7980" diff --git a/pr-528/wordle/wordle.png b/pr-528/wordle/wordle.png new file mode 100644 index 000000000..cdb62ec05 Binary files /dev/null and b/pr-528/wordle/wordle.png differ