diff --git a/.codeclimate.yml b/.codeclimate.yml index 8ef8ff5c..29c6a237 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -7,7 +7,7 @@ plugins: eslint: enabled: true channel: "eslint-4" - config: + config: config: .eslintrc.json checks: # indent rules on codeclimate seem to be different from @@ -21,4 +21,4 @@ exclude_patterns: - "dist" - "wikum" - "**/node_modules/" - - "COPYING" \ No newline at end of file + - "COPYING" diff --git a/.gitignore b/.gitignore index 5fc6ff8e..789206f7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ npm-debug.log siteverification.id tmp_*.md tracking.* +package-lock.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a142adf..f30ecf00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,11 +3,10 @@ image: node:latest cache: paths: - - node_modules/ + - node_modules/ test_async: script: - - npm install - - npm run build - - npm run check - + - npm install + - npm run build + - npm run check diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 81437909..f0b765ae 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,21 +14,21 @@ orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a3e60799..32fee188 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,45 +5,48 @@ So you want to contribute to mscgen_js? We already love you! To make this as easy as possible for you, here's some simple guidelines: ### Reporting issues -- All **issues** are **welcome**. + +- All **issues** are **welcome**. - These include bug reports, questions, feature requests and enhancement proposals - [GitHub's issue tracker](https://github.com/mscgenjs/mscgenjs-inpage/issues) is the easiest way to submit them. -- We prefer bug reports in **_steps taken_ - _expected_ - _found_** format. - - that makes it more easy to reproduce it, and concoct a solution that fits - your expectation. +- We prefer bug reports in **_steps taken_ - _expected_ - _found_** format. + - that makes it more easy to reproduce it, and concoct a solution that fits + your expectation. - If applicable, it is also nice when you provide - the **input** you used and - the **environment** (browser version/ os, or node.js version + os). - [template](#issue-template) at the bottom -- In turn, we try to **respond within a week**. +- In turn, we try to **respond within a week**. This might or might not include an actual code fix. ### Contributing code + - We prefer well documented **[pull requests](https://help.github.com/articles/creating-a-pull-request/)** based on the most recent version of the **master** branch. - Code quality - - Additions pass eslint as configured for this repo - - Mocha tests prove your code does what it intends. - - Your code does not introduce regressions - ```make check``` proves this. - - Code style (you know, petty things like indentations, where brackets go, - how variables & parameters are named) fits in with the current code base. -- Plan to do something drastic? + - Additions pass eslint as configured for this repo + - Mocha tests prove your code does what it intends. + - Your code does not introduce regressions - `make check` proves this. + - Code style (you know, petty things like indentations, where brackets go, + how variables & parameters are named) fits in with the current code base. +- Plan to do something drastic? Leave an [issue](https://github.com/mscgenjs/mscgenjs-inpage/issues/new) on GitHub - mscgenjs-inpage is released with a [code of conduct](CODE_OF_CONDUCT.md), adapted from the [contributor covenant](http://contributor-covenant.org/). ### Legal + - the code you add will be subject to [GPL-3.0](wikum/licenses/license.mscgen_js.md), just like the rest of mscgen_js - the code you add is your own original work - ### Issue template + ### steps taken ### expected diff --git a/dist/mscgen-inpage.js b/dist/mscgen-inpage.js index dcc49b56..837bb199 100644 --- a/dist/mscgen-inpage.js +++ b/dist/mscgen-inpage.js @@ -1 +1 @@ -(()=>{var t={730:t=>{var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var o,i,a=Object.prototype,u=a.hasOwnProperty,c=a.toString,s=a.propertyIsEnumerable,l=(o=Object.keys,i=Object,function(t){return o(i(t))}),d=Math.max,f=!s.call({valueOf:1},"valueOf");function h(t,e,r){var n=t[e];u.call(t,e)&&b(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function p(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=e}(t.length)&&!function(t){var e=v(t)?c.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function v(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var x,w=(x=function(t,e){if(f||g(e)||y(e))!function(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=x.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!v(r))return!1;var n=typeof e;return!!("number"==n?y(r)&&p(e,r.length):"string"==n&&e in r)&&b(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r{t=r.nmd(t);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",u="[object Date]",c="[object Function]",s="[object GeneratorFunction]",l="[object Map]",d="[object Number]",f="[object Object]",h="[object Promise]",p="[object RegExp]",g="[object Set]",b="[object String]",m="[object Symbol]",y="[object WeakMap]",v="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",k="[object Uint8Array]",L="[object Uint8ClampedArray]",E="[object Uint16Array]",T="[object Uint32Array]",M=/\w*$/,j=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[i]=I["[object Array]"]=I[v]=I[x]=I[a]=I[u]=I[w]=I[_]=I[C]=I[A]=I[S]=I[l]=I[d]=I[f]=I[p]=I[g]=I[b]=I[m]=I[k]=I[L]=I[E]=I[T]=!0,I["[object Error]"]=I[c]=I[y]=!1;var O="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,D="object"==typeof self&&self&&self.Object===Object&&self,P=O||D||Function("return this")(),N=e&&!e.nodeType&&e,B=N&&t&&!t.nodeType&&t,H=B&&B.exports===N;function R(t,e){return t.set(e[0],e[1]),t}function W(t,e){return t.add(e),t}function G(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o-1},Lt.prototype.set=function(t,e){var r=this.__data__,n=jt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Et.prototype.clear=function(){this.__data__={hash:new kt,map:new(pt||Lt),string:new kt}},Et.prototype.delete=function(t){return Dt(this,t).delete(t)},Et.prototype.get=function(t){return Dt(this,t).get(t)},Et.prototype.has=function(t){return Dt(this,t).has(t)},Et.prototype.set=function(t,e){return Dt(this,t).set(t,e),this},Tt.prototype.clear=function(){this.__data__=new Lt},Tt.prototype.delete=function(t){return this.__data__.delete(t)},Tt.prototype.get=function(t){return this.__data__.get(t)},Tt.prototype.has=function(t){return this.__data__.has(t)},Tt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Lt){var n=r.__data__;if(!pt||n.length<199)return n.push([t,e]),this;r=this.__data__=new Et(n)}return r.set(t,e),this};var Nt=lt?V(lt,Object):function(){return[]},Bt=function(t){return et.call(t)};function Ht(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||F.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=o}(t.length)&&!qt(t)}var Vt=dt||function(){return!1};function qt(t){var e=Ut(t)?et.call(t):"";return e==c||e==s}function Ut(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function $t(t){return zt(t)?function(t,e){var r=Xt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&zt(t)}(t)&&tt.call(t,"callee")&&(!ct.call(t,"callee")||et.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();function a(t,e){for(var r=-1,n=e.length,o=t.length;++r0&&r(c)?e>1?h(c,e-1,r,n,o):a(o,c):n||(o[o.length]=c)}return o}function p(t){return g(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?s.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(t)}(t)&&c.call(t,"callee")&&(!d.call(t,"callee")||"[object Arguments]"==s.call(t))}(t)||!!(f&&t&&t[f])}var g=Array.isArray;t.exports=function(t){return t&&t.length?h(t,1):[]}},773:(t,e,r)=>{var n,o="__lodash_hash_undefined__",i=/^\[object .+?Constructor\]$/,a="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=a||u||Function("return this")(),s=Array.prototype,l=Function.prototype,d=Object.prototype,f=c["__core-js_shared__"],h=(n=/[^.]+$/.exec(f&&f.keys&&f.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",p=l.toString,g=d.hasOwnProperty,b=d.toString,m=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=s.splice,v=k(c,"Map"),x=k(Object,"create");function w(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1},_.prototype.set=function(t,e){var r=this.__data__,n=A(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},C.prototype.clear=function(){this.__data__={hash:new w,map:new(v||_),string:new w}},C.prototype.delete=function(t){return S(this,t).delete(t)},C.prototype.get=function(t){return S(this,t).get(t)},C.prototype.has=function(t){return S(this,t).has(t)},C.prototype.set=function(t,e){return S(this,t).set(t,e),this},L.Cache=C,t.exports=L},779:function(t,e,r){var n,o,i;o=[r(730),r(615)],void 0===(i="function"==typeof(n=function(t,e){"use strict";function r(t,e,n,o){this.message=t,this.expected=e,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(r,Error),r.buildMessage=function(t,e){var r={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e,r="";for(e=0;e0){for(e=1,n=1;e0&&(n=t({precomment:r},n)),n},h=",",p=Ne(",",!1),g=";",b=Ne(";",!1),m=Ne("hscale",!0),y=Ne("arcgradient",!0),v="=",x=Ne("=",!1),w=function(t,r){return e.nameValue2Option(t,r)},_=Ne("width",!0),C=Ne("wordwraparcs",!0),A=function(t,r){return e.nameValue2Option(t,e.flattenBoolean(r))},S=Ne("wordwrapentities",!0),k=Ne("wordwrapboxes",!0),L=Ne("watermark",!0),E=He("entity"),T=":",M=Ne(":",!1),j=function(t){return{kind:t}},F="*",I=Ne("*",!1),O=function(t,e){return{kind:e,from:t,to:"*"}},D="{",P=Ne("{",!1),N=Ne("}",!1),B=He("empty row"),H="|||",R=Ne("|||",!1),W="...",G=Ne("...",!1),X=He("---"),z="---",V=Ne("---",!1),q=He("bi-directional arrow"),U=Ne("--",!1),$=Ne("<->",!1),Y=Ne("==",!1),Z="<<=>>",K=Ne("<<=>>",!1),J=Ne("<=>",!1),Q=Ne("..",!1),tt="<<>>",et=Ne("<<>>",!1),rt=Ne("::",!1),nt=Ne("<:>",!1),ot=He("left to right arrow"),it=Ne("->",!1),at=Ne("=>>",!1),ut=Ne("=>",!1),ct=Ne(">>",!1),st=Ne(":>",!1),lt=Ne("-x",!0),dt=He("right to left arrow"),ft=Ne("<-",!1),ht=Ne("<<=",!1),pt=Ne("<=",!1),gt=Ne("<<",!1),bt=Ne("<:",!1),mt=Ne("x-",!0),yt=He("box"),vt="note",xt=Ne("note",!0),wt="abox",_t=Ne("abox",!0),Ct="rbox",At=Ne("rbox",!0),St=Ne("box",!0),kt=He("inline expression"),Lt=Ne("alt",!0),Et="else",Tt=Ne("else",!0),Mt=Ne("opt",!0),jt="break",Ft=Ne("break",!0),It=Ne("par",!0),Ot=Ne("seq",!0),Dt="strict",Pt=Ne("strict",!0),Nt=Ne("neg",!0),Bt="critical",Ht=Ne("critical",!0),Rt="ignore",Wt=Ne("ignore",!0),Gt="consider",Xt=Ne("consider",!0),zt="assert",Vt=Ne("assert",!0),qt="loop",Ut=Ne("loop",!0),$t=Ne("ref",!0),Yt=Ne("exc",!0),Zt=He("double quoted string"),Kt='"',Jt=Ne('"',!1),Qt='\\"',te=Ne('\\"',!1),ee={type:"any"},re=He("identifier"),ne=/^[^;, "\t\n\r=\-><:{*]/,oe=Be([";",","," ",'"',"\t","\n","\r","=","-",">","<",":","{","*"],!0,!1),ie=He("whitespace"),ae=/^[ \t]/,ue=Be([" ","\t"],!1,!1),ce=He("lineend"),se=/^[\r\n]/,le=Be(["\r","\n"],!1,!1),de=Ne("/*",!1),fe="*/",he=Ne("*/",!1),pe=Ne("//",!1),ge=Ne("#",!1),be=/^[^\r\n]/,me=Be(["\r","\n"],!0,!1),ye=He("comment"),ve=He("number"),xe=/^[0-9]/,we=Be([["0","9"]],!1,!1),_e=Ne(".",!1),Ce=He("boolean"),Ae=Ne("true",!0),Se=Ne("false",!0),ke=Ne("on",!0),Le=Ne("off",!0),Ee=Ne("0",!1),Te=Ne("1",!1),Me=He("size"),je=Ne("auto",!0),Fe=0,Ie=[{line:1,column:1}],Oe=0,De=[],Pe=0;if("startRule"in o){if(!(o.startRule in l))throw new Error("Can't start parsing from rule \""+o.startRule+'".');d=l[o.startRule]}function Ne(t,e){return{type:"literal",text:t,ignoreCase:e}}function Be(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function He(t){return{type:"other",description:t}}function Re(t){var e,r=Ie[t];if(r)return r;for(e=t-1;!Ie[e];)e--;for(r={line:(r=Ie[e]).line,column:r.column};eOe&&(Oe=Fe,De=[]),De.push(t))}function Xe(){var e,r,o;return e=Fe,(r=cr())!==s&&(o=function(){var e,r,o,i;return e=Fe,(r=function(){var e,r,o,i,a;for(e=Fe,r=[],o=Fe,(i=ze())!==s?(44===n.charCodeAt(Fe)?(a=h,Fe++):(a=s,0===Pe&&Ge(p)),a!==s?o=i=i:(Fe=o,o=s)):(Fe=o,o=s);o!==s;)r.push(o),o=Fe,(i=ze())!==s?(44===n.charCodeAt(Fe)?(a=h,Fe++):(a=s,0===Pe&&Ge(p)),a!==s?o=i=i:(Fe=o,o=s)):(Fe=o,o=s);return r!==s?(o=Fe,(i=ze())!==s?(59===n.charCodeAt(Fe)?(a=g,Fe++):(a=s,0===Pe&&Ge(b)),a!==s?o=i=i:(Fe=o,o=s)):(Fe=o,o=s),o!==s?e=r=[r,o]:(Fe=e,e=s)):(Fe=e,e=s),e!==s&&(e=function(e){return e[0].concat(e[1]).reduce(t,{})}(e)),e}())===s&&(r=null),r!==s?((o=function(){var t,e,r,o,i;for(t=Fe,e=[],r=Fe,(o=Ve())!==s?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=s,0===Pe&&Ge(p)),i!==s?r=o=o:(Fe=r,r=s)):(Fe=r,r=s);r!==s;)e.push(r),r=Fe,(o=Ve())!==s?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=s,0===Pe&&Ge(p)),i!==s?r=o=o:(Fe=r,r=s)):(Fe=r,r=s);return e!==s?(r=Fe,(o=Ve())!==s?(59===n.charCodeAt(Fe)?(i=g,Fe++):(i=s,0===Pe&&Ge(b)),i!==s?r=o=o:(Fe=r,r=s)):(Fe=r,r=s),r!==s?t=e=[e,r]:(Fe=t,t=s)):(Fe=t,t=s),t!==s&&(a=t,t=a[0].concat(a[1])),t;var a}())===s&&(o=null),o!==s?((i=qe())===s&&(i=null),i!==s?e=r=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n}(r,o,i):(Fe=e,e=s)):(Fe=e,e=s)):(Fe=e,e=s),e}())!==s&&cr()!==s?e=r=f(r,o):(Fe=e,e=s),e}function ze(){var t,e,r,o;return t=Fe,cr()!==s?("hscale"===n.substr(Fe,6).toLowerCase()?(e=n.substr(Fe,6),Fe+=6):(e=s,0===Pe&&Ge(m)),e===s&&("arcgradient"===n.substr(Fe,11).toLowerCase()?(e=n.substr(Fe,11),Fe+=11):(e=s,0===Pe&&Ge(y))),e!==s&&cr()!==s?(61===n.charCodeAt(Fe)?(r=v,Fe++):(r=s,0===Pe&&Ge(x)),r!==s&&cr()!==s&&(o=function(){var t,e;return Pe++,t=Fe,(e=function(){var t,e,r,o;return t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=s,0===Pe&&Ge(Jt)),e!==s&&(r=sr())!==s?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=s,0===Pe&&Ge(Jt)),o!==s?(i=r,t=e=i.toString()):(Fe=t,t=s)):(Fe=t,t=s),t;var i}())!==s&&(e=e),(t=e)===s&&(t=Fe,(e=sr())!==s&&(r=e,e=r.toString()),t=e),Pe--,t===s&&(e=s,0===Pe&&Ge(ve)),t;var r}())!==s&&cr()!==s?t=w(e,o):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s?("width"===n.substr(Fe,5).toLowerCase()?(e=n.substr(Fe,5),Fe+=5):(e=s,0===Pe&&Ge(_)),e!==s&&cr()!==s?(61===n.charCodeAt(Fe)?(r=v,Fe++):(r=s,0===Pe&&Ge(x)),r!==s&&cr()!==s&&(o=function(){var t;return Pe++,(t=function(){var t,e,r,o;return t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=s,0===Pe&&Ge(Jt)),e!==s&&(r=hr())!==s?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=s,0===Pe&&Ge(Jt)),o!==s?t=e=r:(Fe=t,t=s)):(Fe=t,t=s),t}())===s&&(t=hr()),Pe--,t===s&&0===Pe&&Ge(Me),t}())!==s&&cr()!==s?t=w(e,o):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s?("wordwraparcs"===n.substr(Fe,12).toLowerCase()?(e=n.substr(Fe,12),Fe+=12):(e=s,0===Pe&&Ge(C)),e!==s&&cr()!==s?(61===n.charCodeAt(Fe)?(r=v,Fe++):(r=s,0===Pe&&Ge(x)),r!==s&&cr()!==s&&(o=dr())!==s&&cr()!==s?t=A(e,o):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s?("wordwrapentities"===n.substr(Fe,16).toLowerCase()?(e=n.substr(Fe,16),Fe+=16):(e=s,0===Pe&&Ge(S)),e!==s&&cr()!==s?(61===n.charCodeAt(Fe)?(r=v,Fe++):(r=s,0===Pe&&Ge(x)),r!==s&&cr()!==s&&(o=dr())!==s&&cr()!==s?t=A(e,o):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s?("wordwrapboxes"===n.substr(Fe,13).toLowerCase()?(e=n.substr(Fe,13),Fe+=13):(e=s,0===Pe&&Ge(k)),e!==s&&cr()!==s?(61===n.charCodeAt(Fe)?(r=v,Fe++):(r=s,0===Pe&&Ge(x)),r!==s&&cr()!==s&&(o=dr())!==s&&cr()!==s?t=A(e,o):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s?("watermark"===n.substr(Fe,9).toLowerCase()?(e=n.substr(Fe,9),Fe+=9):(e=s,0===Pe&&Ge(L)),e!==s&&cr()!==s?(61===n.charCodeAt(Fe)?(r=v,Fe++):(r=s,0===Pe&&Ge(x)),r!==s&&cr()!==s&&(o=Qe())!==s&&cr()!==s?t=w(e,o):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s)))))),t}function Ve(){var t,e,r,o,i,a,u;return Pe++,t=Fe,cr()!==s&&(e=tr())!==s&&cr()!==s?(r=Fe,58===n.charCodeAt(Fe)?(o=":",Fe++):(o=s,0===Pe&&Ge(M)),o!==s&&cr()!==s&&(i=Je())!==s&&cr()!==s?r=o=i:(Fe=r,r=s),r===s&&(r=null),r!==s?(a=r,u=gr(e),a&&(u.label=a),t=u):(Fe=t,t=s)):(Fe=t,t=s),Pe--,t===s&&0===Pe&&Ge(E),t}function qe(){var t,e,r,o;if(t=[],e=Fe,(r=Ue())!==s&&cr()!==s?(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=s,0===Pe&&Ge(b)),o!==s?e=r=r:(Fe=e,e=s)):(Fe=e,e=s),e!==s)for(;e!==s;)t.push(e),e=Fe,(r=Ue())!==s&&cr()!==s?(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=s,0===Pe&&Ge(b)),o!==s?e=r=r:(Fe=e,e=s)):(Fe=e,e=s);else t=s;return t}function Ue(){var t,e,r,o,i,a;for(t=Fe,e=[],r=Fe,(o=$e())!==s?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=s,0===Pe&&Ge(p)),i!==s?r=o=o:(Fe=r,r=s)):(Fe=r,r=s);r!==s;)e.push(r),r=Fe,(o=$e())!==s?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=s,0===Pe&&Ge(p)),i!==s?r=o=o:(Fe=r,r=s)):(Fe=r,r=s);return e!==s?(r=Fe,(o=$e())!==s&&(o=o),(r=o)!==s?t=e=[e,r]:(Fe=t,t=s)):(Fe=t,t=s),t!==s&&(t=(a=t)[0].concat(a[1])),t}function $e(){var t;return(t=function(){var t,e,r,o,i;return t=Fe,e=Fe,(r=function(){var t,e;return t=Fe,cr()!==s&&(e=function(){var t;return Pe++,n.substr(Fe,3)===H?(t=H,Fe+=3):(t=s,0===Pe&&Ge(R)),t===s&&(n.substr(Fe,3)===W?(t=W,Fe+=3):(t=s,0===Pe&&Ge(G))),Pe--,t===s&&0===Pe&&Ge(B),t}())!==s&&cr()!==s?t=j(e):(Fe=t,t=s),t}())!==s&&(r=r),(e=r)===s&&(e=Fe,(r=function(){var t,e,r,o;return t=Fe,cr()!==s&&(e=tr())!==s&&cr()!==s&&(r=function(){var t;return(t=Ye())===s&&(t=Ze())===s&&(t=Ke())===s&&(t=function(){var t;return Pe++,n.substr(Fe,4).toLowerCase()===vt?(t=n.substr(Fe,4),Fe+=4):(t=s,0===Pe&&Ge(xt)),t===s&&(n.substr(Fe,4).toLowerCase()===wt?(t=n.substr(Fe,4),Fe+=4):(t=s,0===Pe&&Ge(_t)),t===s&&(n.substr(Fe,4).toLowerCase()===Ct?(t=n.substr(Fe,4),Fe+=4):(t=s,0===Pe&&Ge(At)),t===s&&("box"===n.substr(Fe,3).toLowerCase()?(t=n.substr(Fe,3),Fe+=3):(t=s,0===Pe&&Ge(St))))),Pe--,t===s&&0===Pe&&Ge(yt),t}()),t!==s&&(e=t,t=e.toLowerCase()),t;var e}())!==s&&cr()!==s&&(o=tr())!==s&&cr()!==s?(i=e,a=r,u=o,t={kind:a,from:i,to:u}):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s?(42===n.charCodeAt(Fe)?(e=F,Fe++):(e=s,0===Pe&&Ge(I)),e!==s&&cr()!==s&&(r=Ke())!==s&&cr()!==s&&(o=tr())!==s&&cr()!==s?t=function(t,e){return{kind:t,from:"*",to:e}}(r,o):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s&&(e=tr())!==s&&cr()!==s&&(r=Ze())!==s&&cr()!==s?(42===n.charCodeAt(Fe)?(o=F,Fe++):(o=s,0===Pe&&Ge(I)),o!==s&&cr()!==s?t=O(e,r):(Fe=t,t=s)):(Fe=t,t=s),t===s&&(t=Fe,cr()!==s&&(e=tr())!==s&&cr()!==s&&(r=Ye())!==s&&cr()!==s?(42===n.charCodeAt(Fe)?(o=F,Fe++):(o=s,0===Pe&&Ge(I)),o!==s&&cr()!==s?t=O(e,r):(Fe=t,t=s)):(Fe=t,t=s)))),t;var i,a,u}())!==s&&(r=r),(e=r)===s&&(e=Fe,(r=function(){var t,e;return t=Fe,cr()!==s&&(e=function(){var t;return Pe++,n.substr(Fe,3)===z?(t=z,Fe+=3):(t=s,0===Pe&&Ge(V)),Pe--,t===s&&0===Pe&&Ge(X),t}())!==s&&cr()!==s?t=j(e):(Fe=t,t=s),t}())!==s&&(r=r),e=r)),e!==s?(r=Fe,58===n.charCodeAt(Fe)?(o=T,Fe++):(o=s,0===Pe&&Ge(M)),o!==s&&cr()!==s&&(i=Je())!==s&&cr()!==s?(c=i,r=o=c):(Fe=r,r=s),r===s&&(r=null),r!==s?(a=e,u=r,u&&(a.label=u),t=e=a):(Fe=t,t=s)):(Fe=t,t=s),t;var a,u;var c}())===s&&(t=function(){var t,e,r,o,i,a,u,c;return t=Fe,cr()!==s&&(e=tr())!==s&&cr()!==s&&(r=function(){var t,e;return Pe++,t=Fe,"alt"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge(Lt)),e===s&&(n.substr(Fe,4).toLowerCase()===Et?(e=n.substr(Fe,4),Fe+=4):(e=s,0===Pe&&Ge(Tt)),e===s&&("opt"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge(Mt)),e===s&&(n.substr(Fe,5).toLowerCase()===jt?(e=n.substr(Fe,5),Fe+=5):(e=s,0===Pe&&Ge(Ft)),e===s&&("par"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge(It)),e===s&&("seq"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge(Ot)),e===s&&(n.substr(Fe,6).toLowerCase()===Dt?(e=n.substr(Fe,6),Fe+=6):(e=s,0===Pe&&Ge(Pt)),e===s&&("neg"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge(Nt)),e===s&&(n.substr(Fe,8).toLowerCase()===Bt?(e=n.substr(Fe,8),Fe+=8):(e=s,0===Pe&&Ge(Ht)),e===s&&(n.substr(Fe,6).toLowerCase()===Rt?(e=n.substr(Fe,6),Fe+=6):(e=s,0===Pe&&Ge(Wt)),e===s&&(n.substr(Fe,8).toLowerCase()===Gt?(e=n.substr(Fe,8),Fe+=8):(e=s,0===Pe&&Ge(Xt)),e===s&&(n.substr(Fe,6).toLowerCase()===zt?(e=n.substr(Fe,6),Fe+=6):(e=s,0===Pe&&Ge(Vt)),e===s&&(n.substr(Fe,4).toLowerCase()===qt?(e=n.substr(Fe,4),Fe+=4):(e=s,0===Pe&&Ge(Ut)),e===s&&("ref"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge($t)),e===s&&("exc"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=s,0===Pe&&Ge(Yt)))))))))))))))),e!==s&&(r=e,e=r.toLowerCase()),Pe--,(t=e)===s&&(e=s,0===Pe&&Ge(kt)),t;var r}())!==s&&cr()!==s&&(o=tr())!==s&&cr()!==s?(i=Fe,58===n.charCodeAt(Fe)?(a=T,Fe++):(a=s,0===Pe&&Ge(M)),a!==s&&cr()!==s&&(u=Je())!==s&&cr()!==s?(b=u,i=a=b):(Fe=i,i=s),i===s&&(i=null),i!==s?(123===n.charCodeAt(Fe)?(a=D,Fe++):(a=s,0===Pe&&Ge(P)),a!==s&&cr()!==s?((u=qe())===s&&(u=null),u!==s&&cr()!==s?(125===n.charCodeAt(Fe)?(c="}",Fe++):(c=s,0===Pe&&Ge(N)),c!==s&&cr()!==s?(l=e,d=r,f=o,h=i,p=u,g={kind:d,from:l,to:f,arcs:p},h&&(g.label=h),t=g):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s)):(Fe=t,t=s),t;var l,d,f,h,p,g;var b}()),t}function Ye(){var t;return Pe++,"--"===n.substr(Fe,2)?(t="--",Fe+=2):(t=s,0===Pe&&Ge(U)),t===s&&("<->"===n.substr(Fe,3)?(t="<->",Fe+=3):(t=s,0===Pe&&Ge($)),t===s&&("=="===n.substr(Fe,2)?(t="==",Fe+=2):(t=s,0===Pe&&Ge(Y)),t===s&&(n.substr(Fe,5)===Z?(t=Z,Fe+=5):(t=s,0===Pe&&Ge(K)),t===s&&("<=>"===n.substr(Fe,3)?(t="<=>",Fe+=3):(t=s,0===Pe&&Ge(J)),t===s&&(".."===n.substr(Fe,2)?(t="..",Fe+=2):(t=s,0===Pe&&Ge(Q)),t===s&&(n.substr(Fe,4)===tt?(t=tt,Fe+=4):(t=s,0===Pe&&Ge(et)),t===s&&("::"===n.substr(Fe,2)?(t="::",Fe+=2):(t=s,0===Pe&&Ge(rt)),t===s&&("<:>"===n.substr(Fe,3)?(t="<:>",Fe+=3):(t=s,0===Pe&&Ge(nt)))))))))),Pe--,t===s&&0===Pe&&Ge(q),t}function Ze(){var t;return Pe++,"->"===n.substr(Fe,2)?(t="->",Fe+=2):(t=s,0===Pe&&Ge(it)),t===s&&("=>>"===n.substr(Fe,3)?(t="=>>",Fe+=3):(t=s,0===Pe&&Ge(at)),t===s&&("=>"===n.substr(Fe,2)?(t="=>",Fe+=2):(t=s,0===Pe&&Ge(ut)),t===s&&(">>"===n.substr(Fe,2)?(t=">>",Fe+=2):(t=s,0===Pe&&Ge(ct)),t===s&&(":>"===n.substr(Fe,2)?(t=":>",Fe+=2):(t=s,0===Pe&&Ge(st)),t===s&&("-x"===n.substr(Fe,2).toLowerCase()?(t=n.substr(Fe,2),Fe+=2):(t=s,0===Pe&&Ge(lt))))))),Pe--,t===s&&0===Pe&&Ge(ot),t}function Ke(){var t;return Pe++,"<-"===n.substr(Fe,2)?(t="<-",Fe+=2):(t=s,0===Pe&&Ge(ft)),t===s&&("<<="===n.substr(Fe,3)?(t="<<=",Fe+=3):(t=s,0===Pe&&Ge(ht)),t===s&&("<="===n.substr(Fe,2)?(t="<=",Fe+=2):(t=s,0===Pe&&Ge(pt)),t===s&&("<<"===n.substr(Fe,2)?(t="<<",Fe+=2):(t=s,0===Pe&&Ge(gt)),t===s&&("<:"===n.substr(Fe,2)?(t="<:",Fe+=2):(t=s,0===Pe&&Ge(bt)),t===s&&("x-"===n.substr(Fe,2).toLowerCase()?(t=n.substr(Fe,2),Fe+=2):(t=s,0===Pe&&Ge(mt))))))),Pe--,t===s&&0===Pe&&Ge(dt),t}function Je(){var t,e;return(t=Qe())===s&&((e=function(){var t,e,r,o;for(t=[],e=Fe,r=Fe,Pe++,44===n.charCodeAt(Fe)?(o=h,Fe++):(o=s,0===Pe&&Ge(p)),o===s&&(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=s,0===Pe&&Ge(b)),o===s&&(123===n.charCodeAt(Fe)?(o=D,Fe++):(o=s,0===Pe&&Ge(P)))),Pe--,o===s?r=void 0:(Fe=r,r=s),r!==s?(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=s,0===Pe&&Ge(ee)),o!==s?e=r=o:(Fe=e,e=s)):(Fe=e,e=s);e!==s;)t.push(e),e=Fe,r=Fe,Pe++,44===n.charCodeAt(Fe)?(o=h,Fe++):(o=s,0===Pe&&Ge(p)),o===s&&(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=s,0===Pe&&Ge(b)),o===s&&(123===n.charCodeAt(Fe)?(o=D,Fe++):(o=s,0===Pe&&Ge(P)))),Pe--,o===s?r=void 0:(Fe=r,r=s),r!==s?(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=s,0===Pe&&Ge(ee)),o!==s?e=r=o:(Fe=e,e=s)):(Fe=e,e=s);return t}())!==s&&(e=e.join("").trim()),t=e),t}function Qe(){var t,e,r,o;return Pe++,t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=s,0===Pe&&Ge(Jt)),e!==s&&(r=function(){var t,e,r,o;for(t=[],e=Fe,r=Fe,Pe++,34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=s,0===Pe&&Ge(Jt)),Pe--,o===s?r=void 0:(Fe=r,r=s),r!==s?(n.substr(Fe,2)===Qt?(o=Qt,Fe+=2):(o=s,0===Pe&&Ge(te)),o===s&&(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=s,0===Pe&&Ge(ee))),o!==s?e=r=o:(Fe=e,e=s)):(Fe=e,e=s);e!==s;)t.push(e),e=Fe,r=Fe,Pe++,34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=s,0===Pe&&Ge(Jt)),Pe--,o===s?r=void 0:(Fe=r,r=s),r!==s?(n.substr(Fe,2)===Qt?(o=Qt,Fe+=2):(o=s,0===Pe&&Ge(te)),o===s&&(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=s,0===Pe&&Ge(ee))),o!==s?e=r=o:(Fe=e,e=s)):(Fe=e,e=s);return t}())!==s?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=s,0===Pe&&Ge(Jt)),o!==s?t=e=r.join(""):(Fe=t,t=s)):(Fe=t,t=s),Pe--,t===s&&(e=s,0===Pe&&Ge(Zt)),t}function tr(){var t,e,r;if(Pe++,t=Fe,e=[],ne.test(n.charAt(Fe))?(r=n.charAt(Fe),Fe++):(r=s,0===Pe&&Ge(oe)),r!==s)for(;r!==s;)e.push(r),ne.test(n.charAt(Fe))?(r=n.charAt(Fe),Fe++):(r=s,0===Pe&&Ge(oe));else e=s;return e!==s&&(e=e.join("")),(t=e)===s&&(t=Qe()),Pe--,t===s&&(e=s,0===Pe&&Ge(re)),t}function er(){var t,e;return Pe++,Fe,ae.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=s,0===Pe&&Ge(ue)),e!==s&&(e=e),Pe--,(t=e)===s&&(e=s,0===Pe&&Ge(ie)),t}function rr(){var t,e;return Pe++,Fe,se.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=s,0===Pe&&Ge(le)),e!==s&&(e=e),Pe--,(t=e)===s&&(e=s,0===Pe&&Ge(ce)),t}function nr(){var t,e,r;return t=Fe,e=Fe,Pe++,n.substr(Fe,2)===fe?(r=fe,Fe+=2):(r=s,0===Pe&&Ge(he)),Pe--,r===s?e=void 0:(Fe=e,e=s),e!==s?(n.length>Fe?(r=n.charAt(Fe),Fe++):(r=s,0===Pe&&Ge(ee)),r!==s?t=e=r:(Fe=t,t=s)):(Fe=t,t=s),t}function or(){var t,e,r,o,i;if(t=Fe,(e=function(){var t;return"/*"===n.substr(Fe,2)?(t="/*",Fe+=2):(t=s,0===Pe&&Ge(de)),t}())!==s){for(r=[],o=nr();o!==s;)r.push(o),o=nr();r!==s&&(o=function(){var t;return n.substr(Fe,2)===fe?(t=fe,Fe+=2):(t=s,0===Pe&&Ge(he)),t}())!==s?(i=o,t=e=e+r.join("")+i):(Fe=t,t=s)}else Fe=t,t=s;return t}function ir(){var t;return be.test(n.charAt(Fe))?(t=n.charAt(Fe),Fe++):(t=s,0===Pe&&Ge(me)),t}function ar(){var t,e,r,o;if(t=Fe,(e=function(){var t;return"//"===n.substr(Fe,2)?(t="//",Fe+=2):(t=s,0===Pe&&Ge(pe)),t===s&&(35===n.charCodeAt(Fe)?(t="#",Fe++):(t=s,0===Pe&&Ge(ge))),t}())!==s){for(r=[],o=ir();o!==s;)r.push(o),o=ir();r!==s?t=e=e+r.join(""):(Fe=t,t=s)}else Fe=t,t=s;return t}function ur(){var t;return Pe++,(t=ar())===s&&(t=or()),Pe--,t===s&&0===Pe&&Ge(ye),t}function cr(){var t,e;for(t=[],(e=er())===s&&(e=rr())===s&&(e=ur());e!==s;)t.push(e),(e=er())===s&&(e=rr())===s&&(e=ur());return t}function sr(){var t,e,r,o,i,a;return e=Fe,(r=lr())!==s?(46===n.charCodeAt(Fe)?(o=".",Fe++):(o=s,0===Pe&&Ge(_e)),o!==s&&(i=lr())!==s?e=r=[r,o,i]:(Fe=e,e=s)):(Fe=e,e=s),e!==s&&(a=e,e=parseFloat(a.join(""))),(t=e)===s&&(t=lr()),t}function lr(){var t,e;if(t=[],xe.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=s,0===Pe&&Ge(we)),e!==s)for(;e!==s;)t.push(e),xe.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=s,0===Pe&&Ge(we));else t=s;return t!==s&&(t=parseInt(t.join(""),10)),t}function dr(){var t,e;return Pe++,t=Fe,(e=function(){var t,e,r,o;return t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=s,0===Pe&&Ge(Jt)),e!==s&&(r=fr())!==s?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=s,0===Pe&&Ge(Jt)),o!==s?t=e=r:(Fe=t,t=s)):(Fe=t,t=s),t}())!==s&&(e=e),(t=e)===s&&(t=Fe,(e=fr())!==s&&(e=e.toString()),t=e),Pe--,t===s&&(e=s,0===Pe&&Ge(Ce)),t}function fr(){var t;return"true"===n.substr(Fe,4).toLowerCase()?(t=n.substr(Fe,4),Fe+=4):(t=s,0===Pe&&Ge(Ae)),t===s&&("false"===n.substr(Fe,5).toLowerCase()?(t=n.substr(Fe,5),Fe+=5):(t=s,0===Pe&&Ge(Se)),t===s&&("on"===n.substr(Fe,2).toLowerCase()?(t=n.substr(Fe,2),Fe+=2):(t=s,0===Pe&&Ge(ke)),t===s&&("off"===n.substr(Fe,3).toLowerCase()?(t=n.substr(Fe,3),Fe+=3):(t=s,0===Pe&&Ge(Le)),t===s&&(48===n.charCodeAt(Fe)?(t="0",Fe++):(t=s,0===Pe&&Ge(Ee)),t===s&&(49===n.charCodeAt(Fe)?(t="1",Fe++):(t=s,0===Pe&&Ge(Te))))))),t}function hr(){var t,e;return t=Fe,(e=sr())!==s&&(e=e.toString()),(t=e)===s&&(t=Fe,"auto"===n.substr(Fe,4).toLowerCase()?(e=n.substr(Fe,4),Fe+=4):(e=s,0===Pe&&Ge(je)),e!==s&&(e=e.toLowerCase()),t=e),t}function pr(t,r,n){return!(e.entityExists(t,r)||!0===n[r])}function gr(t){return{name:t}}function br(e,r,n){return n||(n={}),(r||[]).forEach((function(r){r.forEach((function(r){pr(e,r.from,n)&&e.push(gr(r.from)),r.arcs&&(n[r.to]=!0,t(e,br(e,r.arcs,n)),delete n[r.to]),pr(e,r.to,n)&&e.push(gr(r.to))}))})),e}if((i=d())!==s&&Fe===n.length)return i;throw i!==s&&Fe{"use strict";function r(t,e){return void 0===e||"*"===e||t.some((function(t){return t.name===e}))}e.__esModule=!0,e.nameValue2Option=function(t,e){var r={};return r[t.toLowerCase()]=e,r},e.flattenBoolean=function(t){return["true","on","1"].includes(t.toLowerCase())},e.entityExists=r,e.isMscGenKeyword=function(t){return["box","abox","rbox","note","msc","hscale","width","arcgradient","wordwraparcs","label","color","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"].includes(t)};var n=function(t,e){this.name="EntityNotDefinedError",this.message=function(t,e){return"Entity '"+t+"' in arc '"+e.from+" "+e.kind+" "+e.to+"' is not defined."}(t,e)};e.EntityNotDefinedError=n,e.checkForUndeclaredEntities=function t(e,o){(o||[]).forEach((function(o){o.forEach((function(o){if(o.from&&!r(e,o.from))throw new n(o.from,o);if(o.to&&!r(e,o.to))throw new n(o.to,o);o.arcs&&t(e,o.arcs)}))}))},e.getMetaInfo=function(t,e){var r=function(t){return!!t&&(t.hasOwnProperty("watermark")||t.hasOwnProperty("wordwrapentities")||t.hasOwnProperty("wordwrapboxes")||t.hasOwnProperty("width")&&"auto"===t.width)}(t),n=function(t){return(t||[]).some((function(t){return t.some((function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].includes(t.kind)}))}))}(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}},150:function(t,e,r){var n,o,i;o=[r(730),r(615)],void 0===(i="function"==typeof(n=function(t,e){"use strict";function r(t,e,n,o){this.message=t,this.expected=e,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(r,Error),r.buildMessage=function(t,e){var r={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e,r="";for(e=0;e0){for(e=1,n=1;e",!1),tt=jr("==",!1),et="<<=>>",rt=jr("<<=>>",!1),nt=jr("<=>",!1),ot=jr("..",!1),it="<<>>",at=jr("<<>>",!1),ut=jr("::",!1),ct=jr("<:>",!1),st=Ir("left to right arrow"),lt=jr("->",!1),dt=jr("=>>",!1),ft=jr("=>",!1),ht=jr(">>",!1),pt=jr(":>",!1),gt=jr("-x",!0),bt=Ir("right to left arrow"),mt=jr("<-",!1),yt=jr("<<=",!1),vt=jr("<=",!1),xt=jr("<<",!1),wt=jr("<:",!1),_t=jr("x-",!0),Ct=Ir("box"),At="note",St=jr("note",!0),kt="abox",Lt=jr("abox",!0),Et="rbox",Tt=jr("rbox",!0),Mt=jr("box",!0),jt=Ir("inline expression"),Ft=jr("alt",!0),It="else",Ot=jr("else",!0),Dt=jr("opt",!0),Pt="break",Nt=jr("break",!0),Bt=jr("par",!0),Ht=jr("seq",!0),Rt="strict",Wt=jr("strict",!0),Gt=jr("neg",!0),Xt="critical",zt=jr("critical",!0),Vt="ignore",qt=jr("ignore",!0),Ut="consider",$t=jr("consider",!0),Yt="assert",Zt=jr("assert",!0),Kt="loop",Jt=jr("loop",!0),Qt=jr("ref",!0),te=jr("exc",!0),ee=Ir("activate or deactivate"),re="activate",ne=jr("activate",!0),oe="deactivate",ie=jr("deactivate",!0),ae=Ir("attribute name"),ue="label",ce=jr("label",!0),se="idurl",le=jr("idurl",!0),de=jr("id",!0),fe=jr("url",!0),he="linecolor",pe=jr("linecolor",!0),ge="linecolour",be=jr("linecolour",!0),me="textcolor",ye=jr("textcolor",!0),ve="textcolour",xe=jr("textcolour",!0),we="textbgcolor",_e=jr("textbgcolor",!0),Ce="textbgcolour",Ae=jr("textbgcolour",!0),Se="arclinecolor",ke=jr("arclinecolor",!0),Le="arclinecolour",Ee=jr("arclinecolour",!0),Te="arctextcolor",Me=jr("arctextcolor",!0),je="arctextcolour",Fe=jr("arctextcolour",!0),Ie="arctextbgcolor",Oe=jr("arctextbgcolor",!0),De="arctextbgcolour",Pe=jr("arctextbgcolour",!0),Ne="arcskip",Be=jr("arcskip",!0),He="title",Re=jr("title",!0),We="activation",Ge=jr("activation",!0),Xe=Ir("double quoted string"),ze='"',Ve=jr('"',!1),qe='\\"',Ue=jr('\\"',!1),$e={type:"any"},Ye=Ir("identifier"),Ze=/^[A-Za-z_0-9]/,Ke=Fr([["A","Z"],["a","z"],"_",["0","9"]],!1,!1),Je=Ir("whitespace"),Qe=/^[ \t]/,tr=Fr([" ","\t"],!1,!1),er=Ir("lineend"),rr=/^[\r\n]/,nr=Fr(["\r","\n"],!1,!1),or=jr("/*",!1),ir="*/",ar=jr("*/",!1),ur=jr("//",!1),cr=jr("#",!1),sr=/^[^\r\n]/,lr=Fr(["\r","\n"],!0,!1),dr=Ir("comment"),fr=Ir("number"),hr=/^[0-9]/,pr=Fr([["0","9"]],!1,!1),gr=jr(".",!1),br=Ir("boolean"),mr=jr("true",!0),yr=jr("false",!0),vr=jr("on",!0),xr=jr("off",!0),wr=jr("0",!1),_r=jr("1",!1),Cr=Ir("size"),Ar=jr("auto",!0),Sr=0,kr=0,Lr=[{line:1,column:1}],Er=0,Tr=[],Mr=0;if("startRule"in o){if(!(o.startRule in l))throw new Error("Can't start parsing from rule \""+o.startRule+'".');d=l[o.startRule]}function jr(t,e){return{type:"literal",text:t,ignoreCase:e}}function Fr(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Ir(t){return{type:"other",description:t}}function Or(t){var e,r=Lr[t];if(r)return r;for(e=t-1;!Lr[e];)e--;for(r={line:(r=Lr[e]).line,column:r.column};eEr&&(Er=Sr,Tr=[]),Tr.push(t))}function Nr(){var r,o,i,a,u,c,l;return r=Sr,(o=on())!==s&&function(){var t;return"msc"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=s,0===Mr&&Pr(p)),t===s&&("xu"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=s,0===Mr&&Pr(g))),t}()!==s&&on()!==s?(123===n.charCodeAt(Sr)?(i="{",Sr++):(i=s,0===Mr&&Pr(f)),i!==s&&on()!==s&&(a=function(){var e,r,o,i;return e=Sr,(r=function(){var e,r,o,i,a,u;for(e=Sr,r=Sr,o=[],i=Sr,(a=Br())!==s?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=s,0===Mr&&Pr(m)),u!==s?(kr=i,i=a=a):(Sr=i,i=s)):(Sr=i,i=s);i!==s;)o.push(i),i=Sr,(a=Br())!==s?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=s,0===Mr&&Pr(m)),u!==s?(kr=i,i=a=a):(Sr=i,i=s)):(Sr=i,i=s);return o!==s?(i=Sr,(a=Br())!==s?(59===n.charCodeAt(Sr)?(u=y,Sr++):(u=s,0===Mr&&Pr(v)),u!==s?(kr=i,i=a=a):(Sr=i,i=s)):(Sr=i,i=s),i!==s?r=o=[o,i]:(Sr=r,r=s)):(Sr=r,r=s),r!==s&&(kr=e,r=function(e){return e[0].concat(e[1]).reduce(t,{})}(r)),r}())===s&&(r=null),r!==s?((o=function(){var t,e,r,o,i,a;for(t=Sr,e=Sr,r=[],o=Sr,(i=Hr())!==s?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=s,0===Mr&&Pr(m)),a!==s?(kr=o,o=i=i):(Sr=o,o=s)):(Sr=o,o=s);o!==s;)r.push(o),o=Sr,(i=Hr())!==s?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=s,0===Mr&&Pr(m)),a!==s?(kr=o,o=i=i):(Sr=o,o=s)):(Sr=o,o=s);return r!==s?(o=Sr,(i=Hr())!==s?(59===n.charCodeAt(Sr)?(a=y,Sr++):(a=s,0===Mr&&Pr(v)),a!==s?(kr=o,o=i=i):(Sr=o,o=s)):(Sr=o,o=s),o!==s?e=r=[r,o]:(Sr=e,e=s)):(Sr=e,e=s),e!==s&&(kr=t,u=e,e=u[0].concat(u[1])),e;var u}())===s&&(o=null),o!==s?((i=Rr())===s&&(i=null),i!==s?(kr=e,e=r=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n}(r,o,i)):(Sr=e,e=s)):(Sr=e,e=s)):(Sr=e,e=s),e}())!==s&&on()!==s?(125===n.charCodeAt(Sr)?(u="}",Sr++):(u=s,0===Mr&&Pr(h)),u!==s&&on()!==s?(kr=r,c=o,(l=a).entities=l.entities||[],e.checkForUndeclaredEntities(l.entities,l.arcs),l=t({meta:e.getMetaInfo(l.options,l.arcs)},l),c.length>0&&(l=t({precomment:c},l)),r=o=l):(Sr=r,r=s)):(Sr=r,r=s)):(Sr=r,r=s),r}function Br(){var t,e,r,o;return Mr++,t=Sr,on()!==s?("hscale"===n.substr(Sr,6).toLowerCase()?(e=n.substr(Sr,6),Sr+=6):(e=s,0===Mr&&Pr(w)),e===s&&("arcgradient"===n.substr(Sr,11).toLowerCase()?(e=n.substr(Sr,11),Sr+=11):(e=s,0===Mr&&Pr(_))),e!==s&&on()!==s?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=s,0===Mr&&Pr(A)),r!==s&&on()!==s&&(o=function(){var t,e;return Mr++,t=Sr,(e=function(){var t,e,r,o;return t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=s,0===Mr&&Pr(Ve)),e!==s&&(r=an())!==s?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=s,0===Mr&&Pr(Ve)),o!==s?(kr=t,i=r,t=e=i.toString()):(Sr=t,t=s)):(Sr=t,t=s),t;var i}())!==s&&(kr=t,e=e),(t=e)===s&&(t=Sr,(e=an())!==s&&(kr=t,r=e,e=r.toString()),t=e),Mr--,t===s&&(e=s,0===Mr&&Pr(fr)),t;var r}())!==s&&on()!==s?(kr=t,t=S(e,o)):(Sr=t,t=s)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s?("width"===n.substr(Sr,5).toLowerCase()?(e=n.substr(Sr,5),Sr+=5):(e=s,0===Mr&&Pr(k)),e!==s&&on()!==s?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=s,0===Mr&&Pr(A)),r!==s&&on()!==s&&(o=function(){var t;return Mr++,(t=function(){var t,e,r,o;return t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=s,0===Mr&&Pr(Ve)),e!==s&&(r=ln())!==s?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=s,0===Mr&&Pr(Ve)),o!==s?(kr=t,t=e=r):(Sr=t,t=s)):(Sr=t,t=s),t}())===s&&(t=ln()),Mr--,t===s&&0===Mr&&Pr(Cr),t}())!==s&&on()!==s?(kr=t,t=S(e,o)):(Sr=t,t=s)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s?("wordwraparcs"===n.substr(Sr,12).toLowerCase()?(e=n.substr(Sr,12),Sr+=12):(e=s,0===Mr&&Pr(L)),e!==s&&on()!==s?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=s,0===Mr&&Pr(A)),r!==s&&on()!==s&&(o=cn())!==s&&on()!==s?(kr=t,t=E(e,o)):(Sr=t,t=s)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s?("wordwrapentities"===n.substr(Sr,16).toLowerCase()?(e=n.substr(Sr,16),Sr+=16):(e=s,0===Mr&&Pr(T)),e!==s&&on()!==s?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=s,0===Mr&&Pr(A)),r!==s&&on()!==s&&(o=cn())!==s&&on()!==s?(kr=t,t=E(e,o)):(Sr=t,t=s)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s?("wordwrapboxes"===n.substr(Sr,13).toLowerCase()?(e=n.substr(Sr,13),Sr+=13):(e=s,0===Mr&&Pr(M)),e!==s&&on()!==s?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=s,0===Mr&&Pr(A)),r!==s&&on()!==s&&(o=cn())!==s&&on()!==s?(kr=t,t=E(e,o)):(Sr=t,t=s)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s?("watermark"===n.substr(Sr,9).toLowerCase()?(e=n.substr(Sr,9),Sr+=9):(e=s,0===Mr&&Pr(j)),e!==s&&on()!==s?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=s,0===Mr&&Pr(A)),r!==s&&on()!==s&&(o=$r())!==s&&on()!==s?(kr=t,t=S(e,o)):(Sr=t,t=s)):(Sr=t,t=s)):(Sr=t,t=s)))))),Mr--,t===s&&0===Mr&&Pr(x),t}function Hr(){var e,r,o,i,a,u;return Mr++,e=Sr,on()!==s&&(r=$r())!==s&&on()!==s?(o=Sr,91===n.charCodeAt(Sr)?(i=I,Sr++):(i=s,0===Mr&&Pr(O)),i!==s&&(a=qr())!==s?(93===n.charCodeAt(Sr)?(u=D,Sr++):(u=s,0===Mr&&Pr(P)),u!==s?(kr=o,o=i=N(0,a)):(Sr=o,o=s)):(Sr=o,o=s),o===s&&(o=null),o!==s&&(i=on())!==s?(kr=e,e=t({name:r},o)):(Sr=e,e=s)):(Sr=e,e=s),e===s&&(e=Sr,on()!==s&&(r=Zr())!==s&&on()!==s?(o=Sr,91===n.charCodeAt(Sr)?(i=I,Sr++):(i=s,0===Mr&&Pr(O)),i!==s&&(a=qr())!==s?(93===n.charCodeAt(Sr)?(u=D,Sr++):(u=s,0===Mr&&Pr(P)),u!==s?(kr=o,o=i=N(0,a)):(Sr=o,o=s)):(Sr=o,o=s),o===s&&(o=null),o!==s&&(i=on())!==s?(kr=e,e=B(r,o)):(Sr=e,e=s)):(Sr=e,e=s)),Mr--,e===s&&0===Mr&&Pr(F),e}function Rr(){var t,e,r,o;if(t=[],e=Sr,(r=Wr())!==s&&on()!==s?(59===n.charCodeAt(Sr)?(o=y,Sr++):(o=s,0===Mr&&Pr(v)),o!==s?(kr=e,e=r=r):(Sr=e,e=s)):(Sr=e,e=s),e!==s)for(;e!==s;)t.push(e),e=Sr,(r=Wr())!==s&&on()!==s?(59===n.charCodeAt(Sr)?(o=y,Sr++):(o=s,0===Mr&&Pr(v)),o!==s?(kr=e,e=r=r):(Sr=e,e=s)):(Sr=e,e=s);else t=s;return t}function Wr(){var t,e,r,o,i,a,u;for(t=Sr,e=Sr,r=[],o=Sr,(i=Gr())!==s&&on()!==s?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=s,0===Mr&&Pr(m)),a!==s?(kr=o,o=i=i):(Sr=o,o=s)):(Sr=o,o=s);o!==s;)r.push(o),o=Sr,(i=Gr())!==s&&on()!==s?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=s,0===Mr&&Pr(m)),a!==s?(kr=o,o=i=i):(Sr=o,o=s)):(Sr=o,o=s);return r!==s?(o=Sr,(i=Gr())!==s&&(kr=o,i=i),(o=i)!==s?e=r=[r,o]:(Sr=e,e=s)):(Sr=e,e=s),e!==s&&(kr=t,e=(u=e)[0].concat(u[1])),e}function Gr(){var e;return(e=function(){var e,r,o,i,a,u;return e=Sr,r=Sr,(o=function(){var t,e;return t=Sr,on()!==s&&(e=function(){var t;return Mr++,n.substr(Sr,3)===z?(t=z,Sr+=3):(t=s,0===Mr&&Pr(V)),t===s&&(n.substr(Sr,3)===q?(t=q,Sr+=3):(t=s,0===Mr&&Pr(U))),Mr--,t===s&&0===Mr&&Pr(X),t}())!==s&&on()!==s?(kr=t,t=H(e)):(Sr=t,t=s),t}())!==s&&(kr=r,o=o),(r=o)===s&&(r=Sr,(o=function(){var t,e,r,o;return t=Sr,on()!==s&&(e=Yr())!==s&&on()!==s&&(r=function(){var t,e;return t=Sr,(e=Xr())===s&&(e=zr())===s&&(e=Vr())===s&&(e=function(){var t;return Mr++,n.substr(Sr,4).toLowerCase()===At?(t=n.substr(Sr,4),Sr+=4):(t=s,0===Mr&&Pr(St)),t===s&&(n.substr(Sr,4).toLowerCase()===kt?(t=n.substr(Sr,4),Sr+=4):(t=s,0===Mr&&Pr(Lt)),t===s&&(n.substr(Sr,4).toLowerCase()===Et?(t=n.substr(Sr,4),Sr+=4):(t=s,0===Mr&&Pr(Tt)),t===s&&("box"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=s,0===Mr&&Pr(Mt))))),Mr--,t===s&&0===Mr&&Pr(Ct),t}()),e!==s&&(kr=t,r=e,e=r.toLowerCase()),e;var r}())!==s&&on()!==s&&(o=Yr())!==s&&on()!==s?(kr=t,i=e,a=r,u=o,t={kind:a,from:i,to:u}):(Sr=t,t=s),t===s&&(t=Sr,on()!==s?(42===n.charCodeAt(Sr)?(e=R,Sr++):(e=s,0===Mr&&Pr(W)),e!==s&&on()!==s&&(r=Vr())!==s&&on()!==s&&(o=Yr())!==s&&on()!==s?(kr=t,t=function(t,e){return{kind:t,from:"*",to:e}}(r,o)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s&&(e=Yr())!==s&&on()!==s&&(r=zr())!==s&&on()!==s?(42===n.charCodeAt(Sr)?(o=R,Sr++):(o=s,0===Mr&&Pr(W)),o!==s&&on()!==s?(kr=t,t=G(e,r)):(Sr=t,t=s)):(Sr=t,t=s),t===s&&(t=Sr,on()!==s&&(e=Yr())!==s&&on()!==s&&(r=Xr())!==s&&on()!==s?(42===n.charCodeAt(Sr)?(o=R,Sr++):(o=s,0===Mr&&Pr(W)),o!==s&&on()!==s?(kr=t,t=G(e,r)):(Sr=t,t=s)):(Sr=t,t=s)))),t;var i,a,u}())!==s&&(kr=r,o=o),(r=o)===s&&(r=Sr,(o=function(){var t,e;return t=Sr,on()!==s&&(e=function(){var t;return Mr++,n.substr(Sr,3)===Y?(t=Y,Sr+=3):(t=s,0===Mr&&Pr(Z)),Mr--,t===s&&0===Mr&&Pr($),t}())!==s&&on()!==s?(kr=t,t=H(e)):(Sr=t,t=s),t}())!==s&&(kr=r,o=o),r=o)),r!==s?(o=Sr,91===n.charCodeAt(Sr)?(i=I,Sr++):(i=s,0===Mr&&Pr(O)),i!==s&&(a=qr())!==s?(93===n.charCodeAt(Sr)?(u=D,Sr++):(u=s,0===Mr&&Pr(P)),u!==s?(kr=o,c=a,o=i=c):(Sr=o,o=s)):(Sr=o,o=s),o===s&&(o=null),o!==s?(kr=e,e=r=function(e,r){return t(e,r)}(r,o)):(Sr=e,e=s)):(Sr=e,e=s),e;var c}())===s&&(e=function(){var e,r,o,i,a,u,c,l,d,p;return e=Sr,on()!==s&&(r=Yr())!==s&&on()!==s&&(o=function(){var t,e;return Mr++,t=Sr,"alt"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(Ft)),e===s&&(n.substr(Sr,4).toLowerCase()===It?(e=n.substr(Sr,4),Sr+=4):(e=s,0===Mr&&Pr(Ot)),e===s&&("opt"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(Dt)),e===s&&(n.substr(Sr,5).toLowerCase()===Pt?(e=n.substr(Sr,5),Sr+=5):(e=s,0===Mr&&Pr(Nt)),e===s&&("par"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(Bt)),e===s&&("seq"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(Ht)),e===s&&(n.substr(Sr,6).toLowerCase()===Rt?(e=n.substr(Sr,6),Sr+=6):(e=s,0===Mr&&Pr(Wt)),e===s&&("neg"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(Gt)),e===s&&(n.substr(Sr,8).toLowerCase()===Xt?(e=n.substr(Sr,8),Sr+=8):(e=s,0===Mr&&Pr(zt)),e===s&&(n.substr(Sr,6).toLowerCase()===Vt?(e=n.substr(Sr,6),Sr+=6):(e=s,0===Mr&&Pr(qt)),e===s&&(n.substr(Sr,8).toLowerCase()===Ut?(e=n.substr(Sr,8),Sr+=8):(e=s,0===Mr&&Pr($t)),e===s&&(n.substr(Sr,6).toLowerCase()===Yt?(e=n.substr(Sr,6),Sr+=6):(e=s,0===Mr&&Pr(Zt)),e===s&&(n.substr(Sr,4).toLowerCase()===Kt?(e=n.substr(Sr,4),Sr+=4):(e=s,0===Mr&&Pr(Jt)),e===s&&("ref"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(Qt)),e===s&&("exc"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=s,0===Mr&&Pr(te)))))))))))))))),e!==s&&(kr=t,r=e,e=r.toLowerCase()),Mr--,(t=e)===s&&(e=s,0===Mr&&Pr(jt)),t;var r}())!==s&&on()!==s&&(i=Yr())!==s&&on()!==s?(a=Sr,91===n.charCodeAt(Sr)?(u=I,Sr++):(u=s,0===Mr&&Pr(O)),u!==s&&(c=qr())!==s?(93===n.charCodeAt(Sr)?(l=D,Sr++):(l=s,0===Mr&&Pr(P)),l!==s?(kr=a,g=c,a=u=g):(Sr=a,a=s)):(Sr=a,a=s),a===s&&(a=null),a!==s&&(u=on())!==s?(123===n.charCodeAt(Sr)?(c="{",Sr++):(c=s,0===Mr&&Pr(f)),c!==s&&(l=on())!==s?((d=Rr())===s&&(d=null),d!==s&&on()!==s?(125===n.charCodeAt(Sr)?(p="}",Sr++):(p=s,0===Mr&&Pr(h)),p!==s&&on()!==s?(kr=e,e=function(e,r,n,o,i){return t({kind:r,from:e,to:n,arcs:i},o)}(r,o,i,a,d)):(Sr=e,e=s)):(Sr=e,e=s)):(Sr=e,e=s)):(Sr=e,e=s)):(Sr=e,e=s),e;var g}()),e}function Xr(){var t;return Mr++,"--"===n.substr(Sr,2)?(t="--",Sr+=2):(t=s,0===Mr&&Pr(J)),t===s&&("<->"===n.substr(Sr,3)?(t="<->",Sr+=3):(t=s,0===Mr&&Pr(Q)),t===s&&("=="===n.substr(Sr,2)?(t="==",Sr+=2):(t=s,0===Mr&&Pr(tt)),t===s&&(n.substr(Sr,5)===et?(t=et,Sr+=5):(t=s,0===Mr&&Pr(rt)),t===s&&("<=>"===n.substr(Sr,3)?(t="<=>",Sr+=3):(t=s,0===Mr&&Pr(nt)),t===s&&(".."===n.substr(Sr,2)?(t="..",Sr+=2):(t=s,0===Mr&&Pr(ot)),t===s&&(n.substr(Sr,4)===it?(t=it,Sr+=4):(t=s,0===Mr&&Pr(at)),t===s&&("::"===n.substr(Sr,2)?(t="::",Sr+=2):(t=s,0===Mr&&Pr(ut)),t===s&&("<:>"===n.substr(Sr,3)?(t="<:>",Sr+=3):(t=s,0===Mr&&Pr(ct)))))))))),Mr--,t===s&&0===Mr&&Pr(K),t}function zr(){var t;return Mr++,"->"===n.substr(Sr,2)?(t="->",Sr+=2):(t=s,0===Mr&&Pr(lt)),t===s&&("=>>"===n.substr(Sr,3)?(t="=>>",Sr+=3):(t=s,0===Mr&&Pr(dt)),t===s&&("=>"===n.substr(Sr,2)?(t="=>",Sr+=2):(t=s,0===Mr&&Pr(ft)),t===s&&(">>"===n.substr(Sr,2)?(t=">>",Sr+=2):(t=s,0===Mr&&Pr(ht)),t===s&&(":>"===n.substr(Sr,2)?(t=":>",Sr+=2):(t=s,0===Mr&&Pr(pt)),t===s&&("-x"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=s,0===Mr&&Pr(gt))))))),Mr--,t===s&&0===Mr&&Pr(st),t}function Vr(){var t;return Mr++,"<-"===n.substr(Sr,2)?(t="<-",Sr+=2):(t=s,0===Mr&&Pr(mt)),t===s&&("<<="===n.substr(Sr,3)?(t="<<=",Sr+=3):(t=s,0===Mr&&Pr(yt)),t===s&&("<="===n.substr(Sr,2)?(t="<=",Sr+=2):(t=s,0===Mr&&Pr(vt)),t===s&&("<<"===n.substr(Sr,2)?(t="<<",Sr+=2):(t=s,0===Mr&&Pr(xt)),t===s&&("<:"===n.substr(Sr,2)?(t="<:",Sr+=2):(t=s,0===Mr&&Pr(wt)),t===s&&("x-"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=s,0===Mr&&Pr(_t))))))),Mr--,t===s&&0===Mr&&Pr(bt),t}function qr(){var e,r,o,i,a,u,c;for(e=Sr,r=Sr,o=[],i=Sr,(a=Ur())!==s?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=s,0===Mr&&Pr(m)),u!==s?(kr=i,i=a=a):(Sr=i,i=s)):(Sr=i,i=s);i!==s;)o.push(i),i=Sr,(a=Ur())!==s?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=s,0===Mr&&Pr(m)),u!==s?(kr=i,i=a=a):(Sr=i,i=s)):(Sr=i,i=s);return o!==s?(i=Sr,(a=Ur())!==s&&(kr=i,a=a),(i=a)!==s?r=o=[o,i]:(Sr=r,r=s)):(Sr=r,r=s),r!==s&&(kr=e,r=(c=r)[0].concat(c[1]).reduce(t,{})),r}function Ur(){var t;return(t=function(){var t,r,o,i;return t=Sr,on()!==s&&(r=function(){var t;return Mr++,n.substr(Sr,5).toLowerCase()===ue?(t=n.substr(Sr,5),Sr+=5):(t=s,0===Mr&&Pr(ce)),t===s&&(n.substr(Sr,5).toLowerCase()===se?(t=n.substr(Sr,5),Sr+=5):(t=s,0===Mr&&Pr(le)),t===s&&("id"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=s,0===Mr&&Pr(de)),t===s&&("url"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=s,0===Mr&&Pr(fe)),t===s&&(n.substr(Sr,9).toLowerCase()===he?(t=n.substr(Sr,9),Sr+=9):(t=s,0===Mr&&Pr(pe)),t===s&&(n.substr(Sr,10).toLowerCase()===ge?(t=n.substr(Sr,10),Sr+=10):(t=s,0===Mr&&Pr(be)),t===s&&(n.substr(Sr,9).toLowerCase()===me?(t=n.substr(Sr,9),Sr+=9):(t=s,0===Mr&&Pr(ye)),t===s&&(n.substr(Sr,10).toLowerCase()===ve?(t=n.substr(Sr,10),Sr+=10):(t=s,0===Mr&&Pr(xe)),t===s&&(n.substr(Sr,11).toLowerCase()===we?(t=n.substr(Sr,11),Sr+=11):(t=s,0===Mr&&Pr(_e)),t===s&&(n.substr(Sr,12).toLowerCase()===Ce?(t=n.substr(Sr,12),Sr+=12):(t=s,0===Mr&&Pr(Ae)),t===s&&(n.substr(Sr,12).toLowerCase()===Se?(t=n.substr(Sr,12),Sr+=12):(t=s,0===Mr&&Pr(ke)),t===s&&(n.substr(Sr,13).toLowerCase()===Le?(t=n.substr(Sr,13),Sr+=13):(t=s,0===Mr&&Pr(Ee)),t===s&&(n.substr(Sr,12).toLowerCase()===Te?(t=n.substr(Sr,12),Sr+=12):(t=s,0===Mr&&Pr(Me)),t===s&&(n.substr(Sr,13).toLowerCase()===je?(t=n.substr(Sr,13),Sr+=13):(t=s,0===Mr&&Pr(Fe)),t===s&&(n.substr(Sr,14).toLowerCase()===Ie?(t=n.substr(Sr,14),Sr+=14):(t=s,0===Mr&&Pr(Oe)),t===s&&(n.substr(Sr,15).toLowerCase()===De?(t=n.substr(Sr,15),Sr+=15):(t=s,0===Mr&&Pr(Pe)),t===s&&(n.substr(Sr,7).toLowerCase()===Ne?(t=n.substr(Sr,7),Sr+=7):(t=s,0===Mr&&Pr(Be)),t===s&&(n.substr(Sr,5).toLowerCase()===He?(t=n.substr(Sr,5),Sr+=5):(t=s,0===Mr&&Pr(Re)),t===s&&(n.substr(Sr,10).toLowerCase()===We?(t=n.substr(Sr,10),Sr+=10):(t=s,0===Mr&&Pr(Ge)))))))))))))))))))),Mr--,t===s&&0===Mr&&Pr(ae),t}())!==s&&on()!==s?(61===n.charCodeAt(Sr)?(o=C,Sr++):(o=s,0===Mr&&Pr(A)),o!==s&&on()!==s&&(i=Yr())!==s&&on()!==s?(kr=t,a=r,u=i,c={},"activation"===a.toLowerCase()?c.activation=e.flattenBoolean(u):c[a.toLowerCase().replace("colour","color")]=u,t=c):(Sr=t,t=s)):(Sr=t,t=s),t;var a,u,c}())===s&&(t=function(){var t,e;return Mr++,t=Sr,on()!==s?(n.substr(Sr,8).toLowerCase()===re?(e=n.substr(Sr,8),Sr+=8):(e=s,0===Mr&&Pr(ne)),e===s&&(n.substr(Sr,10).toLowerCase()===oe?(e=n.substr(Sr,10),Sr+=10):(e=s,0===Mr&&Pr(ie))),e!==s&&on()!==s?(kr=t,r=e,t={activation:"activate"===r.toLowerCase()}):(Sr=t,t=s)):(Sr=t,t=s),Mr--,t===s&&0===Mr&&Pr(ee),t;var r}()),t}function $r(){var t,e,r,o;return Mr++,t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=s,0===Mr&&Pr(Ve)),e!==s&&(r=function(){var t,e,r,o;for(t=[],e=Sr,r=Sr,Mr++,34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=s,0===Mr&&Pr(Ve)),Mr--,o===s?r=void 0:(Sr=r,r=s),r!==s?(n.substr(Sr,2)===qe?(o=qe,Sr+=2):(o=s,0===Mr&&Pr(Ue)),o===s&&(n.length>Sr?(o=n.charAt(Sr),Sr++):(o=s,0===Mr&&Pr($e))),o!==s?(kr=e,e=r=o):(Sr=e,e=s)):(Sr=e,e=s);e!==s;)t.push(e),e=Sr,r=Sr,Mr++,34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=s,0===Mr&&Pr(Ve)),Mr--,o===s?r=void 0:(Sr=r,r=s),r!==s?(n.substr(Sr,2)===qe?(o=qe,Sr+=2):(o=s,0===Mr&&Pr(Ue)),o===s&&(n.length>Sr?(o=n.charAt(Sr),Sr++):(o=s,0===Mr&&Pr($e))),o!==s?(kr=e,e=r=o):(Sr=e,e=s)):(Sr=e,e=s);return t}())!==s?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=s,0===Mr&&Pr(Ve)),o!==s?(kr=t,t=e=r.join("")):(Sr=t,t=s)):(Sr=t,t=s),Mr--,t===s&&(e=s,0===Mr&&Pr(Xe)),t}function Yr(){var t;return Mr++,(t=Zr())===s&&(t=$r()),Mr--,t===s&&0===Mr&&Pr(Ye),t}function Zr(){var t,e,r;if(t=Sr,e=[],Ze.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=s,0===Mr&&Pr(Ke)),r!==s)for(;r!==s;)e.push(r),Ze.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=s,0===Mr&&Pr(Ke));else e=s;return e!==s&&(kr=t,e=e.join("")),e}function Kr(){var t,e;return Mr++,t=Sr,Qe.test(n.charAt(Sr))?(e=n.charAt(Sr),Sr++):(e=s,0===Mr&&Pr(tr)),e!==s&&(kr=t,e=e),Mr--,(t=e)===s&&(e=s,0===Mr&&Pr(Je)),t}function Jr(){var t,e;return Mr++,t=Sr,rr.test(n.charAt(Sr))?(e=n.charAt(Sr),Sr++):(e=s,0===Mr&&Pr(nr)),e!==s&&(kr=t,e=e),Mr--,(t=e)===s&&(e=s,0===Mr&&Pr(er)),t}function Qr(){var t,e,r;return t=Sr,e=Sr,Mr++,n.substr(Sr,2)===ir?(r=ir,Sr+=2):(r=s,0===Mr&&Pr(ar)),Mr--,r===s?e=void 0:(Sr=e,e=s),e!==s?(n.length>Sr?(r=n.charAt(Sr),Sr++):(r=s,0===Mr&&Pr($e)),r!==s?(kr=t,t=e=r):(Sr=t,t=s)):(Sr=t,t=s),t}function tn(){var t,e,r,o,i;if(t=Sr,(e=function(){var t;return"/*"===n.substr(Sr,2)?(t="/*",Sr+=2):(t=s,0===Mr&&Pr(or)),t}())!==s){for(r=[],o=Qr();o!==s;)r.push(o),o=Qr();r!==s&&(o=function(){var t;return n.substr(Sr,2)===ir?(t=ir,Sr+=2):(t=s,0===Mr&&Pr(ar)),t}())!==s?(kr=t,i=o,t=e=e+r.join("")+i):(Sr=t,t=s)}else Sr=t,t=s;return t}function en(){var t;return sr.test(n.charAt(Sr))?(t=n.charAt(Sr),Sr++):(t=s,0===Mr&&Pr(lr)),t}function rn(){var t,e,r,o;if(t=Sr,(e=function(){var t;return"//"===n.substr(Sr,2)?(t="//",Sr+=2):(t=s,0===Mr&&Pr(ur)),t===s&&(35===n.charCodeAt(Sr)?(t="#",Sr++):(t=s,0===Mr&&Pr(cr))),t}())!==s){for(r=[],o=en();o!==s;)r.push(o),o=en();r!==s?(kr=t,t=e=e+r.join("")):(Sr=t,t=s)}else Sr=t,t=s;return t}function nn(){var t;return Mr++,(t=rn())===s&&(t=tn()),Mr--,t===s&&0===Mr&&Pr(dr),t}function on(){var t,e;for(t=[],(e=Kr())===s&&(e=Jr())===s&&(e=nn());e!==s;)t.push(e),(e=Kr())===s&&(e=Jr())===s&&(e=nn());return t}function an(){var t;return(t=function(){var t,e,r,o,i;return t=Sr,e=Sr,(r=un())!==s?(46===n.charCodeAt(Sr)?(o=".",Sr++):(o=s,0===Mr&&Pr(gr)),o!==s&&(i=un())!==s?e=r=[r,o,i]:(Sr=e,e=s)):(Sr=e,e=s),e!==s&&(kr=t,a=e,e=parseFloat(a.join(""))),e;var a}())===s&&(t=un()),t}function un(){var t,e,r;if(t=Sr,e=[],hr.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=s,0===Mr&&Pr(pr)),r!==s)for(;r!==s;)e.push(r),hr.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=s,0===Mr&&Pr(pr));else e=s;return e!==s&&(kr=t,e=parseInt(e.join(""),10)),e}function cn(){var t,e;return Mr++,t=Sr,(e=function(){var t,e,r,o;return t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=s,0===Mr&&Pr(Ve)),e!==s&&(r=sn())!==s?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=s,0===Mr&&Pr(Ve)),o!==s?(kr=t,t=e=r):(Sr=t,t=s)):(Sr=t,t=s),t}())!==s&&(kr=t,e=e),(t=e)===s&&(t=Sr,(e=sn())!==s&&(kr=t,e=e.toString()),t=e),Mr--,t===s&&(e=s,0===Mr&&Pr(br)),t}function sn(){var t;return"true"===n.substr(Sr,4).toLowerCase()?(t=n.substr(Sr,4),Sr+=4):(t=s,0===Mr&&Pr(mr)),t===s&&("false"===n.substr(Sr,5).toLowerCase()?(t=n.substr(Sr,5),Sr+=5):(t=s,0===Mr&&Pr(yr)),t===s&&("on"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=s,0===Mr&&Pr(vr)),t===s&&("off"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=s,0===Mr&&Pr(xr)),t===s&&(48===n.charCodeAt(Sr)?(t="0",Sr++):(t=s,0===Mr&&Pr(wr)),t===s&&(49===n.charCodeAt(Sr)?(t="1",Sr++):(t=s,0===Mr&&Pr(_r))))))),t}function ln(){var t,e;return t=Sr,(e=an())!==s&&(kr=t,e=e.toString()),(t=e)===s&&(t=Sr,"auto"===n.substr(Sr,4).toLowerCase()?(e=n.substr(Sr,4),Sr+=4):(e=s,0===Mr&&Pr(Ar)),e!==s&&(kr=t,e=e.toLowerCase()),t=e),t}if((i=d())!==s&&Sr===n.length)return i;throw i!==s&&Sr{"use strict";e.__esModule=!0;var r=Object.freeze({"|||":"empty","...":"empty","---":"empty","->":"directional","=>":"directional","=>>":"directional",">>":"directional",":>":"directional","-x":"directional","<-":"directional","<=":"directional","<<=":"directional","<<":"directional","<:":"directional","x-":"directional",note:"box",box:"box",abox:"box",rbox:"box","<->":"bidirectional","<=>":"bidirectional","<<=>>":"bidirectional","<<>>":"bidirectional","<:>":"bidirectional","--":"nondirectional","==":"nondirectional","..":"nondirectional","::":"nondirectional",alt:"inline_expression",else:"inline_expression",opt:"inline_expression",break:"inline_expression",par:"inline_expression",seq:"inline_expression",strict:"inline_expression",neg:"inline_expression",critical:"inline_expression",ignore:"inline_expression",consider:"inline_expression",assert:"inline_expression",loop:"inline_expression",ref:"inline_expression",exc:"inline_expression"});e.default=function(t){return r[t]}},940:(t,e)=>{"use strict";function r(t,e,n){e.forEach((function(e){!function(t,e,n){e.forEach((function(o){!function(t,e,r,n){n.forEach((function(n){n(r,t,e)}))}(t,e,o,n),o.arcs&&r(t,o.arcs,n)}))}(t,e,n)}))}e.__esModule=!0,e.default=function(t,e,n){var o,i;return o=t.entities,i=e,o.forEach((function(t){i.forEach((function(e){e(t)}))})),t.arcs&&r(t.entities,t.arcs,n),t}},597:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(940)),a=n(r(465)),u=o(r(367)),c=n(r(596)),s=n(r(975)),l=n(r(925)),d=0;function f(t){void 0===t.label&&(t.label=t.name)}function h(t){t.label&&(t.label=u.unescapeString(t.label)),t.id&&(t.id=u.unescapeString(t.id))}function p(t){t.label=Boolean(t.label)?t.label:""}function g(t){if(s.default(t.kind)!==t.kind){t.kind=s.default(t.kind);var e=t.from;t.from=t.to,t.to=e}}function b(t,e){!t.linecolor&&e.arclinecolor&&(t.linecolor=e.arclinecolor),!t.textcolor&&e.arctextcolor&&(t.textcolor=e.arctextcolor),!t.textbgcolor&&e.arctextbgcolor&&(t.textbgcolor=e.arctextbgcolor)}function m(t,e){if(void 0===e&&(e=[]),t&&t.from){var r=e.find((function(e){return e.name===t.from}));r&&b(t,r)}}function y(t){return t.arcs.reduce((function(t,e){return t+(Boolean(e[0].arcs)?y(e[0])+1:0)}),t.arcs.length)}function v(t,e,r,n){var o=[],i=[],u=[];return t.forEach((function(t){if(t.isVirtual=!1,"inline_expression"===c.default(t.kind)){if(t.depth=e,t.isVirtual=!0,t.arcs){var o=a.default(t);o.numberofrows=y(o),delete o.arcs,i.push(o),t.arcs.forEach((function(t){u=u.concat(v(t,e+1,o.from,o.to)),t.forEach((function(t){b(t,o)}))})),e>d&&(d=e)}else i.push(t);u.push([{kind:"|||",from:t.from,to:t.to,isVirtual:!0}])}else r&&n&&"empty"===c.default(t.kind)&&(t.from=r,t.to=n,t.depth=e),i.push(t)})),o.push(i),o.concat(u)}function x(t){return d=0,{options:l.default(t.options),entities:a.default(t.entities),arcs:(e=t.arcs,e?e.reduce((function(t,e){return t.concat(v(e,0))}),[]):[]),depth:d+1};var e}e.nameAsLabel=f,e.swapRTLArc=g,e.overrideColors=m,e.normalize=x,e.flatten=function(t){return x(i.default(t,[f,h],[g,m,h,p]))}},975:(t,e)=>{"use strict";e.__esModule=!0;var r=Object.freeze({"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"});e.default=function(t){return r[t]||t}},925:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t){return Object.assign({wordwraparcs:!1,wordwrapentities:!0,wordwrapboxes:!0},t||{})}},866:(t,e)=>{"use strict";e.__esModule=!0,e.default={LINE_WIDTH:2,FONT_SIZE:12}},22:t=>{"use strict";t.exports=JSON.parse('{"baseTemplate":"svg.<%=id%>{font-family:Helvetica,sans-serif;font-size:<%=fontSize%>px;font-weight:normal;font-style:normal;text-decoration:none;background-color:white;stroke:black;stroke-width:<%=lineWidth%>}.<%=id%> path, .<%=id%> rect{fill:none}.<%=id%> .label-text-background{fill:white;stroke:white;stroke-width:0}.<%=id%> .bglayer{fill:white;stroke:white;stroke-width:0}.<%=id%> line{}.<%=id%> .return, .<%=id%> .comment{stroke-dasharray:5,3}.<%=id%> .inline_expression_divider{stroke-dasharray:10,5}.<%=id%> text{color:inherit;stroke:none;text-anchor:middle}.<%=id%> text.anchor-start{text-anchor:start}.<%=id%> .arrow-marker{overflow:visible}.<%=id%> .arrow-style{stroke-width:1}.<%=id%> .arcrow, .<%=id%> .arcrowomit, .<%=id%> .emphasised{stroke-linecap:butt}.<%=id%> .arcrowomit{stroke-dasharray:2,2}.<%=id%> .box, .<%=id%> .entity{fill:white;stroke-linejoin:round}.<%=id%> .inherit{stroke:inherit;color:inherit}.<%=id%> .inherit-fill{fill:inherit}.<%=id%> .watermark{font-size:48pt;font-weight:bold;opacity:0.14}","namedStyles":[{"name":"basic","description":"Basic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:underline;}"},{"name":"lazy","description":"Lazy","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{font-weight:bold;}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC}.<%=id%> rect.label-text-background{opacity:0.9}.<%=id%> line.comment,.<%=id%> rect.inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke:grey}"},{"name":"classic","description":"Classic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:none}.<%=id%> .entity{stroke:none;}.<%=id%> line,.<%=id%> rect,.<%=id%> path{stroke-width:1px}.<%=id%> .arrow-style{stroke-width:2;}.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke-width: 1px}"},{"name":"fountainpen","description":"Fountain pen","experimental":true,"deprecated":false,"renderMagic":"wobbly","cssBefore":"@import \'https://fonts.googleapis.com/css?family=Gochi+Hand\';","cssAfter":"svg.<%=id%>{font-family:\'Gochi Hand\', cursive;font-size:14px;stroke-opacity:0.4;stroke-linecap:round;background-color:transparent}.<%=id%> text{fill:rgba(0,0,128,0.7)}.<%=id%> marker polygon{fill:rgba(0,0,255,0.4);stroke-linejoin:round}.<%=id%> line, .<%=id%> path, .<%=id%> rect, .<%=id%> polygon{stroke:blue !important}.<%=id%> text.entity-text{font-weight:bold;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC;}.<%=id%> .label-text-background{opacity:0}"},{"name":"cygne","description":"Cygne (best with msgenny)","experimental":true,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:#00A1DE}.<%=id%> text{fill:#005B82}.<%=id%> .entity,.<%=id%> .box{fill:#00A1DE;stroke:#00A1DE}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#E77B2F;stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"pegasse","description":"Pégase (best with msgenny)","experimental":false,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:rgba(0, 43, 84, 1)}.<%=id%> text{fill:rgba(0, 43, 84, 1)}.<%=id%> .entity,.<%=id%> .box{fill:rgba(0, 43, 84, 1);stroke:rgba(0, 43, 84, 1)}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:rgba(255, 50, 0, 1);stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"grayscaled","description":"Grayscaled (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:grayscale(1);-webkit-filter:grayscale(1);}"},{"name":"inverted","description":"Inverted (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:invert(1);-webkit-filter:invert(1);}"},{"name":"noentityboxes","description":"No entity boxes","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> .entity{fill:none;stroke:none;}.<%=id%> text.entity-text{text-decoration:underline;}"}]}')},489:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(866)),a=o(r(631)),u=o(r(683)),c=o(r(930)),s=function(){function t(t){this.interEntitySpacing=160,this.height=34,this.width=100,this.entityXHWM=0,this.entity2x={},t&&(this.interEntitySpacing=160*t,this.width=100*t)}return t.prototype.getX=function(t){return this.entity2x[t]},t.prototype.getDims=function(){return{interEntitySpacing:this.interEntitySpacing,height:this.height,width:this.width,entityXHWM:this.entityXHWM}},t.prototype.getOAndD=function(t,e){return{from:this.getX(t)this.getX(t)?this.getX(e):this.getX(t)}},t.prototype.renderEntities=function(t,e,r){var n=this,o=u.createGroup();return this.entityXHWM=0,this.height=this.getMaxEntityHeight(t,r)+2*i.default.LINE_WIDTH,t.forEach((function(t){o.appendChild(n.renderEntity(t,n.entityXHWM,e,r)),n.setX(t,n.entityXHWM),n.entityXHWM+=n.interEntitySpacing})),o},t.prototype.setX=function(t,e){this.entity2x[t.name]=e+this.width/2},t.prototype.getNoEntityLines=function(t,e,r){return a.splitLabel(t,"entity",this.width,e,r).length},t.prototype.sizeEntityBoxToLabel=function(t,e){var r=Math.min(c.getBBox(t).width+4*i.default.LINE_WIDTH,this.interEntitySpacing/3+e.width);return r>=e.width&&(e.x-=(r-e.width)/2,e.width=r),e},t.prototype.renderEntity=function(t,e,r,n){var o=u.createGroup(),i={x:e||0,y:r||0,width:this.width,height:this.height},c=a.createLabel(Object.assign({kind:"entity"},t),Object.assign({},i,{y:i.y+i.height/2}),n);return o.appendChild(u.createRect(this.sizeEntityBoxToLabel(c,i),{class:"entity",color:t.linecolor,bgColor:t.textbgcolor})),o.appendChild(c),o},t.prototype.getMaxEntityHeight=function(t,e){var r=this,n=t[0],o=2;return t.forEach((function(t){var a=r.getNoEntityLines(t.label,i.default.FONT_SIZE,e);a>o&&(o=a,n=t)})),o>2?Math.max(this.height,c.getBBox(this.renderEntity(n,0,0,e)).height):this.height},t}();e.Thing=s},824:(t,e)=>{"use strict";e.__esModule=!0;var r="mscgenjs",n=r;e.setPrefix=function(t){n=r+t},e.get=function(t){return n+(t||"")}},622:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(596)),i=Object.freeze({"|||":"empty-row","...":"omitted-row","---":"comment-row","->":"signal","=>":"method","=>>":"callback",">>":"return",":>":"emphasised","-x":"lost","<-":"signal","<=":"method","<<=":"callback","<<":"return","<:":"emphasised","x-":"lost","<->":"signal","<=>":"method","<<=>>":"callback","<<>>":"return","<:>":"emphasised","--":"signal","==":"method","..":"return","::":"emphasised"});e.getClass=function(t){return i[t]||t},e.getAggregateClass=function(t){return o.default(t)||t}},853:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(800)),i=n(r(975)),a={"->":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}{{signal-marker-end}}-{{color}})"}],marker:{name:"signal"}},"<->":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}{{signal-marker-end}}-{{color}})"},{name:"marker-start",value:"url(#{{id}}{{signal-marker-start}}-{{color}})"}],marker:{name:"signal"}},"=>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"}],marker:{name:"callback",end:""}},"<<=>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"},{name:"marker-start",value:"url(#{{id}}callback-l-{{color}})"}],marker:{name:"callback",end:"",start:"-l"}},">>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"}],marker:{name:"callback",end:""}},"<<>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"},{name:"marker-start",value:"url(#{{id}}callback-l-{{color}})"}],marker:{name:"callback",end:"",start:"-l"}},"..":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"--":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"==":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"::":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"=>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"}],marker:{name:"method",end:""}},"<=>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"},{name:"marker-start",value:"url(#{{id}}method-l-{{color}})"}],marker:{name:"method",end:"",start:"-l"}},":>":{attributes:[{name:"style",value:"stroke:{{color}};"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"}],marker:{name:"method",end:""}},"<:>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"},{name:"marker-start",value:"url(#{{id}}method-l-{{color}})"}],marker:{name:"method",end:"",start:"-l"}},"-x":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}lost-{{color}})"}],marker:{name:"lost",end:""}}},u={signal:{variants:[{name:"",path:"M9,3 l-8, 2"},{name:"-u",path:"M9,3 l-8,-2"},{name:"-l",path:"M9,3 l 8, 2"},{name:"-lu",path:"M9,3 l 8,-2"}]},method:{variants:[{name:"",path:"1,1 9,3 1,5"},{name:"-l",path:"17,1 9,3 17,5"}]},callback:{variants:[{name:"",path:"M 1,1 l 8,2 l-8,2"},{name:"-l",path:"M17,1 l-8,2 l 8,2"}]},lost:{variants:[{name:"",path:"M7,0 l5,6 M7,6 l5,-6"}]}};function c(t,e,r){return e&&r&&["<->","->"].includes(t)?e"===t&&e<=r?"signal-l":"signal-lu"}function l(t,e){return a[i.default(t)].marker.name+(Boolean(e)?" "+e:" black")}function d(t,e){function r(e){d(t,e)}return Array.isArray(e)&&e.forEach(r),e.arcs&&e.arcs.forEach(r),e.kind&&a[i.default(e.kind)]&&a[i.default(e.kind)].marker&&!t.includes(l(e.kind,e.linecolor))&&t.push(l(e.kind,e.linecolor)),t}function f(t){return{kind:t.split(" ")[0],color:t.split(" ")[1]}}e.getAttributes=function(t,e,r,n,o){var i=[];return a[e]&&a[e].attributes&&(i=a[e].attributes.map((function(i){return{name:i.name,value:i.value.replace(/\{\{signal-marker-end\}\}/g,c(e,n,o)).replace(/\{\{signal-marker-start\}\}/g,s(e,n,o)).replace(/\{\{id\}\}/g,t).replace(/\{\{color\}\}/g,r||"black")}}))),i},e.getMarkerDefs=function(t,e){return o.default(function(t){return t.arcs.reduce(d,[]).sort().map(f)}(e).map((function(e){return u[e.kind].variants.map((function(r){return{name:t+e.kind+r.name+"-"+e.color,path:r.path,color:e.color,type:e.kind}}))})))}},533:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(465)),a=n(r(596)),u=r(597),c=n(r(866)),s=r(489),l=o(r(824)),d=o(r(622)),f=o(r(853)),h=o(r(631)),p=o(r(525)),g=o(r(173)),b=o(r(621)),m=o(r(683)),y=o(r(930)),v=new s.Thing(0),x=Object.seal({arcRowHeight:38,arcGradient:0,arcEndX:0,wordWrapArcs:!1,mirrorEntitiesOnBottom:!1,regularArcTextVerticalAlignment:"middle",maxDepth:0,document:{},layers:{lifeline:{},sequence:{},notes:{},inline:{},watermark:{}}}),w=[];function _(t,e,r){x.layers.sequence.appendChild(v.renderEntities(t,e,r)),x.arcEndX=v.getDims().entityXHWM-v.getDims().interEntitySpacing+v.getDims().width}function C(t,e,r,n,o){var a=m.createGroup();return t.from&&t.to&&("*"===t.to?(function(t,e,r,n,o){var i=0,a=t.label,u=v.getX(t.from);t.label="",e.forEach((function(e){var a={};e.name!==t.from&&(i=v.getX(e.name),a=E(t,u,i,n,o),r.push({layer:x.layers.sequence,element:a}))})),t.label=a}(t,e,r,n,o),a=h.createLabel(t,{x:0,y:b.get(n).y,width:x.arcEndX},Object.assign({alignAround:!0,ownBackground:!0},i.default(o))),r.push({title:t.title,layer:x.layers.sequence,element:a})):(a=E(t,v.getX(t.from),v.getX(t.to),n,o),r.push({title:t.title,layer:x.layers.sequence,element:a}))),a}function A(t,e,r){var n=0;return t.forEach((function(t){var o;switch(a.default(t.kind)){case"empty":o=L(t,0);break;case"box":o=M(v.getOAndD(t.from,t.to),t,0,r);break;case"inline_expression":o=S(t,0);break;default:var u=i.default(t);u.arcskip=0,o=C(u,e,[],0,r)}n=Math.max(n,y.getBBox(o).height+2*c.default.LINE_WIDTH)})),n}function S(t,e){var r=v.getOAndD(t.from,t.to),n=e>0,o=2*x.maxDepth*c.default.LINE_WIDTH,i=r.to-r.from+(v.getDims().interEntitySpacing-2*c.default.LINE_WIDTH)-7-c.default.LINE_WIDTH,a=r.from-(v.getDims().interEntitySpacing-3*c.default.LINE_WIDTH-o)/2-2*(x.maxDepth-t.depth)*c.default.LINE_WIDTH,u=m.createGroup();n||(t.label=t.kind+(t.label?": "+t.label:""));var s=h.createLabel(t,{x:a+c.default.LINE_WIDTH-i/2,y:e+x.arcRowHeight/4,width:i},{alignLeft:!0,ownBackground:!1,wordwraparcs:x.wordWrapArcs}),l=y.getBBox(s),d=Math.max(l.height+2*c.default.LINE_WIDTH,x.arcRowHeight/2-2*c.default.LINE_WIDTH),f=Math.min(l.width+2*c.default.LINE_WIDTH,i),p=m.createEdgeRemark({width:f-c.default.LINE_WIDTH+7,height:d,x:a,y:e},{class:"box inline_expression_label",color:t.linecolor,bgColor:t.textbgcolor,foldSize:7});return u.appendChild(p),u.appendChild(s),u}function k(t,e,r,n){return r","::","<:>"].includes(t.kind),y=function(t,e,r){var n=b.get(t).y+e;if(r){var o=Math.floor(r),i=r-o,a=b.get(t).realRowNumber;n=b.getByRealRowNumber(a+o).y+i*(b.getByRealRowNumber(a+o+1).y-b.getByRealRowNumber(a+o).y)}return n}(n,x.arcGradient,t.arcskip);if(e===(r=g.determineArcXTo(t.kind,e,r))){u.appendChild(function(t,e,r,n,o,i){var a=x.arcRowHeight/5*2,u=v.getDims().interEntitySpacing/2,s={},h="arc "+d.getAggregateClass(t)+" "+d.getClass(t);if(n){s=m.createGroup();var p=m.createUTurn({x:e,y:o,width:u-2*c.default.LINE_WIDTH,height:a},o+r+a-2*c.default.LINE_WIDTH,{class:h,dontHitHome:"::"!==t,lineWidth:c.default.LINE_WIDTH}),g=m.createUTurn({x:e,y:o,width:u,height:a},o+r+a-c.default.LINE_WIDTH,{lineWidth:c.default.LINE_WIDTH}),b=m.createUTurn({x:e,y:o,width:u,height:a},o+r+a,{class:h,dontHitHome:"::"!==t,lineWidth:c.default.LINE_WIDTH});i&&p.setAttribute("style","stroke:"+i),f.getAttributes(l.get(),t,i,e,e).forEach((function(t){g.setAttribute(t.name,t.value)})),g.setAttribute("style","stroke:transparent;"),Boolean(i)&&b.setAttribute("style","stroke:"+i),s.appendChild(p),s.appendChild(b),s.appendChild(g),s.setAttribute("class",h)}else s=m.createUTurn({x:e,y:o,width:u,height:a},o+r+a,{class:h,dontHitHome:"-x"===t,lineWidth:c.default.LINE_WIDTH}),f.getAttributes(l.get(),t,i,e,e).forEach((function(t){s.setAttribute(t.name,t.value)}));return s}(t.kind,e,y-b.get(n).y-x.arcGradient,p,b.get(n).y,t.linecolor));var w=2*v.getDims().interEntitySpacing/3;u.appendChild(h.createLabel(t,{x:e+1.5*c.default.LINE_WIDTH-w/2,y:b.get(n).y-x.arcRowHeight/5-c.default.LINE_WIDTH/2,width:w},Object.assign({alignLeft:!0,alignAbove:!0,ownBackground:!0},i.default(o))))}else{var _=m.createLine({xFrom:e,yFrom:b.get(n).y,xTo:r,yTo:y},{class:s,doubleLine:p});f.getAttributes(l.get(),t.kind,t.linecolor,e,r).forEach((function(t){_.setAttribute(t.name,t.value)})),u.appendChild(_),u.appendChild(h.createLabel(t,{x:e,y:b.get(n).y+(y-b.get(n).y)/2,width:r-e},Object.assign({alignAround:!0,alignAbove:"above"===x.regularArcTextVerticalAlignment,ownBackground:!0},i.default(o))))}return u}function T(t,e,r){var n=0,o=x.arcEndX;return t.from&&t.to&&(n=e.from,o=e.to-e.from),h.createLabel(t,{x:n,y:r,width:o},{ownBackground:!0,wordwraparcs:x.wordWrapArcs})}function M(t,e,r,n){var o,i=2*x.maxDepth*c.default.LINE_WIDTH,a=t.to-t.from+v.getDims().interEntitySpacing-2*c.default.LINE_WIDTH-i,u=t.from-(v.getDims().interEntitySpacing-2*c.default.LINE_WIDTH-i)/2,s=m.createGroup(),l=h.createLabel(e,{x:u,y:r,width:a},n),d=y.getBBox(l),f=Math.max(d.height+2*c.default.LINE_WIDTH,x.arcRowHeight-2*c.default.LINE_WIDTH),p={width:a,height:f,x:u,y:r-f/2};switch(e.kind){case"rbox":o=m.createRBox(p,{class:"box rbox",color:e.linecolor,bgColor:e.textbgcolor});break;case"abox":o=m.createABox(p,{class:"box abox",color:e.linecolor,bgColor:e.textbgcolor});break;case"note":o=m.createNote(p,{class:"box note",color:e.linecolor,bgColor:e.textbgcolor,lineWidth:c.default.LINE_WIDTH});break;default:o=m.createRect(p,{class:"box",color:e.linecolor,bgColor:e.textbgcolor})}return s.appendChild(o),s.appendChild(l),s}e.clean=function(t,e){x.document=p.init(e),y.init(x.document),y.removeRenderedSVGFromElement(t)},e.render=function(t,e,r,n){var o=Object.freeze(u.flatten(t)),i=function(t,e){return t.document.getElementById(e)||t.document.body}(e,r);return l.setPrefix(r),function(t,e,r,n){var o;x.document=p.bootstrap(e,r,l.get(),f.getMarkerDefs(l.get(),t),n),x.mirrorEntitiesOnBottom=n.mirrorEntitiesOnBottom,x.regularArcTextVerticalAlignment=n.regularArcTextVerticalAlignment,y.init(x.document),x.layers={lifeline:(o=x.document).getElementById(l.get("_lifelines")),sequence:o.getElementById(l.get("_sequence")),notes:o.getElementById(l.get("_notes")),inline:o.getElementById(l.get("_arcspans")),watermark:o.getElementById(l.get("_watermark"))},x.maxDepth=t.depth,function(t,e){v=new s.Thing(e&&e.hscale),function(t,e){t.arcRowHeight=38,t.arcGradient=0,t.wordWrapArcs=!1,e.arcgradient&&(t.arcRowHeight=parseInt(e.arcgradient,10)+38,t.arcGradient=parseInt(e.arcgradient,10)+0),t.wordWrapArcs=Boolean(e.wordwraparcs)}(t,e)}(x,t.options)}(o,e,i,n||{}),function(t){var e,r,n;_(t.entities,0,t.options),b.clear(v.getDims().height,x.arcRowHeight),e=t.arcs,r=t.entities,n=t.options,w=[],k(r,"arcrow",x.arcRowHeight,b.get(-1).y).forEach((function(t){x.layers.lifeline.appendChild(t)})),function(t,e,r){var n=0;t.forEach((function(t,o){t.every((function(t){return t.isVirtual}))?b.set(o,Math.max(b.get(o).height,A(t,e,r))):(b.set(o,Math.max(b.get(o).height,A(t,e,r)),n),n++)}))}(e,r,n),e.forEach((function(t,e){!function(t,e,r,n){var o="arcrow",i=[];t.forEach((function(t){var u={};switch(a.default(t.kind)){case"empty":u=L(t,b.get(e).y),"..."===t.kind&&(o="arcrowomit"),i.push({layer:x.layers.sequence,element:u});break;case"box":u=M(v.getOAndD(t.from,t.to),t,b.get(e).y,n),i.push({title:t.title,layer:x.layers.notes,element:u});break;case"inline_expression":u=S(t,b.get(e).y),i.push({layer:x.layers.notes,element:u}),w.push({arc:t,rownum:e});break;default:u=C(t,r,i,e,n)}})),k(r,o,b.get(e).height,b.get(e).y).forEach((function(t){x.layers.lifeline.appendChild(t)})),i.forEach((function(t){t.element&&(t.title&&t.element.appendChild(m.createTitle(t.title)),t.layer.appendChild(t.element))}))}(t,e,r,n)})),w.forEach((function(t){var e,r,n,o;x.layers.inline.appendChild((e=t,r=b.get(t.rownum).y,n=b.get(e.rownum).y,o=b.get(e.rownum+e.arc.numberofrows+1).y-n,e.arc.label="",function(t,e,r,n){var o=2*x.maxDepth*c.default.LINE_WIDTH,i=t.to-t.from+v.getDims().interEntitySpacing-2*c.default.LINE_WIDTH-o,a=t.from-(v.getDims().interEntitySpacing-2*c.default.LINE_WIDTH-o)/2,u=2*(x.maxDepth-e.depth)*c.default.LINE_WIDTH;return m.createRect({width:i+2*u,height:r||x.arcRowHeight-2*c.default.LINE_WIDTH,x:a-u,y:n},{class:"box inline_expression "+e.kind,color:e.linecolor,bgColor:e.textbgcolor})}(v.getOAndD(e.arc.from,e.arc.to),e.arc,o,r)))})),x.mirrorEntitiesOnBottom&&function(t,e){var r=b.getLast().y+(b.getLast().height+x.arcRowHeight)/2;k(t,"arcrow",x.arcRowHeight,r).forEach((function(t){x.layers.lifeline.appendChild(t)})),_(t,r+x.arcRowHeight/2,e)}(t.entities,t.options)}(o),function(t){var e,r,n=function(t){var e=g.determineDepthCorrection(t.depth,c.default.LINE_WIDTH),r=b.getLast(),n={width:t.entities.length*v.getDims().interEntitySpacing+e,height:Boolean(x.mirrorEntitiesOnBottom)?2*v.getDims().height+r.y+r.height+6:r.y+r.height/2+6,horizontaltransform:(v.getDims().interEntitySpacing+e-v.getDims().width)/2,autoscale:!!t.options&&!!t.options.width&&"auto"===t.options.width,verticaltransform:3,scale:1};return n.x=0-n.horizontaltransform,n.y=0-n.verticaltransform,n}(t);e=n,(r=x.document.getElementById(l.get("_background")))&&r.appendChild(m.createRect(e,{class:"bglayer"})),function(t){var e=x.document.getElementById(l.get()),r=x.document.getElementById(l.get("_body"));r&&e&&(r.setAttribute("transform","translate("+t.horizontaltransform+","+t.verticaltransform+") scale("+t.scale+","+t.scale+")"),t.autoscale&&!0===t.autoscale?m.updateSVG(e,{width:"100%",height:"100%",viewBox:"0 0 "+t.width.toString()+" "+t.height.toString()}):m.updateSVG(e,{width:t.width.toString(),height:t.height.toString(),viewBox:"0 0 "+t.width.toString()+" "+t.height.toString()}))}(n=function(t,e){return t.watermark&&function(t,e){x.layers.watermark.appendChild(m.createDiagonalText(t,e,"watermark"))}(t.watermark,e),t.width&&"auto"!==t.width&&(e=g.scaleCanvasToWidth(t.width,e)),e}(t.options,n))}(o),y.webkitNamespaceBugWorkaround(i.innerHTML)}},631:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(596)),a=n(r(791)),u=n(r(866)),c=o(r(622)),s=o(r(683)),l=o(r(930));function d(t,e){return e&&t.setAttribute("style","fill:"+e+";"),t}function f(t,e,r,n,o){return function(t,e){return function(t,e){return"box"===i.default(t)&&e}(t,e.wordwrapboxes)||function(t,e){return"entity"===t&&e}(t,e.wordwrapentities)||function(t,e){return"box"!==i.default(t)&&"entity"!==t&&e}(t,e.wordwraparcs)||void 0===t}(e,o)?a.default(t,function(t,e){var r=Math.abs(t);return r<=160?r/(e/12*8):r<=320?r/(e/12*6.4):r<=480?r/(e/12*5.9):r/(e/12*5.6)}(r,n)):t.split("\\n")}e.createLabel=function(t,e,r,n){var o=s.createGroup(n);if(r=r||{},t.label){var i=e.x+e.width/2,a=function(t,e){return e.alignAbove&&t.forEach((function(){t.push("")})),e.alignAround&&1===t.length&&t.push(""),t}(f(t.label,t.kind,e.width,u.default.FONT_SIZE,r),r),h=function(t,e,r){return r.alignAround?e.y-(t.length-1)/2*(l.calculateTextHeight()+u.default.LINE_WIDTH+1):e.y-(t.length-1)/2*(l.calculateTextHeight()+1)}(a,e,r);a.forEach((function(e,n){if(""!==e){var a=function(t,e,r,n,o,i){var a,f,h,p=r+(o+1/4)*l.calculateTextHeight(),g=function(t,e){var r=t,n=c.getClass(r),o=c.getAggregateClass(r);return n===o?n+e:o+e+n+e}(n.kind,"-text ");return i.alignLeft&&(g+="anchor-start "),i.alignAround&&(p=r+(o+1/4)*(l.calculateTextHeight()+u.default.LINE_WIDTH)),a=d(function(t,e,r,n,o){var i=0===e?{class:n,url:o.url,id:o.id,idurl:o.idurl}:{class:n,url:o.url};return s.createText(t,r,i)}(t,o,{x:e,y:p},g,n),n.textcolor),f=n.url,h=n.textcolor,d(a,f&&!h?"blue":h)}(e,i,h,t,n,r);r.ownBackground&&o.appendChild((f=a,p=t.textbgcolor,g=s.createRect(l.getBBox(f),{class:"label-text-background"}),p&&g.setAttribute("style","fill:"+p+"; stroke:"+p+";"),g)),o.appendChild(a)}var f,p,g;h++}))}return o},e.splitLabel=f},525:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=n(r(683)),a=o(r(866)),u=r(22),c={};function s(t,e,r){var n=i.createDefs();return n.appendChild(function(t,e){var r=c.createElement("style");return r.setAttribute("type","text/css"),r.appendChild(c.createTextNode(function(t,e){return(r=d(t.additionalTemplate)||{},n=t.styleAdditions,(r.cssBefore||"")+u.baseTemplate+(r.cssAfter||"")+(n||"")).replace(/<%=fontSize%>/g,a.default.FONT_SIZE).replace(/<%=lineWidth%>/g,a.default.LINE_WIDTH).replace(/<%=id%>/g,e);var r,n}(t,e))),r}(r,t)),function(t,e){return e.forEach((function(e){"method"===e.type?t.appendChild(i.createMarkerPolygon(e.name,e.path,e.color)):t.appendChild(i.createMarkerPath(e.name,e.path,e.color))})),t}(n,e)}function l(t){return i.init(t.document,{LINE_WIDTH:a.default.LINE_WIDTH,FONT_SIZE:a.default.FONT_SIZE}),t.document}function d(t){return u.namedStyles.find((function(e){return e.name===t}))}e.init=l,e.bootstrap=function(t,e,r,n,o){c=l(t);var a,u,f=i.createSVG(r,r,function(t){var e="",r=d(t.additionalTemplate);return Boolean(r)&&(e=r.renderMagic),e}(o));return Boolean(o.source)&&f.appendChild(function(t,e){var r=i.createDesc();return r.appendChild(t.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n"+e)),r}(t,o.source)),f.appendChild(s(r,n,o)),f.appendChild((a=r,(u=i.createGroup(a+"_body")).appendChild(i.createGroup(a+"_background")),u.appendChild(i.createGroup(a+"_arcspans")),u.appendChild(i.createGroup(a+"_lifelines")),u.appendChild(i.createGroup(a+"_sequence")),u.appendChild(i.createGroup(a+"_notes")),u.appendChild(i.createGroup(a+"_watermark")),u)),e.appendChild(f),c}},173:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(465));e.scaleCanvasToWidth=function(t,e){var r=o.default(e);return r.scale=t/r.width,r.width*=r.scale,r.height*=r.scale,r.horizontaltransform*=r.scale,r.verticaltransform*=r.scale,r.x=0-r.horizontaltransform,r.y=0-r.verticaltransform,r},e.determineDepthCorrection=function(t,e){return t?2*(t+1)*e*2:0},e.determineArcXTo=function(t,e,r){return"-x"===t?e+3/4*(r-e):r}},621:(t,e)=>{"use strict";e.__esModule=!0;var r=[],n=0,o=0;function i(t){return r[t]?r[t]:{y:n+1.5*o+t*o,height:o,realRowNumber:r.length-1}}function a(){return i(r.length-1)}e.get=i,e.getLast=a,e.clear=function(t,e){r=[],n=t,o=e},e.getByRealRowNumber=function(t){var e=r.find((function(e){return e.realRowNumber===t}));return void 0===e&&(e=a()),e},e.set=function(t,e,n){void 0===n&&(n=-1);var o=i(t-1);r[t]={y:o.y+(o.height+e)/2,height:e,realRowNumber:n}}},431:(t,e)=>{"use strict";e.__esModule=!0,e.SVGNS="http://www.w3.org/2000/svg",e.XLINKNS="http://www.w3.org/1999/xlink";var r={};function n(t,e,r){return Boolean(r)&&t.setAttribute(e,r),t}function o(t,e,r,n){return Boolean(n)&&t.setAttributeNS(e,r,n),t}function i(t,e){return Object.keys(e||{}).forEach((function(r){n(t,r,e[r])})),t}e.setAttribute=n,e.setAttributeNS=o,e.setAttributes=i,e.setAttributesNS=function(t,e,r){return Object.keys(r||{}).forEach((function(n){o(t,e,n,r[n])})),t},e.createElement=function(t,n){return i(r.createElementNS(e.SVGNS,t),n)},e.createTextNode=function(t){return r.createTextNode(t)},e.init=function(t){r=t}},710:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t){return 0-360*Math.atan(t.height/t.width)/(2*Math.PI)}},683:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var o=n(r(718)),i=n(r(652)),a=n(r(282)),u=o,c={};e.init=function(t,e){i.init(t),c=Object.assign({LINE_WIDTH:2,FONT_SIZE:12},e)},e.createSVG=function(t,e,r){return u=function(t){return Boolean(t)?"wobbly"===t?a:o:u}(r),i.createSVG(t,e)},e.updateSVG=i.updateSVG,e.createTitle=i.createTitle,e.createDesc=i.createDesc,e.createDefs=i.createDefs,e.createTSpan=i.createTSpan,e.createRect=function(t,e){return u.createRect(t,e)},e.createRBox=function(t,e){return u.createRBox(t,e)},e.createABox=function(t,e){return u.createABox(t,e)},e.createNote=function(t,e){return u.createNote(t,e)},e.createEdgeRemark=function(t,e){return u.createEdgeRemark(t,{class:e.class,color:e.color,bgColor:e.bgColor,foldSize:e.foldSize,lineWidth:c.LINE_WIDTH})},e.createText=i.createText,e.createDiagonalText=i.createDiagonalText,e.createLine=function(t,e){return Boolean(e)&&Boolean(e.doubleLine)?(e.lineWidth||(e.lineWidth=c.LINE_WIDTH),u.createDoubleLine(t,e)):u.createSingleLine(t,e)},e.createUTurn=i.createUTurn,e.createGroup=i.createGroup,e.createMarkerPath=i.createMarkerPath,e.createMarkerPolygon=i.createMarkerPolygon},103:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t,e){return e?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Math.round(t)}},718:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var o=n(r(652)),i=n(r(344));e.createDoubleLine=function(t,e){var r=e.lineWidth||1,n=r,a=e?e.class:"",u=i.getDirection(t),c=i.determineEndCorrection(t,a,r),s=i.determineStartCorrection(t,a,r),l=(t.xTo-t.xFrom+c-s).toString(),d=(t.yTo-t.yFrom).toString(),f=o.pathPoint2String("l",u.signX,u.dy),h=o.pathPoint2String("l",l,d);return o.createPath(o.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*u.dy)+f+o.pathPoint2String("M",t.xFrom+s,t.yFrom-n)+h+o.pathPoint2String("M",t.xFrom+s,t.yFrom+n)+h+o.pathPoint2String("M",t.xTo-u.signX,t.yTo+7.5*r*u.dy)+f,e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),i=n.toString(10);return o.createPath(o.pathPoint2String("M",t.x,t.y)+o.pathPoint2String("l",t.width-n,0)+o.pathPoint2String("l",0,i)+o.pathPoint2String("l",i,0)+o.pathPoint2String("m",-i,-i)+o.pathPoint2String("l",i,i)+o.pathPoint2String("l",0,t.height-n)+o.pathPoint2String("l",-t.width,0)+o.pathPoint2String("l",0,-t.height)+"z",e)},e.createRBox=function(t,e){var r=Object.assign({rx:6,ry:6},e);return o.createRect(t,r)},e.createABox=function(t,e){return o.createPath(o.pathPoint2String("M",t.x,t.y+t.height/2)+o.pathPoint2String("l",3,-t.height/2)+o.pathPoint2String("l",t.width-6,0)+o.pathPoint2String("l",3,t.height/2)+o.pathPoint2String("l",-3,t.height/2)+o.pathPoint2String("l",-(t.width-6),0)+"z",e)},e.createEdgeRemark=function(t,e){var r=e&&e.foldSize?e.foldSize:7,n=Object.assign({class:null,color:null,bgColor:null},e);return o.createPath(o.pathPoint2String("M",t.x,t.y)+o.pathPoint2String("l",t.width,0)+o.pathPoint2String("l",0,t.height-r)+o.pathPoint2String("l",-r,r)+o.pathPoint2String("l",-(t.width-r),0),n)},e.createSingleLine=o.createSingleLine,e.createRect=o.createRect},652:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=n(r(431)),a=o(r(710)),u=o(r(103));function c(t){return u.default(t.x,2).toString()+","+u.default(t.y,2).toString()+" "}function s(t,e,r){return t+c({x:e,y:r})}function l(t,e,r,n){return i.createElement("marker",{orient:r,id:t,class:e,viewBox:Boolean(n)?n:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}function d(t,e){var r=i.createElement("tspan"),n=i.createTextNode(t);return r.appendChild(n),e?function(t,e){var r=i.createElement("a");return i.setAttributesNS(r,i.XLINKNS,{"xlink:href":t,"xlink:title":t}),r.appendChild(e),r}(e,r):r}function f(t,e,r){var n=Object.assign({class:null,url:null,id:null,idurl:null},r),o=i.createElement("text",{x:u.default(e.x,2).toString(),y:u.default(e.y,2).toString(),class:n.class});if(o.appendChild(d(t,n.url)),n.id){var a=d(" ["+n.id+"]",n.idurl);a.setAttribute("style","vertical-align:text-top;font-size:0.7em;text-anchor:start;"),o.appendChild(a)}return o}function h(t,e){var r=Object.assign({class:null,style:null,color:null,bgColor:null},e);return p(i.createElement("path",{d:t,class:r.class,style:r.style}),r.color,r.bgColor)}function p(t,e,r){var n="";return r&&(n+="fill:"+r+";"),e&&(n+="stroke:"+e+";"),i.setAttribute(t,"style",n)}e.point2String=c,e.pathPoint2String=s,e.createTSpan=d,e.createText=f,e.createPath=h,e.createSingleLine=function(t,e){return i.createElement("line",{x1:u.default(t.xFrom,2).toString(),y1:u.default(t.yFrom,2).toString(),x2:u.default(t.xTo,2).toString(),y2:u.default(t.yTo,2).toString(),class:e?e.class:null})},e.createRect=function(t,e){var r=Object.assign({class:null,color:null,bgColor:null,rx:null,ry:null},e);return p(i.createElement("rect",{width:u.default(t.width,2),height:u.default(t.height,2),x:u.default(t.x,2),y:u.default(t.y,2),rx:u.default(r.rx,2),ry:u.default(r.ry,2),class:r.class}),r.color,r.bgColor)},e.createUTurn=function(t,e,r){var n=Object.assign({class:null,dontHitHome:!1,lineWidth:1},r),o=n.dontHitHome?t.x+7.5*n.lineWidth:t.x;return h(s("M",t.x,t.y-t.height/2)+s("C",t.x+t.width,t.y-7.5*n.lineWidth/2)+c({x:t.x+t.width,y:e+0})+c({x:o,y:e}),{class:n.class})},e.createGroup=function(t,e){return i.createElement("g",{id:t,class:e})},e.createMarkerPath=function(t,e,r){var n=l(t,"arrow-marker","auto");return n.appendChild(h(e,{class:"arrow-style",style:"stroke-dasharray:100,1;stroke:"+r||0})),n},e.createMarkerPolygon=function(t,e,r){var n=l(t,"arrow-marker","auto");return n.appendChild(i.createElement("polygon",{points:e,class:"arrow-style",stroke:r||"black",fill:r||"black"})),n},e.createTitle=function(t){var e=i.createElement("title"),r=i.createTextNode(t);return e.appendChild(r),e},e.createDiagonalText=function(t,e,r){return i.setAttributes(f(t,{x:e.width/2,y:e.height/2},{class:r}),{transform:"rotate("+u.default(a.default(e),2).toString()+" "+u.default(e.width/2,2).toString()+" "+u.default(e.height/2,2).toString()+")"})},e.createDesc=function(){return i.createElement("desc")},e.createDefs=function(){return i.createElement("defs")},e.createSVG=function(t,e){return i.createElement("svg",{version:"1.1",id:t,class:e,xmlns:i.SVGNS,"xmlns:xlink":i.XLINKNS,width:"0",height:"0"})},e.init=i.init,e.updateSVG=i.setAttributes},344:(t,e)=>{"use strict";e.__esModule=!0,e.determineStartCorrection=function(t,e,r){var n=0;return!e.includes("nodi")&&e.includes("bidi")&&(n=t.xTo>t.xFrom?7.5*r:-7.5*r),n},e.determineEndCorrection=function(t,e,r){var n=0;return e.includes("nodi")||(n=t.xTo>t.xFrom?-7.5*r:7.5*r),n},e.getDirection=function(t){var e=t.xTo>t.xFrom?1:-1;return{signX:e,signY:t.yTo>t.yFrom?1:-1,dy:e*(t.yTo-t.yFrom)/(t.xTo-t.xFrom)}}},441:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var o=n(r(652)),i=n(r(344)),a=r(913);e.renderNotePathString=function(t,e){return o.pathPoint2String("M",t.x,t.y)+a.line2CurveString({xFrom:t.x,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+o.pathPoint2String("L",t.x+t.width-e,t.y)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+e})+o.pathPoint2String("L",t.x+t.width,t.y+e)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+t.width,t.y+t.height)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height})+o.pathPoint2String("L",t.x,t.y+t.height)+a.line2CurveString({xFrom:t.x,yFrom:t.y+t.height,xTo:t.x,yTo:t.y})+o.pathPoint2String("L",t.x,t.y)+"z"},e.renderNoteCornerString=function(t,e){return o.pathPoint2String("M",t.x+t.width-e,t.y)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y+e})+o.pathPoint2String("L",t.x+t.width-e,t.y+e)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+e})+o.pathPoint2String("L",t.x+t.width,t.y+e)},e.abox2CurveString=function(t,e){return o.pathPoint2String("M",t.x,t.y+t.height/2)+a.line2CurveString({xFrom:t.x,yFrom:t.y+t.height/2,xTo:t.x+e,yTo:t.y})+o.pathPoint2String("L",t.x+e,t.y)+a.line2CurveString({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+o.pathPoint2String("L",t.x+t.width-e,t.y)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height/2})+o.pathPoint2String("L",t.x+t.width,t.y+t.height/2)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+t.height/2,xTo:t.x+t.width-e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+e,t.y+t.height)+a.line2CurveString({xFrom:t.x+e,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height/2})+"z"},e.rbox2CurveString=function(t,e){return o.pathPoint2String("M",t.x,t.y+e)+a.points2CurveString([{controlX:t.x,controlY:t.y,x:t.x+e,y:t.y}])+a.line2CurveString({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+o.pathPoint2String("L",t.x+t.width-e,t.y)+a.points2CurveString([{controlX:t.x+t.width,controlY:t.y,x:t.x+t.width,y:t.y+e}])+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height-e})+o.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+a.points2CurveString([{controlX:t.x+t.width,controlY:t.y+t.height,x:t.x+t.width-e,y:t.y+t.height}])+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+e,t.y+t.height)+a.points2CurveString([{controlX:t.x,controlY:t.y+t.height,x:t.x,y:t.y+t.height-e}])+a.line2CurveString({xFrom:t.x,yFrom:t.y+t.height-e,xTo:t.x,yTo:t.y+e})+"z"},e.doubleLine2CurveString=function(t,e){var r=e.lineWidth||1,n=r,u=e?e.class:"",c=i.getDirection(t),s=i.determineEndCorrection(t,u,r),l=i.determineStartCorrection(t,u,r);return o.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*c.dy)+o.pathPoint2String("l",c.signX,c.dy)+o.pathPoint2String("M",t.xFrom+l,t.yFrom-n)+a.line2CurveString({xFrom:t.xFrom+l,yFrom:t.yFrom-n,xTo:t.xTo+s,yTo:t.yTo-n})+o.pathPoint2String("M",t.xFrom+l,t.yFrom+n)+a.line2CurveString({xFrom:t.xFrom+l,yFrom:t.yFrom+n,xTo:t.xTo+s,yTo:t.yTo+n})+o.pathPoint2String("M",t.xTo-c.signX,t.yTo+7.5*r*c.dy)+o.pathPoint2String("l",c.signX,c.dy)},e.edgeRemark2CurveString=function(t,e){return o.pathPoint2String("M",t.x+t.width,t.y)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height-e})+o.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+t.height-e,xTo:t.x+t.width-e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x-1,yTo:t.y+t.height})+o.pathPoint2String("L",t.x-1,t.y+t.height)}},913:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(103)),a=o(r(652)),u=o(r(344));function c(t){return t.map((function(t){return a.pathPoint2String("S",t.controlX,t.controlY)+" "+a.point2String(t)})).join(" ")}function s(t){var e=Math.abs(t.xTo-t.xFrom),r=Math.abs(t.yTo-t.yFrom);return Math.sqrt(e*e+r*r)}function l(t,e){var r=s(t);return r>0?Math.floor(r/e):0}function d(t){return Math.round(2*Math.random()*t)-t}function f(t,e,r){for(var n,o=[],a=l(t,e=function(t,e){if(t<=0)throw new Error("pInterval must be > 0");return Math.min(s(e),t)}(e,t)),c=u.getDirection(t),f=c.signX*Math.sqrt(Math.pow(e,2)/(1+Math.pow(c.dy,2))),h=c.signY*(Math.abs(c.dy)===1/0?e:Math.sqrt(Math.pow(c.dy,2)*Math.pow(e,2)/(1+Math.pow(c.dy,2)))),p=1;p<=a;p++)e>s({xFrom:(n={controlX:i.default(t.xFrom+(p-.5)*f+d(r),2),controlY:i.default(t.yFrom+(p-.5)*h+d(r),2),x:i.default(t.xFrom+p*f,2),y:i.default(t.yFrom+p*h,2)}).x,yFrom:n.y,xTo:t.xTo,yTo:t.yTo})&&(n.x=t.xTo,n.y=t.yTo),o.push(n);return o}e.points2CurveString=c,e.line2CurveString=function(t){return c(f(t,70,3))},e.getLineLength=s,e.getNumberOfSegments=l,e.getBetweenPoints=f},282:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=r(441),a=r(913),u=n(r(103)),c=o(r(652)),s=o(r(344));e.createSingleLine=function(t,e){void 0===e&&(e={});var r=s.getDirection(t);return c.createPath(c.pathPoint2String("M",t.xFrom,t.yFrom)+c.pathPoint2String("L",u.default(t.xFrom+r.signX*Math.sqrt(1/(1+Math.pow(r.dy,2))),2),t.yFrom+r.signY*(Math.abs(r.dy)===1/0?1:u.default(Math.sqrt(Math.pow(r.dy,2)/(1+Math.pow(r.dy,2))),2)))+a.line2CurveString(t),e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),o=c.createGroup();return o.appendChild(c.createPath(i.renderNotePathString(t,n),e)),e.bgColor="transparent",o.appendChild(c.createPath(i.renderNoteCornerString(t,n),e)),o},e.createRect=function(t,e){return c.createPath(i.rbox2CurveString(t,0),e)},e.createABox=function(t,e){return c.createPath(i.abox2CurveString(t,3),e)},e.createRBox=function(t,e){return c.createPath(i.rbox2CurveString(t,6),e)},e.createEdgeRemark=function(t,e){var r=e&&e.lineWidth||1,n=c.createGroup(),o=e&&e.foldSize?e.foldSize:7,a=e&&e.color?e.color:"black";e.color="transparent!important";var u=c.createPath(c.pathPoint2String("M",t.x,t.y+r/2)+c.pathPoint2String("L",t.x+t.width,t.y+r/2)+c.pathPoint2String("L",t.x+t.width,t.y+t.height-o)+c.pathPoint2String("L",t.x+t.width-o,t.y+t.height)+c.pathPoint2String("L",t.x,t.y+t.height)+"z",e);e.bgColor="transparent",e.color=a;var s=c.createPath(i.edgeRemark2CurveString(t,o),e);return n.appendChild(u),n.appendChild(s),n},e.createDoubleLine=function(t,e){return c.createPath(i.doubleLine2CurveString(t,e),{class:e.class})}},930:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(773)),a=o(r(824)),u=o(r(683)),c={},s=a.get("bboxer");function l(t){return"function"==typeof t.getBBox?(e=function(t){var e=c.getElementById(s);(e=e||function(t){var e=u.createSVG(t,a.get());return c.body.appendChild(e),e}(s)).appendChild(t);var r=t.getBBox();return e.removeChild(t),r}(t),r=1e5,Math.abs(e.height)>r||Math.abs(e.width)>r?{height:0,width:0,x:0,y:0}:e):{height:15,width:15,x:2,y:2};var e,r}e.getBBox=l,e.removeRenderedSVGFromElement=function(t){a.setPrefix(t);var e=c.getElementById(a.get());if(Boolean(e)){var r=c.getElementById(t);r?r.removeChild(e):c.body.removeChild(e)}},e.init=function(t){c=t},e.calculateTextHeight=i.default((function(){return l(u.createText("ÁjyÎ9ƒ@💩",{x:0,y:0})).height})),e.webkitNamespaceBugWorkaround=function(t){return t.replace(/ xlink=/g," xmlns:xlink=").replace(/ href=/g," xlink:href=")}},367:(t,e)=>{"use strict";e.__esModule=!0,e.unescapeString=function(t){return t.replace(/\\"/g,'"')},e.escapeString=function(t){return t.replace(/\\"/g,'"').replace(/"/g,'\\"')}},791:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t,e){for(var r=0,n=[],o=0,i=0,a=0,u=0,c=t.replace(/[\t\n]+/g," ").replace(/\\n/g,"\n");u<=c.length;)u>=c.length?n.push(c.substring(o,u)):"\n"===c[u]?(r=0,a=u,n.push(c.substring(o,a)),o=a+1):r++>=e&&(-1===(a=c.substring(0,u).lastIndexOf(" "))||a{var e={defaultLanguage:"mscgen",parentElementPrefix:"mscgen_js-parent_",clickable:!1,clickURL:"https://sverweij.github.io/mscgen_js/",loadFromSrcAttribute:!1};t.exports={getConfig:function(){var t,r;return"undefined"!=typeof mscgen_js_config&&mscgen_js_config&&"object"==typeof mscgen_js_config&&(t=e,r=mscgen_js_config,Object.getOwnPropertyNames(r).forEach((function(e){t[e]=r[e]}))),e}}},335:(t,e,r)=>{var n=r(115);function o(t,e){for(var r=t.toString(),n=e-r.length,o=0;o{char}",{char:u(r)}):t+u(r)}),"")}function u(t){return t.replace(/
# ERROR on line {line}, column {col} - {message}
",{message:r,line:e.start.line,col:e.start.column}):n.applyTemplate("
# ERROR {message}
",{message:r});return t.split("\n").reduce((function(t,r,o){return e&&o===e.start.line-1?t+n.applyTemplate("{line}\n",{line:i(a(r,e.start.column-1),o+1)}):t+u(i(r,o+1))+"\n"}),o)+"
"}}},865:t=>{t.exports={ajax:function(t,e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(t){t.target.readyState===XMLHttpRequest.DONE&&(200===n.status?e(t):r(t))},n.open("GET",t),n.responseType="text";try{n.send()}catch(t){r(t)}}}},222:t=>{function e(t,e,r){return t.pathname+"?lang="+r+"&msc="+encodeURIComponent(e)}t.exports={toLocationString:function(t,r,n){var o="# source too long for an URL";return function(t,r,n){return e(t,r,n).length<4094}(t,r,n)&&(o=r),e(t,o,n)}}},115:t=>{t.exports={applyTemplate:function(t,e){var r=t;return e&&Object.keys(e).forEach((function(t){r=r.replace(new RegExp("{"+t+"}","g"),e[t])})),r}}}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t=r(150),e=r(779),n=r(533),o=r(916),i=r(335),a=r(865),u=r(222),c=r(115),s=Object.freeze({"text/x-mscgen":"mscgen","text/x-msgenny":"msgenny","text/x-xu":"xu"});function l(t,e){for(var r=0;rdata-src attribute.",{url:t.getAttribute("data-src")}))})):!o.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?d(t,c.applyTemplate("ERROR: Won't load the chart specified in data-src='{url}', because loading from separate files is switched off in the mscgen_js configuration.

See Loading charts from separate files in the mscgen_js embedding guide how to enable it.",{url:t.getAttribute("data-src")})):f(t,t.textContent)}(n,i);var n,i}function d(t,e){t.innerHTML=c.applyTemplate("
{string}
",{string:e})}function f(r,a){var c,s,l,d,f=function(t){var e=t.getAttribute("data-language");return e||(e=o.getConfig().defaultLanguage),e}(r),b=function(r,n){var o={};try{o="msgenny"===n?e.parse(r):"json"===n?JSON.parse(r):t.parse(r)}catch(t){return t}return o}(a,f);b.entities?(c=b,s=r.id,l={source:a,language:f,mirrorEntities:h(r),namedStyle:p(r),regularArcTextVerticalAlignment:g(r)},(d=document.getElementById(s)).innerHTML="",!0===o.getConfig().clickable&&(d.appendChild(function(t,e,r){var n=document.createElement("a");return n.setAttribute("href",o.getConfig().clickURL+u.toLocationString({pathname:"index.html"},t,e)),n.setAttribute("id",r+"link"),n.setAttribute("style","text-decoration: none;"),n.setAttribute("title","click to edit in the mscgen_js interpreter"),n}(l.source,l.language,s)),s+="link"),n.clean(s,window),n.render(c,window,s,{source:l.source,additionalTemplate:l.namedStyle,mirrorEntitiesOnBottom:l.mirrorEntities,regularArcTextVerticalAlignment:l.regularArcTextVerticalAlignment})):r.innerHTML=i.renderError(a,b.location,b.message)}function h(t){var e=t.getAttribute("data-mirror-entities");return!(!e||"true"!==e)}function p(t){return t.getAttribute("data-named-style")||"basic"}function g(t){return t.getAttribute("data-regular-arc-text-vertical-alignment")||"middle"}!function(){!function(){for(var t=document.scripts,e=0;e{msc}",{src:t[e].src?c.applyTemplate("data-src='{src}' ",{src:t[e].src}):"",lang:s[t[e].type]||o.getConfig().defaultLanguage,msc:t[e].textContent.replace(/{var t={730:t=>{var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var o,i,a=Object.prototype,u=a.hasOwnProperty,s=a.toString,c=a.propertyIsEnumerable,l=(o=Object.keys,i=Object,function(t){return o(i(t))}),d=Math.max,f=!c.call({valueOf:1},"valueOf");function h(t,e,r){var n=t[e];u.call(t,e)&&b(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function p(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=e}(t.length)&&!function(t){var e=x(t)?s.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function x(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var v,w=(v=function(t,e){if(f||g(e)||y(e))!function(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=v.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!x(r))return!1;var n=typeof e;return!!("number"==n?y(r)&&p(e,r.length):"string"==n&&e in r)&&b(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r{t=r.nmd(t);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",u="[object Date]",s="[object Function]",c="[object GeneratorFunction]",l="[object Map]",d="[object Number]",f="[object Object]",h="[object Promise]",p="[object RegExp]",g="[object Set]",b="[object String]",m="[object Symbol]",y="[object WeakMap]",x="[object ArrayBuffer]",v="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",k="[object Uint8Array]",L="[object Uint8ClampedArray]",E="[object Uint16Array]",T="[object Uint32Array]",M=/\w*$/,j=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[i]=I["[object Array]"]=I[x]=I[v]=I[a]=I[u]=I[w]=I[_]=I[C]=I[A]=I[S]=I[l]=I[d]=I[f]=I[p]=I[g]=I[b]=I[m]=I[k]=I[L]=I[E]=I[T]=!0,I["[object Error]"]=I[s]=I[y]=!1;var O="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,D="object"==typeof self&&self&&self.Object===Object&&self,P=O||D||Function("return this")(),B=e&&!e.nodeType&&e,N=B&&t&&!t.nodeType&&t,H=N&&N.exports===B;function R(t,e){return t.set(e[0],e[1]),t}function W(t,e){return t.add(e),t}function G(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o-1},Lt.prototype.set=function(t,e){var r=this.__data__,n=jt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Et.prototype.clear=function(){this.__data__={hash:new kt,map:new(pt||Lt),string:new kt}},Et.prototype.delete=function(t){return Dt(this,t).delete(t)},Et.prototype.get=function(t){return Dt(this,t).get(t)},Et.prototype.has=function(t){return Dt(this,t).has(t)},Et.prototype.set=function(t,e){return Dt(this,t).set(t,e),this},Tt.prototype.clear=function(){this.__data__=new Lt},Tt.prototype.delete=function(t){return this.__data__.delete(t)},Tt.prototype.get=function(t){return this.__data__.get(t)},Tt.prototype.has=function(t){return this.__data__.has(t)},Tt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Lt){var n=r.__data__;if(!pt||n.length<199)return n.push([t,e]),this;r=this.__data__=new Et(n)}return r.set(t,e),this};var Bt=lt?V(lt,Object):function(){return[]},Nt=function(t){return et.call(t)};function Ht(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||F.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=o}(t.length)&&!qt(t)}var Vt=dt||function(){return!1};function qt(t){var e=$t(t)?et.call(t):"";return e==s||e==c}function $t(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ut(t){return zt(t)?function(t,e){var r=Xt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&zt(t)}(t)&&tt.call(t,"callee")&&(!st.call(t,"callee")||et.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();function a(t,e){for(var r=-1,n=e.length,o=t.length;++r0&&r(s)?e>1?h(s,e-1,r,n,o):a(o,s):n||(o[o.length]=s)}return o}function p(t){return g(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?c.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(t)}(t)&&s.call(t,"callee")&&(!d.call(t,"callee")||"[object Arguments]"==c.call(t))}(t)||!!(f&&t&&t[f])}var g=Array.isArray;t.exports=function(t){return t&&t.length?h(t,1):[]}},773:(t,e,r)=>{var n,o="__lodash_hash_undefined__",i=/^\[object .+?Constructor\]$/,a="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,s=a||u||Function("return this")(),c=Array.prototype,l=Function.prototype,d=Object.prototype,f=s["__core-js_shared__"],h=(n=/[^.]+$/.exec(f&&f.keys&&f.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",p=l.toString,g=d.hasOwnProperty,b=d.toString,m=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=c.splice,x=k(s,"Map"),v=k(Object,"create");function w(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1},_.prototype.set=function(t,e){var r=this.__data__,n=A(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},C.prototype.clear=function(){this.__data__={hash:new w,map:new(x||_),string:new w}},C.prototype.delete=function(t){return S(this,t).delete(t)},C.prototype.get=function(t){return S(this,t).get(t)},C.prototype.has=function(t){return S(this,t).has(t)},C.prototype.set=function(t,e){return S(this,t).set(t,e),this},L.Cache=C,t.exports=L},779:function(t,e,r){var n,o,i;o=[r(730),r(615)],void 0===(i="function"==typeof(n=function(t,e){"use strict";function r(t,e,n,o){this.message=t,this.expected=e,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(r,Error),r.buildMessage=function(t,e){var r={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e,r="";for(e=0;e0){for(e=1,n=1;e0&&(n=t({precomment:r},n)),n},h=",",p=Be(",",!1),g=";",b=Be(";",!1),m=Be("hscale",!0),y=Be("arcgradient",!0),x="=",v=Be("=",!1),w=function(t,r){return e.nameValue2Option(t,r)},_=Be("width",!0),C=Be("wordwraparcs",!0),A=function(t,r){return e.nameValue2Option(t,e.flattenBoolean(r))},S=Be("wordwrapentities",!0),k=Be("wordwrapboxes",!0),L=Be("watermark",!0),E=He("entity"),T=":",M=Be(":",!1),j=function(t){return{kind:t}},F="*",I=Be("*",!1),O=function(t,e){return{kind:e,from:t,to:"*"}},D="{",P=Be("{",!1),B=Be("}",!1),N=He("empty row"),H="|||",R=Be("|||",!1),W="...",G=Be("...",!1),X=He("---"),z="---",V=Be("---",!1),q=He("bi-directional arrow"),$=Be("--",!1),U=Be("<->",!1),Y=Be("==",!1),Z="<<=>>",K=Be("<<=>>",!1),J=Be("<=>",!1),Q=Be("..",!1),tt="<<>>",et=Be("<<>>",!1),rt=Be("::",!1),nt=Be("<:>",!1),ot=He("left to right arrow"),it=Be("->",!1),at=Be("=>>",!1),ut=Be("=>",!1),st=Be(">>",!1),ct=Be(":>",!1),lt=Be("-x",!0),dt=He("right to left arrow"),ft=Be("<-",!1),ht=Be("<<=",!1),pt=Be("<=",!1),gt=Be("<<",!1),bt=Be("<:",!1),mt=Be("x-",!0),yt=He("box"),xt="note",vt=Be("note",!0),wt="abox",_t=Be("abox",!0),Ct="rbox",At=Be("rbox",!0),St=Be("box",!0),kt=He("inline expression"),Lt=Be("alt",!0),Et="else",Tt=Be("else",!0),Mt=Be("opt",!0),jt="break",Ft=Be("break",!0),It=Be("par",!0),Ot=Be("seq",!0),Dt="strict",Pt=Be("strict",!0),Bt=Be("neg",!0),Nt="critical",Ht=Be("critical",!0),Rt="ignore",Wt=Be("ignore",!0),Gt="consider",Xt=Be("consider",!0),zt="assert",Vt=Be("assert",!0),qt="loop",$t=Be("loop",!0),Ut=Be("ref",!0),Yt=Be("exc",!0),Zt=He("double quoted string"),Kt='"',Jt=Be('"',!1),Qt='\\"',te=Be('\\"',!1),ee={type:"any"},re=He("identifier"),ne=/^[^;, "\t\n\r=\-><:{*]/,oe=Ne([";",","," ",'"',"\t","\n","\r","=","-",">","<",":","{","*"],!0,!1),ie=He("whitespace"),ae=/^[ \t]/,ue=Ne([" ","\t"],!1,!1),se=He("lineend"),ce=/^[\r\n]/,le=Ne(["\r","\n"],!1,!1),de=Be("/*",!1),fe="*/",he=Be("*/",!1),pe=Be("//",!1),ge=Be("#",!1),be=/^[^\r\n]/,me=Ne(["\r","\n"],!0,!1),ye=He("comment"),xe=He("number"),ve=/^[0-9]/,we=Ne([["0","9"]],!1,!1),_e=Be(".",!1),Ce=He("boolean"),Ae=Be("true",!0),Se=Be("false",!0),ke=Be("on",!0),Le=Be("off",!0),Ee=Be("0",!1),Te=Be("1",!1),Me=He("size"),je=Be("auto",!0),Fe=0,Ie=[{line:1,column:1}],Oe=0,De=[],Pe=0;if("startRule"in o){if(!(o.startRule in l))throw new Error("Can't start parsing from rule \""+o.startRule+'".');d=l[o.startRule]}function Be(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ne(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function He(t){return{type:"other",description:t}}function Re(t){var e,r=Ie[t];if(r)return r;for(e=t-1;!Ie[e];)e--;for(r={line:(r=Ie[e]).line,column:r.column};eOe&&(Oe=Fe,De=[]),De.push(t))}function Xe(){var e,r,o;return e=Fe,(r=sr())!==c&&(o=function(){var e,r,o,i;return e=Fe,(r=function(){var e,r,o,i,a;for(e=Fe,r=[],o=Fe,(i=ze())!==c?(44===n.charCodeAt(Fe)?(a=h,Fe++):(a=c,0===Pe&&Ge(p)),a!==c?o=i=i:(Fe=o,o=c)):(Fe=o,o=c);o!==c;)r.push(o),o=Fe,(i=ze())!==c?(44===n.charCodeAt(Fe)?(a=h,Fe++):(a=c,0===Pe&&Ge(p)),a!==c?o=i=i:(Fe=o,o=c)):(Fe=o,o=c);return r!==c?(o=Fe,(i=ze())!==c?(59===n.charCodeAt(Fe)?(a=g,Fe++):(a=c,0===Pe&&Ge(b)),a!==c?o=i=i:(Fe=o,o=c)):(Fe=o,o=c),o!==c?e=r=[r,o]:(Fe=e,e=c)):(Fe=e,e=c),e!==c&&(e=function(e){return e[0].concat(e[1]).reduce(t,{})}(e)),e}())===c&&(r=null),r!==c?((o=function(){var t,e,r,o,i;for(t=Fe,e=[],r=Fe,(o=Ve())!==c?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=c,0===Pe&&Ge(p)),i!==c?r=o=o:(Fe=r,r=c)):(Fe=r,r=c);r!==c;)e.push(r),r=Fe,(o=Ve())!==c?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=c,0===Pe&&Ge(p)),i!==c?r=o=o:(Fe=r,r=c)):(Fe=r,r=c);return e!==c?(r=Fe,(o=Ve())!==c?(59===n.charCodeAt(Fe)?(i=g,Fe++):(i=c,0===Pe&&Ge(b)),i!==c?r=o=o:(Fe=r,r=c)):(Fe=r,r=c),r!==c?t=e=[e,r]:(Fe=t,t=c)):(Fe=t,t=c),t!==c&&(a=t,t=a[0].concat(a[1])),t;var a}())===c&&(o=null),o!==c?((i=qe())===c&&(i=null),i!==c?e=r=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n}(r,o,i):(Fe=e,e=c)):(Fe=e,e=c)):(Fe=e,e=c),e}())!==c&&sr()!==c?e=r=f(r,o):(Fe=e,e=c),e}function ze(){var t,e,r,o;return t=Fe,sr()!==c?("hscale"===n.substr(Fe,6).toLowerCase()?(e=n.substr(Fe,6),Fe+=6):(e=c,0===Pe&&Ge(m)),e===c&&("arcgradient"===n.substr(Fe,11).toLowerCase()?(e=n.substr(Fe,11),Fe+=11):(e=c,0===Pe&&Ge(y))),e!==c&&sr()!==c?(61===n.charCodeAt(Fe)?(r=x,Fe++):(r=c,0===Pe&&Ge(v)),r!==c&&sr()!==c&&(o=function(){var t,e;return Pe++,t=Fe,(e=function(){var t,e,r,o;return t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=c,0===Pe&&Ge(Jt)),e!==c&&(r=cr())!==c?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=c,0===Pe&&Ge(Jt)),o!==c?(i=r,t=e=i.toString()):(Fe=t,t=c)):(Fe=t,t=c),t;var i}())!==c&&(e=e),(t=e)===c&&(t=Fe,(e=cr())!==c&&(r=e,e=r.toString()),t=e),Pe--,t===c&&(e=c,0===Pe&&Ge(xe)),t;var r}())!==c&&sr()!==c?t=w(e,o):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c?("width"===n.substr(Fe,5).toLowerCase()?(e=n.substr(Fe,5),Fe+=5):(e=c,0===Pe&&Ge(_)),e!==c&&sr()!==c?(61===n.charCodeAt(Fe)?(r=x,Fe++):(r=c,0===Pe&&Ge(v)),r!==c&&sr()!==c&&(o=function(){var t;return Pe++,(t=function(){var t,e,r,o;return t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=c,0===Pe&&Ge(Jt)),e!==c&&(r=hr())!==c?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=c,0===Pe&&Ge(Jt)),o!==c?t=e=r:(Fe=t,t=c)):(Fe=t,t=c),t}())===c&&(t=hr()),Pe--,t===c&&0===Pe&&Ge(Me),t}())!==c&&sr()!==c?t=w(e,o):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c?("wordwraparcs"===n.substr(Fe,12).toLowerCase()?(e=n.substr(Fe,12),Fe+=12):(e=c,0===Pe&&Ge(C)),e!==c&&sr()!==c?(61===n.charCodeAt(Fe)?(r=x,Fe++):(r=c,0===Pe&&Ge(v)),r!==c&&sr()!==c&&(o=dr())!==c&&sr()!==c?t=A(e,o):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c?("wordwrapentities"===n.substr(Fe,16).toLowerCase()?(e=n.substr(Fe,16),Fe+=16):(e=c,0===Pe&&Ge(S)),e!==c&&sr()!==c?(61===n.charCodeAt(Fe)?(r=x,Fe++):(r=c,0===Pe&&Ge(v)),r!==c&&sr()!==c&&(o=dr())!==c&&sr()!==c?t=A(e,o):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c?("wordwrapboxes"===n.substr(Fe,13).toLowerCase()?(e=n.substr(Fe,13),Fe+=13):(e=c,0===Pe&&Ge(k)),e!==c&&sr()!==c?(61===n.charCodeAt(Fe)?(r=x,Fe++):(r=c,0===Pe&&Ge(v)),r!==c&&sr()!==c&&(o=dr())!==c&&sr()!==c?t=A(e,o):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c?("watermark"===n.substr(Fe,9).toLowerCase()?(e=n.substr(Fe,9),Fe+=9):(e=c,0===Pe&&Ge(L)),e!==c&&sr()!==c?(61===n.charCodeAt(Fe)?(r=x,Fe++):(r=c,0===Pe&&Ge(v)),r!==c&&sr()!==c&&(o=Qe())!==c&&sr()!==c?t=w(e,o):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c)))))),t}function Ve(){var t,e,r,o,i,a,u;return Pe++,t=Fe,sr()!==c&&(e=tr())!==c&&sr()!==c?(r=Fe,58===n.charCodeAt(Fe)?(o=":",Fe++):(o=c,0===Pe&&Ge(M)),o!==c&&sr()!==c&&(i=Je())!==c&&sr()!==c?r=o=i:(Fe=r,r=c),r===c&&(r=null),r!==c?(a=r,u=gr(e),a&&(u.label=a),t=u):(Fe=t,t=c)):(Fe=t,t=c),Pe--,t===c&&0===Pe&&Ge(E),t}function qe(){var t,e,r,o;if(t=[],e=Fe,(r=$e())!==c&&sr()!==c?(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=c,0===Pe&&Ge(b)),o!==c?e=r=r:(Fe=e,e=c)):(Fe=e,e=c),e!==c)for(;e!==c;)t.push(e),e=Fe,(r=$e())!==c&&sr()!==c?(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=c,0===Pe&&Ge(b)),o!==c?e=r=r:(Fe=e,e=c)):(Fe=e,e=c);else t=c;return t}function $e(){var t,e,r,o,i,a;for(t=Fe,e=[],r=Fe,(o=Ue())!==c?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=c,0===Pe&&Ge(p)),i!==c?r=o=o:(Fe=r,r=c)):(Fe=r,r=c);r!==c;)e.push(r),r=Fe,(o=Ue())!==c?(44===n.charCodeAt(Fe)?(i=h,Fe++):(i=c,0===Pe&&Ge(p)),i!==c?r=o=o:(Fe=r,r=c)):(Fe=r,r=c);return e!==c?(r=Fe,(o=Ue())!==c&&(o=o),(r=o)!==c?t=e=[e,r]:(Fe=t,t=c)):(Fe=t,t=c),t!==c&&(t=(a=t)[0].concat(a[1])),t}function Ue(){var t;return(t=function(){var t,e,r,o,i;return t=Fe,e=Fe,(r=function(){var t,e;return t=Fe,sr()!==c&&(e=function(){var t;return Pe++,n.substr(Fe,3)===H?(t=H,Fe+=3):(t=c,0===Pe&&Ge(R)),t===c&&(n.substr(Fe,3)===W?(t=W,Fe+=3):(t=c,0===Pe&&Ge(G))),Pe--,t===c&&0===Pe&&Ge(N),t}())!==c&&sr()!==c?t=j(e):(Fe=t,t=c),t}())!==c&&(r=r),(e=r)===c&&(e=Fe,(r=function(){var t,e,r,o;return t=Fe,sr()!==c&&(e=tr())!==c&&sr()!==c&&(r=function(){var t;return(t=Ye())===c&&(t=Ze())===c&&(t=Ke())===c&&(t=function(){var t;return Pe++,n.substr(Fe,4).toLowerCase()===xt?(t=n.substr(Fe,4),Fe+=4):(t=c,0===Pe&&Ge(vt)),t===c&&(n.substr(Fe,4).toLowerCase()===wt?(t=n.substr(Fe,4),Fe+=4):(t=c,0===Pe&&Ge(_t)),t===c&&(n.substr(Fe,4).toLowerCase()===Ct?(t=n.substr(Fe,4),Fe+=4):(t=c,0===Pe&&Ge(At)),t===c&&("box"===n.substr(Fe,3).toLowerCase()?(t=n.substr(Fe,3),Fe+=3):(t=c,0===Pe&&Ge(St))))),Pe--,t===c&&0===Pe&&Ge(yt),t}()),t!==c&&(e=t,t=e.toLowerCase()),t;var e}())!==c&&sr()!==c&&(o=tr())!==c&&sr()!==c?(i=e,a=r,u=o,t={kind:a,from:i,to:u}):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c?(42===n.charCodeAt(Fe)?(e=F,Fe++):(e=c,0===Pe&&Ge(I)),e!==c&&sr()!==c&&(r=Ke())!==c&&sr()!==c&&(o=tr())!==c&&sr()!==c?t=function(t,e){return{kind:t,from:"*",to:e}}(r,o):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c&&(e=tr())!==c&&sr()!==c&&(r=Ze())!==c&&sr()!==c?(42===n.charCodeAt(Fe)?(o=F,Fe++):(o=c,0===Pe&&Ge(I)),o!==c&&sr()!==c?t=O(e,r):(Fe=t,t=c)):(Fe=t,t=c),t===c&&(t=Fe,sr()!==c&&(e=tr())!==c&&sr()!==c&&(r=Ye())!==c&&sr()!==c?(42===n.charCodeAt(Fe)?(o=F,Fe++):(o=c,0===Pe&&Ge(I)),o!==c&&sr()!==c?t=O(e,r):(Fe=t,t=c)):(Fe=t,t=c)))),t;var i,a,u}())!==c&&(r=r),(e=r)===c&&(e=Fe,(r=function(){var t,e;return t=Fe,sr()!==c&&(e=function(){var t;return Pe++,n.substr(Fe,3)===z?(t=z,Fe+=3):(t=c,0===Pe&&Ge(V)),Pe--,t===c&&0===Pe&&Ge(X),t}())!==c&&sr()!==c?t=j(e):(Fe=t,t=c),t}())!==c&&(r=r),e=r)),e!==c?(r=Fe,58===n.charCodeAt(Fe)?(o=T,Fe++):(o=c,0===Pe&&Ge(M)),o!==c&&sr()!==c&&(i=Je())!==c&&sr()!==c?(s=i,r=o=s):(Fe=r,r=c),r===c&&(r=null),r!==c?(a=e,u=r,u&&(a.label=u),t=e=a):(Fe=t,t=c)):(Fe=t,t=c),t;var a,u;var s}())===c&&(t=function(){var t,e,r,o,i,a,u,s;return t=Fe,sr()!==c&&(e=tr())!==c&&sr()!==c&&(r=function(){var t,e;return Pe++,t=Fe,"alt"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(Lt)),e===c&&(n.substr(Fe,4).toLowerCase()===Et?(e=n.substr(Fe,4),Fe+=4):(e=c,0===Pe&&Ge(Tt)),e===c&&("opt"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(Mt)),e===c&&(n.substr(Fe,5).toLowerCase()===jt?(e=n.substr(Fe,5),Fe+=5):(e=c,0===Pe&&Ge(Ft)),e===c&&("par"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(It)),e===c&&("seq"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(Ot)),e===c&&(n.substr(Fe,6).toLowerCase()===Dt?(e=n.substr(Fe,6),Fe+=6):(e=c,0===Pe&&Ge(Pt)),e===c&&("neg"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(Bt)),e===c&&(n.substr(Fe,8).toLowerCase()===Nt?(e=n.substr(Fe,8),Fe+=8):(e=c,0===Pe&&Ge(Ht)),e===c&&(n.substr(Fe,6).toLowerCase()===Rt?(e=n.substr(Fe,6),Fe+=6):(e=c,0===Pe&&Ge(Wt)),e===c&&(n.substr(Fe,8).toLowerCase()===Gt?(e=n.substr(Fe,8),Fe+=8):(e=c,0===Pe&&Ge(Xt)),e===c&&(n.substr(Fe,6).toLowerCase()===zt?(e=n.substr(Fe,6),Fe+=6):(e=c,0===Pe&&Ge(Vt)),e===c&&(n.substr(Fe,4).toLowerCase()===qt?(e=n.substr(Fe,4),Fe+=4):(e=c,0===Pe&&Ge($t)),e===c&&("ref"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(Ut)),e===c&&("exc"===n.substr(Fe,3).toLowerCase()?(e=n.substr(Fe,3),Fe+=3):(e=c,0===Pe&&Ge(Yt)))))))))))))))),e!==c&&(r=e,e=r.toLowerCase()),Pe--,(t=e)===c&&(e=c,0===Pe&&Ge(kt)),t;var r}())!==c&&sr()!==c&&(o=tr())!==c&&sr()!==c?(i=Fe,58===n.charCodeAt(Fe)?(a=T,Fe++):(a=c,0===Pe&&Ge(M)),a!==c&&sr()!==c&&(u=Je())!==c&&sr()!==c?(b=u,i=a=b):(Fe=i,i=c),i===c&&(i=null),i!==c?(123===n.charCodeAt(Fe)?(a=D,Fe++):(a=c,0===Pe&&Ge(P)),a!==c&&sr()!==c?((u=qe())===c&&(u=null),u!==c&&sr()!==c?(125===n.charCodeAt(Fe)?(s="}",Fe++):(s=c,0===Pe&&Ge(B)),s!==c&&sr()!==c?(l=e,d=r,f=o,h=i,p=u,g={kind:d,from:l,to:f,arcs:p},h&&(g.label=h),t=g):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c)):(Fe=t,t=c),t;var l,d,f,h,p,g;var b}()),t}function Ye(){var t;return Pe++,"--"===n.substr(Fe,2)?(t="--",Fe+=2):(t=c,0===Pe&&Ge($)),t===c&&("<->"===n.substr(Fe,3)?(t="<->",Fe+=3):(t=c,0===Pe&&Ge(U)),t===c&&("=="===n.substr(Fe,2)?(t="==",Fe+=2):(t=c,0===Pe&&Ge(Y)),t===c&&(n.substr(Fe,5)===Z?(t=Z,Fe+=5):(t=c,0===Pe&&Ge(K)),t===c&&("<=>"===n.substr(Fe,3)?(t="<=>",Fe+=3):(t=c,0===Pe&&Ge(J)),t===c&&(".."===n.substr(Fe,2)?(t="..",Fe+=2):(t=c,0===Pe&&Ge(Q)),t===c&&(n.substr(Fe,4)===tt?(t=tt,Fe+=4):(t=c,0===Pe&&Ge(et)),t===c&&("::"===n.substr(Fe,2)?(t="::",Fe+=2):(t=c,0===Pe&&Ge(rt)),t===c&&("<:>"===n.substr(Fe,3)?(t="<:>",Fe+=3):(t=c,0===Pe&&Ge(nt)))))))))),Pe--,t===c&&0===Pe&&Ge(q),t}function Ze(){var t;return Pe++,"->"===n.substr(Fe,2)?(t="->",Fe+=2):(t=c,0===Pe&&Ge(it)),t===c&&("=>>"===n.substr(Fe,3)?(t="=>>",Fe+=3):(t=c,0===Pe&&Ge(at)),t===c&&("=>"===n.substr(Fe,2)?(t="=>",Fe+=2):(t=c,0===Pe&&Ge(ut)),t===c&&(">>"===n.substr(Fe,2)?(t=">>",Fe+=2):(t=c,0===Pe&&Ge(st)),t===c&&(":>"===n.substr(Fe,2)?(t=":>",Fe+=2):(t=c,0===Pe&&Ge(ct)),t===c&&("-x"===n.substr(Fe,2).toLowerCase()?(t=n.substr(Fe,2),Fe+=2):(t=c,0===Pe&&Ge(lt))))))),Pe--,t===c&&0===Pe&&Ge(ot),t}function Ke(){var t;return Pe++,"<-"===n.substr(Fe,2)?(t="<-",Fe+=2):(t=c,0===Pe&&Ge(ft)),t===c&&("<<="===n.substr(Fe,3)?(t="<<=",Fe+=3):(t=c,0===Pe&&Ge(ht)),t===c&&("<="===n.substr(Fe,2)?(t="<=",Fe+=2):(t=c,0===Pe&&Ge(pt)),t===c&&("<<"===n.substr(Fe,2)?(t="<<",Fe+=2):(t=c,0===Pe&&Ge(gt)),t===c&&("<:"===n.substr(Fe,2)?(t="<:",Fe+=2):(t=c,0===Pe&&Ge(bt)),t===c&&("x-"===n.substr(Fe,2).toLowerCase()?(t=n.substr(Fe,2),Fe+=2):(t=c,0===Pe&&Ge(mt))))))),Pe--,t===c&&0===Pe&&Ge(dt),t}function Je(){var t,e;return(t=Qe())===c&&((e=function(){var t,e,r,o;for(t=[],e=Fe,r=Fe,Pe++,44===n.charCodeAt(Fe)?(o=h,Fe++):(o=c,0===Pe&&Ge(p)),o===c&&(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=c,0===Pe&&Ge(b)),o===c&&(123===n.charCodeAt(Fe)?(o=D,Fe++):(o=c,0===Pe&&Ge(P)))),Pe--,o===c?r=void 0:(Fe=r,r=c),r!==c?(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=c,0===Pe&&Ge(ee)),o!==c?e=r=o:(Fe=e,e=c)):(Fe=e,e=c);e!==c;)t.push(e),e=Fe,r=Fe,Pe++,44===n.charCodeAt(Fe)?(o=h,Fe++):(o=c,0===Pe&&Ge(p)),o===c&&(59===n.charCodeAt(Fe)?(o=g,Fe++):(o=c,0===Pe&&Ge(b)),o===c&&(123===n.charCodeAt(Fe)?(o=D,Fe++):(o=c,0===Pe&&Ge(P)))),Pe--,o===c?r=void 0:(Fe=r,r=c),r!==c?(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=c,0===Pe&&Ge(ee)),o!==c?e=r=o:(Fe=e,e=c)):(Fe=e,e=c);return t}())!==c&&(e=e.join("").trim()),t=e),t}function Qe(){var t,e,r,o;return Pe++,t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=c,0===Pe&&Ge(Jt)),e!==c&&(r=function(){var t,e,r,o;for(t=[],e=Fe,r=Fe,Pe++,34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=c,0===Pe&&Ge(Jt)),Pe--,o===c?r=void 0:(Fe=r,r=c),r!==c?(n.substr(Fe,2)===Qt?(o=Qt,Fe+=2):(o=c,0===Pe&&Ge(te)),o===c&&(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=c,0===Pe&&Ge(ee))),o!==c?e=r=o:(Fe=e,e=c)):(Fe=e,e=c);e!==c;)t.push(e),e=Fe,r=Fe,Pe++,34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=c,0===Pe&&Ge(Jt)),Pe--,o===c?r=void 0:(Fe=r,r=c),r!==c?(n.substr(Fe,2)===Qt?(o=Qt,Fe+=2):(o=c,0===Pe&&Ge(te)),o===c&&(n.length>Fe?(o=n.charAt(Fe),Fe++):(o=c,0===Pe&&Ge(ee))),o!==c?e=r=o:(Fe=e,e=c)):(Fe=e,e=c);return t}())!==c?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=c,0===Pe&&Ge(Jt)),o!==c?t=e=r.join(""):(Fe=t,t=c)):(Fe=t,t=c),Pe--,t===c&&(e=c,0===Pe&&Ge(Zt)),t}function tr(){var t,e,r;if(Pe++,t=Fe,e=[],ne.test(n.charAt(Fe))?(r=n.charAt(Fe),Fe++):(r=c,0===Pe&&Ge(oe)),r!==c)for(;r!==c;)e.push(r),ne.test(n.charAt(Fe))?(r=n.charAt(Fe),Fe++):(r=c,0===Pe&&Ge(oe));else e=c;return e!==c&&(e=e.join("")),(t=e)===c&&(t=Qe()),Pe--,t===c&&(e=c,0===Pe&&Ge(re)),t}function er(){var t,e;return Pe++,Fe,ae.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=c,0===Pe&&Ge(ue)),e!==c&&(e=e),Pe--,(t=e)===c&&(e=c,0===Pe&&Ge(ie)),t}function rr(){var t,e;return Pe++,Fe,ce.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=c,0===Pe&&Ge(le)),e!==c&&(e=e),Pe--,(t=e)===c&&(e=c,0===Pe&&Ge(se)),t}function nr(){var t,e,r;return t=Fe,e=Fe,Pe++,n.substr(Fe,2)===fe?(r=fe,Fe+=2):(r=c,0===Pe&&Ge(he)),Pe--,r===c?e=void 0:(Fe=e,e=c),e!==c?(n.length>Fe?(r=n.charAt(Fe),Fe++):(r=c,0===Pe&&Ge(ee)),r!==c?t=e=r:(Fe=t,t=c)):(Fe=t,t=c),t}function or(){var t,e,r,o,i;if(t=Fe,(e=function(){var t;return"/*"===n.substr(Fe,2)?(t="/*",Fe+=2):(t=c,0===Pe&&Ge(de)),t}())!==c){for(r=[],o=nr();o!==c;)r.push(o),o=nr();r!==c&&(o=function(){var t;return n.substr(Fe,2)===fe?(t=fe,Fe+=2):(t=c,0===Pe&&Ge(he)),t}())!==c?(i=o,t=e=e+r.join("")+i):(Fe=t,t=c)}else Fe=t,t=c;return t}function ir(){var t;return be.test(n.charAt(Fe))?(t=n.charAt(Fe),Fe++):(t=c,0===Pe&&Ge(me)),t}function ar(){var t,e,r,o;if(t=Fe,(e=function(){var t;return"//"===n.substr(Fe,2)?(t="//",Fe+=2):(t=c,0===Pe&&Ge(pe)),t===c&&(35===n.charCodeAt(Fe)?(t="#",Fe++):(t=c,0===Pe&&Ge(ge))),t}())!==c){for(r=[],o=ir();o!==c;)r.push(o),o=ir();r!==c?t=e=e+r.join(""):(Fe=t,t=c)}else Fe=t,t=c;return t}function ur(){var t;return Pe++,(t=ar())===c&&(t=or()),Pe--,t===c&&0===Pe&&Ge(ye),t}function sr(){var t,e;for(t=[],(e=er())===c&&(e=rr())===c&&(e=ur());e!==c;)t.push(e),(e=er())===c&&(e=rr())===c&&(e=ur());return t}function cr(){var t,e,r,o,i,a;return e=Fe,(r=lr())!==c?(46===n.charCodeAt(Fe)?(o=".",Fe++):(o=c,0===Pe&&Ge(_e)),o!==c&&(i=lr())!==c?e=r=[r,o,i]:(Fe=e,e=c)):(Fe=e,e=c),e!==c&&(a=e,e=parseFloat(a.join(""))),(t=e)===c&&(t=lr()),t}function lr(){var t,e;if(t=[],ve.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=c,0===Pe&&Ge(we)),e!==c)for(;e!==c;)t.push(e),ve.test(n.charAt(Fe))?(e=n.charAt(Fe),Fe++):(e=c,0===Pe&&Ge(we));else t=c;return t!==c&&(t=parseInt(t.join(""),10)),t}function dr(){var t,e;return Pe++,t=Fe,(e=function(){var t,e,r,o;return t=Fe,34===n.charCodeAt(Fe)?(e=Kt,Fe++):(e=c,0===Pe&&Ge(Jt)),e!==c&&(r=fr())!==c?(34===n.charCodeAt(Fe)?(o=Kt,Fe++):(o=c,0===Pe&&Ge(Jt)),o!==c?t=e=r:(Fe=t,t=c)):(Fe=t,t=c),t}())!==c&&(e=e),(t=e)===c&&(t=Fe,(e=fr())!==c&&(e=e.toString()),t=e),Pe--,t===c&&(e=c,0===Pe&&Ge(Ce)),t}function fr(){var t;return"true"===n.substr(Fe,4).toLowerCase()?(t=n.substr(Fe,4),Fe+=4):(t=c,0===Pe&&Ge(Ae)),t===c&&("false"===n.substr(Fe,5).toLowerCase()?(t=n.substr(Fe,5),Fe+=5):(t=c,0===Pe&&Ge(Se)),t===c&&("on"===n.substr(Fe,2).toLowerCase()?(t=n.substr(Fe,2),Fe+=2):(t=c,0===Pe&&Ge(ke)),t===c&&("off"===n.substr(Fe,3).toLowerCase()?(t=n.substr(Fe,3),Fe+=3):(t=c,0===Pe&&Ge(Le)),t===c&&(48===n.charCodeAt(Fe)?(t="0",Fe++):(t=c,0===Pe&&Ge(Ee)),t===c&&(49===n.charCodeAt(Fe)?(t="1",Fe++):(t=c,0===Pe&&Ge(Te))))))),t}function hr(){var t,e;return t=Fe,(e=cr())!==c&&(e=e.toString()),(t=e)===c&&(t=Fe,"auto"===n.substr(Fe,4).toLowerCase()?(e=n.substr(Fe,4),Fe+=4):(e=c,0===Pe&&Ge(je)),e!==c&&(e=e.toLowerCase()),t=e),t}function pr(t,r,n){return!(e.entityExists(t,r)||!0===n[r])}function gr(t){return{name:t}}function br(e,r,n){return n||(n={}),(r||[]).forEach((function(r){r.forEach((function(r){pr(e,r.from,n)&&e.push(gr(r.from)),r.arcs&&(n[r.to]=!0,t(e,br(e,r.arcs,n)),delete n[r.to]),pr(e,r.to,n)&&e.push(gr(r.to))}))})),e}if((i=d())!==c&&Fe===n.length)return i;throw i!==c&&Fe{"use strict";function r(t,e){return void 0===e||"*"===e||t.some((function(t){return t.name===e}))}e.__esModule=!0,e.nameValue2Option=function(t,e){var r={};return r[t.toLowerCase()]=e,r},e.flattenBoolean=function(t){return["true","on","1"].includes(t.toLowerCase())},e.entityExists=r,e.isMscGenKeyword=function(t){return["box","abox","rbox","note","msc","hscale","width","arcgradient","wordwraparcs","label","color","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"].includes(t)};var n=function(t,e){this.name="EntityNotDefinedError",this.message=function(t,e){return"Entity '"+t+"' in arc '"+e.from+" "+e.kind+" "+e.to+"' is not defined."}(t,e)};e.EntityNotDefinedError=n,e.checkForUndeclaredEntities=function t(e,o){(o||[]).forEach((function(o){o.forEach((function(o){if(o.from&&!r(e,o.from))throw new n(o.from,o);if(o.to&&!r(e,o.to))throw new n(o.to,o);o.arcs&&t(e,o.arcs)}))}))},e.getMetaInfo=function(t,e){var r=function(t){return!!t&&(t.hasOwnProperty("watermark")||t.hasOwnProperty("wordwrapentities")||t.hasOwnProperty("wordwrapboxes")||t.hasOwnProperty("width")&&"auto"===t.width)}(t),n=function(t){return(t||[]).some((function(t){return t.some((function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].includes(t.kind)}))}))}(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}},150:function(t,e,r){var n,o,i;o=[r(730),r(615)],void 0===(i="function"==typeof(n=function(t,e){"use strict";function r(t,e,n,o){this.message=t,this.expected=e,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(r,Error),r.buildMessage=function(t,e){var r={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e,r="";for(e=0;e0){for(e=1,n=1;e",!1),tt=jr("==",!1),et="<<=>>",rt=jr("<<=>>",!1),nt=jr("<=>",!1),ot=jr("..",!1),it="<<>>",at=jr("<<>>",!1),ut=jr("::",!1),st=jr("<:>",!1),ct=Ir("left to right arrow"),lt=jr("->",!1),dt=jr("=>>",!1),ft=jr("=>",!1),ht=jr(">>",!1),pt=jr(":>",!1),gt=jr("-x",!0),bt=Ir("right to left arrow"),mt=jr("<-",!1),yt=jr("<<=",!1),xt=jr("<=",!1),vt=jr("<<",!1),wt=jr("<:",!1),_t=jr("x-",!0),Ct=Ir("box"),At="note",St=jr("note",!0),kt="abox",Lt=jr("abox",!0),Et="rbox",Tt=jr("rbox",!0),Mt=jr("box",!0),jt=Ir("inline expression"),Ft=jr("alt",!0),It="else",Ot=jr("else",!0),Dt=jr("opt",!0),Pt="break",Bt=jr("break",!0),Nt=jr("par",!0),Ht=jr("seq",!0),Rt="strict",Wt=jr("strict",!0),Gt=jr("neg",!0),Xt="critical",zt=jr("critical",!0),Vt="ignore",qt=jr("ignore",!0),$t="consider",Ut=jr("consider",!0),Yt="assert",Zt=jr("assert",!0),Kt="loop",Jt=jr("loop",!0),Qt=jr("ref",!0),te=jr("exc",!0),ee=Ir("activate or deactivate"),re="activate",ne=jr("activate",!0),oe="deactivate",ie=jr("deactivate",!0),ae=Ir("attribute name"),ue="label",se=jr("label",!0),ce="idurl",le=jr("idurl",!0),de=jr("id",!0),fe=jr("url",!0),he="linecolor",pe=jr("linecolor",!0),ge="linecolour",be=jr("linecolour",!0),me="textcolor",ye=jr("textcolor",!0),xe="textcolour",ve=jr("textcolour",!0),we="textbgcolor",_e=jr("textbgcolor",!0),Ce="textbgcolour",Ae=jr("textbgcolour",!0),Se="arclinecolor",ke=jr("arclinecolor",!0),Le="arclinecolour",Ee=jr("arclinecolour",!0),Te="arctextcolor",Me=jr("arctextcolor",!0),je="arctextcolour",Fe=jr("arctextcolour",!0),Ie="arctextbgcolor",Oe=jr("arctextbgcolor",!0),De="arctextbgcolour",Pe=jr("arctextbgcolour",!0),Be="arcskip",Ne=jr("arcskip",!0),He="title",Re=jr("title",!0),We="activation",Ge=jr("activation",!0),Xe=Ir("double quoted string"),ze='"',Ve=jr('"',!1),qe='\\"',$e=jr('\\"',!1),Ue={type:"any"},Ye=Ir("identifier"),Ze=/^[A-Za-z_0-9]/,Ke=Fr([["A","Z"],["a","z"],"_",["0","9"]],!1,!1),Je=Ir("whitespace"),Qe=/^[ \t]/,tr=Fr([" ","\t"],!1,!1),er=Ir("lineend"),rr=/^[\r\n]/,nr=Fr(["\r","\n"],!1,!1),or=jr("/*",!1),ir="*/",ar=jr("*/",!1),ur=jr("//",!1),sr=jr("#",!1),cr=/^[^\r\n]/,lr=Fr(["\r","\n"],!0,!1),dr=Ir("comment"),fr=Ir("number"),hr=/^[0-9]/,pr=Fr([["0","9"]],!1,!1),gr=jr(".",!1),br=Ir("boolean"),mr=jr("true",!0),yr=jr("false",!0),xr=jr("on",!0),vr=jr("off",!0),wr=jr("0",!1),_r=jr("1",!1),Cr=Ir("size"),Ar=jr("auto",!0),Sr=0,kr=0,Lr=[{line:1,column:1}],Er=0,Tr=[],Mr=0;if("startRule"in o){if(!(o.startRule in l))throw new Error("Can't start parsing from rule \""+o.startRule+'".');d=l[o.startRule]}function jr(t,e){return{type:"literal",text:t,ignoreCase:e}}function Fr(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Ir(t){return{type:"other",description:t}}function Or(t){var e,r=Lr[t];if(r)return r;for(e=t-1;!Lr[e];)e--;for(r={line:(r=Lr[e]).line,column:r.column};eEr&&(Er=Sr,Tr=[]),Tr.push(t))}function Br(){var r,o,i,a,u,s,l;return r=Sr,(o=on())!==c&&function(){var t;return"msc"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=c,0===Mr&&Pr(p)),t===c&&("xu"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=c,0===Mr&&Pr(g))),t}()!==c&&on()!==c?(123===n.charCodeAt(Sr)?(i="{",Sr++):(i=c,0===Mr&&Pr(f)),i!==c&&on()!==c&&(a=function(){var e,r,o,i;return e=Sr,(r=function(){var e,r,o,i,a,u;for(e=Sr,r=Sr,o=[],i=Sr,(a=Nr())!==c?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=c,0===Mr&&Pr(m)),u!==c?(kr=i,i=a=a):(Sr=i,i=c)):(Sr=i,i=c);i!==c;)o.push(i),i=Sr,(a=Nr())!==c?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=c,0===Mr&&Pr(m)),u!==c?(kr=i,i=a=a):(Sr=i,i=c)):(Sr=i,i=c);return o!==c?(i=Sr,(a=Nr())!==c?(59===n.charCodeAt(Sr)?(u=y,Sr++):(u=c,0===Mr&&Pr(x)),u!==c?(kr=i,i=a=a):(Sr=i,i=c)):(Sr=i,i=c),i!==c?r=o=[o,i]:(Sr=r,r=c)):(Sr=r,r=c),r!==c&&(kr=e,r=function(e){return e[0].concat(e[1]).reduce(t,{})}(r)),r}())===c&&(r=null),r!==c?((o=function(){var t,e,r,o,i,a;for(t=Sr,e=Sr,r=[],o=Sr,(i=Hr())!==c?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=c,0===Mr&&Pr(m)),a!==c?(kr=o,o=i=i):(Sr=o,o=c)):(Sr=o,o=c);o!==c;)r.push(o),o=Sr,(i=Hr())!==c?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=c,0===Mr&&Pr(m)),a!==c?(kr=o,o=i=i):(Sr=o,o=c)):(Sr=o,o=c);return r!==c?(o=Sr,(i=Hr())!==c?(59===n.charCodeAt(Sr)?(a=y,Sr++):(a=c,0===Mr&&Pr(x)),a!==c?(kr=o,o=i=i):(Sr=o,o=c)):(Sr=o,o=c),o!==c?e=r=[r,o]:(Sr=e,e=c)):(Sr=e,e=c),e!==c&&(kr=t,u=e,e=u[0].concat(u[1])),e;var u}())===c&&(o=null),o!==c?((i=Rr())===c&&(i=null),i!==c?(kr=e,e=r=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n}(r,o,i)):(Sr=e,e=c)):(Sr=e,e=c)):(Sr=e,e=c),e}())!==c&&on()!==c?(125===n.charCodeAt(Sr)?(u="}",Sr++):(u=c,0===Mr&&Pr(h)),u!==c&&on()!==c?(kr=r,s=o,(l=a).entities=l.entities||[],e.checkForUndeclaredEntities(l.entities,l.arcs),l=t({meta:e.getMetaInfo(l.options,l.arcs)},l),s.length>0&&(l=t({precomment:s},l)),r=o=l):(Sr=r,r=c)):(Sr=r,r=c)):(Sr=r,r=c),r}function Nr(){var t,e,r,o;return Mr++,t=Sr,on()!==c?("hscale"===n.substr(Sr,6).toLowerCase()?(e=n.substr(Sr,6),Sr+=6):(e=c,0===Mr&&Pr(w)),e===c&&("arcgradient"===n.substr(Sr,11).toLowerCase()?(e=n.substr(Sr,11),Sr+=11):(e=c,0===Mr&&Pr(_))),e!==c&&on()!==c?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=c,0===Mr&&Pr(A)),r!==c&&on()!==c&&(o=function(){var t,e;return Mr++,t=Sr,(e=function(){var t,e,r,o;return t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=c,0===Mr&&Pr(Ve)),e!==c&&(r=an())!==c?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=c,0===Mr&&Pr(Ve)),o!==c?(kr=t,i=r,t=e=i.toString()):(Sr=t,t=c)):(Sr=t,t=c),t;var i}())!==c&&(kr=t,e=e),(t=e)===c&&(t=Sr,(e=an())!==c&&(kr=t,r=e,e=r.toString()),t=e),Mr--,t===c&&(e=c,0===Mr&&Pr(fr)),t;var r}())!==c&&on()!==c?(kr=t,t=S(e,o)):(Sr=t,t=c)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c?("width"===n.substr(Sr,5).toLowerCase()?(e=n.substr(Sr,5),Sr+=5):(e=c,0===Mr&&Pr(k)),e!==c&&on()!==c?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=c,0===Mr&&Pr(A)),r!==c&&on()!==c&&(o=function(){var t;return Mr++,(t=function(){var t,e,r,o;return t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=c,0===Mr&&Pr(Ve)),e!==c&&(r=ln())!==c?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=c,0===Mr&&Pr(Ve)),o!==c?(kr=t,t=e=r):(Sr=t,t=c)):(Sr=t,t=c),t}())===c&&(t=ln()),Mr--,t===c&&0===Mr&&Pr(Cr),t}())!==c&&on()!==c?(kr=t,t=S(e,o)):(Sr=t,t=c)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c?("wordwraparcs"===n.substr(Sr,12).toLowerCase()?(e=n.substr(Sr,12),Sr+=12):(e=c,0===Mr&&Pr(L)),e!==c&&on()!==c?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=c,0===Mr&&Pr(A)),r!==c&&on()!==c&&(o=sn())!==c&&on()!==c?(kr=t,t=E(e,o)):(Sr=t,t=c)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c?("wordwrapentities"===n.substr(Sr,16).toLowerCase()?(e=n.substr(Sr,16),Sr+=16):(e=c,0===Mr&&Pr(T)),e!==c&&on()!==c?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=c,0===Mr&&Pr(A)),r!==c&&on()!==c&&(o=sn())!==c&&on()!==c?(kr=t,t=E(e,o)):(Sr=t,t=c)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c?("wordwrapboxes"===n.substr(Sr,13).toLowerCase()?(e=n.substr(Sr,13),Sr+=13):(e=c,0===Mr&&Pr(M)),e!==c&&on()!==c?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=c,0===Mr&&Pr(A)),r!==c&&on()!==c&&(o=sn())!==c&&on()!==c?(kr=t,t=E(e,o)):(Sr=t,t=c)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c?("watermark"===n.substr(Sr,9).toLowerCase()?(e=n.substr(Sr,9),Sr+=9):(e=c,0===Mr&&Pr(j)),e!==c&&on()!==c?(61===n.charCodeAt(Sr)?(r=C,Sr++):(r=c,0===Mr&&Pr(A)),r!==c&&on()!==c&&(o=Ur())!==c&&on()!==c?(kr=t,t=S(e,o)):(Sr=t,t=c)):(Sr=t,t=c)):(Sr=t,t=c)))))),Mr--,t===c&&0===Mr&&Pr(v),t}function Hr(){var e,r,o,i,a,u;return Mr++,e=Sr,on()!==c&&(r=Ur())!==c&&on()!==c?(o=Sr,91===n.charCodeAt(Sr)?(i=I,Sr++):(i=c,0===Mr&&Pr(O)),i!==c&&(a=qr())!==c?(93===n.charCodeAt(Sr)?(u=D,Sr++):(u=c,0===Mr&&Pr(P)),u!==c?(kr=o,o=i=B(0,a)):(Sr=o,o=c)):(Sr=o,o=c),o===c&&(o=null),o!==c&&(i=on())!==c?(kr=e,e=t({name:r},o)):(Sr=e,e=c)):(Sr=e,e=c),e===c&&(e=Sr,on()!==c&&(r=Zr())!==c&&on()!==c?(o=Sr,91===n.charCodeAt(Sr)?(i=I,Sr++):(i=c,0===Mr&&Pr(O)),i!==c&&(a=qr())!==c?(93===n.charCodeAt(Sr)?(u=D,Sr++):(u=c,0===Mr&&Pr(P)),u!==c?(kr=o,o=i=B(0,a)):(Sr=o,o=c)):(Sr=o,o=c),o===c&&(o=null),o!==c&&(i=on())!==c?(kr=e,e=N(r,o)):(Sr=e,e=c)):(Sr=e,e=c)),Mr--,e===c&&0===Mr&&Pr(F),e}function Rr(){var t,e,r,o;if(t=[],e=Sr,(r=Wr())!==c&&on()!==c?(59===n.charCodeAt(Sr)?(o=y,Sr++):(o=c,0===Mr&&Pr(x)),o!==c?(kr=e,e=r=r):(Sr=e,e=c)):(Sr=e,e=c),e!==c)for(;e!==c;)t.push(e),e=Sr,(r=Wr())!==c&&on()!==c?(59===n.charCodeAt(Sr)?(o=y,Sr++):(o=c,0===Mr&&Pr(x)),o!==c?(kr=e,e=r=r):(Sr=e,e=c)):(Sr=e,e=c);else t=c;return t}function Wr(){var t,e,r,o,i,a,u;for(t=Sr,e=Sr,r=[],o=Sr,(i=Gr())!==c&&on()!==c?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=c,0===Mr&&Pr(m)),a!==c?(kr=o,o=i=i):(Sr=o,o=c)):(Sr=o,o=c);o!==c;)r.push(o),o=Sr,(i=Gr())!==c&&on()!==c?(44===n.charCodeAt(Sr)?(a=b,Sr++):(a=c,0===Mr&&Pr(m)),a!==c?(kr=o,o=i=i):(Sr=o,o=c)):(Sr=o,o=c);return r!==c?(o=Sr,(i=Gr())!==c&&(kr=o,i=i),(o=i)!==c?e=r=[r,o]:(Sr=e,e=c)):(Sr=e,e=c),e!==c&&(kr=t,e=(u=e)[0].concat(u[1])),e}function Gr(){var e;return(e=function(){var e,r,o,i,a,u;return e=Sr,r=Sr,(o=function(){var t,e;return t=Sr,on()!==c&&(e=function(){var t;return Mr++,n.substr(Sr,3)===z?(t=z,Sr+=3):(t=c,0===Mr&&Pr(V)),t===c&&(n.substr(Sr,3)===q?(t=q,Sr+=3):(t=c,0===Mr&&Pr($))),Mr--,t===c&&0===Mr&&Pr(X),t}())!==c&&on()!==c?(kr=t,t=H(e)):(Sr=t,t=c),t}())!==c&&(kr=r,o=o),(r=o)===c&&(r=Sr,(o=function(){var t,e,r,o;return t=Sr,on()!==c&&(e=Yr())!==c&&on()!==c&&(r=function(){var t,e;return t=Sr,(e=Xr())===c&&(e=zr())===c&&(e=Vr())===c&&(e=function(){var t;return Mr++,n.substr(Sr,4).toLowerCase()===At?(t=n.substr(Sr,4),Sr+=4):(t=c,0===Mr&&Pr(St)),t===c&&(n.substr(Sr,4).toLowerCase()===kt?(t=n.substr(Sr,4),Sr+=4):(t=c,0===Mr&&Pr(Lt)),t===c&&(n.substr(Sr,4).toLowerCase()===Et?(t=n.substr(Sr,4),Sr+=4):(t=c,0===Mr&&Pr(Tt)),t===c&&("box"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=c,0===Mr&&Pr(Mt))))),Mr--,t===c&&0===Mr&&Pr(Ct),t}()),e!==c&&(kr=t,r=e,e=r.toLowerCase()),e;var r}())!==c&&on()!==c&&(o=Yr())!==c&&on()!==c?(kr=t,i=e,a=r,u=o,t={kind:a,from:i,to:u}):(Sr=t,t=c),t===c&&(t=Sr,on()!==c?(42===n.charCodeAt(Sr)?(e=R,Sr++):(e=c,0===Mr&&Pr(W)),e!==c&&on()!==c&&(r=Vr())!==c&&on()!==c&&(o=Yr())!==c&&on()!==c?(kr=t,t=function(t,e){return{kind:t,from:"*",to:e}}(r,o)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c&&(e=Yr())!==c&&on()!==c&&(r=zr())!==c&&on()!==c?(42===n.charCodeAt(Sr)?(o=R,Sr++):(o=c,0===Mr&&Pr(W)),o!==c&&on()!==c?(kr=t,t=G(e,r)):(Sr=t,t=c)):(Sr=t,t=c),t===c&&(t=Sr,on()!==c&&(e=Yr())!==c&&on()!==c&&(r=Xr())!==c&&on()!==c?(42===n.charCodeAt(Sr)?(o=R,Sr++):(o=c,0===Mr&&Pr(W)),o!==c&&on()!==c?(kr=t,t=G(e,r)):(Sr=t,t=c)):(Sr=t,t=c)))),t;var i,a,u}())!==c&&(kr=r,o=o),(r=o)===c&&(r=Sr,(o=function(){var t,e;return t=Sr,on()!==c&&(e=function(){var t;return Mr++,n.substr(Sr,3)===Y?(t=Y,Sr+=3):(t=c,0===Mr&&Pr(Z)),Mr--,t===c&&0===Mr&&Pr(U),t}())!==c&&on()!==c?(kr=t,t=H(e)):(Sr=t,t=c),t}())!==c&&(kr=r,o=o),r=o)),r!==c?(o=Sr,91===n.charCodeAt(Sr)?(i=I,Sr++):(i=c,0===Mr&&Pr(O)),i!==c&&(a=qr())!==c?(93===n.charCodeAt(Sr)?(u=D,Sr++):(u=c,0===Mr&&Pr(P)),u!==c?(kr=o,s=a,o=i=s):(Sr=o,o=c)):(Sr=o,o=c),o===c&&(o=null),o!==c?(kr=e,e=r=function(e,r){return t(e,r)}(r,o)):(Sr=e,e=c)):(Sr=e,e=c),e;var s}())===c&&(e=function(){var e,r,o,i,a,u,s,l,d,p;return e=Sr,on()!==c&&(r=Yr())!==c&&on()!==c&&(o=function(){var t,e;return Mr++,t=Sr,"alt"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(Ft)),e===c&&(n.substr(Sr,4).toLowerCase()===It?(e=n.substr(Sr,4),Sr+=4):(e=c,0===Mr&&Pr(Ot)),e===c&&("opt"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(Dt)),e===c&&(n.substr(Sr,5).toLowerCase()===Pt?(e=n.substr(Sr,5),Sr+=5):(e=c,0===Mr&&Pr(Bt)),e===c&&("par"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(Nt)),e===c&&("seq"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(Ht)),e===c&&(n.substr(Sr,6).toLowerCase()===Rt?(e=n.substr(Sr,6),Sr+=6):(e=c,0===Mr&&Pr(Wt)),e===c&&("neg"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(Gt)),e===c&&(n.substr(Sr,8).toLowerCase()===Xt?(e=n.substr(Sr,8),Sr+=8):(e=c,0===Mr&&Pr(zt)),e===c&&(n.substr(Sr,6).toLowerCase()===Vt?(e=n.substr(Sr,6),Sr+=6):(e=c,0===Mr&&Pr(qt)),e===c&&(n.substr(Sr,8).toLowerCase()===$t?(e=n.substr(Sr,8),Sr+=8):(e=c,0===Mr&&Pr(Ut)),e===c&&(n.substr(Sr,6).toLowerCase()===Yt?(e=n.substr(Sr,6),Sr+=6):(e=c,0===Mr&&Pr(Zt)),e===c&&(n.substr(Sr,4).toLowerCase()===Kt?(e=n.substr(Sr,4),Sr+=4):(e=c,0===Mr&&Pr(Jt)),e===c&&("ref"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(Qt)),e===c&&("exc"===n.substr(Sr,3).toLowerCase()?(e=n.substr(Sr,3),Sr+=3):(e=c,0===Mr&&Pr(te)))))))))))))))),e!==c&&(kr=t,r=e,e=r.toLowerCase()),Mr--,(t=e)===c&&(e=c,0===Mr&&Pr(jt)),t;var r}())!==c&&on()!==c&&(i=Yr())!==c&&on()!==c?(a=Sr,91===n.charCodeAt(Sr)?(u=I,Sr++):(u=c,0===Mr&&Pr(O)),u!==c&&(s=qr())!==c?(93===n.charCodeAt(Sr)?(l=D,Sr++):(l=c,0===Mr&&Pr(P)),l!==c?(kr=a,g=s,a=u=g):(Sr=a,a=c)):(Sr=a,a=c),a===c&&(a=null),a!==c&&(u=on())!==c?(123===n.charCodeAt(Sr)?(s="{",Sr++):(s=c,0===Mr&&Pr(f)),s!==c&&(l=on())!==c?((d=Rr())===c&&(d=null),d!==c&&on()!==c?(125===n.charCodeAt(Sr)?(p="}",Sr++):(p=c,0===Mr&&Pr(h)),p!==c&&on()!==c?(kr=e,e=function(e,r,n,o,i){return t({kind:r,from:e,to:n,arcs:i},o)}(r,o,i,a,d)):(Sr=e,e=c)):(Sr=e,e=c)):(Sr=e,e=c)):(Sr=e,e=c)):(Sr=e,e=c),e;var g}()),e}function Xr(){var t;return Mr++,"--"===n.substr(Sr,2)?(t="--",Sr+=2):(t=c,0===Mr&&Pr(J)),t===c&&("<->"===n.substr(Sr,3)?(t="<->",Sr+=3):(t=c,0===Mr&&Pr(Q)),t===c&&("=="===n.substr(Sr,2)?(t="==",Sr+=2):(t=c,0===Mr&&Pr(tt)),t===c&&(n.substr(Sr,5)===et?(t=et,Sr+=5):(t=c,0===Mr&&Pr(rt)),t===c&&("<=>"===n.substr(Sr,3)?(t="<=>",Sr+=3):(t=c,0===Mr&&Pr(nt)),t===c&&(".."===n.substr(Sr,2)?(t="..",Sr+=2):(t=c,0===Mr&&Pr(ot)),t===c&&(n.substr(Sr,4)===it?(t=it,Sr+=4):(t=c,0===Mr&&Pr(at)),t===c&&("::"===n.substr(Sr,2)?(t="::",Sr+=2):(t=c,0===Mr&&Pr(ut)),t===c&&("<:>"===n.substr(Sr,3)?(t="<:>",Sr+=3):(t=c,0===Mr&&Pr(st)))))))))),Mr--,t===c&&0===Mr&&Pr(K),t}function zr(){var t;return Mr++,"->"===n.substr(Sr,2)?(t="->",Sr+=2):(t=c,0===Mr&&Pr(lt)),t===c&&("=>>"===n.substr(Sr,3)?(t="=>>",Sr+=3):(t=c,0===Mr&&Pr(dt)),t===c&&("=>"===n.substr(Sr,2)?(t="=>",Sr+=2):(t=c,0===Mr&&Pr(ft)),t===c&&(">>"===n.substr(Sr,2)?(t=">>",Sr+=2):(t=c,0===Mr&&Pr(ht)),t===c&&(":>"===n.substr(Sr,2)?(t=":>",Sr+=2):(t=c,0===Mr&&Pr(pt)),t===c&&("-x"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=c,0===Mr&&Pr(gt))))))),Mr--,t===c&&0===Mr&&Pr(ct),t}function Vr(){var t;return Mr++,"<-"===n.substr(Sr,2)?(t="<-",Sr+=2):(t=c,0===Mr&&Pr(mt)),t===c&&("<<="===n.substr(Sr,3)?(t="<<=",Sr+=3):(t=c,0===Mr&&Pr(yt)),t===c&&("<="===n.substr(Sr,2)?(t="<=",Sr+=2):(t=c,0===Mr&&Pr(xt)),t===c&&("<<"===n.substr(Sr,2)?(t="<<",Sr+=2):(t=c,0===Mr&&Pr(vt)),t===c&&("<:"===n.substr(Sr,2)?(t="<:",Sr+=2):(t=c,0===Mr&&Pr(wt)),t===c&&("x-"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=c,0===Mr&&Pr(_t))))))),Mr--,t===c&&0===Mr&&Pr(bt),t}function qr(){var e,r,o,i,a,u,s;for(e=Sr,r=Sr,o=[],i=Sr,(a=$r())!==c?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=c,0===Mr&&Pr(m)),u!==c?(kr=i,i=a=a):(Sr=i,i=c)):(Sr=i,i=c);i!==c;)o.push(i),i=Sr,(a=$r())!==c?(44===n.charCodeAt(Sr)?(u=b,Sr++):(u=c,0===Mr&&Pr(m)),u!==c?(kr=i,i=a=a):(Sr=i,i=c)):(Sr=i,i=c);return o!==c?(i=Sr,(a=$r())!==c&&(kr=i,a=a),(i=a)!==c?r=o=[o,i]:(Sr=r,r=c)):(Sr=r,r=c),r!==c&&(kr=e,r=(s=r)[0].concat(s[1]).reduce(t,{})),r}function $r(){var t;return(t=function(){var t,r,o,i;return t=Sr,on()!==c&&(r=function(){var t;return Mr++,n.substr(Sr,5).toLowerCase()===ue?(t=n.substr(Sr,5),Sr+=5):(t=c,0===Mr&&Pr(se)),t===c&&(n.substr(Sr,5).toLowerCase()===ce?(t=n.substr(Sr,5),Sr+=5):(t=c,0===Mr&&Pr(le)),t===c&&("id"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=c,0===Mr&&Pr(de)),t===c&&("url"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=c,0===Mr&&Pr(fe)),t===c&&(n.substr(Sr,9).toLowerCase()===he?(t=n.substr(Sr,9),Sr+=9):(t=c,0===Mr&&Pr(pe)),t===c&&(n.substr(Sr,10).toLowerCase()===ge?(t=n.substr(Sr,10),Sr+=10):(t=c,0===Mr&&Pr(be)),t===c&&(n.substr(Sr,9).toLowerCase()===me?(t=n.substr(Sr,9),Sr+=9):(t=c,0===Mr&&Pr(ye)),t===c&&(n.substr(Sr,10).toLowerCase()===xe?(t=n.substr(Sr,10),Sr+=10):(t=c,0===Mr&&Pr(ve)),t===c&&(n.substr(Sr,11).toLowerCase()===we?(t=n.substr(Sr,11),Sr+=11):(t=c,0===Mr&&Pr(_e)),t===c&&(n.substr(Sr,12).toLowerCase()===Ce?(t=n.substr(Sr,12),Sr+=12):(t=c,0===Mr&&Pr(Ae)),t===c&&(n.substr(Sr,12).toLowerCase()===Se?(t=n.substr(Sr,12),Sr+=12):(t=c,0===Mr&&Pr(ke)),t===c&&(n.substr(Sr,13).toLowerCase()===Le?(t=n.substr(Sr,13),Sr+=13):(t=c,0===Mr&&Pr(Ee)),t===c&&(n.substr(Sr,12).toLowerCase()===Te?(t=n.substr(Sr,12),Sr+=12):(t=c,0===Mr&&Pr(Me)),t===c&&(n.substr(Sr,13).toLowerCase()===je?(t=n.substr(Sr,13),Sr+=13):(t=c,0===Mr&&Pr(Fe)),t===c&&(n.substr(Sr,14).toLowerCase()===Ie?(t=n.substr(Sr,14),Sr+=14):(t=c,0===Mr&&Pr(Oe)),t===c&&(n.substr(Sr,15).toLowerCase()===De?(t=n.substr(Sr,15),Sr+=15):(t=c,0===Mr&&Pr(Pe)),t===c&&(n.substr(Sr,7).toLowerCase()===Be?(t=n.substr(Sr,7),Sr+=7):(t=c,0===Mr&&Pr(Ne)),t===c&&(n.substr(Sr,5).toLowerCase()===He?(t=n.substr(Sr,5),Sr+=5):(t=c,0===Mr&&Pr(Re)),t===c&&(n.substr(Sr,10).toLowerCase()===We?(t=n.substr(Sr,10),Sr+=10):(t=c,0===Mr&&Pr(Ge)))))))))))))))))))),Mr--,t===c&&0===Mr&&Pr(ae),t}())!==c&&on()!==c?(61===n.charCodeAt(Sr)?(o=C,Sr++):(o=c,0===Mr&&Pr(A)),o!==c&&on()!==c&&(i=Yr())!==c&&on()!==c?(kr=t,a=r,u=i,s={},"activation"===a.toLowerCase()?s.activation=e.flattenBoolean(u):s[a.toLowerCase().replace("colour","color")]=u,t=s):(Sr=t,t=c)):(Sr=t,t=c),t;var a,u,s}())===c&&(t=function(){var t,e;return Mr++,t=Sr,on()!==c?(n.substr(Sr,8).toLowerCase()===re?(e=n.substr(Sr,8),Sr+=8):(e=c,0===Mr&&Pr(ne)),e===c&&(n.substr(Sr,10).toLowerCase()===oe?(e=n.substr(Sr,10),Sr+=10):(e=c,0===Mr&&Pr(ie))),e!==c&&on()!==c?(kr=t,r=e,t={activation:"activate"===r.toLowerCase()}):(Sr=t,t=c)):(Sr=t,t=c),Mr--,t===c&&0===Mr&&Pr(ee),t;var r}()),t}function Ur(){var t,e,r,o;return Mr++,t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=c,0===Mr&&Pr(Ve)),e!==c&&(r=function(){var t,e,r,o;for(t=[],e=Sr,r=Sr,Mr++,34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=c,0===Mr&&Pr(Ve)),Mr--,o===c?r=void 0:(Sr=r,r=c),r!==c?(n.substr(Sr,2)===qe?(o=qe,Sr+=2):(o=c,0===Mr&&Pr($e)),o===c&&(n.length>Sr?(o=n.charAt(Sr),Sr++):(o=c,0===Mr&&Pr(Ue))),o!==c?(kr=e,e=r=o):(Sr=e,e=c)):(Sr=e,e=c);e!==c;)t.push(e),e=Sr,r=Sr,Mr++,34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=c,0===Mr&&Pr(Ve)),Mr--,o===c?r=void 0:(Sr=r,r=c),r!==c?(n.substr(Sr,2)===qe?(o=qe,Sr+=2):(o=c,0===Mr&&Pr($e)),o===c&&(n.length>Sr?(o=n.charAt(Sr),Sr++):(o=c,0===Mr&&Pr(Ue))),o!==c?(kr=e,e=r=o):(Sr=e,e=c)):(Sr=e,e=c);return t}())!==c?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=c,0===Mr&&Pr(Ve)),o!==c?(kr=t,t=e=r.join("")):(Sr=t,t=c)):(Sr=t,t=c),Mr--,t===c&&(e=c,0===Mr&&Pr(Xe)),t}function Yr(){var t;return Mr++,(t=Zr())===c&&(t=Ur()),Mr--,t===c&&0===Mr&&Pr(Ye),t}function Zr(){var t,e,r;if(t=Sr,e=[],Ze.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=c,0===Mr&&Pr(Ke)),r!==c)for(;r!==c;)e.push(r),Ze.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=c,0===Mr&&Pr(Ke));else e=c;return e!==c&&(kr=t,e=e.join("")),e}function Kr(){var t,e;return Mr++,t=Sr,Qe.test(n.charAt(Sr))?(e=n.charAt(Sr),Sr++):(e=c,0===Mr&&Pr(tr)),e!==c&&(kr=t,e=e),Mr--,(t=e)===c&&(e=c,0===Mr&&Pr(Je)),t}function Jr(){var t,e;return Mr++,t=Sr,rr.test(n.charAt(Sr))?(e=n.charAt(Sr),Sr++):(e=c,0===Mr&&Pr(nr)),e!==c&&(kr=t,e=e),Mr--,(t=e)===c&&(e=c,0===Mr&&Pr(er)),t}function Qr(){var t,e,r;return t=Sr,e=Sr,Mr++,n.substr(Sr,2)===ir?(r=ir,Sr+=2):(r=c,0===Mr&&Pr(ar)),Mr--,r===c?e=void 0:(Sr=e,e=c),e!==c?(n.length>Sr?(r=n.charAt(Sr),Sr++):(r=c,0===Mr&&Pr(Ue)),r!==c?(kr=t,t=e=r):(Sr=t,t=c)):(Sr=t,t=c),t}function tn(){var t,e,r,o,i;if(t=Sr,(e=function(){var t;return"/*"===n.substr(Sr,2)?(t="/*",Sr+=2):(t=c,0===Mr&&Pr(or)),t}())!==c){for(r=[],o=Qr();o!==c;)r.push(o),o=Qr();r!==c&&(o=function(){var t;return n.substr(Sr,2)===ir?(t=ir,Sr+=2):(t=c,0===Mr&&Pr(ar)),t}())!==c?(kr=t,i=o,t=e=e+r.join("")+i):(Sr=t,t=c)}else Sr=t,t=c;return t}function en(){var t;return cr.test(n.charAt(Sr))?(t=n.charAt(Sr),Sr++):(t=c,0===Mr&&Pr(lr)),t}function rn(){var t,e,r,o;if(t=Sr,(e=function(){var t;return"//"===n.substr(Sr,2)?(t="//",Sr+=2):(t=c,0===Mr&&Pr(ur)),t===c&&(35===n.charCodeAt(Sr)?(t="#",Sr++):(t=c,0===Mr&&Pr(sr))),t}())!==c){for(r=[],o=en();o!==c;)r.push(o),o=en();r!==c?(kr=t,t=e=e+r.join("")):(Sr=t,t=c)}else Sr=t,t=c;return t}function nn(){var t;return Mr++,(t=rn())===c&&(t=tn()),Mr--,t===c&&0===Mr&&Pr(dr),t}function on(){var t,e;for(t=[],(e=Kr())===c&&(e=Jr())===c&&(e=nn());e!==c;)t.push(e),(e=Kr())===c&&(e=Jr())===c&&(e=nn());return t}function an(){var t;return(t=function(){var t,e,r,o,i;return t=Sr,e=Sr,(r=un())!==c?(46===n.charCodeAt(Sr)?(o=".",Sr++):(o=c,0===Mr&&Pr(gr)),o!==c&&(i=un())!==c?e=r=[r,o,i]:(Sr=e,e=c)):(Sr=e,e=c),e!==c&&(kr=t,a=e,e=parseFloat(a.join(""))),e;var a}())===c&&(t=un()),t}function un(){var t,e,r;if(t=Sr,e=[],hr.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=c,0===Mr&&Pr(pr)),r!==c)for(;r!==c;)e.push(r),hr.test(n.charAt(Sr))?(r=n.charAt(Sr),Sr++):(r=c,0===Mr&&Pr(pr));else e=c;return e!==c&&(kr=t,e=parseInt(e.join(""),10)),e}function sn(){var t,e;return Mr++,t=Sr,(e=function(){var t,e,r,o;return t=Sr,34===n.charCodeAt(Sr)?(e=ze,Sr++):(e=c,0===Mr&&Pr(Ve)),e!==c&&(r=cn())!==c?(34===n.charCodeAt(Sr)?(o=ze,Sr++):(o=c,0===Mr&&Pr(Ve)),o!==c?(kr=t,t=e=r):(Sr=t,t=c)):(Sr=t,t=c),t}())!==c&&(kr=t,e=e),(t=e)===c&&(t=Sr,(e=cn())!==c&&(kr=t,e=e.toString()),t=e),Mr--,t===c&&(e=c,0===Mr&&Pr(br)),t}function cn(){var t;return"true"===n.substr(Sr,4).toLowerCase()?(t=n.substr(Sr,4),Sr+=4):(t=c,0===Mr&&Pr(mr)),t===c&&("false"===n.substr(Sr,5).toLowerCase()?(t=n.substr(Sr,5),Sr+=5):(t=c,0===Mr&&Pr(yr)),t===c&&("on"===n.substr(Sr,2).toLowerCase()?(t=n.substr(Sr,2),Sr+=2):(t=c,0===Mr&&Pr(xr)),t===c&&("off"===n.substr(Sr,3).toLowerCase()?(t=n.substr(Sr,3),Sr+=3):(t=c,0===Mr&&Pr(vr)),t===c&&(48===n.charCodeAt(Sr)?(t="0",Sr++):(t=c,0===Mr&&Pr(wr)),t===c&&(49===n.charCodeAt(Sr)?(t="1",Sr++):(t=c,0===Mr&&Pr(_r))))))),t}function ln(){var t,e;return t=Sr,(e=an())!==c&&(kr=t,e=e.toString()),(t=e)===c&&(t=Sr,"auto"===n.substr(Sr,4).toLowerCase()?(e=n.substr(Sr,4),Sr+=4):(e=c,0===Mr&&Pr(Ar)),e!==c&&(kr=t,e=e.toLowerCase()),t=e),t}if((i=d())!==c&&Sr===n.length)return i;throw i!==c&&Sr{"use strict";e.__esModule=!0;var r=Object.freeze({"|||":"empty","...":"empty","---":"empty","->":"directional","=>":"directional","=>>":"directional",">>":"directional",":>":"directional","-x":"directional","<-":"directional","<=":"directional","<<=":"directional","<<":"directional","<:":"directional","x-":"directional",note:"box",box:"box",abox:"box",rbox:"box","<->":"bidirectional","<=>":"bidirectional","<<=>>":"bidirectional","<<>>":"bidirectional","<:>":"bidirectional","--":"nondirectional","==":"nondirectional","..":"nondirectional","::":"nondirectional",alt:"inline_expression",else:"inline_expression",opt:"inline_expression",break:"inline_expression",par:"inline_expression",seq:"inline_expression",strict:"inline_expression",neg:"inline_expression",critical:"inline_expression",ignore:"inline_expression",consider:"inline_expression",assert:"inline_expression",loop:"inline_expression",ref:"inline_expression",exc:"inline_expression"});e.default=function(t){return r[t]}},940:(t,e)=>{"use strict";function r(t,e,n){e.forEach((function(e){!function(t,e,n){e.forEach((function(o){!function(t,e,r,n){n.forEach((function(n){n(r,t,e)}))}(t,e,o,n),o.arcs&&r(t,o.arcs,n)}))}(t,e,n)}))}e.__esModule=!0,e.default=function(t,e,n){var o,i;return o=t.entities,i=e,o.forEach((function(t){i.forEach((function(e){e(t)}))})),t.arcs&&r(t.entities,t.arcs,n),t}},597:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(940)),a=n(r(465)),u=o(r(367)),s=n(r(596)),c=n(r(975)),l=n(r(925)),d=0;function f(t){void 0===t.label&&(t.label=t.name)}function h(t){t.label&&(t.label=u.unescapeString(t.label)),t.id&&(t.id=u.unescapeString(t.id))}function p(t){t.label=Boolean(t.label)?t.label:""}function g(t){if(c.default(t.kind)!==t.kind){t.kind=c.default(t.kind);var e=t.from;t.from=t.to,t.to=e}}function b(t,e){!t.linecolor&&e.arclinecolor&&(t.linecolor=e.arclinecolor),!t.textcolor&&e.arctextcolor&&(t.textcolor=e.arctextcolor),!t.textbgcolor&&e.arctextbgcolor&&(t.textbgcolor=e.arctextbgcolor)}function m(t,e){if(void 0===e&&(e=[]),t&&t.from){var r=e.find((function(e){return e.name===t.from}));r&&b(t,r)}}function y(t){return t.arcs.reduce((function(t,e){return t+(Boolean(e[0].arcs)?y(e[0])+1:0)}),t.arcs.length)}function x(t,e,r,n){var o=[],i=[],u=[];return t.forEach((function(t){if(t.isVirtual=!1,"inline_expression"===s.default(t.kind)){if(t.depth=e,t.isVirtual=!0,t.arcs){var o=a.default(t);o.numberofrows=y(o),delete o.arcs,i.push(o),t.arcs.forEach((function(t){u=u.concat(x(t,e+1,o.from,o.to)),t.forEach((function(t){b(t,o)}))})),e>d&&(d=e)}else i.push(t);u.push([{kind:"|||",from:t.from,to:t.to,isVirtual:!0}])}else r&&n&&"empty"===s.default(t.kind)&&(t.from=r,t.to=n,t.depth=e),i.push(t)})),o.push(i),o.concat(u)}function v(t){return d=0,{options:l.default(t.options),entities:a.default(t.entities),arcs:(e=t.arcs,e?e.reduce((function(t,e){return t.concat(x(e,0))}),[]):[]),depth:d+1};var e}e.nameAsLabel=f,e.swapRTLArc=g,e.overrideColors=m,e.normalize=v,e.flatten=function(t){return v(i.default(t,[f,h],[g,m,h,p]))}},975:(t,e)=>{"use strict";e.__esModule=!0;var r=Object.freeze({"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"});e.default=function(t){return r[t]||t}},925:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t){return Object.assign({wordwraparcs:!1,wordwrapentities:!0,wordwrapboxes:!0},t||{})}},866:(t,e)=>{"use strict";e.__esModule=!0,e.default={LINE_WIDTH:2,FONT_SIZE:12}},22:t=>{"use strict";t.exports=JSON.parse('{"baseTemplate":"svg.<%=id%>{font-family:Helvetica,sans-serif;font-size:<%=fontSize%>px;font-weight:normal;font-style:normal;text-decoration:none;background-color:white;stroke:black;stroke-width:<%=lineWidth%>}.<%=id%> path, .<%=id%> rect{fill:none}.<%=id%> .label-text-background{fill:white;stroke:white;stroke-width:0}.<%=id%> .bglayer{fill:white;stroke:white;stroke-width:0}.<%=id%> line{}.<%=id%> .return, .<%=id%> .comment{stroke-dasharray:5,3}.<%=id%> .inline_expression_divider{stroke-dasharray:10,5}.<%=id%> text{color:inherit;stroke:none;text-anchor:middle}.<%=id%> text.anchor-start{text-anchor:start}.<%=id%> .arrow-marker{overflow:visible}.<%=id%> .arrow-style{stroke-width:1}.<%=id%> .arcrow, .<%=id%> .arcrowomit, .<%=id%> .emphasised{stroke-linecap:butt}.<%=id%> .arcrowomit{stroke-dasharray:2,2}.<%=id%> .box, .<%=id%> .entity{fill:white;stroke-linejoin:round}.<%=id%> .inherit{stroke:inherit;color:inherit}.<%=id%> .inherit-fill{fill:inherit}.<%=id%> .watermark{font-size:48pt;font-weight:bold;opacity:0.14}","namedStyles":[{"name":"basic","description":"Basic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:underline;}"},{"name":"lazy","description":"Lazy","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{font-weight:bold;}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC}.<%=id%> rect.label-text-background{opacity:0.9}.<%=id%> line.comment,.<%=id%> rect.inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke:grey}"},{"name":"classic","description":"Classic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:none}.<%=id%> .entity{stroke:none;}.<%=id%> line,.<%=id%> rect,.<%=id%> path{stroke-width:1px}.<%=id%> .arrow-style{stroke-width:2;}.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke-width: 1px}"},{"name":"fountainpen","description":"Fountain pen","experimental":true,"deprecated":false,"renderMagic":"wobbly","cssBefore":"@import \'https://fonts.googleapis.com/css?family=Gochi+Hand\';","cssAfter":"svg.<%=id%>{font-family:\'Gochi Hand\', cursive;font-size:14px;stroke-opacity:0.4;stroke-linecap:round;background-color:transparent}.<%=id%> text{fill:rgba(0,0,128,0.7)}.<%=id%> marker polygon{fill:rgba(0,0,255,0.4);stroke-linejoin:round}.<%=id%> line, .<%=id%> path, .<%=id%> rect, .<%=id%> polygon{stroke:blue !important}.<%=id%> text.entity-text{font-weight:bold;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC;}.<%=id%> .label-text-background{opacity:0}"},{"name":"cygne","description":"Cygne (best with msgenny)","experimental":true,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:#00A1DE}.<%=id%> text{fill:#005B82}.<%=id%> .entity,.<%=id%> .box{fill:#00A1DE;stroke:#00A1DE}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#E77B2F;stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"pegasse","description":"Pégase (best with msgenny)","experimental":false,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:rgba(0, 43, 84, 1)}.<%=id%> text{fill:rgba(0, 43, 84, 1)}.<%=id%> .entity,.<%=id%> .box{fill:rgba(0, 43, 84, 1);stroke:rgba(0, 43, 84, 1)}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:rgba(255, 50, 0, 1);stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"grayscaled","description":"Grayscaled (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:grayscale(1);-webkit-filter:grayscale(1);}"},{"name":"inverted","description":"Inverted (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:invert(1);-webkit-filter:invert(1);}"},{"name":"noentityboxes","description":"No entity boxes","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> .entity{fill:none;stroke:none;}.<%=id%> text.entity-text{text-decoration:underline;}"}]}')},489:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(866)),a=o(r(631)),u=o(r(683)),s=o(r(930)),c=function(){function t(t){this.interEntitySpacing=160,this.height=34,this.width=100,this.entityXHWM=0,this.entity2x={},t&&(this.interEntitySpacing=160*t,this.width=100*t)}return t.prototype.getX=function(t){return this.entity2x[t]},t.prototype.getDims=function(){return{interEntitySpacing:this.interEntitySpacing,height:this.height,width:this.width,entityXHWM:this.entityXHWM}},t.prototype.getOAndD=function(t,e){return{from:this.getX(t)this.getX(t)?this.getX(e):this.getX(t)}},t.prototype.renderEntities=function(t,e,r){var n=this,o=u.createGroup();return this.entityXHWM=0,this.height=this.getMaxEntityHeight(t,r)+2*i.default.LINE_WIDTH,t.forEach((function(t){o.appendChild(n.renderEntity(t,n.entityXHWM,e,r)),n.setX(t,n.entityXHWM),n.entityXHWM+=n.interEntitySpacing})),o},t.prototype.setX=function(t,e){this.entity2x[t.name]=e+this.width/2},t.prototype.getNoEntityLines=function(t,e,r){return a.splitLabel(t,"entity",this.width,e,r).length},t.prototype.sizeEntityBoxToLabel=function(t,e){var r=Math.min(s.getBBox(t).width+4*i.default.LINE_WIDTH,this.interEntitySpacing/3+e.width);return r>=e.width&&(e.x-=(r-e.width)/2,e.width=r),e},t.prototype.renderEntity=function(t,e,r,n){var o=u.createGroup(),i={x:e||0,y:r||0,width:this.width,height:this.height},s=a.createLabel(Object.assign({kind:"entity"},t),Object.assign({},i,{y:i.y+i.height/2}),n);return o.appendChild(u.createRect(this.sizeEntityBoxToLabel(s,i),{class:"entity",color:t.linecolor,bgColor:t.textbgcolor})),o.appendChild(s),o},t.prototype.getMaxEntityHeight=function(t,e){var r=this,n=t[0],o=2;return t.forEach((function(t){var a=r.getNoEntityLines(t.label,i.default.FONT_SIZE,e);a>o&&(o=a,n=t)})),o>2?Math.max(this.height,s.getBBox(this.renderEntity(n,0,0,e)).height):this.height},t}();e.Thing=c},824:(t,e)=>{"use strict";e.__esModule=!0;var r="mscgenjs",n=r;e.setPrefix=function(t){n=r+t},e.get=function(t){return n+(t||"")}},622:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(596)),i=Object.freeze({"|||":"empty-row","...":"omitted-row","---":"comment-row","->":"signal","=>":"method","=>>":"callback",">>":"return",":>":"emphasised","-x":"lost","<-":"signal","<=":"method","<<=":"callback","<<":"return","<:":"emphasised","x-":"lost","<->":"signal","<=>":"method","<<=>>":"callback","<<>>":"return","<:>":"emphasised","--":"signal","==":"method","..":"return","::":"emphasised"});e.getClass=function(t){return i[t]||t},e.getAggregateClass=function(t){return o.default(t)||t}},853:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(800)),i=n(r(975)),a={"->":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}{{signal-marker-end}}-{{color}})"}],marker:{name:"signal"}},"<->":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}{{signal-marker-end}}-{{color}})"},{name:"marker-start",value:"url(#{{id}}{{signal-marker-start}}-{{color}})"}],marker:{name:"signal"}},"=>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"}],marker:{name:"callback",end:""}},"<<=>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"},{name:"marker-start",value:"url(#{{id}}callback-l-{{color}})"}],marker:{name:"callback",end:"",start:"-l"}},">>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"}],marker:{name:"callback",end:""}},"<<>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"},{name:"marker-start",value:"url(#{{id}}callback-l-{{color}})"}],marker:{name:"callback",end:"",start:"-l"}},"..":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"--":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"==":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"::":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"=>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"}],marker:{name:"method",end:""}},"<=>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"},{name:"marker-start",value:"url(#{{id}}method-l-{{color}})"}],marker:{name:"method",end:"",start:"-l"}},":>":{attributes:[{name:"style",value:"stroke:{{color}};"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"}],marker:{name:"method",end:""}},"<:>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"},{name:"marker-start",value:"url(#{{id}}method-l-{{color}})"}],marker:{name:"method",end:"",start:"-l"}},"-x":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}lost-{{color}})"}],marker:{name:"lost",end:""}}},u={signal:{variants:[{name:"",path:"M9,3 l-8, 2"},{name:"-u",path:"M9,3 l-8,-2"},{name:"-l",path:"M9,3 l 8, 2"},{name:"-lu",path:"M9,3 l 8,-2"}]},method:{variants:[{name:"",path:"1,1 9,3 1,5"},{name:"-l",path:"17,1 9,3 17,5"}]},callback:{variants:[{name:"",path:"M 1,1 l 8,2 l-8,2"},{name:"-l",path:"M17,1 l-8,2 l 8,2"}]},lost:{variants:[{name:"",path:"M7,0 l5,6 M7,6 l5,-6"}]}};function s(t,e,r){return e&&r&&["<->","->"].includes(t)?e"===t&&e<=r?"signal-l":"signal-lu"}function l(t,e){return a[i.default(t)].marker.name+(Boolean(e)?" "+e:" black")}function d(t,e){function r(e){d(t,e)}return Array.isArray(e)&&e.forEach(r),e.arcs&&e.arcs.forEach(r),e.kind&&a[i.default(e.kind)]&&a[i.default(e.kind)].marker&&!t.includes(l(e.kind,e.linecolor))&&t.push(l(e.kind,e.linecolor)),t}function f(t){return{kind:t.split(" ")[0],color:t.split(" ")[1]}}e.getAttributes=function(t,e,r,n,o){var i=[];return a[e]&&a[e].attributes&&(i=a[e].attributes.map((function(i){return{name:i.name,value:i.value.replace(/\{\{signal-marker-end\}\}/g,s(e,n,o)).replace(/\{\{signal-marker-start\}\}/g,c(e,n,o)).replace(/\{\{id\}\}/g,t).replace(/\{\{color\}\}/g,r||"black")}}))),i},e.getMarkerDefs=function(t,e){return o.default(function(t){return t.arcs.reduce(d,[]).sort().map(f)}(e).map((function(e){return u[e.kind].variants.map((function(r){return{name:t+e.kind+r.name+"-"+e.color,path:r.path,color:e.color,type:e.kind}}))})))}},533:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(465)),a=n(r(596)),u=r(597),s=n(r(866)),c=r(489),l=o(r(824)),d=o(r(622)),f=o(r(853)),h=o(r(631)),p=o(r(525)),g=o(r(173)),b=o(r(621)),m=o(r(683)),y=o(r(930)),x=new c.Thing(0),v=Object.seal({arcRowHeight:38,arcGradient:0,arcEndX:0,wordWrapArcs:!1,mirrorEntitiesOnBottom:!1,regularArcTextVerticalAlignment:"middle",maxDepth:0,document:{},layers:{lifeline:{},sequence:{},notes:{},inline:{},watermark:{}}}),w=[];function _(t,e,r){v.layers.sequence.appendChild(x.renderEntities(t,e,r)),v.arcEndX=x.getDims().entityXHWM-x.getDims().interEntitySpacing+x.getDims().width}function C(t,e,r,n,o){var a=m.createGroup();return t.from&&t.to&&("*"===t.to?(function(t,e,r,n,o){var i=0,a=t.label,u=x.getX(t.from);t.label="",e.forEach((function(e){var a={};e.name!==t.from&&(i=x.getX(e.name),a=E(t,u,i,n,o),r.push({layer:v.layers.sequence,element:a}))})),t.label=a}(t,e,r,n,o),a=h.createLabel(t,{x:0,y:b.get(n).y,width:v.arcEndX},Object.assign({alignAround:!0,ownBackground:!0},i.default(o))),r.push({title:t.title,layer:v.layers.sequence,element:a})):(a=E(t,x.getX(t.from),x.getX(t.to),n,o),r.push({title:t.title,layer:v.layers.sequence,element:a}))),a}function A(t,e,r){var n=0;return t.forEach((function(t){var o;switch(a.default(t.kind)){case"empty":o=L(t,0);break;case"box":o=M(x.getOAndD(t.from,t.to),t,0,r);break;case"inline_expression":o=S(t,0);break;default:var u=i.default(t);u.arcskip=0,o=C(u,e,[],0,r)}n=Math.max(n,y.getBBox(o).height+2*s.default.LINE_WIDTH)})),n}function S(t,e){var r=x.getOAndD(t.from,t.to),n=e>0,o=2*v.maxDepth*s.default.LINE_WIDTH,i=r.to-r.from+(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH)-7-s.default.LINE_WIDTH,a=r.from-(x.getDims().interEntitySpacing-3*s.default.LINE_WIDTH-o)/2-2*(v.maxDepth-t.depth)*s.default.LINE_WIDTH,u=m.createGroup();n||(t.label=t.kind+(t.label?": "+t.label:""));var c=h.createLabel(t,{x:a+s.default.LINE_WIDTH-i/2,y:e+v.arcRowHeight/4,width:i},{alignLeft:!0,ownBackground:!1,wordwraparcs:v.wordWrapArcs}),l=y.getBBox(c),d=Math.max(l.height+2*s.default.LINE_WIDTH,v.arcRowHeight/2-2*s.default.LINE_WIDTH),f=Math.min(l.width+2*s.default.LINE_WIDTH,i),p=m.createEdgeRemark({width:f-s.default.LINE_WIDTH+7,height:d,x:a,y:e},{class:"box inline_expression_label",color:t.linecolor,bgColor:t.textbgcolor,foldSize:7});return u.appendChild(p),u.appendChild(c),u}function k(t,e,r,n){return r","::","<:>"].includes(t.kind),y=function(t,e,r){var n=b.get(t).y+e;if(r){var o=Math.floor(r),i=r-o,a=b.get(t).realRowNumber;n=b.getByRealRowNumber(a+o).y+i*(b.getByRealRowNumber(a+o+1).y-b.getByRealRowNumber(a+o).y)}return n}(n,v.arcGradient,t.arcskip);if(e===(r=g.determineArcXTo(t.kind,e,r))){u.appendChild(function(t,e,r,n,o,i){var a=v.arcRowHeight/5*2,u=x.getDims().interEntitySpacing/2,c={},h="arc "+d.getAggregateClass(t)+" "+d.getClass(t);if(n){c=m.createGroup();var p=m.createUTurn({x:e,y:o,width:u-2*s.default.LINE_WIDTH,height:a},o+r+a-2*s.default.LINE_WIDTH,{class:h,dontHitHome:"::"!==t,lineWidth:s.default.LINE_WIDTH}),g=m.createUTurn({x:e,y:o,width:u,height:a},o+r+a-s.default.LINE_WIDTH,{lineWidth:s.default.LINE_WIDTH}),b=m.createUTurn({x:e,y:o,width:u,height:a},o+r+a,{class:h,dontHitHome:"::"!==t,lineWidth:s.default.LINE_WIDTH});i&&p.setAttribute("style","stroke:"+i),f.getAttributes(l.get(),t,i,e,e).forEach((function(t){g.setAttribute(t.name,t.value)})),g.setAttribute("style","stroke:transparent;"),Boolean(i)&&b.setAttribute("style","stroke:"+i),c.appendChild(p),c.appendChild(b),c.appendChild(g),c.setAttribute("class",h)}else c=m.createUTurn({x:e,y:o,width:u,height:a},o+r+a,{class:h,dontHitHome:"-x"===t,lineWidth:s.default.LINE_WIDTH}),f.getAttributes(l.get(),t,i,e,e).forEach((function(t){c.setAttribute(t.name,t.value)}));return c}(t.kind,e,y-b.get(n).y-v.arcGradient,p,b.get(n).y,t.linecolor));var w=2*x.getDims().interEntitySpacing/3;u.appendChild(h.createLabel(t,{x:e+1.5*s.default.LINE_WIDTH-w/2,y:b.get(n).y-v.arcRowHeight/5-s.default.LINE_WIDTH/2,width:w},Object.assign({alignLeft:!0,alignAbove:!0,ownBackground:!0},i.default(o))))}else{var _=m.createLine({xFrom:e,yFrom:b.get(n).y,xTo:r,yTo:y},{class:c,doubleLine:p});f.getAttributes(l.get(),t.kind,t.linecolor,e,r).forEach((function(t){_.setAttribute(t.name,t.value)})),u.appendChild(_),u.appendChild(h.createLabel(t,{x:e,y:b.get(n).y+(y-b.get(n).y)/2,width:r-e},Object.assign({alignAround:!0,alignAbove:"above"===v.regularArcTextVerticalAlignment,ownBackground:!0},i.default(o))))}return u}function T(t,e,r){var n=0,o=v.arcEndX;return t.from&&t.to&&(n=e.from,o=e.to-e.from),h.createLabel(t,{x:n,y:r,width:o},{ownBackground:!0,wordwraparcs:v.wordWrapArcs})}function M(t,e,r,n){var o,i=2*v.maxDepth*s.default.LINE_WIDTH,a=t.to-t.from+x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-i,u=t.from-(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-i)/2,c=m.createGroup(),l=h.createLabel(e,{x:u,y:r,width:a},n),d=y.getBBox(l),f=Math.max(d.height+2*s.default.LINE_WIDTH,v.arcRowHeight-2*s.default.LINE_WIDTH),p={width:a,height:f,x:u,y:r-f/2};switch(e.kind){case"rbox":o=m.createRBox(p,{class:"box rbox",color:e.linecolor,bgColor:e.textbgcolor});break;case"abox":o=m.createABox(p,{class:"box abox",color:e.linecolor,bgColor:e.textbgcolor});break;case"note":o=m.createNote(p,{class:"box note",color:e.linecolor,bgColor:e.textbgcolor,lineWidth:s.default.LINE_WIDTH});break;default:o=m.createRect(p,{class:"box",color:e.linecolor,bgColor:e.textbgcolor})}return c.appendChild(o),c.appendChild(l),c}e.clean=function(t,e){v.document=p.init(e),y.init(v.document),y.removeRenderedSVGFromElement(t)},e.render=function(t,e,r,n){var o=Object.freeze(u.flatten(t)),i=function(t,e){return t.document.getElementById(e)||t.document.body}(e,r);return l.setPrefix(r),function(t,e,r,n){var o;v.document=p.bootstrap(e,r,l.get(),f.getMarkerDefs(l.get(),t),n),v.mirrorEntitiesOnBottom=n.mirrorEntitiesOnBottom,v.regularArcTextVerticalAlignment=n.regularArcTextVerticalAlignment,y.init(v.document),v.layers={lifeline:(o=v.document).getElementById(l.get("_lifelines")),sequence:o.getElementById(l.get("_sequence")),notes:o.getElementById(l.get("_notes")),inline:o.getElementById(l.get("_arcspans")),watermark:o.getElementById(l.get("_watermark"))},v.maxDepth=t.depth,function(t,e){x=new c.Thing(e&&e.hscale),function(t,e){t.arcRowHeight=38,t.arcGradient=0,t.wordWrapArcs=!1,e.arcgradient&&(t.arcRowHeight=parseInt(e.arcgradient,10)+38,t.arcGradient=parseInt(e.arcgradient,10)+0),t.wordWrapArcs=Boolean(e.wordwraparcs)}(t,e)}(v,t.options)}(o,e,i,n||{}),function(t){var e,r,n;_(t.entities,0,t.options),b.clear(x.getDims().height,v.arcRowHeight),e=t.arcs,r=t.entities,n=t.options,w=[],k(r,"arcrow",v.arcRowHeight,b.get(-1).y).forEach((function(t){v.layers.lifeline.appendChild(t)})),function(t,e,r){var n=0;t.forEach((function(t,o){t.every((function(t){return t.isVirtual}))?b.set(o,Math.max(b.get(o).height,A(t,e,r))):(b.set(o,Math.max(b.get(o).height,A(t,e,r)),n),n++)}))}(e,r,n),e.forEach((function(t,e){!function(t,e,r,n){var o="arcrow",i=[];t.forEach((function(t){var u={};switch(a.default(t.kind)){case"empty":u=L(t,b.get(e).y),"..."===t.kind&&(o="arcrowomit"),i.push({layer:v.layers.sequence,element:u});break;case"box":u=M(x.getOAndD(t.from,t.to),t,b.get(e).y,n),i.push({title:t.title,layer:v.layers.notes,element:u});break;case"inline_expression":u=S(t,b.get(e).y),i.push({layer:v.layers.notes,element:u}),w.push({arc:t,rownum:e});break;default:u=C(t,r,i,e,n)}})),k(r,o,b.get(e).height,b.get(e).y).forEach((function(t){v.layers.lifeline.appendChild(t)})),i.forEach((function(t){t.element&&(t.title&&t.element.appendChild(m.createTitle(t.title)),t.layer.appendChild(t.element))}))}(t,e,r,n)})),w.forEach((function(t){var e,r,n,o;v.layers.inline.appendChild((e=t,r=b.get(t.rownum).y,n=b.get(e.rownum).y,o=b.get(e.rownum+e.arc.numberofrows+1).y-n,e.arc.label="",function(t,e,r,n){var o=2*v.maxDepth*s.default.LINE_WIDTH,i=t.to-t.from+x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-o,a=t.from-(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-o)/2,u=2*(v.maxDepth-e.depth)*s.default.LINE_WIDTH;return m.createRect({width:i+2*u,height:r||v.arcRowHeight-2*s.default.LINE_WIDTH,x:a-u,y:n},{class:"box inline_expression "+e.kind,color:e.linecolor,bgColor:e.textbgcolor})}(x.getOAndD(e.arc.from,e.arc.to),e.arc,o,r)))})),v.mirrorEntitiesOnBottom&&function(t,e){var r=b.getLast().y+(b.getLast().height+v.arcRowHeight)/2;k(t,"arcrow",v.arcRowHeight,r).forEach((function(t){v.layers.lifeline.appendChild(t)})),_(t,r+v.arcRowHeight/2,e)}(t.entities,t.options)}(o),function(t){var e,r,n=function(t){var e=g.determineDepthCorrection(t.depth,s.default.LINE_WIDTH),r=b.getLast(),n={width:t.entities.length*x.getDims().interEntitySpacing+e,height:Boolean(v.mirrorEntitiesOnBottom)?2*x.getDims().height+r.y+r.height+6:r.y+r.height/2+6,horizontaltransform:(x.getDims().interEntitySpacing+e-x.getDims().width)/2,autoscale:!!t.options&&!!t.options.width&&"auto"===t.options.width,verticaltransform:3,scale:1};return n.x=0-n.horizontaltransform,n.y=0-n.verticaltransform,n}(t);e=n,(r=v.document.getElementById(l.get("_background")))&&r.appendChild(m.createRect(e,{class:"bglayer"})),function(t){var e=v.document.getElementById(l.get()),r=v.document.getElementById(l.get("_body"));r&&e&&(r.setAttribute("transform","translate("+t.horizontaltransform+","+t.verticaltransform+") scale("+t.scale+","+t.scale+")"),t.autoscale&&!0===t.autoscale?m.updateSVG(e,{width:"100%",height:"100%",viewBox:"0 0 "+t.width.toString()+" "+t.height.toString()}):m.updateSVG(e,{width:t.width.toString(),height:t.height.toString(),viewBox:"0 0 "+t.width.toString()+" "+t.height.toString()}))}(n=function(t,e){return t.watermark&&function(t,e){v.layers.watermark.appendChild(m.createDiagonalText(t,e,"watermark"))}(t.watermark,e),t.width&&"auto"!==t.width&&(e=g.scaleCanvasToWidth(t.width,e)),e}(t.options,n))}(o),y.webkitNamespaceBugWorkaround(i.innerHTML)}},631:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(596)),a=n(r(791)),u=n(r(866)),s=o(r(622)),c=o(r(683)),l=o(r(930));function d(t,e){return e&&t.setAttribute("style","fill:"+e+";"),t}function f(t,e,r,n,o){return function(t,e){return function(t,e){return"box"===i.default(t)&&e}(t,e.wordwrapboxes)||function(t,e){return"entity"===t&&e}(t,e.wordwrapentities)||function(t,e){return"box"!==i.default(t)&&"entity"!==t&&e}(t,e.wordwraparcs)||void 0===t}(e,o)?a.default(t,function(t,e){var r=Math.abs(t);return r<=160?r/(e/12*8):r<=320?r/(e/12*6.4):r<=480?r/(e/12*5.9):r/(e/12*5.6)}(r,n)):t.split("\\n")}e.createLabel=function(t,e,r,n){var o=c.createGroup(n);if(r=r||{},t.label){var i=e.x+e.width/2,a=function(t,e){return e.alignAbove&&t.forEach((function(){t.push("")})),e.alignAround&&1===t.length&&t.push(""),t}(f(t.label,t.kind,e.width,u.default.FONT_SIZE,r),r),h=function(t,e,r){return r.alignAround?e.y-(t.length-1)/2*(l.calculateTextHeight()+u.default.LINE_WIDTH+1):e.y-(t.length-1)/2*(l.calculateTextHeight()+1)}(a,e,r);a.forEach((function(e,n){if(""!==e){var a=function(t,e,r,n,o,i){var a,f,h,p=r+(o+1/4)*l.calculateTextHeight(),g=function(t,e){var r=t,n=s.getClass(r),o=s.getAggregateClass(r);return n===o?n+e:o+e+n+e}(n.kind,"-text ");return i.alignLeft&&(g+="anchor-start "),i.alignAround&&(p=r+(o+1/4)*(l.calculateTextHeight()+u.default.LINE_WIDTH)),a=d(function(t,e,r,n,o){var i=0===e?{class:n,url:o.url,id:o.id,idurl:o.idurl}:{class:n,url:o.url};return c.createText(t,r,i)}(t,o,{x:e,y:p},g,n),n.textcolor),f=n.url,h=n.textcolor,d(a,f&&!h?"blue":h)}(e,i,h,t,n,r);r.ownBackground&&o.appendChild((f=a,p=t.textbgcolor,g=c.createRect(l.getBBox(f),{class:"label-text-background"}),p&&g.setAttribute("style","fill:"+p+"; stroke:"+p+";"),g)),o.appendChild(a)}var f,p,g;h++}))}return o},e.splitLabel=f},525:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=n(r(683)),a=o(r(866)),u=r(22),s={};function c(t,e,r){var n=i.createDefs();return n.appendChild(function(t,e){var r=s.createElement("style");return r.setAttribute("type","text/css"),r.appendChild(s.createTextNode(function(t,e){return(r=d(t.additionalTemplate)||{},n=t.styleAdditions,(r.cssBefore||"")+u.baseTemplate+(r.cssAfter||"")+(n||"")).replace(/<%=fontSize%>/g,a.default.FONT_SIZE).replace(/<%=lineWidth%>/g,a.default.LINE_WIDTH).replace(/<%=id%>/g,e);var r,n}(t,e))),r}(r,t)),function(t,e){return e.forEach((function(e){"method"===e.type?t.appendChild(i.createMarkerPolygon(e.name,e.path,e.color)):t.appendChild(i.createMarkerPath(e.name,e.path,e.color))})),t}(n,e)}function l(t){return i.init(t.document,{LINE_WIDTH:a.default.LINE_WIDTH,FONT_SIZE:a.default.FONT_SIZE}),t.document}function d(t){return u.namedStyles.find((function(e){return e.name===t}))}e.init=l,e.bootstrap=function(t,e,r,n,o){s=l(t);var a,u,f=i.createSVG(r,r,function(t){var e="",r=d(t.additionalTemplate);return Boolean(r)&&(e=r.renderMagic),e}(o));return Boolean(o.source)&&f.appendChild(function(t,e){var r=i.createDesc();return r.appendChild(t.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n"+e)),r}(t,o.source)),f.appendChild(c(r,n,o)),f.appendChild((a=r,(u=i.createGroup(a+"_body")).appendChild(i.createGroup(a+"_background")),u.appendChild(i.createGroup(a+"_arcspans")),u.appendChild(i.createGroup(a+"_lifelines")),u.appendChild(i.createGroup(a+"_sequence")),u.appendChild(i.createGroup(a+"_notes")),u.appendChild(i.createGroup(a+"_watermark")),u)),e.appendChild(f),s}},173:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(465));e.scaleCanvasToWidth=function(t,e){var r=o.default(e);return r.scale=t/r.width,r.width*=r.scale,r.height*=r.scale,r.horizontaltransform*=r.scale,r.verticaltransform*=r.scale,r.x=0-r.horizontaltransform,r.y=0-r.verticaltransform,r},e.determineDepthCorrection=function(t,e){return t?2*(t+1)*e*2:0},e.determineArcXTo=function(t,e,r){return"-x"===t?e+3/4*(r-e):r}},621:(t,e)=>{"use strict";e.__esModule=!0;var r=[],n=0,o=0;function i(t){return r[t]?r[t]:{y:n+1.5*o+t*o,height:o,realRowNumber:r.length-1}}function a(){return i(r.length-1)}e.get=i,e.getLast=a,e.clear=function(t,e){r=[],n=t,o=e},e.getByRealRowNumber=function(t){var e=r.find((function(e){return e.realRowNumber===t}));return void 0===e&&(e=a()),e},e.set=function(t,e,n){void 0===n&&(n=-1);var o=i(t-1);r[t]={y:o.y+(o.height+e)/2,height:e,realRowNumber:n}}},431:(t,e)=>{"use strict";e.__esModule=!0,e.SVGNS="http://www.w3.org/2000/svg",e.XLINKNS="http://www.w3.org/1999/xlink";var r={};function n(t,e,r){return Boolean(r)&&t.setAttribute(e,r),t}function o(t,e,r,n){return Boolean(n)&&t.setAttributeNS(e,r,n),t}function i(t,e){return Object.keys(e||{}).forEach((function(r){n(t,r,e[r])})),t}e.setAttribute=n,e.setAttributeNS=o,e.setAttributes=i,e.setAttributesNS=function(t,e,r){return Object.keys(r||{}).forEach((function(n){o(t,e,n,r[n])})),t},e.createElement=function(t,n){return i(r.createElementNS(e.SVGNS,t),n)},e.createTextNode=function(t){return r.createTextNode(t)},e.init=function(t){r=t}},710:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t){return 0-360*Math.atan(t.height/t.width)/(2*Math.PI)}},683:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var o=n(r(718)),i=n(r(652)),a=n(r(282)),u=o,s={};e.init=function(t,e){i.init(t),s=Object.assign({LINE_WIDTH:2,FONT_SIZE:12},e)},e.createSVG=function(t,e,r){return u=function(t){return Boolean(t)?"wobbly"===t?a:o:u}(r),i.createSVG(t,e)},e.updateSVG=i.updateSVG,e.createTitle=i.createTitle,e.createDesc=i.createDesc,e.createDefs=i.createDefs,e.createTSpan=i.createTSpan,e.createRect=function(t,e){return u.createRect(t,e)},e.createRBox=function(t,e){return u.createRBox(t,e)},e.createABox=function(t,e){return u.createABox(t,e)},e.createNote=function(t,e){return u.createNote(t,e)},e.createEdgeRemark=function(t,e){return u.createEdgeRemark(t,{class:e.class,color:e.color,bgColor:e.bgColor,foldSize:e.foldSize,lineWidth:s.LINE_WIDTH})},e.createText=i.createText,e.createDiagonalText=i.createDiagonalText,e.createLine=function(t,e){return Boolean(e)&&Boolean(e.doubleLine)?(e.lineWidth||(e.lineWidth=s.LINE_WIDTH),u.createDoubleLine(t,e)):u.createSingleLine(t,e)},e.createUTurn=i.createUTurn,e.createGroup=i.createGroup,e.createMarkerPath=i.createMarkerPath,e.createMarkerPolygon=i.createMarkerPolygon},103:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t,e){return e?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Math.round(t)}},718:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var o=n(r(652)),i=n(r(344));e.createDoubleLine=function(t,e){var r=e.lineWidth||1,n=r,a=e?e.class:"",u=i.getDirection(t),s=i.determineEndCorrection(t,a,r),c=i.determineStartCorrection(t,a,r),l=(t.xTo-t.xFrom+s-c).toString(),d=(t.yTo-t.yFrom).toString(),f=o.pathPoint2String("l",u.signX,u.dy),h=o.pathPoint2String("l",l,d);return o.createPath(o.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*u.dy)+f+o.pathPoint2String("M",t.xFrom+c,t.yFrom-n)+h+o.pathPoint2String("M",t.xFrom+c,t.yFrom+n)+h+o.pathPoint2String("M",t.xTo-u.signX,t.yTo+7.5*r*u.dy)+f,e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),i=n.toString(10);return o.createPath(o.pathPoint2String("M",t.x,t.y)+o.pathPoint2String("l",t.width-n,0)+o.pathPoint2String("l",0,i)+o.pathPoint2String("l",i,0)+o.pathPoint2String("m",-i,-i)+o.pathPoint2String("l",i,i)+o.pathPoint2String("l",0,t.height-n)+o.pathPoint2String("l",-t.width,0)+o.pathPoint2String("l",0,-t.height)+"z",e)},e.createRBox=function(t,e){var r=Object.assign({rx:6,ry:6},e);return o.createRect(t,r)},e.createABox=function(t,e){return o.createPath(o.pathPoint2String("M",t.x,t.y+t.height/2)+o.pathPoint2String("l",3,-t.height/2)+o.pathPoint2String("l",t.width-6,0)+o.pathPoint2String("l",3,t.height/2)+o.pathPoint2String("l",-3,t.height/2)+o.pathPoint2String("l",-(t.width-6),0)+"z",e)},e.createEdgeRemark=function(t,e){var r=e&&e.foldSize?e.foldSize:7,n=Object.assign({class:null,color:null,bgColor:null},e);return o.createPath(o.pathPoint2String("M",t.x,t.y)+o.pathPoint2String("l",t.width,0)+o.pathPoint2String("l",0,t.height-r)+o.pathPoint2String("l",-r,r)+o.pathPoint2String("l",-(t.width-r),0),n)},e.createSingleLine=o.createSingleLine,e.createRect=o.createRect},652:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=n(r(431)),a=o(r(710)),u=o(r(103));function s(t){return u.default(t.x,2).toString()+","+u.default(t.y,2).toString()+" "}function c(t,e,r){return t+s({x:e,y:r})}function l(t,e,r,n){return i.createElement("marker",{orient:r,id:t,class:e,viewBox:Boolean(n)?n:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}function d(t,e){var r=i.createElement("tspan"),n=i.createTextNode(t);return r.appendChild(n),e?function(t,e){var r=i.createElement("a");return i.setAttributesNS(r,i.XLINKNS,{"xlink:href":t,"xlink:title":t}),r.appendChild(e),r}(e,r):r}function f(t,e,r){var n=Object.assign({class:null,url:null,id:null,idurl:null},r),o=i.createElement("text",{x:u.default(e.x,2).toString(),y:u.default(e.y,2).toString(),class:n.class});if(o.appendChild(d(t,n.url)),n.id){var a=d(" ["+n.id+"]",n.idurl);a.setAttribute("style","vertical-align:text-top;font-size:0.7em;text-anchor:start;"),o.appendChild(a)}return o}function h(t,e){var r=Object.assign({class:null,style:null,color:null,bgColor:null},e);return p(i.createElement("path",{d:t,class:r.class,style:r.style}),r.color,r.bgColor)}function p(t,e,r){var n="";return r&&(n+="fill:"+r+";"),e&&(n+="stroke:"+e+";"),i.setAttribute(t,"style",n)}e.point2String=s,e.pathPoint2String=c,e.createTSpan=d,e.createText=f,e.createPath=h,e.createSingleLine=function(t,e){return i.createElement("line",{x1:u.default(t.xFrom,2).toString(),y1:u.default(t.yFrom,2).toString(),x2:u.default(t.xTo,2).toString(),y2:u.default(t.yTo,2).toString(),class:e?e.class:null})},e.createRect=function(t,e){var r=Object.assign({class:null,color:null,bgColor:null,rx:null,ry:null},e);return p(i.createElement("rect",{width:u.default(t.width,2),height:u.default(t.height,2),x:u.default(t.x,2),y:u.default(t.y,2),rx:u.default(r.rx,2),ry:u.default(r.ry,2),class:r.class}),r.color,r.bgColor)},e.createUTurn=function(t,e,r){var n=Object.assign({class:null,dontHitHome:!1,lineWidth:1},r),o=n.dontHitHome?t.x+7.5*n.lineWidth:t.x;return h(c("M",t.x,t.y-t.height/2)+c("C",t.x+t.width,t.y-7.5*n.lineWidth/2)+s({x:t.x+t.width,y:e+0})+s({x:o,y:e}),{class:n.class})},e.createGroup=function(t,e){return i.createElement("g",{id:t,class:e})},e.createMarkerPath=function(t,e,r){var n=l(t,"arrow-marker","auto");return n.appendChild(h(e,{class:"arrow-style",style:"stroke-dasharray:100,1;stroke:"+r||0})),n},e.createMarkerPolygon=function(t,e,r){var n=l(t,"arrow-marker","auto");return n.appendChild(i.createElement("polygon",{points:e,class:"arrow-style",stroke:r||"black",fill:r||"black"})),n},e.createTitle=function(t){var e=i.createElement("title"),r=i.createTextNode(t);return e.appendChild(r),e},e.createDiagonalText=function(t,e,r){return i.setAttributes(f(t,{x:e.width/2,y:e.height/2},{class:r}),{transform:"rotate("+u.default(a.default(e),2).toString()+" "+u.default(e.width/2,2).toString()+" "+u.default(e.height/2,2).toString()+")"})},e.createDesc=function(){return i.createElement("desc")},e.createDefs=function(){return i.createElement("defs")},e.createSVG=function(t,e){return i.createElement("svg",{version:"1.1",id:t,class:e,xmlns:i.SVGNS,"xmlns:xlink":i.XLINKNS,width:"0",height:"0"})},e.init=i.init,e.updateSVG=i.setAttributes},344:(t,e)=>{"use strict";e.__esModule=!0,e.determineStartCorrection=function(t,e,r){var n=0;return!e.includes("nodi")&&e.includes("bidi")&&(n=t.xTo>t.xFrom?7.5*r:-7.5*r),n},e.determineEndCorrection=function(t,e,r){var n=0;return e.includes("nodi")||(n=t.xTo>t.xFrom?-7.5*r:7.5*r),n},e.getDirection=function(t){var e=t.xTo>t.xFrom?1:-1;return{signX:e,signY:t.yTo>t.yFrom?1:-1,dy:e*(t.yTo-t.yFrom)/(t.xTo-t.xFrom)}}},441:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var o=n(r(652)),i=n(r(344)),a=r(913);e.renderNotePathString=function(t,e){return o.pathPoint2String("M",t.x,t.y)+a.line2CurveString({xFrom:t.x,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+o.pathPoint2String("L",t.x+t.width-e,t.y)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+e})+o.pathPoint2String("L",t.x+t.width,t.y+e)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+t.width,t.y+t.height)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height})+o.pathPoint2String("L",t.x,t.y+t.height)+a.line2CurveString({xFrom:t.x,yFrom:t.y+t.height,xTo:t.x,yTo:t.y})+o.pathPoint2String("L",t.x,t.y)+"z"},e.renderNoteCornerString=function(t,e){return o.pathPoint2String("M",t.x+t.width-e,t.y)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y+e})+o.pathPoint2String("L",t.x+t.width-e,t.y+e)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+e})+o.pathPoint2String("L",t.x+t.width,t.y+e)},e.abox2CurveString=function(t,e){return o.pathPoint2String("M",t.x,t.y+t.height/2)+a.line2CurveString({xFrom:t.x,yFrom:t.y+t.height/2,xTo:t.x+e,yTo:t.y})+o.pathPoint2String("L",t.x+e,t.y)+a.line2CurveString({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+o.pathPoint2String("L",t.x+t.width-e,t.y)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height/2})+o.pathPoint2String("L",t.x+t.width,t.y+t.height/2)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+t.height/2,xTo:t.x+t.width-e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+e,t.y+t.height)+a.line2CurveString({xFrom:t.x+e,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height/2})+"z"},e.rbox2CurveString=function(t,e){return o.pathPoint2String("M",t.x,t.y+e)+a.points2CurveString([{controlX:t.x,controlY:t.y,x:t.x+e,y:t.y}])+a.line2CurveString({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+o.pathPoint2String("L",t.x+t.width-e,t.y)+a.points2CurveString([{controlX:t.x+t.width,controlY:t.y,x:t.x+t.width,y:t.y+e}])+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height-e})+o.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+a.points2CurveString([{controlX:t.x+t.width,controlY:t.y+t.height,x:t.x+t.width-e,y:t.y+t.height}])+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+e,t.y+t.height)+a.points2CurveString([{controlX:t.x,controlY:t.y+t.height,x:t.x,y:t.y+t.height-e}])+a.line2CurveString({xFrom:t.x,yFrom:t.y+t.height-e,xTo:t.x,yTo:t.y+e})+"z"},e.doubleLine2CurveString=function(t,e){var r=e.lineWidth||1,n=r,u=e?e.class:"",s=i.getDirection(t),c=i.determineEndCorrection(t,u,r),l=i.determineStartCorrection(t,u,r);return o.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*s.dy)+o.pathPoint2String("l",s.signX,s.dy)+o.pathPoint2String("M",t.xFrom+l,t.yFrom-n)+a.line2CurveString({xFrom:t.xFrom+l,yFrom:t.yFrom-n,xTo:t.xTo+c,yTo:t.yTo-n})+o.pathPoint2String("M",t.xFrom+l,t.yFrom+n)+a.line2CurveString({xFrom:t.xFrom+l,yFrom:t.yFrom+n,xTo:t.xTo+c,yTo:t.yTo+n})+o.pathPoint2String("M",t.xTo-s.signX,t.yTo+7.5*r*s.dy)+o.pathPoint2String("l",s.signX,s.dy)},e.edgeRemark2CurveString=function(t,e){return o.pathPoint2String("M",t.x+t.width,t.y)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height-e})+o.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+a.line2CurveString({xFrom:t.x+t.width,yFrom:t.y+t.height-e,xTo:t.x+t.width-e,yTo:t.y+t.height})+o.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+a.line2CurveString({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x-1,yTo:t.y+t.height})+o.pathPoint2String("L",t.x-1,t.y+t.height)}},913:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(103)),a=o(r(652)),u=o(r(344));function s(t){return t.map((function(t){return a.pathPoint2String("S",t.controlX,t.controlY)+" "+a.point2String(t)})).join(" ")}function c(t){var e=Math.abs(t.xTo-t.xFrom),r=Math.abs(t.yTo-t.yFrom);return Math.sqrt(e*e+r*r)}function l(t,e){var r=c(t);return r>0?Math.floor(r/e):0}function d(t){return Math.round(2*Math.random()*t)-t}function f(t,e,r){for(var n,o=[],a=l(t,e=function(t,e){if(t<=0)throw new Error("pInterval must be > 0");return Math.min(c(e),t)}(e,t)),s=u.getDirection(t),f=s.signX*Math.sqrt(Math.pow(e,2)/(1+Math.pow(s.dy,2))),h=s.signY*(Math.abs(s.dy)===1/0?e:Math.sqrt(Math.pow(s.dy,2)*Math.pow(e,2)/(1+Math.pow(s.dy,2)))),p=1;p<=a;p++)e>c({xFrom:(n={controlX:i.default(t.xFrom+(p-.5)*f+d(r),2),controlY:i.default(t.yFrom+(p-.5)*h+d(r),2),x:i.default(t.xFrom+p*f,2),y:i.default(t.yFrom+p*h,2)}).x,yFrom:n.y,xTo:t.xTo,yTo:t.yTo})&&(n.x=t.xTo,n.y=t.yTo),o.push(n);return o}e.points2CurveString=s,e.line2CurveString=function(t){return s(f(t,70,3))},e.getLineLength=c,e.getNumberOfSegments=l,e.getBetweenPoints=f},282:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=r(441),a=r(913),u=n(r(103)),s=o(r(652)),c=o(r(344));e.createSingleLine=function(t,e){void 0===e&&(e={});var r=c.getDirection(t);return s.createPath(s.pathPoint2String("M",t.xFrom,t.yFrom)+s.pathPoint2String("L",u.default(t.xFrom+r.signX*Math.sqrt(1/(1+Math.pow(r.dy,2))),2),t.yFrom+r.signY*(Math.abs(r.dy)===1/0?1:u.default(Math.sqrt(Math.pow(r.dy,2)/(1+Math.pow(r.dy,2))),2)))+a.line2CurveString(t),e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),o=s.createGroup();return o.appendChild(s.createPath(i.renderNotePathString(t,n),e)),e.bgColor="transparent",o.appendChild(s.createPath(i.renderNoteCornerString(t,n),e)),o},e.createRect=function(t,e){return s.createPath(i.rbox2CurveString(t,0),e)},e.createABox=function(t,e){return s.createPath(i.abox2CurveString(t,3),e)},e.createRBox=function(t,e){return s.createPath(i.rbox2CurveString(t,6),e)},e.createEdgeRemark=function(t,e){var r=e&&e.lineWidth||1,n=s.createGroup(),o=e&&e.foldSize?e.foldSize:7,a=e&&e.color?e.color:"black";e.color="transparent!important";var u=s.createPath(s.pathPoint2String("M",t.x,t.y+r/2)+s.pathPoint2String("L",t.x+t.width,t.y+r/2)+s.pathPoint2String("L",t.x+t.width,t.y+t.height-o)+s.pathPoint2String("L",t.x+t.width-o,t.y+t.height)+s.pathPoint2String("L",t.x,t.y+t.height)+"z",e);e.bgColor="transparent",e.color=a;var c=s.createPath(i.edgeRemark2CurveString(t,o),e);return n.appendChild(u),n.appendChild(c),n},e.createDoubleLine=function(t,e){return s.createPath(i.doubleLine2CurveString(t,e),{class:e.class})}},930:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};e.__esModule=!0;var i=n(r(773)),a=o(r(824)),u=o(r(683)),s={},c=a.get("bboxer");function l(t){return"function"==typeof t.getBBox?(e=function(t){var e=s.getElementById(c);(e=e||function(t){var e=u.createSVG(t,a.get());return s.body.appendChild(e),e}(c)).appendChild(t);var r=t.getBBox();return e.removeChild(t),r}(t),r=1e5,Math.abs(e.height)>r||Math.abs(e.width)>r?{height:0,width:0,x:0,y:0}:e):{height:15,width:15,x:2,y:2};var e,r}e.getBBox=l,e.removeRenderedSVGFromElement=function(t){a.setPrefix(t);var e=s.getElementById(a.get());if(Boolean(e)){var r=s.getElementById(t);r?r.removeChild(e):s.body.removeChild(e)}},e.init=function(t){s=t},e.calculateTextHeight=i.default((function(){return l(u.createText("ÁjyÎ9ƒ@💩",{x:0,y:0})).height})),e.webkitNamespaceBugWorkaround=function(t){return t.replace(/ xlink=/g," xmlns:xlink=").replace(/ href=/g," xlink:href=")}},367:(t,e)=>{"use strict";e.__esModule=!0,e.unescapeString=function(t){return t.replace(/\\"/g,'"')},e.escapeString=function(t){return t.replace(/\\"/g,'"').replace(/"/g,'\\"')}},791:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t,e){for(var r=0,n=[],o=0,i=0,a=0,u=0,s=t.replace(/[\t\n]+/g," ").replace(/\\n/g,"\n");u<=s.length;)u>=s.length?n.push(s.substring(o,u)):"\n"===s[u]?(r=0,a=u,n.push(s.substring(o,a)),o=a+1):r++>=e&&(-1===(a=s.substring(0,u).lastIndexOf(" "))||a{let e={defaultLanguage:"mscgen",parentElementPrefix:"mscgen_js-parent_",clickable:!1,clickURL:"https://sverweij.github.io/mscgen_js/",loadFromSrcAttribute:!1};t.exports={getConfig(){var t,r;return"undefined"!=typeof mscgen_js_config&&mscgen_js_config&&"object"==typeof mscgen_js_config&&(t=e,r=mscgen_js_config,Object.getOwnPropertyNames(r).forEach((e=>{t[e]=r[e]}))),e}}},335:(t,e,r)=>{const n=r(115);function o(t,e){let r=t.toString(),n=e-r.length;for(let t=0;to===e?t+n.applyTemplate("{char}",{char:a(r)}):t+a(r)),"")}t.exports={formatNumber:o,deHTMLize:a,renderError:function(t,e,r){let o=e?n.applyTemplate("
# ERROR on line {line}, column {col} - {message}
",{message:r,line:e.start.line,col:e.start.column}):n.applyTemplate("
# ERROR {message}
",{message:r});return`${t.split("\n").reduce(((t,r,o)=>Boolean(e)&&o===e.start.line-1?t+n.applyTemplate("{line}\n",{line:i(u(r,e.start.column-1),o+1)}):`${t+a(i(r,o+1))}\n`),o)}
`}}},865:t=>{t.exports={ajax(t,e,r){let n=new XMLHttpRequest;n.onreadystatechange=function(t){t.target.readyState===XMLHttpRequest.DONE&&(200===n.status?e(t):r(t))},n.open("GET",t),n.responseType="text";try{n.send()}catch(t){r(t)}}}},222:t=>{function e(t,e,r){return`${t.pathname}?lang=${r}&msc=${encodeURIComponent(e)}`}t.exports={toLocationString(t,r,n){let o="# source too long for an URL";return function(t,r,n){return e(t,r,n).length<4094}(t,r,n)&&(o=r),e(t,o,n)}}},115:t=>{t.exports={applyTemplate:function(t,e){let r=t;return e&&Object.keys(e).forEach((t=>{r=r.replace(new RegExp(`{${t}}`,"g"),e[t])})),r}}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{const t=r(150),e=r(779),n=r(533),o=r(916),i=r(335),a=r(865),u=r(222),s=r(115),c=Object.freeze({"text/x-mscgen":"mscgen","text/x-msgenny":"msgenny","text/x-xu":"xu"});function l(t,e){t.innerHTML=s.applyTemplate("
{string}
",{string:e})}function d(t){let e=t.getAttribute("data-mirror-entities");return!(!e||"true"!==e)}function f(t){return t.getAttribute("data-named-style")||"basic"}function h(t){return t.getAttribute("data-regular-arc-text-vertical-alignment")||"middle"}function p(r,a){let s=function(t){let e=t.getAttribute("data-language");return e||(e=o.getConfig().defaultLanguage),e}(r),c=function(r,n){let o={};try{o="msgenny"===n?e.parse(r):"json"===n?JSON.parse(r):t.parse(r)}catch(t){return t}return o}(a,s);c.entities?function(t,e,r){let i=document.getElementById(e);i.innerHTML="",!0===o.getConfig().clickable&&(i.append(function(t,e,r){let n=document.createElement("a");return n.setAttribute("href",o.getConfig().clickURL+u.toLocationString({pathname:"index.html"},t,e)),n.setAttribute("id",`${r}link`),n.setAttribute("style","text-decoration: none;"),n.setAttribute("title","click to edit in the mscgen_js interpreter"),n}(r.source,r.language,e)),e+="link"),n.clean(e,window),n.render(t,window,e,{source:r.source,additionalTemplate:r.namedStyle,mirrorEntitiesOnBottom:r.mirrorEntities,regularArcTextVerticalAlignment:r.regularArcTextVerticalAlignment})}(c,r.id,{source:a,language:s,mirrorEntities:d(r),namedStyle:f(r),regularArcTextVerticalAlignment:h(r)}):r.innerHTML=i.renderError(a,c.location,c.message)}function g(t,e){!function(t,e){t.id||(t.id=o.getConfig().parentElementPrefix+e.toString())}(t,e),t.dataset.renderedby="mscgen_js",o.getConfig().loadFromSrcAttribute&&Boolean(t.getAttribute("data-src"))?a.ajax(t.getAttribute("data-src"),(e=>{p(t,e.target.response)}),(()=>{l(t,s.applyTemplate("ERROR: Could not find or open the URL '{url}' specified in the data-src attribute.",{url:t.getAttribute("data-src")}))})):!o.getConfig().loadFromSrcAttribute&&Boolean(t.getAttribute("data-src"))?l(t,s.applyTemplate("ERROR: Won't load the chart specified in data-src='{url}', because loading from separate files is switched off in the mscgen_js configuration.

See Loading charts from separate files in the mscgen_js embedding guide how to enable it.",{url:t.getAttribute("data-src")})):p(t,t.textContent)}function b(t,e){for(const[o,i]of t.entries())n=e+o,(r=i).hasAttribute("data-renderedby")||g(r,n);var r,n}!function(){!function(){let t=document.scripts;for(const e of t)Boolean(c[e.type])&&!e.hasAttribute("data-renderedby")&&(e.insertAdjacentHTML("afterend",s.applyTemplate("{msc}",{src:e.src?s.applyTemplate("data-src='{src}' ",{src:e.src}):"",lang:c[e.type]||o.getConfig().defaultLanguage,msc:e.textContent.replace(/ docs/dependencygraph.html", "depcruise:graph:png": "depcruise -T dot -v -- src | dot -Gdpi=192 -T png | pngquant - > docs/dependencygraph.png", - "lint": "eslint src test", - "lint:fix": "eslint --fix src test", + "lint": "npm-run-all lint:eslint lint:prettier", + "lint:eslint": "eslint src test", + "lint:prettier": "prettier --check {src,test}/**/*.js *.{json,yml,md} .github", + "lint:fix": "npm-run-all lint:fix:eslint lint:fix:prettier", + "lint:fix:eslint": "eslint --fix src test", + "lint:fix:prettier": "prettier --write {src,test}/**/*.js *.{json,yml,md} .github", "scm:push": "run-p --aggregate-output scm:push:*", "scm:push:github": "run-p --aggregate-output scm:push:github:*", "scm:push:github:commits": "git push", @@ -69,23 +76,36 @@ "version": "run-s build depcruise:graph scm:stage" }, "eslintConfig": { - "extends": "standard", - "plugins": [ - "security" + "extends": [ + "moving-meadow" ], - "rules": { - "no-var": "off" + "parserOptions": { + "ecmaVersion": 2020 }, "env": { "browser": true }, + "rules": { + "complexity": [ + "warn", + 7 + ], + "sort-imports": "off", + "import/no-relative-parent-imports": "off" + }, "overrides": [ { "files": [ "test/**/*.js" ], "env": { - "mocha": true + "jest": true + }, + "rules": { + "node/global-require": "off", + "max-lines-per-function": "off", + "func-names": "off", + "no-magic-numbers": "off" } } ] diff --git a/src/embedding/config.js b/src/embedding/config.js index 8260fc7d..9ed23a3d 100644 --- a/src/embedding/config.js +++ b/src/embedding/config.js @@ -1,28 +1,31 @@ /* global mscgen_js_config */ -var gConfig = { - defaultLanguage: 'mscgen', - parentElementPrefix: 'mscgen_js-parent_', +let gConfig = { + defaultLanguage: "mscgen", + parentElementPrefix: "mscgen_js-parent_", clickable: false, - clickURL: 'https://sverweij.github.io/mscgen_js/', - loadFromSrcAttribute: false -} + clickURL: "https://sverweij.github.io/mscgen_js/", + loadFromSrcAttribute: false, +}; -function mergeConfig (pConfigBase, pConfigToMerge) { - Object.getOwnPropertyNames(pConfigToMerge).forEach(function (pAttribute) { - pConfigBase[pAttribute] = pConfigToMerge[pAttribute] - }) +function mergeConfig(pConfigBase, pConfigToMerge) { + Object.getOwnPropertyNames(pConfigToMerge).forEach((pAttribute) => { + pConfigBase[pAttribute] = pConfigToMerge[pAttribute]; + }); } module.exports = { - getConfig: function () { - if (typeof (mscgen_js_config) !== 'undefined' && mscgen_js_config && - typeof (mscgen_js_config) === 'object') { - mergeConfig(gConfig, mscgen_js_config) + getConfig() { + if ( + typeof mscgen_js_config !== "undefined" && + mscgen_js_config && + typeof mscgen_js_config === "object" + ) { + mergeConfig(gConfig, mscgen_js_config); } - return gConfig - } -} + return gConfig; + }, +}; /* eslint security/detect-object-injection: 0, camelcase: 0 */ /* We're good here with object injection stuff; the attributes are not passed from the outside */ /* diff --git a/src/embedding/error-rendering.js b/src/embedding/error-rendering.js index dfd9c1a7..46da5515 100644 --- a/src/embedding/error-rendering.js +++ b/src/embedding/error-rendering.js @@ -1,9 +1,13 @@ -var tpl = require('../utl/tpl') +const tpl = require("../utl/tpl"); + +const TPL_ERROR_LINENO = + "
# ERROR on line {line}, column {col} - {message}
"; +const TPL_ERROR = "
# ERROR {message}
"; +const TPL_MARKED_LINE = "{line}\n"; +const TPL_UNDERLINED_CHAR = + "{char}"; +const MAX_NUMBER_WIDTH = 3; -var TPL_ERR_LINENO = "
# ERROR on line {line}, column {col} - {message}
" -var TPL_ERR = "
# ERROR {message}
" -var TPL_MARKED_LINE = '{line}\n' -var TPL_UNDERLINED_CHAR = "{char}" /** * Given a Number, emits a String with that number in, left padded so the * string is pMaxWidth long. If the number doesn't fit within pMaxWidth @@ -13,28 +17,18 @@ var TPL_UNDERLINED_CHAR = "{char} * @param {number} pMaxWidth * @return {string} - the formatted number */ -function formatNumber (pNumber, pMaxWidth) { - var lRetval = pNumber.toString() - var lPosLeft = pMaxWidth - lRetval.length - for (var i = 0; i < lPosLeft; i++) { - lRetval = ' ' + lRetval +function formatNumber(pNumber, pMaxWidth) { + let lReturnValue = pNumber.toString(); + let lPosLeft = pMaxWidth - lReturnValue.length; + // eslint-disable-next-line no-plusplus + for (let lIndex = 0; lIndex < lPosLeft; lIndex++) { + lReturnValue = ` ${lReturnValue}`; } - return lRetval + return lReturnValue; } -function formatLine (pLine, pLineNo) { - return formatNumber(pLineNo, 3) + ' ' + pLine -} - -function underlineCol (pLine, pCol) { - return pLine.split('').reduce(function (pPrev, pChar, pIndex) { - if (pIndex === pCol) { - return pPrev + tpl.applyTemplate( - TPL_UNDERLINED_CHAR, { char: deHTMLize(pChar) } - ) - } - return pPrev + deHTMLize(pChar) - }, '') +function formatLine(pLine, pLineNo) { + return `${formatNumber(pLineNo, MAX_NUMBER_WIDTH)} ${pLine}`; } /** @@ -44,39 +38,56 @@ function underlineCol (pLine, pCol) { * as html. I'd rather use something standard for this, but haven't * found it yet... */ -function deHTMLize (pString) { - return pString.replace(/ { + if (pIndex === pCol) { + return ( + pPrevious + + tpl.applyTemplate(TPL_UNDERLINED_CHAR, { + char: deZALGΌtheBlackPonyLord(pChar), + }) + ); + } + return pPrevious + deZALGΌtheBlackPonyLord(pChar); + }, ""); } module.exports = { - formatNumber: formatNumber, - deHTMLize: deHTMLize, - renderError: function renderError (pSource, pErrorLocation, pMessage) { - var lErrorIntro = pErrorLocation - ? tpl.applyTemplate( - TPL_ERR_LINENO, { + formatNumber, + deHTMLize: deZALGΌtheBlackPonyLord, + renderError: function renderError(pSource, pErrorLocation, pMessage) { + let lErrorIntro = pErrorLocation + ? tpl.applyTemplate(TPL_ERROR_LINENO, { message: pMessage, line: pErrorLocation.start.line, - col: pErrorLocation.start.column + col: pErrorLocation.start.column, }) - : tpl.applyTemplate( - TPL_ERR, { - message: pMessage - } - ) + : tpl.applyTemplate(TPL_ERROR, { + message: pMessage, + }); - return pSource.split('\n').reduce(function (pPrev, pLine, pIndex) { - if (!!pErrorLocation && pIndex === (pErrorLocation.start.line - 1)) { - return pPrev + tpl.applyTemplate( - TPL_MARKED_LINE, { - line: formatLine(underlineCol(pLine, pErrorLocation.start.column - 1), pIndex + 1) - } - ) + return `${pSource.split("\n").reduce((pPrevious, pLine, pIndex) => { + if (Boolean(pErrorLocation) && pIndex === pErrorLocation.start.line - 1) { + return ( + pPrevious + + tpl.applyTemplate(TPL_MARKED_LINE, { + line: formatLine( + underlineCol(pLine, pErrorLocation.start.column - 1), + pIndex + 1 + ), + }) + ); } - return pPrev + deHTMLize(formatLine(pLine, pIndex + 1)) + '\n' - }, lErrorIntro) + '
' - } -} + return `${ + pPrevious + deZALGΌtheBlackPonyLord(formatLine(pLine, pIndex + 1)) + }\n`; + }, lErrorIntro)}
`; + }, +}; /* This file is part of mscgen_js. diff --git a/src/mscgen-inpage.js b/src/mscgen-inpage.js index e05df8b5..ffcc689b 100644 --- a/src/mscgen-inpage.js +++ b/src/mscgen-inpage.js @@ -1,232 +1,241 @@ -var mscparser = require('mscgenjs/dist/cjs/parse/xuparser') -var msgennyparser = require('mscgenjs/dist/cjs/parse/msgennyparser') -var renderast = require('mscgenjs/dist/cjs/render/graphics/renderast') - -var config = require('./embedding/config') -var errorRendering = require('./embedding/error-rendering') -var $ = require('./utl/domutl') -var exporter = require('./utl/exporter') -var tpl = require('./utl/tpl') - -var TPL_SPAN = "{msc}' -var TPL_SPAN_SRC = "data-src='{src}' " -var TPL_ERR_FILE_NOT_FOUND = - "ERROR: Could not find or open the URL '{url}' specified in the data-src attribute." -var TPL_ERR_FILE_LOADING_DISABLED = - "ERROR: Won't load the chart specified in data-src='{url}', " + - 'because loading from separate files is switched off in the mscgen_js ' + - 'configuration.

See ' + - "" + - 'Loading charts from separate files in the mscgen_js embedding ' + - 'guide how to enable it.' - -var MIME2LANG = Object.freeze({ - 'text/x-mscgen': 'mscgen', - 'text/x-msgenny': 'msgenny', - 'text/x-xu': 'xu' -}) - -start() - -function start () { - processScriptElements() - - var lClassElements = document.getElementsByClassName('mscgen_js') - renderElementArray(lClassElements, 0) - renderElementArray(document.getElementsByTagName('mscgen'), lClassElements.length) +const mscparser = require("mscgenjs/dist/cjs/parse/xuparser"); +const msgennyparser = require("mscgenjs/dist/cjs/parse/msgennyparser"); +const renderast = require("mscgenjs/dist/cjs/render/graphics/renderast"); + +const config = require("./embedding/config"); +const errorRendering = require("./embedding/error-rendering"); +const $ = require("./utl/domutl"); +const exporter = require("./utl/exporter"); +const tpl = require("./utl/tpl"); + +const TPL_SPAN = + "{msc}"; +const TPL_SPAN_SOURCE = "data-src='{src}' "; +const TPL_ERROR_FILE_NOT_FOUND = + "ERROR: Could not find or open the URL '{url}' specified in the data-src attribute."; +const TPL_ERR_FILE_LOADING_DISABLED = + "ERROR: Won't load the chart specified in data-src='{url}', " + + "because loading from separate files is switched off in the mscgen_js " + + "configuration.

See " + + "" + + "Loading charts from separate files in the mscgen_js embedding " + + "guide how to enable it."; + +const MIME2LANG = Object.freeze({ + "text/x-mscgen": "mscgen", + "text/x-msgenny": "msgenny", + "text/x-xu": "xu", +}); + +function getLanguage(pElement) { + /* the way to do it, but doesn't work in IE: + lLanguage = pElement.dataset.language; + */ + let lLanguage = pElement.getAttribute("data-language"); + if (!lLanguage) { + lLanguage = config.getConfig().defaultLanguage; + } + return lLanguage; } -function processScriptElements () { - var lScripts = document.scripts - - for (var i = 0; i < lScripts.length; i++) { - if (!!(MIME2LANG[lScripts[i].type]) && !lScripts[i].hasAttribute('data-renderedby')) { - lScripts[i].insertAdjacentHTML( - 'afterend', - tpl.applyTemplate( - TPL_SPAN, { - src: lScripts[i].src ? tpl.applyTemplate(TPL_SPAN_SRC, { src: lScripts[i].src }) : '', - lang: MIME2LANG[lScripts[i].type] || config.getConfig().defaultLanguage, - msc: lScripts[i].textContent.replace(/{string}", + { string: pString } + ); } -function processElement (pElement, pIndex) { - if (!pElement.hasAttribute('data-renderedby')) { - renderElement(pElement, pIndex) +function setElementId(pElement, pIndex) { + if (!pElement.id) { + pElement.id = config.getConfig().parentElementPrefix + pIndex.toString(); } } -function renderElementError (pElement, pString) { - pElement.innerHTML = - tpl.applyTemplate( - "
{string}
", - { string: pString } - ) -} +function renderLink(pSource, pLanguage, pId) { + let lLocation = { + pathname: "index.html", + }; -function renderElement (pElement, pIndex) { - setElementId(pElement, pIndex) - pElement.setAttribute('data-renderedby', 'mscgen_js') - if (config.getConfig().loadFromSrcAttribute && !!pElement.getAttribute('data-src')) { - $.ajax( - pElement.getAttribute('data-src'), - function onSuccess (pEvent) { - parseAndRender(pElement, pEvent.target.response) - }, - function onError () { - renderElementError( - pElement, - tpl.applyTemplate( - TPL_ERR_FILE_NOT_FOUND, - { url: pElement.getAttribute('data-src') } - ) - ) - } - ) - } else if (!config.getConfig().loadFromSrcAttribute && !!pElement.getAttribute('data-src')) { - renderElementError( - pElement, - tpl.applyTemplate( - TPL_ERR_FILE_LOADING_DISABLED, - { url: pElement.getAttribute('data-src') } - ) - ) - } else { - parseAndRender(pElement, pElement.textContent) - } + let lLink = document.createElement("a"); + lLink.setAttribute( + "href", + config.getConfig().clickURL + + exporter.toLocationString(lLocation, pSource, pLanguage) + ); + lLink.setAttribute("id", `${pId}link`); + lLink.setAttribute("style", "text-decoration: none;"); + lLink.setAttribute("title", "click to edit in the mscgen_js interpreter"); + return lLink; } -function parseAndRender (pElement, pSource) { - var lLanguage = getLanguage(pElement) - var lAST = getAST(pSource, lLanguage) +function render(pAST, pElementId, pOptions) { + // eslint-disable-next-line unicorn/prefer-query-selector + let lElement = document.getElementById(pElementId); + lElement.innerHTML = ""; - if (lAST.entities) { - render( - lAST, - pElement.id, - { - source: pSource, - language: lLanguage, - mirrorEntities: getMirrorEntities(pElement), - namedStyle: getNamedStyle(pElement), - regularArcTextVerticalAlignment: getVerticalAlignment(pElement) - } - ) - } else { - pElement.innerHTML = errorRendering.renderError(pSource, lAST.location, lAST.message) + if (config.getConfig().clickable === true) { + lElement.append(renderLink(pOptions.source, pOptions.language, pElementId)); + pElementId += "link"; } + renderast.clean(pElementId, window); + renderast.render(pAST, window, pElementId, { + source: pOptions.source, + additionalTemplate: pOptions.namedStyle, + mirrorEntitiesOnBottom: pOptions.mirrorEntities, + regularArcTextVerticalAlignment: pOptions.regularArcTextVerticalAlignment, + }); } -function renderLink (pSource, pLanguage, pId) { - var lLocation = { - pathname: 'index.html' - } +function getMirrorEntities(pElement) { + let lMirrorEntities = pElement.getAttribute("data-mirror-entities"); - var lLink = document.createElement('a') - lLink.setAttribute( - 'href', - config.getConfig().clickURL + exporter.toLocationString(lLocation, pSource, pLanguage) - ) - lLink.setAttribute('id', pId + 'link') - lLink.setAttribute('style', 'text-decoration: none;') - lLink.setAttribute('title', 'click to edit in the mscgen_js interpreter') - return lLink + if (lMirrorEntities && lMirrorEntities === "true") { + return true; + } + return false; } -function setElementId (pElement, pIndex) { - if (!pElement.id) { - pElement.id = config.getConfig().parentElementPrefix + pIndex.toString() - } +function getNamedStyle(pElement) { + return pElement.getAttribute("data-named-style") || "basic"; } -function getLanguage (pElement) { - /* the way to do it, but doesn't work in IE: - lLanguage = pElement.dataset.language; - */ - var lLanguage = pElement.getAttribute('data-language') - if (!lLanguage) { - lLanguage = config.getConfig().defaultLanguage - } - return lLanguage +function getVerticalAlignment(pElement) { + return ( + pElement.getAttribute("data-regular-arc-text-vertical-alignment") || + "middle" + ); } -function getMirrorEntities (pElement) { - var lMirrorEntities = pElement.getAttribute('data-mirror-entities') +function parseAndRender(pElement, pSource) { + let lLanguage = getLanguage(pElement); + let lAST = getAST(pSource, lLanguage); - if (lMirrorEntities && lMirrorEntities === 'true') { - return true + if (lAST.entities) { + render(lAST, pElement.id, { + source: pSource, + language: lLanguage, + mirrorEntities: getMirrorEntities(pElement), + namedStyle: getNamedStyle(pElement), + regularArcTextVerticalAlignment: getVerticalAlignment(pElement), + }); + } else { + pElement.innerHTML = errorRendering.renderError( + pSource, + lAST.location, + lAST.message + ); } - return false } -function getNamedStyle (pElement) { - return pElement.getAttribute('data-named-style') || 'basic' +function renderElement(pElement, pIndex) { + setElementId(pElement, pIndex); + pElement.dataset.renderedby = "mscgen_js"; + if ( + config.getConfig().loadFromSrcAttribute && + Boolean(pElement.getAttribute("data-src")) + ) { + $.ajax( + pElement.getAttribute("data-src"), + (pEvent) => { + parseAndRender(pElement, pEvent.target.response); + }, + () => { + renderElementError( + pElement, + tpl.applyTemplate(TPL_ERROR_FILE_NOT_FOUND, { + url: pElement.getAttribute("data-src"), + }) + ); + } + ); + } else if ( + !config.getConfig().loadFromSrcAttribute && + Boolean(pElement.getAttribute("data-src")) + ) { + renderElementError( + pElement, + tpl.applyTemplate(TPL_ERR_FILE_LOADING_DISABLED, { + url: pElement.getAttribute("data-src"), + }) + ); + } else { + parseAndRender(pElement, pElement.textContent); + } } -function getVerticalAlignment (pElement) { - return pElement.getAttribute('data-regular-arc-text-vertical-alignment') || 'middle' +function processElement(pElement, pIndex) { + if (!pElement.hasAttribute("data-renderedby")) { + renderElement(pElement, pIndex); + } } -function getAST (pText, pLanguage) { - var lAST = {} - try { - if (pLanguage === 'msgenny') { - lAST = msgennyparser.parse(pText) - } else if (pLanguage === 'json') { - lAST = JSON.parse(pText) - } else { - lAST = mscparser.parse(pText) +function processScriptElements() { + let lScripts = document.scripts; + + for (const lScript of lScripts) { + if ( + Boolean(MIME2LANG[lScript.type]) && + !lScript.hasAttribute("data-renderedby") + ) { + lScript.insertAdjacentHTML( + "afterend", + tpl.applyTemplate(TPL_SPAN, { + src: lScript.src + ? tpl.applyTemplate(TPL_SPAN_SOURCE, { src: lScript.src }) + : "", + lang: MIME2LANG[lScript.type] || config.getConfig().defaultLanguage, + msc: lScript.textContent.replace(/ { + lReturnValue = lReturnValue.replace( + new RegExp(`{${pKey}}`, "g"), + pReplacementPairs[pKey] + ); + }); } - return lRetval - } -} + return lReturnValue; + }, +}; /* eslint security/detect-non-literal-regexp: 0, security/detect-object-injection: 0 */ /* This file is part of mscgen_js. diff --git a/test/embedding/config.spec.js b/test/embedding/config.spec.js index 94ad049e..87ad778a 100644 --- a/test/embedding/config.spec.js +++ b/test/embedding/config.spec.js @@ -1,46 +1,43 @@ -'use strict' -const chai = require('chai') -const config = require('../../src/embedding/config') +const chai = require("chai"); +const config = require("../../src/embedding/config"); -const expect = chai.expect +const expect = chai.expect; -function getGlobal () { - if (typeof global === 'undefined') { - return window +function getGlobal() { + if (typeof global === "undefined") { + return window; } else { - return global + return global; } } -describe('embedding/embed-config', function () { - describe('#getConfig - merges with the global mscgen_js_config', function () { - it('should return the default configuration when no global mscgen_js_config is present', function () { - expect(config.getConfig()).to.deep.equal( - { - defaultLanguage: 'mscgen', - parentElementPrefix: 'mscgen_js-parent_', - clickable: false, - clickURL: 'https://sverweij.github.io/mscgen_js/', - loadFromSrcAttribute: false - }) - }) +describe("embedding/embed-config", function () { + describe("#getConfig - merges with the global mscgen_js_config", function () { + it("should return the default configuration when no global mscgen_js_config is present", function () { + expect(config.getConfig()).to.deep.equal({ + defaultLanguage: "mscgen", + parentElementPrefix: "mscgen_js-parent_", + clickable: false, + clickURL: "https://sverweij.github.io/mscgen_js/", + loadFromSrcAttribute: false, + }); + }); - it('should return a changed configuration when a mscgen_js_config is present', function () { - const lGlobal = getGlobal() + it("should return a changed configuration when a mscgen_js_config is present", function () { + const lGlobal = getGlobal(); lGlobal.mscgen_js_config = { clickable: true, - clickURL: 'http://localhost/' - } - expect(config.getConfig()).to.deep.equal( - { - defaultLanguage: 'mscgen', - parentElementPrefix: 'mscgen_js-parent_', - clickable: true, - clickURL: 'http://localhost/', - loadFromSrcAttribute: false - }) - delete lGlobal.mscgen_js_config - }) - }) -}) + clickURL: "http://localhost/", + }; + expect(config.getConfig()).to.deep.equal({ + defaultLanguage: "mscgen", + parentElementPrefix: "mscgen_js-parent_", + clickable: true, + clickURL: "http://localhost/", + loadFromSrcAttribute: false, + }); + delete lGlobal.mscgen_js_config; + }); + }); +}); diff --git a/test/embedding/error-rendering.spec.js b/test/embedding/error-rendering.spec.js index f339fc6c..44dbfc1a 100644 --- a/test/embedding/error-rendering.spec.js +++ b/test/embedding/error-rendering.spec.js @@ -1,66 +1,78 @@ -const chai = require('chai') -const errorRendering = require('../../src/embedding/error-rendering') +const chai = require("chai"); +const errorRendering = require("../../src/embedding/error-rendering"); -const expect = chai.expect -const assert = chai.assert +const expect = chai.expect; +const assert = chai.assert; /* eslint no-undefined: 0 */ -describe('embedding/error-rendering', function () { - describe('#renderError', function () { - it('should render error and source without underline when error location not provided', function () { +describe("embedding/error-rendering", function () { + describe("#renderError", function () { + it("should render error and source without underline when error location not provided", function () { expect( - errorRendering.renderError('Just a source\nwith two lines', undefined, 'just a message') + errorRendering.renderError( + "Just a source\nwith two lines", + undefined, + "just a message" + ) ).to.equal( "
# ERROR just a message
1 Just a source\n 2 with two lines\n
" - ) - }) + ); + }); - it('should render error and source with underline when error location provided', function () { + it("should render error and source with underline when error location provided", function () { const lErrorLocation = { start: { line: 2, - column: 6 - } - } - expect(errorRendering.renderError('Just a source\nwith two lines', lErrorLocation, 'just a message')).to.equal( + column: 6, + }, + }; + expect( + errorRendering.renderError( + "Just a source\nwith two lines", + lErrorLocation, + "just a message" + ) + ).to.equal( "
# ERROR on line 2, column 6 - just a message
1 Just a source\n 2 with two lines\n
" - ) - }) - }) + ); + }); + }); - describe('#deHTMLize() - ', function () { - it('replaces < with <', function () { - expect(errorRendering.deHTMLize('<')).to.equal('<') - }) - it('replaces all < with <', function () { - expect(errorRendering.deHTMLize('hello')).to.equal('<bla>hello</bla>') - }) - it('leaves strings without < alone', function () { + describe("#deHTMLize() - ", function () { + it("replaces < with <", function () { + expect(errorRendering.deHTMLize("<")).to.equal("<"); + }); + it("replaces all < with <", function () { + expect(errorRendering.deHTMLize("hello")).to.equal( + "<bla>hello</bla>" + ); + }); + it("leaves strings without < alone", function () { expect( errorRendering.deHTMLize( - 'In Dutch, Huey, Louis and Dewy translate => Kwik, Kwek en Kwak' + "In Dutch, Huey, Louis and Dewy translate => Kwik, Kwek en Kwak" ) ).to.equal( - 'In Dutch, Huey, Louis and Dewy translate => Kwik, Kwek en Kwak' - ) - }) - }) + "In Dutch, Huey, Louis and Dewy translate => Kwik, Kwek en Kwak" + ); + }); + }); - describe('#formatNumber() - ', function () { - it('puts two spaces in front of a single digit on max width 3', function () { - assert.equal(errorRendering.formatNumber(7, 3), ' 7') - }) - it('puts no spaces in front of a single digit on max width 1', function () { - assert.equal(errorRendering.formatNumber(7, 1), '7') - }) - it('puts no spaces in front of a single digit on max width 0', function () { - assert.equal(errorRendering.formatNumber(7, 0), '7') - }) - it('puts no spaces in front of a single digit on max width < 0', function () { - assert.equal(errorRendering.formatNumber(7, -8), '7') - }) - it('puts no spaces in front of a three digit number on max width 3', function () { - assert.equal(errorRendering.formatNumber(481, 3), '481') - }) - }) -}) + describe("#formatNumber() - ", function () { + it("puts two spaces in front of a single digit on max width 3", function () { + assert.equal(errorRendering.formatNumber(7, 3), " 7"); + }); + it("puts no spaces in front of a single digit on max width 1", function () { + assert.equal(errorRendering.formatNumber(7, 1), "7"); + }); + it("puts no spaces in front of a single digit on max width 0", function () { + assert.equal(errorRendering.formatNumber(7, 0), "7"); + }); + it("puts no spaces in front of a single digit on max width < 0", function () { + assert.equal(errorRendering.formatNumber(7, -8), "7"); + }); + it("puts no spaces in front of a three digit number on max width 3", function () { + assert.equal(errorRendering.formatNumber(481, 3), "481"); + }); + }); +}); diff --git a/test/utl/domutl.spec.js b/test/utl/domutl.spec.js index 33880a72..27bac5af 100644 --- a/test/utl/domutl.spec.js +++ b/test/utl/domutl.spec.js @@ -1,27 +1,34 @@ -'use strict' -const chai = require('chai') -const $ = require('../../src/utl/domutl') +const chai = require("chai"); +const $ = require("../../src/utl/domutl"); -const expect = chai.expect +const expect = chai.expect; -describe('utl/domutl (browser only)', function () { - describe('ajax', function () { - it('should complain when presented with an invalid url ', function () { - $.ajax('invalid url', function ok () { - expect('run').to.equal('not run') - }, function notok (pArg) { - expect(pArg instanceof Error).to.be.true() - }) - }) - it('should run the ok function when presented with a valid url ', function () { - $.ajax('./utl/t_domutl.js', function ok (pEvent) { - expect(pEvent instanceof Event).to.be.true() - expect(pEvent.target.response).to.contain( - 'expect(pEvent.target.response).to.contain' - ) - }, function notok () { - expect('run').to.equal('not run') - }) - }) - }) -}) +describe("utl/domutl (browser only)", function () { + describe("ajax", function () { + it("should complain when presented with an invalid url ", function () { + $.ajax( + "invalid url", + () => { + expect("run").to.equal("not run"); + }, + (pArgument) => { + expect(pArgument instanceof Error).to.be.true(); + } + ); + }); + it("should run the ok function when presented with a valid url ", function () { + $.ajax( + "./utl/t_domutl.js", + (pEvent) => { + expect(pEvent instanceof Event).to.be.true(); + expect(pEvent.target.response).to.contain( + "expect(pEvent.target.response).to.contain" + ); + }, + () => { + expect("run").to.equal("not run"); + } + ); + }); + }); +}); diff --git a/test/utl/exporter.spec.js b/test/utl/exporter.spec.js index c6c7f670..33808b6c 100644 --- a/test/utl/exporter.spec.js +++ b/test/utl/exporter.spec.js @@ -1,40 +1,43 @@ -const chai = require('chai') -const exporter = require('../../src/utl/exporter') +const chai = require("chai"); +const exporter = require("../../src/utl/exporter"); -const assert = chai.assert -const gMsc = 'msc{a[label="💩"],b[label="序"],c [label="💩"]; a => b[label="things"], c => b;}' +const assert = chai.assert; +const MSC = + 'msc{a[label="💩"],b[label="序"],c [label="💩"]; a => b[label="things"], c => b;}'; -describe('utl/exporter', function () { - describe('#toLocationString', function () { - it('without extra parameters', function () { +describe("utl/exporter", function () { + describe("#toLocationString", function () { + it("without extra parameters", function () { const lLocation = { - protocol: 'http', - host: 'localhost', - pathname: 'mscgen_js/index.html' - } + protocol: "http", + host: "localhost", + pathname: "mscgen_js/index.html", + }; assert.equal( - exporter.toLocationString(lLocation, gMsc, 'mscgen'), - 'mscgen_js/index.html?lang=mscgen&msc=msc%7Ba%5Blabel%3D%22%F0%9F%92%A9%22%5D%2Cb%5Blabel%3D%22%E5%BA%8F%22%5D%2Cc%20%5Blabel%3D%22%F0%9F%92%A9%22%5D%3B%20a%20%3D%3E%20b%5Blabel%3D%22things%22%5D%2C%20c%20%3D%3E%20b%3B%7D' - ) - }) - it('with a source that is too big (> 4k)', function () { + exporter.toLocationString(lLocation, MSC, "mscgen"), + "mscgen_js/index.html?lang=mscgen&msc=msc%7Ba%5Blabel%3D%22%F0%9F%92%A9%22%5D%2Cb%5Blabel%3D%22%E5%BA%8F%22%5D%2Cc%20%5Blabel%3D%22%F0%9F%92%A9%22%5D%3B%20a%20%3D%3E%20b%5Blabel%3D%22things%22%5D%2C%20c%20%3D%3E%20b%3B%7D" + ); + }); + it("with a source that is too big (> 4k)", function () { const lLocation = { - protocol: 'http', - host: 'localhost', - pathname: 'mscgen_js/index.html' - } - const l100wString = '# 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890' - let lBig = l100wString - for (let i = 0; i < 40; i++) { - lBig += l100wString + protocol: "http", + host: "localhost", + pathname: "mscgen_js/index.html", + }; + const lL100WString = + "# 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890"; + let lBig = lL100WString; + // eslint-disable-next-line no-plusplus + for (let lIndex = 0; lIndex < 40; lIndex++) { + lBig += lL100WString; } assert.equal( - exporter.toLocationString(lLocation, lBig, 'mscgen'), - 'mscgen_js/index.html?lang=mscgen&msc=%23%20source%20too%20long%20for%20an%20URL' - ) - }) - }) -}) + exporter.toLocationString(lLocation, lBig, "mscgen"), + "mscgen_js/index.html?lang=mscgen&msc=%23%20source%20too%20long%20for%20an%20URL" + ); + }); + }); +}); /* eslint max-len: 0 */ /* we can't really make these two long strings shorter without compromising readability */ diff --git a/test/utl/tpl.spec.js b/test/utl/tpl.spec.js index 73d25101..cadf89b1 100644 --- a/test/utl/tpl.spec.js +++ b/test/utl/tpl.spec.js @@ -1,88 +1,84 @@ -const chai = require('chai') -const tpl = require('../../src/utl/tpl') +const chai = require("chai"); +const tpl = require("../../src/utl/tpl"); -const expect = chai.expect +const expect = chai.expect; const CASES = [ { - title: 'leaves strings without variables alone', + title: "leaves strings without variables alone", input: { - template: 'template with no variables', + template: "template with no variables", args: { - avariable: 'replacement value' - } + avariable: "replacement value", + }, }, - expected: 'template with no variables' + expected: "template with no variables", }, { - title: 'replaces a variable', + title: "replaces a variable", input: { - template: 'value of avariable: {avariable}', + template: "value of avariable: {avariable}", args: { - avariable: 'good value' - } + avariable: "good value", + }, }, - expected: 'value of avariable: good value' + expected: "value of avariable: good value", }, { - title: 'replaces a variable when it occurs more than once', + title: "replaces a variable when it occurs more than once", input: { - template: 'first time: {avariable}, second time: {avariable}', + template: "first time: {avariable}, second time: {avariable}", args: { - avariable: 'swell value' - } + avariable: "swell value", + }, }, - expected: 'first time: swell value, second time: swell value' + expected: "first time: swell value, second time: swell value", }, { - title: 'does not barf on empty replacement value', + title: "does not barf on empty replacement value", input: { - template: 'expected between |{stuff-here}| to be empty', + template: "expected between |{stuff-here}| to be empty", args: { - 'stuff-here': '' - } + "stuff-here": "", + }, }, - expected: 'expected between || to be empty' + expected: "expected between || to be empty", }, { - title: 'does not barf on unused arguments', + title: "does not barf on unused arguments", input: { template: "unused stuff won't appear used {used}", args: { - unused: 'should not appear', - used: 'will appear' - } + unused: "should not appear", + used: "will appear", + }, }, - expected: "unused stuff won't appear used will appear" + expected: "unused stuff won't appear used will appear", }, { - title: 'does not barf on empty arguments', + title: "does not barf on empty arguments", input: { template: "unused stuff won't appear used {used}", - args: {} + args: {}, }, - expected: "unused stuff won't appear used {used}" + expected: "unused stuff won't appear used {used}", }, { - title: 'does not barf on unexisting arguments', + title: "does not barf on unexisting arguments", input: { - template: "unused stuff won't appear used {used}" + template: "unused stuff won't appear used {used}", }, - expected: "unused stuff won't appear used {used}" - } - -] + expected: "unused stuff won't appear used {used}", + }, +]; -describe('utl/tpl', function () { - describe('#applyTemplate', function () { - CASES.forEach(function (pCase) { +describe("utl/tpl", function () { + describe("#applyTemplate", function () { + CASES.forEach((pCase) => { it(pCase.title, function () { expect( - tpl.applyTemplate( - pCase.input.template, - pCase.input.args - ) - ).to.equal(pCase.expected) - }) - }) - }) -}) + tpl.applyTemplate(pCase.input.template, pCase.input.args) + ).to.equal(pCase.expected); + }); + }); + }); +});