From 29bf1a829502d020eed2a6ca12e8fa7dac07566e Mon Sep 17 00:00:00 2001 From: sverweij Date: Sun, 26 Jun 2016 23:21:13 +0200 Subject: [PATCH] [upgrade] mscgenjs-inpage --- package.json | 2 +- src/mscgen-inpage.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index dd680899..0bf885a1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "codemirror": "5.16.0", "requirejs": "2.2.0", "mscgenjs": "1.4.2", - "mscgenjs-inpage": "1.4.1" + "mscgenjs-inpage": "1.4.2" }, "devDependencies": { "chai": "3.5.0", diff --git a/src/mscgen-inpage.js b/src/mscgen-inpage.js index 2da43e2c..dac6ca5e 100644 --- a/src/mscgen-inpage.js +++ b/src/mscgen-inpage.js @@ -30,7 +30,7 @@ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -!function(){var e,t,r;!function(n){function o(e,t){return x.call(e,t)}function i(e,t){var r,n,o,i,a,c,s,u,l,p,f,d,h=t&&t.split("/"),g=y.map,m=g&&g["*"]||{};if(e){for(e=e.split("/"),a=e.length-1,y.nodeIdCompat&&C.test(e[a])&&(e[a]=e[a].replace(C,"")),"."===e[0].charAt(0)&&h&&(d=h.slice(0,h.length-1),e=d.concat(e)),l=0;l0&&(e.splice(l-1,2),l-=2)}e=e.join("/")}if((h||m)&&g){for(r=e.split("/"),l=r.length;l>0;l-=1){if(n=r.slice(0,l).join("/"),h)for(p=h.length;p>0;p-=1)if(o=g[h.slice(0,p).join("/")],o&&(o=o[n])){i=o,c=l;break}if(i)break;!s&&m&&m[n]&&(s=m[n],u=l)}!i&&s&&(i=s,c=u),i&&(r.splice(0,c,i),e=r.join("/"))}return e}function a(e,t){return function(){var r=w.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),d.apply(n,r.concat([e,t]))}}function c(e){return function(t){return i(t,e)}}function s(e){return function(t){m[e]=t}}function u(e){if(o(b,e)){var t=b[e];delete b[e],v[e]=!0,f.apply(n,t)}if(!o(m,e)&&!o(v,e))throw new Error("No "+e);return m[e]}function l(e){var t,r=e?e.indexOf("!"):-1;return r>-1&&(t=e.substring(0,r),e=e.substring(r+1,e.length)),[t,e]}function p(e){return function(){return y&&y.config&&y.config[e]||{}}}var f,d,h,g,m={},b={},y={},v={},x=Object.prototype.hasOwnProperty,w=[].slice,C=/\.js$/;h=function(e,t){var r,n=l(e),o=n[0];return e=n[1],o&&(o=i(o,t),r=u(o)),o?e=r&&r.normalize?r.normalize(e,c(t)):i(e,t):(e=i(e,t),n=l(e),o=n[0],e=n[1],o&&(r=u(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:r}},g={require:function(e){return a(e)},exports:function(e){var t=m[e];return"undefined"!=typeof t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:p(e)}}},f=function(e,t,r,i){var c,l,p,f,d,y,x=[],w=typeof r;if(i=i||e,"undefined"===w||"function"===w){for(t=!t.length&&r.length?["require","exports","module"]:t,d=0;dr;)n=e.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return ai[t]=o,o}function i(e,t){var r=o(e),n=o(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function a(e){ci>oi||(oi>ci&&(ci=oi,si=[]),si.push(e))}function c(e,r,n,o){function i(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?a.slice(0,-1).join(", ")+" or "+a[e.length-1]:a[0],o=t?'"'+r(t)+'"':"end of input","Expected "+n+" but "+o+" found."}return null!==r&&i(r),new t(null!==e?e:a(r,n),r,n,o)}function s(){var t,r,n,o,i,c,s,p,f,d;return t=oi,r=$(),r!==we?(n=u(),n!==we?(o=$(),o!==we?(123===e.charCodeAt(oi)?(i=_e,oi++):(i=we,0===ui&&a(Ae)),i!==we?(c=$(),c!==we?(s=l(),s!==we?(p=$(),p!==we?(125===e.charCodeAt(oi)?(f=Ee,oi++):(f=we,0===ui&&a(Le)),f!==we?(d=$(),d!==we?(ii=t,r=je(r,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t}function u(){var t;return e.substr(oi,3).toLowerCase()===Se?(t=e.substr(oi,3),oi+=3):(t=we,0===ui&&a(Ie)),t===we&&(e.substr(oi,2).toLowerCase()===Te?(t=e.substr(oi,2),oi+=2):(t=we,0===ui&&a(Ne))),t}function l(){var e,t,r,n,o;return e=oi,t=oi,r=p(),r!==we&&(ii=t,r=De(r)),t=r,t===we&&(t=null),t!==we?(r=oi,n=d(),n!==we&&(ii=r,n=Be(n)),r=n,r===we&&(r=null),r!==we?(n=oi,o=g(),o!==we&&(ii=n,o=Oe(o)),n=o,n===we&&(n=null),n!==we?(t=[t,r,n],e=t):(oi=e,e=we)):(oi=e,e=we)):(oi=e,e=we),e}function p(){var t,r,n,o,i,c;for(t=oi,r=oi,n=[],o=oi,i=f(),i!==we?(44===e.charCodeAt(oi)?(c=He,oi++):(c=we,0===ui&&a(Re)),c!==we?(ii=o,i=We(i),o=i):(oi=o,o=we)):(oi=o,o=we);o!==we;)n.push(o),o=oi,i=f(),i!==we?(44===e.charCodeAt(oi)?(c=He,oi++):(c=we,0===ui&&a(Re)),c!==we?(ii=o,i=We(i),o=i):(oi=o,o=we)):(oi=o,o=we);return n!==we?(o=oi,i=f(),i!==we?(59===e.charCodeAt(oi)?(c=Fe,oi++):(c=we,0===ui&&a(Me)),c!==we?(ii=o,i=We(i),o=i):(oi=o,o=we)):(oi=o,o=we),o!==we?(n=[n,o],r=n):(oi=r,r=we)):(oi=r,r=we),r!==we&&(ii=t,r=Ge(r)),t=r}function f(){var t,r,n,o,i,c,s,u;return ui++,t=oi,r=$(),r!==we?(e.substr(oi,6).toLowerCase()===qe?(n=e.substr(oi,6),oi+=6):(n=we,0===ui&&a(ze)),n===we&&(e.substr(oi,11).toLowerCase()===Ue?(n=e.substr(oi,11),oi+=11):(n=we,0===ui&&a(Pe))),n!==we?(o=$(),o!==we?(61===e.charCodeAt(oi)?(i=Ve,oi++):(i=we,0===ui&&a($e)),i!==we?(c=$(),c!==we?(s=K(),s!==we?(u=$(),u!==we?(ii=t,r=Ke(n,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(e.substr(oi,5).toLowerCase()===Ze?(n=e.substr(oi,5),oi+=5):(n=we,0===ui&&a(Je)),n!==we?(o=$(),o!==we?(61===e.charCodeAt(oi)?(i=Ve,oi++):(i=we,0===ui&&a($e)),i!==we?(c=$(),c!==we?(s=ne(),s!==we?(u=$(),u!==we?(ii=t,r=Ke(n,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(e.substr(oi,12).toLowerCase()===Qe?(n=e.substr(oi,12),oi+=12):(n=we,0===ui&&a(Ye)),n!==we?(o=$(),o!==we?(61===e.charCodeAt(oi)?(i=Ve,oi++):(i=we,0===ui&&a($e)),i!==we?(c=$(),c!==we?(s=ee(),s!==we?(u=$(),u!==we?(ii=t,r=et(n,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(e.substr(oi,9).toLowerCase()===tt?(n=e.substr(oi,9),oi+=9):(n=we,0===ui&&a(rt)),n!==we?(o=$(),o!==we?(61===e.charCodeAt(oi)?(i=Ve,oi++):(i=we,0===ui&&a($e)),i!==we?(c=$(),c!==we?(s=B(),s!==we?(u=$(),u!==we?(ii=t,r=Ke(n,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)))),ui--,t===we&&(r=we,0===ui&&a(Xe)),t}function d(){var t,r,n,o,i,c;for(t=oi,r=oi,n=[],o=oi,i=h(),i!==we?(44===e.charCodeAt(oi)?(c=He,oi++):(c=we,0===ui&&a(Re)),c!==we?(ii=o,i=nt(i),o=i):(oi=o,o=we)):(oi=o,o=we);o!==we;)n.push(o),o=oi,i=h(),i!==we?(44===e.charCodeAt(oi)?(c=He,oi++):(c=we,0===ui&&a(Re)),c!==we?(ii=o,i=nt(i),o=i):(oi=o,o=we)):(oi=o,o=we);return n!==we?(o=oi,i=h(),i!==we?(59===e.charCodeAt(oi)?(c=Fe,oi++):(c=we,0===ui&&a(Me)),c!==we?(ii=o,i=nt(i),o=i):(oi=o,o=we)):(oi=o,o=we),o!==we?(n=[n,o],r=n):(oi=r,r=we)):(oi=r,r=we),r!==we&&(ii=t,r=ot(r)),t=r}function h(){var t,r,n,o,i,c,s,u;return ui++,t=oi,r=$(),r!==we?(n=B(),n!==we?(o=$(),o!==we?(i=oi,91===e.charCodeAt(oi)?(c=at,oi++):(c=we,0===ui&&a(ct)),c!==we?(s=T(),s!==we?(93===e.charCodeAt(oi)?(u=st,oi++):(u=we,0===ui&&a(ut)),u!==we?(ii=i,c=lt(n,s),i=c):(oi=i,i=we)):(oi=i,i=we)):(oi=i,i=we),i===we&&(i=null),i!==we?(c=$(),c!==we?(ii=t,r=pt(n,i),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(n=R(),n!==we?(o=$(),o!==we?(i=oi,91===e.charCodeAt(oi)?(c=at,oi++):(c=we,0===ui&&a(ct)),c!==we?(s=T(),s!==we?(93===e.charCodeAt(oi)?(u=st,oi++):(u=we,0===ui&&a(ut)),u!==we?(ii=i,c=lt(n,s),i=c):(oi=i,i=we)):(oi=i,i=we)):(oi=i,i=we),i===we&&(i=null),i!==we?(c=$(),c!==we?(ii=t,r=ft(n,i),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)),ui--,t===we&&(r=we,0===ui&&a(it)),t}function g(){var t,r,n,o,i;if(t=[],r=oi,n=m(),n!==we?(o=$(),o!==we?(59===e.charCodeAt(oi)?(i=Fe,oi++):(i=we,0===ui&&a(Me)),i!==we?(ii=r,n=dt(n),r=n):(oi=r,r=we)):(oi=r,r=we)):(oi=r,r=we),r!==we)for(;r!==we;)t.push(r),r=oi,n=m(),n!==we?(o=$(),o!==we?(59===e.charCodeAt(oi)?(i=Fe,oi++):(i=we,0===ui&&a(Me)),i!==we?(ii=r,n=dt(n),r=n):(oi=r,r=we)):(oi=r,r=we)):(oi=r,r=we);else t=we;return t}function m(){var t,r,n,o,i,c,s;for(t=oi,r=oi,n=[],o=oi,i=b(),i!==we?(c=$(),c!==we?(44===e.charCodeAt(oi)?(s=He,oi++):(s=we,0===ui&&a(Re)),s!==we?(ii=o,i=dt(i),o=i):(oi=o,o=we)):(oi=o,o=we)):(oi=o,o=we);o!==we;)n.push(o),o=oi,i=b(),i!==we?(c=$(),c!==we?(44===e.charCodeAt(oi)?(s=He,oi++):(s=we,0===ui&&a(Re)),s!==we?(ii=o,i=dt(i),o=i):(oi=o,o=we)):(oi=o,o=we)):(oi=o,o=we);return n!==we?(o=oi,i=b(),i!==we&&(ii=o,i=ht(i)),o=i,o!==we?(n=[n,o],r=n):(oi=r,r=we)):(oi=r,r=we),r!==we&&(ii=t,r=gt(r)),t=r}function b(){var e;return e=y(),e===we&&(e=C()),e}function y(){var t,r,n,o,i,c;return t=oi,r=oi,n=v(),n!==we&&(ii=r,n=dt(n)),r=n,r===we&&(r=oi,n=w(),n!==we&&(ii=r,n=dt(n)),r=n,r===we&&(r=oi,n=x(),n!==we&&(ii=r,n=dt(n)),r=n)),r!==we?(n=oi,91===e.charCodeAt(oi)?(o=at,oi++):(o=we,0===ui&&a(ct)),o!==we?(i=T(),i!==we?(93===e.charCodeAt(oi)?(c=st,oi++):(c=we,0===ui&&a(ut)),c!==we?(ii=n,o=mt(r,i),n=o):(oi=n,n=we)):(oi=n,n=we)):(oi=n,n=we),n===we&&(n=null),n!==we?(ii=t,r=bt(r,n),t=r):(oi=t,t=we)):(oi=t,t=we),t}function v(){var e,t,r,n;return e=oi,t=$(),t!==we?(r=k(),r!==we?(n=$(),n!==we?(ii=e,t=yt(r),e=t):(oi=e,e=we)):(oi=e,e=we)):(oi=e,e=we),e}function x(){var e,t,r,n;return e=oi,t=$(),t!==we?(r=_(),r!==we?(n=$(),n!==we?(ii=e,t=yt(r),e=t):(oi=e,e=we)):(oi=e,e=we)):(oi=e,e=we),e}function w(){var t,r,n,o,i,c,s,u;return t=oi,r=$(),r!==we?(n=H(),n!==we?(o=$(),o!==we?(i=A(),i!==we?(c=$(),c!==we?(s=H(),s!==we?(u=$(),u!==we?(ii=t,r=vt(n,i,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(42===e.charCodeAt(oi)?(n=xt,oi++):(n=we,0===ui&&a(wt)),n!==we?(o=$(),o!==we?(i=j(),i!==we?(c=$(),c!==we?(s=H(),s!==we?(u=$(),u!==we?(ii=t,r=Ct(i,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(n=H(),n!==we?(o=$(),o!==we?(i=L(),i!==we?(c=$(),c!==we?(42===e.charCodeAt(oi)?(s=xt,oi++):(s=we,0===ui&&a(wt)),s!==we?(u=$(),u!==we?(ii=t,r=kt(n,i),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t===we&&(t=oi,r=$(),r!==we?(n=H(),n!==we?(o=$(),o!==we?(i=E(),i!==we?(c=$(),c!==we?(42===e.charCodeAt(oi)?(s=xt,oi++):(s=we,0===ui&&a(wt)),s!==we?(u=$(),u!==we?(ii=t,r=kt(n,i),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)))),t}function C(){var t,r,n,o,i,c,s,u,l,p,f,d,h,m,b,y;return t=oi,r=$(),r!==we?(n=H(),n!==we?(o=$(),o!==we?(i=I(),i!==we?(c=$(),c!==we?(s=H(),s!==we?(u=$(),u!==we?(l=oi,91===e.charCodeAt(oi)?(p=at,oi++):(p=we,0===ui&&a(ct)),p!==we?(f=T(),f!==we?(93===e.charCodeAt(oi)?(d=st,oi++):(d=we,0===ui&&a(ut)),d!==we?(ii=l,p=_t(n,i,s,f),l=p):(oi=l,l=we)):(oi=l,l=we)):(oi=l,l=we),l===we&&(l=null),l!==we?(p=$(),p!==we?(123===e.charCodeAt(oi)?(f=_e,oi++):(f=we,0===ui&&a(Ae)),f!==we?(d=$(),d!==we?(h=g(),h===we&&(h=null),h!==we?(m=$(),m!==we?(125===e.charCodeAt(oi)?(b=Ee,oi++):(b=we,0===ui&&a(Le)),b!==we?(y=$(),y!==we?(ii=t,r=At(n,i,s,l,h),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t}function k(){var t,r;return ui++,e.substr(oi,3)===Lt?(t=Lt,oi+=3):(t=we,0===ui&&a(jt)),t===we&&(e.substr(oi,3)===St?(t=St,oi+=3):(t=we,0===ui&&a(It))),ui--,t===we&&(r=we,0===ui&&a(Et)),t}function _(){var t,r;return ui++,e.substr(oi,3)===Nt?(t=Nt,oi+=3):(t=we,0===ui&&a(Dt)),ui--,t===we&&(r=we,0===ui&&a(Tt)),t}function A(){var e,t;return e=oi,t=E(),t===we&&(t=L(),t===we&&(t=j(),t===we&&(t=S()))),t!==we&&(ii=e,t=Bt(t)),e=t}function E(){var t,r;return ui++,e.substr(oi,2)===Ht?(t=Ht,oi+=2):(t=we,0===ui&&a(Rt)),t===we&&(e.substr(oi,3)===Wt?(t=Wt,oi+=3):(t=we,0===ui&&a(Ft)),t===we&&(e.substr(oi,2)===Mt?(t=Mt,oi+=2):(t=we,0===ui&&a(Gt)),t===we&&(e.substr(oi,5)===Xt?(t=Xt,oi+=5):(t=we,0===ui&&a(qt)),t===we&&(e.substr(oi,3)===zt?(t=zt,oi+=3):(t=we,0===ui&&a(Ut)),t===we&&(e.substr(oi,2)===Pt?(t=Pt,oi+=2):(t=we,0===ui&&a(Vt)),t===we&&(e.substr(oi,4)===$t?(t=$t,oi+=4):(t=we,0===ui&&a(Kt)),t===we&&(e.substr(oi,2)===Zt?(t=Zt,oi+=2):(t=we,0===ui&&a(Jt)),t===we&&(e.substr(oi,3)===Qt?(t=Qt,oi+=3):(t=we,0===ui&&a(Yt)))))))))),ui--,t===we&&(r=we,0===ui&&a(Ot)),t}function L(){var t,r;return ui++,e.substr(oi,2)===tr?(t=tr,oi+=2):(t=we,0===ui&&a(rr)),t===we&&(e.substr(oi,3)===nr?(t=nr,oi+=3):(t=we,0===ui&&a(or)),t===we&&(e.substr(oi,2)===ir?(t=ir,oi+=2):(t=we,0===ui&&a(ar)),t===we&&(e.substr(oi,2)===cr?(t=cr,oi+=2):(t=we,0===ui&&a(sr)),t===we&&(e.substr(oi,2)===ur?(t=ur,oi+=2):(t=we,0===ui&&a(lr)),t===we&&(e.substr(oi,2).toLowerCase()===pr?(t=e.substr(oi,2),oi+=2):(t=we,0===ui&&a(fr))))))),ui--,t===we&&(r=we,0===ui&&a(er)),t}function j(){var t,r;return ui++,e.substr(oi,2)===hr?(t=hr,oi+=2):(t=we,0===ui&&a(gr)),t===we&&(e.substr(oi,3)===mr?(t=mr,oi+=3):(t=we,0===ui&&a(br)),t===we&&(e.substr(oi,2)===yr?(t=yr,oi+=2):(t=we,0===ui&&a(vr)),t===we&&(e.substr(oi,2)===xr?(t=xr,oi+=2):(t=we,0===ui&&a(wr)),t===we&&(e.substr(oi,2)===Cr?(t=Cr,oi+=2):(t=we,0===ui&&a(kr)),t===we&&(e.substr(oi,2).toLowerCase()===_r?(t=e.substr(oi,2),oi+=2):(t=we,0===ui&&a(Ar))))))),ui--,t===we&&(r=we,0===ui&&a(dr)),t}function S(){var t,r;return ui++,e.substr(oi,4).toLowerCase()===Lr?(t=e.substr(oi,4),oi+=4):(t=we,0===ui&&a(jr)),t===we&&(e.substr(oi,4).toLowerCase()===Sr?(t=e.substr(oi,4),oi+=4):(t=we,0===ui&&a(Ir)),t===we&&(e.substr(oi,4).toLowerCase()===Tr?(t=e.substr(oi,4),oi+=4):(t=we,0===ui&&a(Nr)),t===we&&(e.substr(oi,3).toLowerCase()===Dr?(t=e.substr(oi,3),oi+=3):(t=we,0===ui&&a(Br))))),ui--,t===we&&(r=we,0===ui&&a(Er)),t}function I(){var t,r;return ui++,t=oi,e.substr(oi,3).toLowerCase()===Hr?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(Rr)),r===we&&(e.substr(oi,4).toLowerCase()===Wr?(r=e.substr(oi,4),oi+=4):(r=we,0===ui&&a(Fr)),r===we&&(e.substr(oi,3).toLowerCase()===Mr?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(Gr)),r===we&&(e.substr(oi,5).toLowerCase()===Xr?(r=e.substr(oi,5),oi+=5):(r=we,0===ui&&a(qr)),r===we&&(e.substr(oi,3).toLowerCase()===zr?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(Ur)),r===we&&(e.substr(oi,3).toLowerCase()===Pr?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(Vr)),r===we&&(e.substr(oi,6).toLowerCase()===$r?(r=e.substr(oi,6),oi+=6):(r=we,0===ui&&a(Kr)),r===we&&(e.substr(oi,3).toLowerCase()===Zr?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(Jr)),r===we&&(e.substr(oi,8).toLowerCase()===Qr?(r=e.substr(oi,8),oi+=8):(r=we,0===ui&&a(Yr)),r===we&&(e.substr(oi,6).toLowerCase()===en?(r=e.substr(oi,6),oi+=6):(r=we,0===ui&&a(tn)),r===we&&(e.substr(oi,8).toLowerCase()===rn?(r=e.substr(oi,8),oi+=8):(r=we,0===ui&&a(nn)),r===we&&(e.substr(oi,6).toLowerCase()===on?(r=e.substr(oi,6),oi+=6):(r=we,0===ui&&a(an)),r===we&&(e.substr(oi,4).toLowerCase()===cn?(r=e.substr(oi,4),oi+=4):(r=we,0===ui&&a(sn)),r===we&&(e.substr(oi,3).toLowerCase()===un?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(ln)),r===we&&(e.substr(oi,3).toLowerCase()===pn?(r=e.substr(oi,3),oi+=3):(r=we,0===ui&&a(fn)))))))))))))))),r!==we&&(ii=t,r=dn(r)),t=r,ui--,t===we&&(r=we,0===ui&&a(Or)),t}function T(){var t,r,n,o,i,c;for(t=oi,r=oi,n=[],o=oi,i=N(),i!==we?(44===e.charCodeAt(oi)?(c=He,oi++):(c=we,0===ui&&a(Re)),c!==we?(ii=o,i=dt(i),o=i):(oi=o,o=we)):(oi=o,o=we);o!==we;)n.push(o),o=oi,i=N(),i!==we?(44===e.charCodeAt(oi)?(c=He,oi++):(c=we,0===ui&&a(Re)),c!==we?(ii=o,i=dt(i),o=i):(oi=o,o=we)):(oi=o,o=we);return n!==we?(o=oi,i=N(),i!==we&&(ii=o,i=dt(i)),o=i,o!==we?(n=[n,o],r=n):(oi=r,r=we)):(oi=r,r=we),r!==we&&(ii=t,r=Ge(r)),t=r}function N(){var t,r,n,o,i,c,s,u;return t=oi,r=$(),r!==we?(n=D(),n!==we?(o=$(),o!==we?(61===e.charCodeAt(oi)?(i=Ve,oi++):(i=we,0===ui&&a($e)),i!==we?(c=$(),c!==we?(s=H(),s!==we?(u=$(),u!==we?(ii=t,r=hn(n,s),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t}function D(){var t,r;return ui++,e.substr(oi,5).toLowerCase()===mn?(t=e.substr(oi,5),oi+=5):(t=we,0===ui&&a(bn)),t===we&&(e.substr(oi,5).toLowerCase()===yn?(t=e.substr(oi,5),oi+=5):(t=we,0===ui&&a(vn)),t===we&&(e.substr(oi,2).toLowerCase()===xn?(t=e.substr(oi,2),oi+=2):(t=we,0===ui&&a(wn)),t===we&&(e.substr(oi,3).toLowerCase()===Cn?(t=e.substr(oi,3),oi+=3):(t=we,0===ui&&a(kn)),t===we&&(e.substr(oi,9).toLowerCase()===_n?(t=e.substr(oi,9),oi+=9):(t=we,0===ui&&a(An)),t===we&&(e.substr(oi,10).toLowerCase()===En?(t=e.substr(oi,10),oi+=10):(t=we,0===ui&&a(Ln)),t===we&&(e.substr(oi,9).toLowerCase()===jn?(t=e.substr(oi,9),oi+=9):(t=we,0===ui&&a(Sn)),t===we&&(e.substr(oi,10).toLowerCase()===In?(t=e.substr(oi,10),oi+=10):(t=we,0===ui&&a(Tn)),t===we&&(e.substr(oi,11).toLowerCase()===Nn?(t=e.substr(oi,11),oi+=11):(t=we,0===ui&&a(Dn)),t===we&&(e.substr(oi,12).toLowerCase()===Bn?(t=e.substr(oi,12),oi+=12):(t=we,0===ui&&a(On)),t===we&&(e.substr(oi,12).toLowerCase()===Hn?(t=e.substr(oi,12),oi+=12):(t=we,0===ui&&a(Rn)),t===we&&(e.substr(oi,13).toLowerCase()===Wn?(t=e.substr(oi,13),oi+=13):(t=we,0===ui&&a(Fn)),t===we&&(e.substr(oi,12).toLowerCase()===Mn?(t=e.substr(oi,12),oi+=12):(t=we,0===ui&&a(Gn)),t===we&&(e.substr(oi,13).toLowerCase()===Xn?(t=e.substr(oi,13),oi+=13):(t=we,0===ui&&a(qn)),t===we&&(e.substr(oi,14).toLowerCase()===zn?(t=e.substr(oi,14),oi+=14):(t=we,0===ui&&a(Un)),t===we&&(e.substr(oi,15).toLowerCase()===Pn?(t=e.substr(oi,15),oi+=15):(t=we,0===ui&&a(Vn)),t===we&&(e.substr(oi,7).toLowerCase()===$n?(t=e.substr(oi,7),oi+=7):(t=we,0===ui&&a(Kn)))))))))))))))))),ui--,t===we&&(r=we,0===ui&&a(gn)),t}function B(){var t,r,n,o;return ui++,t=oi,34===e.charCodeAt(oi)?(r=Jn,oi++):(r=we,0===ui&&a(Qn)),r!==we?(n=O(),n!==we?(34===e.charCodeAt(oi)?(o=Jn,oi++):(o=we,0===ui&&a(Qn)),o!==we?(ii=t,r=Yn(n),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),ui--,t===we&&(r=we,0===ui&&a(Zn)),t}function O(){var t,r,n,o;for(t=[],r=oi,n=oi,ui++,34===e.charCodeAt(oi)?(o=Jn,oi++):(o=we,0===ui&&a(Qn)),ui--,o===we?n=void 0:(oi=n,n=we),n!==we?(e.substr(oi,2)===eo?(o=eo,oi+=2):(o=we,0===ui&&a(to)),o===we&&(e.length>oi?(o=e.charAt(oi),oi++):(o=we,0===ui&&a(ro))),o!==we?(ii=r,n=no(o),r=n):(oi=r,r=we)):(oi=r,r=we);r!==we;)t.push(r),r=oi,n=oi,ui++,34===e.charCodeAt(oi)?(o=Jn,oi++):(o=we,0===ui&&a(Qn)),ui--,o===we?n=void 0:(oi=n,n=we),n!==we?(e.substr(oi,2)===eo?(o=eo,oi+=2):(o=we,0===ui&&a(to)),o===we&&(e.length>oi?(o=e.charAt(oi),oi++):(o=we,0===ui&&a(ro))),o!==we?(ii=r,n=no(o),r=n):(oi=r,r=we)):(oi=r,r=we);return t}function H(){var e,t;return ui++,e=R(),e===we&&(e=B()),ui--,e===we&&(t=we,0===ui&&a(oo)),e}function R(){var t,r,n;if(t=oi,r=[],io.test(e.charAt(oi))?(n=e.charAt(oi),oi++):(n=we,0===ui&&a(ao)),n!==we)for(;n!==we;)r.push(n),io.test(e.charAt(oi))?(n=e.charAt(oi),oi++):(n=we,0===ui&&a(ao));else r=we;return r!==we&&(ii=t,r=co(r)),t=r}function W(){var t,r;return ui++,t=oi,uo.test(e.charAt(oi))?(r=e.charAt(oi),oi++):(r=we,0===ui&&a(lo)),r!==we&&(ii=t,r=no(r)),t=r,ui--,t===we&&(r=we,0===ui&&a(so)),t}function F(){var t,r;return ui++,t=oi,fo.test(e.charAt(oi))?(r=e.charAt(oi),oi++):(r=we,0===ui&&a(ho)),r!==we&&(ii=t,r=no(r)),t=r,ui--,t===we&&(r=we,0===ui&&a(po)),t}function M(){var t;return e.substr(oi,2)===go?(t=go,oi+=2):(t=we,0===ui&&a(mo)),t}function G(){var t;return e.substr(oi,2)===bo?(t=bo,oi+=2):(t=we,0===ui&&a(yo)),t}function X(){var t,r,n;return t=oi,r=oi,ui++,e.substr(oi,2)===bo?(n=bo,oi+=2):(n=we,0===ui&&a(yo)),ui--,n===we?r=void 0:(oi=r,r=we),r!==we?(e.length>oi?(n=e.charAt(oi),oi++):(n=we,0===ui&&a(ro)),n!==we?(ii=t,r=no(n),t=r):(oi=t,t=we)):(oi=t,t=we),t}function q(){var e,t,r,n;if(e=oi,t=M(),t!==we){for(r=[],n=X();n!==we;)r.push(n),n=X();r!==we?(n=G(),n!==we?(ii=e,t=vo(t,r,n),e=t):(oi=e,e=we)):(oi=e,e=we)}else oi=e,e=we;return e}function z(){var t;return e.substr(oi,2)===xo?(t=xo,oi+=2):(t=we,0===ui&&a(wo)),t===we&&(35===e.charCodeAt(oi)?(t=Co,oi++):(t=we,0===ui&&a(ko))),t}function U(){var t;return _o.test(e.charAt(oi))?(t=e.charAt(oi),oi++):(t=we,0===ui&&a(Ao)),t}function P(){var e,t,r,n;if(e=oi,t=z(),t!==we){for(r=[],n=U();n!==we;)r.push(n),n=U();r!==we?(ii=e,t=Eo(t,r),e=t):(oi=e,e=we)}else oi=e,e=we;return e}function V(){var e,t;return ui++,e=P(),e===we&&(e=q()),ui--,e===we&&(t=we,0===ui&&a(Lo)),e}function $(){var e,t;for(e=[],t=W(),t===we&&(t=F(),t===we&&(t=V()));t!==we;)e.push(t),t=W(),t===we&&(t=F(),t===we&&(t=V()));return e}function K(){var e,t;return ui++,e=oi,t=Z(),t!==we&&(ii=e,t=So(t)),e=t,e===we&&(e=oi,t=J(),t!==we&&(ii=e,t=Io(t)),e=t),ui--,e===we&&(t=we,0===ui&&a(jo)),e}function Z(){var t,r,n,o;return t=oi,34===e.charCodeAt(oi)?(r=Jn,oi++):(r=we,0===ui&&a(Qn)),r!==we?(n=J(),n!==we?(34===e.charCodeAt(oi)?(o=Jn,oi++):(o=we,0===ui&&a(Qn)),o!==we?(ii=t,r=To(n),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t}function J(){var e;return e=Y(),e===we&&(e=Q()),e}function Q(){var t,r,n;if(t=oi,r=[],No.test(e.charAt(oi))?(n=e.charAt(oi),oi++):(n=we,0===ui&&a(Do)),n!==we)for(;n!==we;)r.push(n),No.test(e.charAt(oi))?(n=e.charAt(oi),oi++):(n=we,0===ui&&a(Do));else r=we;return r!==we&&(ii=t,r=Bo(r)),t=r}function Y(){var t,r,n,o,i;return t=oi,r=oi,n=Q(),n!==we?(46===e.charCodeAt(oi)?(o=Oo,oi++):(o=we,0===ui&&a(Ho)),o!==we?(i=Q(),i!==we?(n=[n,o,i],r=n):(oi=r,r=we)):(oi=r,r=we)):(oi=r,r=we),r!==we&&(ii=t,r=Ro(r)),t=r}function ee(){var e,t;return ui++,e=oi,t=te(),t!==we&&(ii=e,t=Fo(t)),e=t,e===we&&(e=oi,t=re(),t!==we&&(ii=e,t=Mo(t)),e=t),ui--,e===we&&(t=we,0===ui&&a(Wo)),e}function te(){var t,r,n,o;return t=oi,34===e.charCodeAt(oi)?(r=Jn,oi++):(r=we,0===ui&&a(Qn)),r!==we?(n=re(),n!==we?(34===e.charCodeAt(oi)?(o=Jn,oi++):(o=we,0===ui&&a(Qn)),o!==we?(ii=t,r=So(n),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t}function re(){var t;return e.substr(oi,4).toLowerCase()===Go?(t=e.substr(oi,4),oi+=4):(t=we,0===ui&&a(Xo)),t===we&&(e.substr(oi,5).toLowerCase()===qo?(t=e.substr(oi,5),oi+=5):(t=we,0===ui&&a(zo)),t===we&&(e.substr(oi,2).toLowerCase()===Uo?(t=e.substr(oi,2),oi+=2):(t=we,0===ui&&a(Po)),t===we&&(e.substr(oi,3).toLowerCase()===Vo?(t=e.substr(oi,3),oi+=3):(t=we,0===ui&&a($o)),t===we&&(48===e.charCodeAt(oi)?(t=Ko,oi++):(t=we,0===ui&&a(Zo)),t===we&&(49===e.charCodeAt(oi)?(t=Jo,oi++):(t=we,0===ui&&a(Qo))))))),t}function ne(){var e,t;return ui++,e=oe(),e===we&&(e=ie()),ui--,e===we&&(t=we,0===ui&&a(Yo)),e}function oe(){var t,r,n,o;return t=oi,34===e.charCodeAt(oi)?(r=Jn,oi++):(r=we,0===ui&&a(Qn)),r!==we?(n=ie(),n!==we?(34===e.charCodeAt(oi)?(o=Jn,oi++):(o=we,0===ui&&a(Qn)),o!==we?(ii=t,r=So(n),t=r):(oi=t,t=we)):(oi=t,t=we)):(oi=t,t=we),t}function ie(){var t,r;return t=oi,r=J(),r!==we&&(ii=t,r=ei(r)),t=r,t===we&&(t=oi,e.substr(oi,4).toLowerCase()===ti?(r=e.substr(oi,4),oi+=4):(r=we,0===ui&&a(ri)),r!==we&&(ii=t,r=ni(r)),t=r),t}function ae(e,t){t&&Object.getOwnPropertyNames(t).forEach(function(r){e[r]=t[r]})}function ce(e,t){return e=e?e:{},ae(e,t),e}function se(e){var t={};return e[0].forEach(function(e){t=ce(t,e)}),ce(t,e[1])}function ue(e){return["true","on","1"].indexOf(e.toLowerCase())>-1}function le(e,t){var r={};return r[e.toLowerCase()]=t,r}function pe(e,t){return void 0===t||"*"===t||e.entities.some(function(e){return e.name===t})}function fe(e){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"].indexOf(e)>-1}function de(e,t){return"Entity '"+e+"' in arc '"+t.from+" "+t.kind+" "+t.to+"' is not defined."}function he(e,t){this.name="EntityNotDefinedError",this.message=de(e,t),t.location&&(this.location=t.location,this.location.start.line++,this.location.end.line++)}function ge(e,t){return e||(e={},e.entities=[]),t&&t.arcs&&t.arcs.forEach(function(t){t.forEach(function(t){if(t.from&&!pe(e,t.from))throw new he(t.from,t);if(t.to&&!pe(e,t.to))throw new he(t.to,t);t.location&&delete t.location,t.arcs&&ge(e,t)})}),e}function me(e){return e&&e.options?!!e.options.watermark||!!e.options.width&&"auto"===e.options.width:!1}function be(e){return e&&e.arcs?e.arcs.some(function(e){return e.some(function(e){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].indexOf(e.kind)>-1})}):!1}function ye(e,t){var r=me(e),n=be(t);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}var ve,xe=arguments.length>1?arguments[1]:{},we={},Ce={program:s},ke=s,_e="{",Ae={type:"literal",value:"{",description:'"{"'},Ee="}",Le={type:"literal",value:"}",description:'"}"'},je=function(e,t){t[1]=ge(t[1],t[2]);var r=ce(t[0],ce(t[1],t[2]));return r=ce({meta:ye(t[0],t[2])},r),e.length>0&&(r=ce({precomment:e},r)),r},Se="msc",Ie={type:"literal",value:"msc",description:'"msc"'},Te="xu",Ne={type:"literal",value:"xu",description:'"xu"'},De=function(e){return{options:e}},Be=function(e){return{entities:e}},Oe=function(e){return{arcs:e}},He=",",Re={type:"literal",value:",",description:'","'},We=function(e){return e},Fe=";",Me={type:"literal",value:";",description:'";"'},Ge=function(e){return se(e)},Xe={type:"other",description:"option"},qe="hscale",ze={type:"literal",value:"hscale",description:'"hscale"'},Ue="arcgradient",Pe={type:"literal",value:"arcgradient",description:'"arcgradient"'},Ve="=",$e={type:"literal",value:"=",description:'"="'},Ke=function(e,t){return le(e,t)},Ze="width",Je={type:"literal",value:"width",description:'"width"'},Qe="wordwraparcs",Ye={type:"literal",value:"wordwraparcs",description:'"wordwraparcs"'},et=function(e,t){var r={};return r[e.toLowerCase()]=ue(t),r},tt="watermark",rt={type:"literal",value:"watermark",description:'"watermark"'},nt=function(e){return e},ot=function(e){return e[0].push(e[1]),e[0]},it={type:"other",description:"entity"},at="[",ct={type:"literal",value:"[",description:'"["'},st="]",ut={type:"literal",value:"]",description:'"]"'},lt=function(e,t){return t},pt=function(e,t){return ce({name:e},t)},ft=function(e,t){return fe(e)&&n("MscGen keywords aren't allowed as entity names (embed them in quotes if you need them)"),ce({name:e},t)},dt=function(e){return e},ht=function(e){return[e]},gt=function(e){return e[0].push(e[1][0]),e[0]},mt=function(e,t){return t},bt=function(e,t){return ce(e,t)},yt=function(e){return{kind:e}},vt=function(e,t,n){return{kind:t,from:e,to:n,location:r()}},xt="*",wt={type:"literal",value:"*",description:'"*"'},Ct=function(e,t){return{kind:e,from:"*",to:t,location:r()}},kt=function(e,t){return{kind:t,from:e,to:"*",location:r()}},_t=function(e,t,r,n){return n},At=function(e,t,n,o,i){var a={kind:t,from:e,to:n,location:r(),arcs:i};return ce(a,o)},Et={type:"other",description:"empty row"},Lt="|||",jt={type:"literal",value:"|||",description:'"|||"'},St="...",It={type:"literal",value:"...",description:'"..."'},Tt={type:"other",description:"---"},Nt="---",Dt={type:"literal",value:"---",description:'"---"'},Bt=function(e){return e.toLowerCase()},Ot={type:"other",description:"bi-directional arrow"},Ht="--",Rt={type:"literal",value:"--",description:'"--"'},Wt="<->",Ft={type:"literal",value:"<->",description:'"<->"'},Mt="==",Gt={type:"literal",value:"==",description:'"=="'},Xt="<<=>>",qt={type:"literal",value:"<<=>>",description:'"<<=>>"'},zt="<=>",Ut={type:"literal",value:"<=>",description:'"<=>"'},Pt="..",Vt={type:"literal",value:"..",description:'".."'},$t="<<>>",Kt={type:"literal",value:"<<>>",description:'"<<>>"'},Zt="::",Jt={type:"literal",value:"::",description:'"::"'},Qt="<:>",Yt={type:"literal",value:"<:>",description:'"<:>"'},er={type:"other",description:"left to right arrow"},tr="->",rr={type:"literal",value:"->",description:'"->"'},nr="=>>",or={type:"literal",value:"=>>",description:'"=>>"'},ir="=>",ar={type:"literal",value:"=>",description:'"=>"'},cr=">>",sr={type:"literal",value:">>",description:'">>"'},ur=":>",lr={type:"literal",value:":>",description:'":>"'},pr="-x",fr={type:"literal",value:"-x",description:'"-x"'},dr={type:"other",description:"right to left arrow"},hr="<-",gr={type:"literal",value:"<-",description:'"<-"'},mr="<<=",br={type:"literal",value:"<<=",description:'"<<="'},yr="<=",vr={type:"literal",value:"<=",description:'"<="'},xr="<<",wr={type:"literal",value:"<<",description:'"<<"'},Cr="<:",kr={type:"literal",value:"<:",description:'"<:"'},_r="x-",Ar={type:"literal",value:"x-",description:'"x-"'},Er={type:"other",description:"box"},Lr="note",jr={type:"literal",value:"note",description:'"note"'},Sr="abox",Ir={type:"literal",value:"abox",description:'"abox"'},Tr="rbox",Nr={type:"literal",value:"rbox",description:'"rbox"'},Dr="box",Br={type:"literal",value:"box",description:'"box"'},Or={type:"other",description:"inline expression"},Hr="alt",Rr={type:"literal",value:"alt",description:'"alt"'},Wr="else",Fr={type:"literal",value:"else",description:'"else"'},Mr="opt",Gr={type:"literal",value:"opt",description:'"opt"'},Xr="break",qr={type:"literal",value:"break",description:'"break"'},zr="par",Ur={type:"literal",value:"par",description:'"par"'},Pr="seq",Vr={type:"literal",value:"seq",description:'"seq"'},$r="strict",Kr={type:"literal",value:"strict",description:'"strict"'},Zr="neg",Jr={type:"literal",value:"neg",description:'"neg"'},Qr="critical",Yr={type:"literal",value:"critical",description:'"critical"'},en="ignore",tn={type:"literal",value:"ignore",description:'"ignore"'},rn="consider",nn={type:"literal",value:"consider",description:'"consider"'},on="assert",an={type:"literal",value:"assert",description:'"assert"'},cn="loop",sn={type:"literal",value:"loop",description:'"loop"'},un="ref",ln={type:"literal",value:"ref",description:'"ref"'},pn="exc",fn={type:"literal",value:"exc",description:'"exc"'},dn=function(e){return e.toLowerCase()},hn=function(e,t){var r={};return r[e.toLowerCase().replace("colour","color")]=t,r},gn={type:"other",description:"attribute name"},mn="label",bn={type:"literal",value:"label",description:'"label"'},yn="idurl",vn={type:"literal",value:"idurl",description:'"idurl"'},xn="id",wn={type:"literal",value:"id",description:'"id"'},Cn="url",kn={type:"literal",value:"url",description:'"url"'},_n="linecolor",An={type:"literal",value:"linecolor",description:'"linecolor"'},En="linecolour",Ln={type:"literal",value:"linecolour",description:'"linecolour"'},jn="textcolor",Sn={type:"literal",value:"textcolor",description:'"textcolor"'},In="textcolour",Tn={type:"literal",value:"textcolour",description:'"textcolour"'},Nn="textbgcolor",Dn={type:"literal",value:"textbgcolor",description:'"textbgcolor"'},Bn="textbgcolour",On={type:"literal",value:"textbgcolour",description:'"textbgcolour"'},Hn="arclinecolor",Rn={type:"literal",value:"arclinecolor",description:'"arclinecolor"'},Wn="arclinecolour",Fn={type:"literal",value:"arclinecolour", -description:'"arclinecolour"'},Mn="arctextcolor",Gn={type:"literal",value:"arctextcolor",description:'"arctextcolor"'},Xn="arctextcolour",qn={type:"literal",value:"arctextcolour",description:'"arctextcolour"'},zn="arctextbgcolor",Un={type:"literal",value:"arctextbgcolor",description:'"arctextbgcolor"'},Pn="arctextbgcolour",Vn={type:"literal",value:"arctextbgcolour",description:'"arctextbgcolour"'},$n="arcskip",Kn={type:"literal",value:"arcskip",description:'"arcskip"'},Zn={type:"other",description:"double quoted string"},Jn='"',Qn={type:"literal",value:'"',description:'"\\""'},Yn=function(e){return e.join("")},eo='\\"',to={type:"literal",value:'\\"',description:'"\\\\\\""'},ro={type:"any",description:"any character"},no=function(e){return e},oo={type:"other",description:"identifier"},io=/^[A-Za-z_0-9]/,ao={type:"class",value:"[A-Za-z_0-9]",description:"[A-Za-z_0-9]"},co=function(e){return e.join("")},so={type:"other",description:"whitespace"},uo=/^[ \t]/,lo={type:"class",value:"[ \\t]",description:"[ \\t]"},po={type:"other",description:"lineend"},fo=/^[\r\n]/,ho={type:"class",value:"[\\r\\n]",description:"[\\r\\n]"},go="/*",mo={type:"literal",value:"/*",description:'"/*"'},bo="*/",yo={type:"literal",value:"*/",description:'"*/"'},vo=function(e,t,r){return e+t.join("")+r},xo="//",wo={type:"literal",value:"//",description:'"//"'},Co="#",ko={type:"literal",value:"#",description:'"#"'},_o=/^[^\r\n]/,Ao={type:"class",value:"[^\\r\\n]",description:"[^\\r\\n]"},Eo=function(e,t){return e+t.join("")},Lo={type:"other",description:"comment"},jo={type:"other",description:"number"},So=function(e){return e},Io=function(e){return e.toString()},To=function(e){return e.toString()},No=/^[0-9]/,Do={type:"class",value:"[0-9]",description:"[0-9]"},Bo=function(e){return parseInt(e.join(""),10)},Oo=".",Ho={type:"literal",value:".",description:'"."'},Ro=function(e){return parseFloat(e.join(""))},Wo={type:"other",description:"boolean"},Fo=function(e){return e},Mo=function(e){return e.toString()},Go="true",Xo={type:"literal",value:"true",description:'"true"'},qo="false",zo={type:"literal",value:"false",description:'"false"'},Uo="on",Po={type:"literal",value:"on",description:'"on"'},Vo="off",$o={type:"literal",value:"off",description:'"off"'},Ko="0",Zo={type:"literal",value:"0",description:'"0"'},Jo="1",Qo={type:"literal",value:"1",description:'"1"'},Yo={type:"other",description:"size"},ei=function(e){return e.toString()},ti="auto",ri={type:"literal",value:"auto",description:'"auto"'},ni=function(e){return e.toLowerCase()},oi=0,ii=0,ai=[{line:1,column:1,seenCR:!1}],ci=0,si=[],ui=0;if("startRule"in xe){if(!(xe.startRule in Ce))throw new Error("Can't start parsing from rule \""+xe.startRule+'".');ke=Ce[xe.startRule]}if(ve=ke(),ve!==we&&oi===e.length)return ve;throw ve!==we&&oir;)n=e.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return ho[t]=o,o}function n(e,t){var n=r(e),o=r(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:o.line,column:o.column}}}function o(e){go>po||(po>go&&(go=po,mo=[]),mo.push(e))}function i(e,r,n,o){function i(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?a.slice(0,-1).join(", ")+" or "+a[e.length-1]:a[0],o=t?'"'+r(t)+'"':"end of input","Expected "+n+" but "+o+" found."}return null!==r&&i(r),new t(null!==e?e:a(r,n),r,n,o)}function a(){var e,t,r,n;return e=po,t=z(),t!==ge?(r=c(),r!==ge?(n=z(),n!==ge?(fo=e,t=ye(t,r),e=t):(po=e,e=ge)):(po=e,e=ge)):(po=e,e=ge),e}function c(){var e,t,r,n,o;return e=po,t=po,r=s(),r!==ge&&(fo=t,r=ve(r)),t=r,t===ge&&(t=null),t!==ge?(r=po,n=l(),n!==ge&&(fo=r,n=xe(n)),r=n,r===ge&&(r=null),r!==ge?(n=po,o=f(),o!==ge&&(fo=n,o=we(o)),n=o,n===ge&&(n=null),n!==ge?(t=[t,r,n],e=t):(po=e,e=ge)):(po=e,e=ge)):(po=e,e=ge),e}function s(){var t,r,n,i,a,c;for(t=po,r=po,n=[],i=po,a=u(),a!==ge?(44===e.charCodeAt(po)?(c=Ce,po++):(c=ge,0===bo&&o(ke)),c!==ge?(fo=i,a=_e(a),i=a):(po=i,i=ge)):(po=i,i=ge);i!==ge;)n.push(i),i=po,a=u(),a!==ge?(44===e.charCodeAt(po)?(c=Ce,po++):(c=ge,0===bo&&o(ke)),c!==ge?(fo=i,a=_e(a),i=a):(po=i,i=ge)):(po=i,i=ge);return n!==ge?(i=po,a=u(),a!==ge?(59===e.charCodeAt(po)?(c=Ae,po++):(c=ge,0===bo&&o(Ee)),c!==ge?(fo=i,a=_e(a),i=a):(po=i,i=ge)):(po=i,i=ge),i!==ge?(n=[n,i],r=n):(po=r,r=ge)):(po=r,r=ge),r!==ge&&(fo=t,r=Le(r)),t=r}function u(){var t,r,n,i,a,c,s,u;return t=po,r=z(),r!==ge?(e.substr(po,6).toLowerCase()===je?(n=e.substr(po,6),po+=6):(n=ge,0===bo&&o(Se)),n===ge&&(e.substr(po,11).toLowerCase()===Ie?(n=e.substr(po,11),po+=11):(n=ge,0===bo&&o(Te))),n!==ge?(i=z(),i!==ge?(61===e.charCodeAt(po)?(a=Ne,po++):(a=ge,0===bo&&o(De)),a!==ge?(c=z(),c!==ge?(s=U(),s!==ge?(u=z(),u!==ge?(fo=t,r=Be(n,s),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t===ge&&(t=po,r=z(),r!==ge?(e.substr(po,5).toLowerCase()===Oe?(n=e.substr(po,5),po+=5):(n=ge,0===bo&&o(He)),n!==ge?(i=z(),i!==ge?(61===e.charCodeAt(po)?(a=Ne,po++):(a=ge,0===bo&&o(De)),a!==ge?(c=z(),c!==ge?(s=Y(),s!==ge?(u=z(),u!==ge?(fo=t,r=Be(n,s),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t===ge&&(t=po,r=z(),r!==ge?(e.substr(po,12).toLowerCase()===Re?(n=e.substr(po,12),po+=12):(n=ge,0===bo&&o(We)),n!==ge?(i=z(),i!==ge?(61===e.charCodeAt(po)?(a=Ne,po++):(a=ge,0===bo&&o(De)),a!==ge?(c=z(),c!==ge?(s=Z(),s!==ge?(u=z(),u!==ge?(fo=t,r=Fe(n,s),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t===ge&&(t=po,r=z(),r!==ge?(e.substr(po,9).toLowerCase()===Me?(n=e.substr(po,9),po+=9):(n=ge,0===bo&&o(Ge)),n!==ge?(i=z(),i!==ge?(61===e.charCodeAt(po)?(a=Ne,po++):(a=ge,0===bo&&o(De)),a!==ge?(c=z(),c!==ge?(s=S(),s!==ge?(u=z(),u!==ge?(fo=t,r=Be(n,s),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)))),t}function l(){var t,r,n,i,a,c;for(t=po,r=po,n=[],i=po,a=p(),a!==ge?(44===e.charCodeAt(po)?(c=Ce,po++):(c=ge,0===bo&&o(ke)),c!==ge?(fo=i,a=Xe(a),i=a):(po=i,i=ge)):(po=i,i=ge);i!==ge;)n.push(i),i=po,a=p(),a!==ge?(44===e.charCodeAt(po)?(c=Ce,po++):(c=ge,0===bo&&o(ke)),c!==ge?(fo=i,a=Xe(a),i=a):(po=i,i=ge)):(po=i,i=ge);return n!==ge?(i=po,a=p(),a!==ge?(59===e.charCodeAt(po)?(c=Ae,po++):(c=ge,0===bo&&o(Ee)),c!==ge?(fo=i,a=Xe(a),i=a):(po=i,i=ge)):(po=i,i=ge),i!==ge?(n=[n,i],r=n):(po=r,r=ge)):(po=r,r=ge),r!==ge&&(fo=t,r=qe(r)),t=r}function p(){var t,r,n,i,a,c,s,u,l;return bo++,t=po,r=z(),r!==ge?(n=D(),n!==ge?(i=z(),i!==ge?(a=po,58===e.charCodeAt(po)?(c=Ue,po++):(c=ge,0===bo&&o(Pe)),c!==ge?(s=z(),s!==ge?(u=j(),u!==ge?(l=z(),l!==ge?(fo=a,c=Ve(n,u),a=c):(po=a,a=ge)):(po=a,a=ge)):(po=a,a=ge)):(po=a,a=ge),a===ge&&(a=null),a!==ge?(fo=t,r=$e(n,a),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),bo--,t===ge&&(r=ge,0===bo&&o(ze)),t}function f(){var t,r,n,i,a;if(t=[],r=po,n=d(),n!==ge?(i=z(),i!==ge?(59===e.charCodeAt(po)?(a=Ae,po++):(a=ge,0===bo&&o(Ee)),a!==ge?(fo=r,n=Ke(n),r=n):(po=r,r=ge)):(po=r,r=ge)):(po=r,r=ge),r!==ge)for(;r!==ge;)t.push(r),r=po,n=d(),n!==ge?(i=z(),i!==ge?(59===e.charCodeAt(po)?(a=Ae,po++):(a=ge,0===bo&&o(Ee)),a!==ge?(fo=r,n=Ke(n),r=n):(po=r,r=ge)):(po=r,r=ge)):(po=r,r=ge);else t=ge;return t}function d(){var t,r,n,i,a,c;for(t=po,r=po,n=[],i=po,a=h(),a!==ge?(44===e.charCodeAt(po)?(c=Ce,po++):(c=ge,0===bo&&o(ke)),c!==ge?(fo=i,a=Ke(a),i=a):(po=i,i=ge)):(po=i,i=ge);i!==ge;)n.push(i),i=po,a=h(),a!==ge?(44===e.charCodeAt(po)?(c=Ce,po++):(c=ge,0===bo&&o(ke)),c!==ge?(fo=i,a=Ke(a),i=a):(po=i,i=ge)):(po=i,i=ge);return n!==ge?(i=po,a=h(),a!==ge&&(fo=i,a=Ze(a)),i=a,i!==ge?(n=[n,i],r=n):(po=r,r=ge)):(po=r,r=ge),r!==ge&&(fo=t,r=Je(r)),t=r}function h(){var e;return e=g(),e===ge&&(e=v()),e}function g(){var t,r,n,i,a,c,s;return t=po,r=po,n=m(),n!==ge&&(fo=r,n=Qe(n)),r=n,r===ge&&(r=po,n=y(),n!==ge&&(fo=r,n=Ye(n)),r=n,r===ge&&(r=po,n=b(),n!==ge&&(fo=r,n=et(n)),r=n)),r!==ge?(n=po,58===e.charCodeAt(po)?(i=Ue,po++):(i=ge,0===bo&&o(Pe)),i!==ge?(a=z(),a!==ge?(c=j(),c!==ge?(s=z(),s!==ge?(fo=n,i=tt(r,c),n=i):(po=n,n=ge)):(po=n,n=ge)):(po=n,n=ge)):(po=n,n=ge),n===ge&&(n=null),n!==ge?(fo=t,r=rt(r,n),t=r):(po=t,t=ge)):(po=t,t=ge),t}function m(){var e,t,r,n;return e=po,t=z(),t!==ge?(r=x(),r!==ge?(n=z(),n!==ge?(fo=e,t=nt(r),e=t):(po=e,e=ge)):(po=e,e=ge)):(po=e,e=ge),e}function b(){var e,t,r,n;return e=po,t=z(),t!==ge?(r=w(),r!==ge?(n=z(),n!==ge?(fo=e,t=nt(r),e=t):(po=e,e=ge)):(po=e,e=ge)):(po=e,e=ge),e}function y(){var t,r,n,i,a,c,s,u;return t=po,r=z(),r!==ge?(n=D(),n!==ge?(i=z(),i!==ge?(a=C(),a!==ge?(c=z(),c!==ge?(s=D(),s!==ge?(u=z(),u!==ge?(fo=t,r=ot(n,a,s),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t===ge&&(t=po,r=z(),r!==ge?(42===e.charCodeAt(po)?(n=it,po++):(n=ge,0===bo&&o(at)),n!==ge?(i=z(),i!==ge?(a=A(),a!==ge?(c=z(),c!==ge?(s=D(),s!==ge?(u=z(),u!==ge?(fo=t,r=ct(a,s),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t===ge&&(t=po,r=z(),r!==ge?(n=D(),n!==ge?(i=z(),i!==ge?(a=_(),a!==ge?(c=z(),c!==ge?(42===e.charCodeAt(po)?(s=it,po++):(s=ge,0===bo&&o(at)),s!==ge?(u=z(),u!==ge?(fo=t,r=st(n,a),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t===ge&&(t=po,r=z(),r!==ge?(n=D(),n!==ge?(i=z(),i!==ge?(a=k(),a!==ge?(c=z(),c!==ge?(42===e.charCodeAt(po)?(s=it,po++):(s=ge,0===bo&&o(at)),s!==ge?(u=z(),u!==ge?(fo=t,r=st(n,a),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)))),t}function v(){var t,r,n,i,a,c,s,u,l,p,d,h,g,m,b;return t=po,r=z(),r!==ge?(n=D(),n!==ge?(i=z(),i!==ge?(a=L(),a!==ge?(c=z(),c!==ge?(s=D(),s!==ge?(u=z(),u!==ge?(l=po,58===e.charCodeAt(po)?(p=Ue,po++):(p=ge,0===bo&&o(Pe)),p!==ge?(d=z(),d!==ge?(h=j(),h!==ge?(g=z(),g!==ge?(fo=l,p=ut(n,a,s,h),l=p):(po=l,l=ge)):(po=l,l=ge)):(po=l,l=ge)):(po=l,l=ge),l===ge&&(l=null),l!==ge?(123===e.charCodeAt(po)?(p=lt,po++):(p=ge,0===bo&&o(pt)),p!==ge?(d=z(),d!==ge?(h=f(),h===ge&&(h=null),h!==ge?(g=z(),g!==ge?(125===e.charCodeAt(po)?(m=ft,po++):(m=ge,0===bo&&o(dt)),m!==ge?(b=z(),b!==ge?(fo=t,r=ht(n,a,s,l,h),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t}function x(){var t,r;return bo++,e.substr(po,3)===mt?(t=mt,po+=3):(t=ge,0===bo&&o(bt)),t===ge&&(e.substr(po,3)===yt?(t=yt,po+=3):(t=ge,0===bo&&o(vt))),bo--,t===ge&&(r=ge,0===bo&&o(gt)),t}function w(){var t,r;return bo++,e.substr(po,3)===wt?(t=wt,po+=3):(t=ge,0===bo&&o(Ct)),bo--,t===ge&&(r=ge,0===bo&&o(xt)),t}function C(){var e,t;return e=po,t=k(),t===ge&&(t=_(),t===ge&&(t=A(),t===ge&&(t=E()))),t!==ge&&(fo=e,t=kt(t)),e=t}function k(){var t,r;return bo++,e.substr(po,2)===At?(t=At,po+=2):(t=ge,0===bo&&o(Et)),t===ge&&(e.substr(po,3)===Lt?(t=Lt,po+=3):(t=ge,0===bo&&o(jt)),t===ge&&(e.substr(po,2)===St?(t=St,po+=2):(t=ge,0===bo&&o(It)),t===ge&&(e.substr(po,5)===Tt?(t=Tt,po+=5):(t=ge,0===bo&&o(Nt)),t===ge&&(e.substr(po,3)===Dt?(t=Dt,po+=3):(t=ge,0===bo&&o(Bt)),t===ge&&(e.substr(po,2)===Ot?(t=Ot,po+=2):(t=ge,0===bo&&o(Ht)),t===ge&&(e.substr(po,4)===Rt?(t=Rt,po+=4):(t=ge,0===bo&&o(Wt)),t===ge&&(e.substr(po,2)===Ft?(t=Ft,po+=2):(t=ge,0===bo&&o(Mt)),t===ge&&(e.substr(po,3)===Gt?(t=Gt,po+=3):(t=ge,0===bo&&o(Xt)))))))))),bo--,t===ge&&(r=ge,0===bo&&o(_t)),t}function _(){var t,r;return bo++,e.substr(po,2)===zt?(t=zt,po+=2):(t=ge,0===bo&&o(Ut)),t===ge&&(e.substr(po,3)===Pt?(t=Pt,po+=3):(t=ge,0===bo&&o(Vt)),t===ge&&(e.substr(po,2)===$t?(t=$t,po+=2):(t=ge,0===bo&&o(Kt)),t===ge&&(e.substr(po,2)===Zt?(t=Zt,po+=2):(t=ge,0===bo&&o(Jt)),t===ge&&(e.substr(po,2)===Qt?(t=Qt,po+=2):(t=ge,0===bo&&o(Yt)),t===ge&&(e.substr(po,2).toLowerCase()===er?(t=e.substr(po,2),po+=2):(t=ge,0===bo&&o(tr))))))),bo--,t===ge&&(r=ge,0===bo&&o(qt)),t}function A(){var t,r;return bo++,e.substr(po,2)===nr?(t=nr,po+=2):(t=ge,0===bo&&o(or)),t===ge&&(e.substr(po,3)===ir?(t=ir,po+=3):(t=ge,0===bo&&o(ar)),t===ge&&(e.substr(po,2)===cr?(t=cr,po+=2):(t=ge,0===bo&&o(sr)),t===ge&&(e.substr(po,2)===ur?(t=ur,po+=2):(t=ge,0===bo&&o(lr)),t===ge&&(e.substr(po,2)===pr?(t=pr,po+=2):(t=ge,0===bo&&o(fr)),t===ge&&(e.substr(po,2).toLowerCase()===dr?(t=e.substr(po,2),po+=2):(t=ge,0===bo&&o(hr))))))),bo--,t===ge&&(r=ge,0===bo&&o(rr)),t}function E(){var t,r;return bo++,e.substr(po,4).toLowerCase()===mr?(t=e.substr(po,4),po+=4):(t=ge,0===bo&&o(br)),t===ge&&(e.substr(po,4).toLowerCase()===yr?(t=e.substr(po,4),po+=4):(t=ge,0===bo&&o(vr)),t===ge&&(e.substr(po,4).toLowerCase()===xr?(t=e.substr(po,4),po+=4):(t=ge,0===bo&&o(wr)),t===ge&&(e.substr(po,3).toLowerCase()===Cr?(t=e.substr(po,3),po+=3):(t=ge,0===bo&&o(kr))))),bo--,t===ge&&(r=ge,0===bo&&o(gr)),t}function L(){var t,r;return bo++,t=po,e.substr(po,3).toLowerCase()===Ar?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(Er)),r===ge&&(e.substr(po,4).toLowerCase()===Lr?(r=e.substr(po,4),po+=4):(r=ge,0===bo&&o(jr)),r===ge&&(e.substr(po,3).toLowerCase()===Sr?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(Ir)),r===ge&&(e.substr(po,5).toLowerCase()===Tr?(r=e.substr(po,5),po+=5):(r=ge,0===bo&&o(Nr)),r===ge&&(e.substr(po,3).toLowerCase()===Dr?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(Br)),r===ge&&(e.substr(po,3).toLowerCase()===Or?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(Hr)),r===ge&&(e.substr(po,6).toLowerCase()===Rr?(r=e.substr(po,6),po+=6):(r=ge,0===bo&&o(Wr)),r===ge&&(e.substr(po,3).toLowerCase()===Fr?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(Mr)),r===ge&&(e.substr(po,8).toLowerCase()===Gr?(r=e.substr(po,8),po+=8):(r=ge,0===bo&&o(Xr)),r===ge&&(e.substr(po,6).toLowerCase()===qr?(r=e.substr(po,6),po+=6):(r=ge,0===bo&&o(zr)),r===ge&&(e.substr(po,8).toLowerCase()===Ur?(r=e.substr(po,8),po+=8):(r=ge,0===bo&&o(Pr)),r===ge&&(e.substr(po,6).toLowerCase()===Vr?(r=e.substr(po,6),po+=6):(r=ge,0===bo&&o($r)),r===ge&&(e.substr(po,4).toLowerCase()===Kr?(r=e.substr(po,4),po+=4):(r=ge,0===bo&&o(Zr)),r===ge&&(e.substr(po,3).toLowerCase()===Jr?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(Qr)),r===ge&&(e.substr(po,3).toLowerCase()===Yr?(r=e.substr(po,3),po+=3):(r=ge,0===bo&&o(en)))))))))))))))),r!==ge&&(fo=t,r=tn(r)),t=r,bo--,t===ge&&(r=ge,0===bo&&o(_r)),t}function j(){var e;return e=S(),e===ge&&(e=T()),e}function S(){var t,r,n,i;return bo++,t=po,34===e.charCodeAt(po)?(r=nn,po++):(r=ge,0===bo&&o(on)),r!==ge?(n=I(),n!==ge?(34===e.charCodeAt(po)?(i=nn,po++):(i=ge,0===bo&&o(on)),i!==ge?(fo=t,r=an(n),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),bo--,t===ge&&(r=ge,0===bo&&o(rn)),t}function I(){var t,r,n,i;for(t=[],r=po,n=po,bo++,34===e.charCodeAt(po)?(i=nn,po++):(i=ge,0===bo&&o(on)),bo--,i===ge?n=void 0:(po=n,n=ge),n!==ge?(e.substr(po,2)===cn?(i=cn,po+=2):(i=ge,0===bo&&o(sn)),i===ge&&(e.length>po?(i=e.charAt(po),po++):(i=ge,0===bo&&o(un))),i!==ge?(fo=r,n=ln(i),r=n):(po=r,r=ge)):(po=r,r=ge);r!==ge;)t.push(r),r=po,n=po,bo++,34===e.charCodeAt(po)?(i=nn,po++):(i=ge,0===bo&&o(on)),bo--,i===ge?n=void 0:(po=n,n=ge),n!==ge?(e.substr(po,2)===cn?(i=cn,po+=2):(i=ge,0===bo&&o(sn)),i===ge&&(e.length>po?(i=e.charAt(po),po++):(i=ge,0===bo&&o(un))),i!==ge?(fo=r,n=ln(i),r=n):(po=r,r=ge)):(po=r,r=ge);return t}function T(){var e,t;return e=po,t=N(),t!==ge&&(fo=e,t=pn(t)),e=t}function N(){var t,r,n,i;for(t=[],r=po,n=po,bo++,44===e.charCodeAt(po)?(i=Ce,po++):(i=ge,0===bo&&o(ke)),i===ge&&(59===e.charCodeAt(po)?(i=Ae,po++):(i=ge,0===bo&&o(Ee)),i===ge&&(123===e.charCodeAt(po)?(i=lt,po++):(i=ge,0===bo&&o(pt)))),bo--,i===ge?n=void 0:(po=n,n=ge),n!==ge?(e.length>po?(i=e.charAt(po),po++):(i=ge,0===bo&&o(un)),i!==ge?(fo=r,n=ln(i),r=n):(po=r,r=ge)):(po=r,r=ge);r!==ge;)t.push(r),r=po,n=po,bo++,44===e.charCodeAt(po)?(i=Ce,po++):(i=ge,0===bo&&o(ke)),i===ge&&(59===e.charCodeAt(po)?(i=Ae,po++):(i=ge,0===bo&&o(Ee)),i===ge&&(123===e.charCodeAt(po)?(i=lt,po++):(i=ge,0===bo&&o(pt)))),bo--,i===ge?n=void 0:(po=n,n=ge),n!==ge?(e.length>po?(i=e.charAt(po),po++):(i=ge,0===bo&&o(un)),i!==ge?(fo=r,n=ln(i),r=n):(po=r,r=ge)):(po=r,r=ge);return t}function D(){var t,r,n;if(bo++,t=po,r=[],dn.test(e.charAt(po))?(n=e.charAt(po),po++):(n=ge,0===bo&&o(hn)),n!==ge)for(;n!==ge;)r.push(n),dn.test(e.charAt(po))?(n=e.charAt(po),po++):(n=ge,0===bo&&o(hn));else r=ge;return r!==ge&&(fo=t,r=gn(r)),t=r,t===ge&&(t=S()),bo--,t===ge&&(r=ge,0===bo&&o(fn)),t}function B(){var t,r;return bo++,t=po,bn.test(e.charAt(po))?(r=e.charAt(po),po++):(r=ge,0===bo&&o(yn)),r!==ge&&(fo=t,r=ln(r)),t=r,bo--,t===ge&&(r=ge,0===bo&&o(mn)),t}function O(){var t,r;return bo++,t=po,xn.test(e.charAt(po))?(r=e.charAt(po),po++):(r=ge,0===bo&&o(wn)),r!==ge&&(fo=t,r=ln(r)),t=r,bo--,t===ge&&(r=ge,0===bo&&o(vn)),t}function H(){var t;return e.substr(po,2)===Cn?(t=Cn,po+=2):(t=ge,0===bo&&o(kn)),t}function R(){var t;return e.substr(po,2)===_n?(t=_n,po+=2):(t=ge,0===bo&&o(An)),t}function W(){var t,r,n;return t=po,r=po,bo++,e.substr(po,2)===_n?(n=_n,po+=2):(n=ge,0===bo&&o(An)),bo--,n===ge?r=void 0:(po=r,r=ge),r!==ge?(e.length>po?(n=e.charAt(po),po++):(n=ge,0===bo&&o(un)),n!==ge?(fo=t,r=ln(n),t=r):(po=t,t=ge)):(po=t,t=ge),t}function F(){var e,t,r,n;if(e=po,t=H(),t!==ge){for(r=[],n=W();n!==ge;)r.push(n),n=W();r!==ge?(n=R(),n!==ge?(fo=e,t=En(t,r,n),e=t):(po=e,e=ge)):(po=e,e=ge)}else po=e,e=ge;return e}function M(){var t;return e.substr(po,2)===Ln?(t=Ln,po+=2):(t=ge,0===bo&&o(jn)),t===ge&&(35===e.charCodeAt(po)?(t=Sn,po++):(t=ge,0===bo&&o(In))),t}function G(){var t;return Tn.test(e.charAt(po))?(t=e.charAt(po),po++):(t=ge,0===bo&&o(Nn)),t}function X(){var e,t,r,n;if(e=po,t=M(),t!==ge){for(r=[],n=G();n!==ge;)r.push(n),n=G();r!==ge?(fo=e,t=Dn(t,r),e=t):(po=e,e=ge)}else po=e,e=ge;return e}function q(){var e,t;return bo++,e=X(),e===ge&&(e=F()),bo--,e===ge&&(t=ge,0===bo&&o(Bn)),e}function z(){var e,t;for(e=[],t=B(),t===ge&&(t=O(),t===ge&&(t=q()));t!==ge;)e.push(t),t=B(),t===ge&&(t=O(),t===ge&&(t=q()));return e}function U(){var e,t;return bo++,e=po,t=P(),t!==ge&&(fo=e,t=Hn(t)),e=t,e===ge&&(e=po,t=V(),t!==ge&&(fo=e,t=Rn(t)),e=t),bo--,e===ge&&(t=ge,0===bo&&o(On)),e}function P(){var t,r,n,i;return t=po,34===e.charCodeAt(po)?(r=nn,po++):(r=ge,0===bo&&o(on)),r!==ge?(n=V(),n!==ge?(34===e.charCodeAt(po)?(i=nn,po++):(i=ge,0===bo&&o(on)),i!==ge?(fo=t,r=Wn(n),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t}function V(){var e;return e=K(),e===ge&&(e=$()),e}function $(){var t,r,n;if(t=po,r=[],Fn.test(e.charAt(po))?(n=e.charAt(po),po++):(n=ge,0===bo&&o(Mn)),n!==ge)for(;n!==ge;)r.push(n),Fn.test(e.charAt(po))?(n=e.charAt(po),po++):(n=ge,0===bo&&o(Mn));else r=ge;return r!==ge&&(fo=t,r=Gn(r)),t=r}function K(){var t,r,n,i,a;return t=po,r=po,n=$(),n!==ge?(46===e.charCodeAt(po)?(i=Xn,po++):(i=ge,0===bo&&o(qn)),i!==ge?(a=$(),a!==ge?(n=[n,i,a],r=n):(po=r,r=ge)):(po=r,r=ge)):(po=r,r=ge),r!==ge&&(fo=t,r=zn(r)),t=r}function Z(){var e,t;return bo++,e=po,t=J(),t!==ge&&(fo=e,t=Pn(t)),e=t,e===ge&&(e=po,t=Q(),t!==ge&&(fo=e,t=Vn(t)),e=t),bo--,e===ge&&(t=ge,0===bo&&o(Un)),e}function J(){var t,r,n,i;return t=po,34===e.charCodeAt(po)?(r=nn,po++):(r=ge,0===bo&&o(on)),r!==ge?(n=Q(),n!==ge?(34===e.charCodeAt(po)?(i=nn,po++):(i=ge,0===bo&&o(on)),i!==ge?(fo=t,r=Hn(n),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t}function Q(){var t;return e.substr(po,4).toLowerCase()===$n?(t=e.substr(po,4),po+=4):(t=ge,0===bo&&o(Kn)),t===ge&&(e.substr(po,5).toLowerCase()===Zn?(t=e.substr(po,5),po+=5):(t=ge,0===bo&&o(Jn)),t===ge&&(e.substr(po,2).toLowerCase()===Qn?(t=e.substr(po,2),po+=2):(t=ge,0===bo&&o(Yn)),t===ge&&(e.substr(po,3).toLowerCase()===eo?(t=e.substr(po,3),po+=3):(t=ge,0===bo&&o(to)),t===ge&&(48===e.charCodeAt(po)?(t=ro,po++):(t=ge,0===bo&&o(no)),t===ge&&(49===e.charCodeAt(po)?(t=oo,po++):(t=ge,0===bo&&o(io))))))),t}function Y(){var e,t;return bo++,e=ee(),e===ge&&(e=te()),bo--,e===ge&&(t=ge,0===bo&&o(ao)),e}function ee(){var t,r,n,i;return t=po,34===e.charCodeAt(po)?(r=nn,po++):(r=ge,0===bo&&o(on)),r!==ge?(n=te(),n!==ge?(34===e.charCodeAt(po)?(i=nn,po++):(i=ge,0===bo&&o(on)),i!==ge?(fo=t,r=Hn(n),t=r):(po=t,t=ge)):(po=t,t=ge)):(po=t,t=ge),t}function te(){var t,r;return t=po,r=V(),r!==ge&&(fo=t,r=co(r)),t=r,t===ge&&(t=po,e.substr(po,4).toLowerCase()===so?(r=e.substr(po,4),po+=4):(r=ge,0===bo&&o(uo)),r!==ge&&(fo=t,r=lo(r)),t=r),t}function re(e,t){t&&Object.getOwnPropertyNames(t).forEach(function(r){e[r]=t[r]})}function ne(e,t){return e=e?e:{},re(e,t),e}function oe(e){var t={};return e[0].forEach(function(e){t=ne(t,e)}),ne(t,e[1])}function ie(e){return["true","on","1"].indexOf(e.toLowerCase())>-1}function ae(e,t){var r={};return r[e.toLowerCase()]=t,r}function ce(e,t,r){return void 0===t||"*"===t?!0:e.entities.some(function(e){return e.name===t})?!0:r[t]===!0}function se(e){var t={};return t.name=e,t}function ue(e,t,r){return e||(e={},e.entities=[]),r||(r={}),t&&t.arcs&&t.arcs.forEach(function(t){t.forEach(function(t){ce(e,t.from,r)||(e.entities[e.entities.length]=se(t.from)),t.arcs&&(r[t.to]=!0,ne(e,ue(e,t,r)),delete r[t.to]),ce(e,t.to,r)||(e.entities[e.entities.length]=se(t.to))})}),e}function le(e){return e&&e.options?!!e.options.watermark||!!e.options.width&&"auto"===e.options.width:!1}function pe(e){return e&&e.arcs?e.arcs.some(function(e){return e.some(function(e){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].indexOf(e.kind)>-1})}):!1}function fe(e,t){var r=le(e),n=pe(t);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}var de,he=arguments.length>1?arguments[1]:{},ge={},me={program:a},be=a,ye=function(e,t){t[1]=ue(t[1],t[2]);var r=ne(t[0],ne(t[1],t[2]));return r=ne({meta:fe(t[0],t[2])},r),e.length>0&&(r=ne({precomment:e},r)),r},ve=function(e){return{options:e}},xe=function(e){return{entities:e}},we=function(e){return{arcs:e}},Ce=",",ke={type:"literal",value:",",description:'","'},_e=function(e){return e},Ae=";",Ee={type:"literal",value:";",description:'";"'},Le=function(e){return oe(e)},je="hscale",Se={type:"literal",value:"hscale",description:'"hscale"'},Ie="arcgradient",Te={type:"literal",value:"arcgradient",description:'"arcgradient"'},Ne="=",De={type:"literal",value:"=",description:'"="'},Be=function(e,t){return ae(e,t)},Oe="width",He={type:"literal",value:"width",description:'"width"'},Re="wordwraparcs",We={type:"literal",value:"wordwraparcs",description:'"wordwraparcs"'},Fe=function(e,t){var r={};return r[e.toLowerCase()]=ie(t),r},Me="watermark",Ge={type:"literal",value:"watermark",description:'"watermark"'},Xe=function(e){return e},qe=function(e){return e[0].push(e[1]),e[0]},ze={type:"other",description:"entity"},Ue=":",Pe={type:"literal",value:":",description:'":"'},Ve=function(e,t){return t},$e=function(e,t){var r={};return r.name=e,t&&(r.label=t),r},Ke=function(e){return e},Ze=function(e){return[e]},Je=function(e){return e[0].push(e[1][0]),e[0]},Qe=function(e){return e},Ye=function(e){return e},et=function(e){return e},tt=function(e,t){return t},rt=function(e,t){return t&&(e.label=t),e},nt=function(e){return{kind:e}},ot=function(e,t,r){return{kind:t,from:e,to:r}},it="*",at={type:"literal",value:"*",description:'"*"'},ct=function(e,t){return{kind:e,from:"*",to:t}},st=function(e,t){return{kind:t,from:e,to:"*"}},ut=function(e,t,r,n){return n},lt="{",pt={type:"literal",value:"{",description:'"{"'},ft="}",dt={type:"literal",value:"}",description:'"}"'},ht=function(e,t,r,n,o){var i={kind:t,from:e,to:r,arcs:o};return n&&(i.label=n),i},gt={type:"other",description:"empty row"},mt="|||",bt={type:"literal",value:"|||",description:'"|||"'},yt="...",vt={type:"literal",value:"...",description:'"..."'},xt={type:"other",description:"---"},wt="---",Ct={type:"literal",value:"---",description:'"---"'},kt=function(e){return e.toLowerCase()},_t={type:"other",description:"bi-directional arrow"},At="--",Et={type:"literal",value:"--",description:'"--"'},Lt="<->",jt={type:"literal",value:"<->",description:'"<->"'},St="==",It={type:"literal",value:"==",description:'"=="'},Tt="<<=>>",Nt={type:"literal",value:"<<=>>",description:'"<<=>>"'},Dt="<=>",Bt={type:"literal",value:"<=>",description:'"<=>"'},Ot="..",Ht={type:"literal",value:"..",description:'".."'},Rt="<<>>",Wt={type:"literal",value:"<<>>",description:'"<<>>"'},Ft="::",Mt={type:"literal",value:"::",description:'"::"'},Gt="<:>",Xt={type:"literal",value:"<:>",description:'"<:>"'},qt={type:"other",description:"left to right arrow"},zt="->",Ut={type:"literal",value:"->",description:'"->"'},Pt="=>>",Vt={type:"literal",value:"=>>",description:'"=>>"'},$t="=>",Kt={type:"literal",value:"=>",description:'"=>"'},Zt=">>",Jt={type:"literal",value:">>",description:'">>"'},Qt=":>",Yt={type:"literal",value:":>",description:'":>"'},er="-x",tr={type:"literal",value:"-x",description:'"-x"'},rr={type:"other",description:"right to left arrow"},nr="<-",or={type:"literal",value:"<-",description:'"<-"'},ir="<<=",ar={type:"literal",value:"<<=",description:'"<<="'},cr="<=",sr={type:"literal",value:"<=",description:'"<="'},ur="<<",lr={type:"literal",value:"<<",description:'"<<"'},pr="<:",fr={type:"literal",value:"<:",description:'"<:"'},dr="x-",hr={type:"literal",value:"x-",description:'"x-"'},gr={type:"other",description:"box"},mr="note",br={type:"literal",value:"note",description:'"note"'},yr="abox",vr={type:"literal",value:"abox",description:'"abox"'},xr="rbox",wr={type:"literal",value:"rbox",description:'"rbox"'},Cr="box",kr={type:"literal",value:"box",description:'"box"'},_r={type:"other",description:"inline expression"},Ar="alt",Er={type:"literal",value:"alt",description:'"alt"'},Lr="else",jr={type:"literal",value:"else",description:'"else"'},Sr="opt",Ir={type:"literal",value:"opt",description:'"opt"'},Tr="break",Nr={type:"literal",value:"break",description:'"break"'},Dr="par",Br={type:"literal",value:"par",description:'"par"'},Or="seq",Hr={type:"literal",value:"seq",description:'"seq"'},Rr="strict",Wr={type:"literal",value:"strict",description:'"strict"'},Fr="neg",Mr={type:"literal",value:"neg",description:'"neg"'},Gr="critical",Xr={type:"literal",value:"critical",description:'"critical"'},qr="ignore",zr={type:"literal",value:"ignore",description:'"ignore"'},Ur="consider",Pr={type:"literal",value:"consider",description:'"consider"'},Vr="assert",$r={type:"literal",value:"assert",description:'"assert"'},Kr="loop",Zr={type:"literal",value:"loop",description:'"loop"'},Jr="ref",Qr={type:"literal",value:"ref",description:'"ref"'},Yr="exc",en={type:"literal",value:"exc",description:'"exc"'},tn=function(e){return e.toLowerCase()},rn={type:"other",description:"double quoted string"},nn='"',on={type:"literal",value:'"',description:'"\\""'},an=function(e){return e.join("")},cn='\\"',sn={type:"literal",value:'\\"',description:'"\\\\\\""'},un={type:"any",description:"any character"},ln=function(e){return e},pn=function(e){return e.join("").trim()},fn={type:"other",description:"identifier"},dn=/^[^;, "\t\n\r=\-><:{*]/,hn={type:"class",value:'[^;, \\"\\t\\n\\r=\\-><:\\{\\*]',description:'[^;, \\"\\t\\n\\r=\\-><:\\{\\*]'},gn=function(e){return e.join("")},mn={type:"other",description:"whitespace"},bn=/^[ \t]/,yn={type:"class",value:"[ \\t]",description:"[ \\t]"},vn={type:"other",description:"lineend"},xn=/^[\r\n]/,wn={type:"class",value:"[\\r\\n]",description:"[\\r\\n]"},Cn="/*",kn={type:"literal",value:"/*",description:'"/*"'},_n="*/",An={type:"literal",value:"*/",description:'"*/"'},En=function(e,t,r){return e+t.join("")+r},Ln="//",jn={type:"literal",value:"//",description:'"//"'},Sn="#",In={type:"literal",value:"#",description:'"#"'},Tn=/^[^\r\n]/,Nn={type:"class",value:"[^\\r\\n]",description:"[^\\r\\n]"},Dn=function(e,t){return e+t.join("")},Bn={type:"other",description:"comment"},On={type:"other",description:"number"},Hn=function(e){return e},Rn=function(e){return e.toString()},Wn=function(e){return e.toString()},Fn=/^[0-9]/,Mn={type:"class",value:"[0-9]",description:"[0-9]"},Gn=function(e){return parseInt(e.join(""),10)},Xn=".",qn={type:"literal",value:".",description:'"."'},zn=function(e){return parseFloat(e.join(""))},Un={type:"other",description:"boolean"},Pn=function(e){return e},Vn=function(e){return e.toString()},$n="true",Kn={type:"literal",value:"true",description:'"true"'},Zn="false",Jn={type:"literal",value:"false",description:'"false"'},Qn="on",Yn={type:"literal",value:"on",description:'"on"'},eo="off",to={type:"literal",value:"off",description:'"off"'},ro="0",no={type:"literal",value:"0",description:'"0"'},oo="1",io={type:"literal",value:"1",description:'"1"'},ao={type:"other",description:"size"},co=function(e){return e.toString()},so="auto",uo={type:"literal",value:"auto",description:'"auto"'},lo=function(e){return e.toLowerCase()},po=0,fo=0,ho=[{line:1,column:1,seenCR:!1}],go=0,mo=[],bo=0;if("startRule"in he){if(!(he.startRule in me))throw new Error("Can't start parsing from rule \""+he.startRule+'".');be=me[he.startRule]}if(de=be(),de!==ge&&po===e.length)return de;throw de!==ge&&poe.xFrom&&(t=1),{dx:t,dy:t*(e.yTo-e.yFrom)/(e.xTo-e.xFrom)}}return{getDiagonalAngle:t,getDirection:r}}),r("lib/mscgenjs-core/render/graphics/svgelementfactory",["./constants","./svglowlevelfactory","./geometry"],function(e,t,r){"use strict";function n(r,n){return t.createElement("svg",{version:"1.1",id:r,"class":n,xmlns:e.SVGNS,"xmlns:xlink":e.XLINKNS,width:0,height:0})}function o(e){return t.createElement("desc",{id:e})}function i(){return t.createElement("defs")}function a(e,r,n,o){return p(t.createElement("path",{d:e,"class":r}),n,o)}function c(e,r){return t.createElement("polygon",{points:e,"class":r})}function s(e,r,n,o,i,a){return p(t.createElement("rect",{width:e.width,height:e.height,x:e.x,y:e.y,rx:i,ry:a,"class":r}),n,o)}function u(e,r){return t.createElement("g",{id:e,"class":r})}function l(r,n){var o=t.createElement("use",{x:r.x.toString(),y:r.y.toString()});return o.setAttributeNS(e.XLINKNS,"xlink:href","#"+n),o}function p(e,r,n){var o="";return n&&(o+="fill:"+n+";"),r&&(o+="stroke:"+r+";"), -t.setAttribute(e,"style",o)}function f(e,r){return t.createElement("line",{x1:e.xFrom.toString(),y1:e.yFrom.toString(),x2:e.xTo.toString(),y2:e.yTo.toString(),"class":r})}function d(t,r){var n=j.createElementNS(e.SVGNS,"a");return n.setAttributeNS(e.XLINKNS,"xlink:href",t),n.setAttributeNS(e.XLINKNS,"xlink:title",t),n.setAttributeNS(e.XLINKNS,"xlink:show","new"),n.appendChild(r),n}function h(e,t,r,n){var o=3;return a("M"+e.x+","+e.y+"l"+o+", -"+e.height/2+"l"+(e.width-2*o)+",0l"+o+","+e.height/2+"l-"+o+","+e.height/2+"l-"+(e.width-2*o)+",0 l-"+o+",-"+e.height/2,t,r,n)}function g(t,r,n,o){var i=Math.max(9,Math.min(4.5*e.LINE_WIDTH,t.height/2)),c=i.toString(10);return a("M"+t.x+","+t.y+"l"+(t.width-i)+",0 l0,"+c+" l"+c+",0 m-"+c+",-"+c+" l"+c+","+c+" l0,"+(t.height-i)+" l-"+t.width+",0 l0,-"+(t.height+e.LINE_WIDTH/2)+" ",r,n,o)}function m(e,t,r,n,o){var i=o?o:7;return a("M"+e.x+","+e.y+" l"+e.width+",0 l0,"+(e.height-i)+" l-"+i.toString(10)+","+i.toString(10)+" l-"+(e.width-i)+",0 ",t,r,n)}function b(t,r){var n=j.createElementNS(e.SVGNS,"tspan"),o=j.createTextNode(t);return n.appendChild(o),r?d(r,n):n}function y(e,r,n,o,i,a){var c=t.createElement("text",{x:r.x.toString(),y:r.y.toString(),"class":n});if(c.appendChild(b(e,o)),i){var s=b(" ["+i+"]",a);s.setAttribute("style",S),c.appendChild(s)}return c}function v(e,n,o){return t.setAttributes(y(e,{x:n.width/2,y:n.height/2},o),{transform:"rotate("+r.getDiagonalAngle(n).toString()+" "+(n.width/2).toString()+" "+(n.height/2).toString()+")"})}function x(t,r){var n=0;return r.indexOf("nodi")<0&&(n=t.xTo>t.xFrom?-7.5*e.LINE_WIDTH:7.5*e.LINE_WIDTH),n}function w(t,r){var n=0;return r.indexOf("nodi")<0&&r.indexOf("bidi")>-1&&(n=t.xTo>t.xFrom?7.5*e.LINE_WIDTH:-7.5*e.LINE_WIDTH),n}function C(t,n){var o=e.LINE_WIDTH,i=r.getDirection(t),c=x(t,n),s=w(t,n),u=(t.xTo-t.xFrom+c-s).toString(),l=(t.yTo-t.yFrom).toString(),p="l"+i.dx.toString()+","+i.dy.toString(),f=" l"+u+","+l;return a("M"+t.xFrom.toString()+","+(t.yFrom-7.5*e.LINE_WIDTH*i.dy).toString()+p+"M"+(t.xFrom+s).toString()+","+(t.yFrom-o).toString()+f+"M"+(t.xFrom+s).toString()+","+(t.yFrom+o).toString()+f+"M"+(t.xTo-i.dx).toString()+","+(t.yTo+7.5*e.LINE_WIDTH*i.dy).toString()+p,n)}function k(e,t,r){return Boolean(r)?C(e,t):f(e,t)}function _(t,r,n,o,i){var c=i?t.x+7.5*e.LINE_WIDTH:t.x;return a("M"+t.x.toString()+", -"+t.y.toString()+" C"+(t.x+n).toString()+","+(t.y-7.5*e.LINE_WIDTH).toString()+" "+(t.x+n).toString()+","+(r+0).toString()+" "+c.toString()+","+r.toString(),o)}function A(e,r,n,o){return t.createElement("marker",{orient:n,id:e,"class":r,viewBox:Boolean(o)?o:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}function E(e,r,n){var o=A(e,"arrow-marker","auto");return o.appendChild(t.setAttributes(a(r,"arrow-style"),{style:"stroke-dasharray:100,1;stroke:"+n||"black"})),o}function L(e,r,n){var o=A(e,"arrow-marker","auto");return o.appendChild(t.setAttributes(c(r,"arrow-style"),{stroke:n||"black",fill:n||"black"})),o}var j={},S="vertical-align:text-top;";return S+="font-size:0.7em;text-anchor:start;",{init:function(e){j=e,t.init(e)},createSVG:n,createDesc:o,createDefs:i,createRect:s,createABox:h,createNote:g,createEdgeRemark:m,createText:y,createDiagonalText:v,createLine:k,createUTurn:_,createGroup:u,createUse:l,createMarkerPath:E,createMarkerPolygon:L}}),r("lib/mscgenjs-core/render/graphics/idmanager",[],function(){"use strict";var e="mscgen_js-svg-",t=e;return{setPrefix:function(r){t=e+r},get:function(e){return e?t+e:t}}}),function(){function e(e,t){return e.set(t[0],t[1]),e}function t(e,t){return e.add(t),e}function n(e,t,r){var n=r.length;switch(n){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function o(e,t){for(var r=-1,n=e?e.length:0;++rr)return!1;var n=t.length-1;return r==n?t.pop():ur.call(t,r,1),!0}function _(e){var t=this.__data__,r=G(t,e);return 0>r?$e:t[r][1]}function A(e){return G(this.__data__,e)>-1}function E(e,t){var r=this.__data__,n=G(r,e);return 0>n?r.push([e,t]):r[n][1]=t,this}function L(e){var t=-1,r=e?e.length:0;for(this.clear();++t0&&r(s)?t>1?U(s,t-1,r,n,o):i(o,s):n||(o[o.length]=s)}return o}function P(e,t,r){var n=t(e);return Lr(e)?n:i(n,r(e))}function V(e,t){return null!=e&&(Qt.call(e,t)||"object"==typeof e&&t in e&&null===de(e))}function $(e){if(!Re(e)||_e(e))return!1;var t=Oe(e)||l(e)?er:Ot;return t.test(Ee(e))}function K(e){return pr(Object(e))}function Z(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}function J(e){return function(t){return null==t?$e:t[e]}}function Q(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Y(e){var t=new e.constructor(e.byteLength);return new or(t).set(new or(e)),t}function ee(e,t){var r=t?Y(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function te(t,r,n){var o=r?n(f(t),!0):f(t);return a(o,e,new t.constructor)}function re(e){var t=new e.constructor(e.source,Nt.exec(e));return t.lastIndex=e.lastIndex,t}function ne(e,r,n){var o=r?n(d(e),!0):d(e);return a(o,t,new e.constructor)}function oe(e){return Ar?Object(Ar.call(e)):{}}function ie(e,t){var r=t?Y(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ae(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r1?r[o-1]:$e,a=o>2?r[2]:$e;for(i=e.length>3&&"function"==typeof i?(o--,i):$e,a&&Ce(r[0],r[1],a)&&(i=3>o?$e:i,o=1),t=Object(t);++n-1&&e%1==0&&t>e}function Ce(e,t,r){if(!Re(r))return!1;var n=typeof t;return("number"==n?De(r)&&we(t,r.length):"string"==n&&t in r)?Te(r[t],e):!1}function ke(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function _e(e){return!!Zt&&Zt in e}function Ae(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||$t;return e===r}function Ee(e){if(null!=e){try{return Jt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Le(e){var t=e?e.length:0;return t?U(e,1):[]}function je(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(Je);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(je.Cache||L),r}function Se(e,t){if("function"!=typeof e)throw new TypeError(Je);return t=fr(t===$e?e.length-1:Xe(t),0),function(){for(var r=arguments,o=-1,i=fr(r.length-t,0),a=Array(i);++o-1&&e%1==0&&et>=e}function Re(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function We(e){return!!e&&"object"==typeof e}function Fe(e){return"string"==typeof e||!Lr(e)&&We(e)&&Yt.call(e)==mt}function Me(e){return"symbol"==typeof e||We(e)&&Yt.call(e)==bt}function Ge(e){if(!e)return 0===e?e:0;if(e=qe(e),e===Ye||e===-Ye){var t=0>e?-1:1;return t*tt}return e===e?e:0}function Xe(e){var t=Ge(e),r=t%1;return t===t?r?t-r:t:0}function qe(e){if("number"==typeof e)return e;if(Me(e))return rt;if(Re(e)){var t=Oe(e.valueOf)?e.valueOf():e;e=Re(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Tt,"");var r=Bt.test(e);return r||Ht.test(e)?Ft(e.slice(2),r?2:8):Dt.test(e)?rt:+e}function ze(e){var t=Ae(e);if(!t&&!De(e))return K(e);var r=ve(e),n=!!r,o=r||[],i=o.length;for(var a in e)!V(e,a)||n&&("length"==a||we(a,i))||t&&"constructor"==a||o.push(a);return o}function Ue(e){for(var t=-1,r=Ae(e),n=Z(e),o=n.length,i=ve(e),a=!!i,c=i||[],s=c.length;++tt||Math.abs(e.width)>t?{height:0,width:0,x:0,y:0}:e}function s(e){return"function"==typeof e.getBBox?c(a(e)):{height:15,width:15,x:2,y:2}}function u(t){var r=d.createElementNS(e.SVGNS,"tspan");return r.appendChild(d.createTextNode(t)),r}function l(e){var t=n.createElement("text",{x:"0",y:"0"});return t.appendChild(u(e)),t}function p(){return s(l("ÁjyÎ9ƒ@💩")).height}function f(e){t.setPrefix(e);var r=d.getElementById(t.get());if(r){var n=d.getElementById(e);n?n.removeChild(r):d.body.removeChild(r)}}var d={},h=t.get("bboxer");return{init:function(e){d=e},removeRenderedSVGFromElement:f,getBBox:s,calculateTextHeight:o.memoize(p),webkitNamespaceBugWorkaround:function(e){return e.replace(/ xlink=/g," xmlns:xlink=","g").replace(/ href=/g," xlink:href=","g")}}}),r("lib/mscgenjs-core/render/graphics/renderutensils",[],function(){"use strict";function e(e,t){t.scale=e/t.width,t.width*=t.scale,t.height*=t.scale,t.horizontaltransform*=t.scale,t.verticaltransform*=t.scale,t.x=0-t.horizontaltransform,t.y=0-t.verticaltransform}function t(e,t){return e?2*(2*(e+1)*t):0}function r(e,t,r){return"-x"===e?t+.75*(r-t):r}return{scaleCanvasToWidth:e,determineDepthCorrection:t,determineArcXTo:r}}),r("lib/mscgenjs-core/render/graphics/csstemplates",[],function(){"use strict";return{baseTemplate:"svg.mscgenjs-fence{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%>;color:black;}.mscgenjs-fence rect{fill:none;stroke:black;}.mscgenjs-fence rect.entity{fill:white;}.mscgenjs-fence rect.label-text-background{fill:white;stroke:white;stroke-width:0;}.mscgenjs-fence rect.bglayer{fill:white;stroke:white;stroke-width:0;}.mscgenjs-fence line{stroke:black;}.mscgenjs-fence line.return{stroke-dasharray:5,2;}.mscgenjs-fence line.comment{stroke-dasharray:5,2;}.mscgenjs-fence line.inline_expression_divider{stroke-dasharray:10,5;}.mscgenjs-fence text{color:inherit;stroke:none;text-anchor:middle;}.mscgenjs-fence text.entity-text{text-decoration:underline;}.mscgenjs-fence text.anchor-start{text-anchor:start;}.mscgenjs-fence path{stroke:black;color:black;fill:none;}.mscgenjs-fence .arrow-marker{overflow:visible;}.mscgenjs-fence .arrow-style{stroke-width:1;}.mscgenjs-fence .arcrowomit{stroke-dasharray:2,2;}.mscgenjs-fence rect.box, .mscgenjs-fence path.box{fill:white;}.mscgenjs-fence .inherit{stroke:inherit;color:inherit;}.mscgenjs-fence .inherit-fill{fill:inherit;}.mscgenjs-fence .watermark{stroke:black;color:black;fill:black;font-size:48pt;font-weight:bold;opacity:0.14;}"}}),r("lib/mscgenjs-core/render/graphics/renderskeleton",["./svgelementfactory","./constants","./csstemplates"],function(e,t,r){"use strict";function n(t,r){return r.forEach(function(r){"method"===r.type?t.appendChild(e.createMarkerPolygon(r.name,r.path,r.color)):t.appendChild(e.createMarkerPath(r.name,r.path,r.color))}),t}function o(e){var t=p.createElement("style");return t.setAttribute("type","text/css"),t.appendChild(p.createTextNode(l(e))),t}function i(t,r,i){var a=e.createDefs();return a.appendChild(o(t,i)),a=n(a,r),a.appendChild(e.createGroup(t+"__defs")),a}function a(t){var r=e.createGroup(t+"__body");return r.appendChild(e.createGroup(t+"__background")),r.appendChild(e.createGroup(t+"__arcspanlayer")),r.appendChild(e.createGroup(t+"__lifelinelayer")),r.appendChild(e.createGroup(t+"__sequencelayer")),r.appendChild(e.createGroup(t+"__notelayer")),r.appendChild(e.createGroup(t+"__watermark")),r.appendChild(e.createGroup(t+"__onionskin","onionskin")),r}function c(t){return e.init(t.document),t.document}function s(r,n,o,s,l){p=c(r);var f=p.getElementById(n);null===f&&(f=p.body);var d=e.createSVG(o,t.CSS_FENCE_CLASS);return d.appendChild(u(r,o,l.source)),d.appendChild(i(o,s,l.styleAdditions)),d.appendChild(a(o)),f.appendChild(d),p}function u(t,r,n){var o=e.createDesc(r+"__msc_source");return Boolean(n)&&o.appendChild(t.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n"+n)),o}function l(e,n){return r.baseTemplate.replace(/<%=fontSize%>/g,t.FONT_SIZE).replace(/<%=lineWidth%>/g,t.LINE_WIDTH)+(Boolean(n)?n:"")}var p={};return{bootstrap:s,init:c}}),r("lib/mscgenjs-core/render/text/asttransform",[],function(){"use strict";function e(e,t){e&&t&&e.forEach(function(e){t.forEach(function(t){t(e)})})}function t(e,t,r,n){n&&n.forEach(function(n){n(r,e,t)})}function r(e,r,o){r.forEach(function(i){t(e,r,i,o),i.arcs&&n(e,i.arcs,o)})}function n(e,t,n){e&&t&&n&&t.forEach(function(t){r(e,t,n)})}function o(t,r,o){return e(t.entities,r),n(t.entities,t.arcs,o),t}return{transform:o}}),r("lib/mscgenjs-core/render/text/arcmappings",[],function(){"use strict";var e={"->":"rvee","<->":"rvee","=>":"normal","<=>":"normal","-x":"oinvonormal"},t={box:"box",abox:"hexagon",rbox:"box",note:"note"},r={">>":"dashed","<<>>":"dashed","..":"dashed",":>":"bold","<:>":"bold","::":"bold",rbox:"rounded"},n={"|||":"emptyarc","...":"emptyarc","---":"emptyarc","->":"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"},o={"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"},i={"|||":"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"},a={"|||":"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"};return{getArrow:function(t){return e[t]},getShape:function(e){return t[e]},getStyle:function(e){return r[e]},getAggregate:function(e){return n[e]},getClass:function(e){return i[e]||e},getAggregateClass:function(e){return a[e]||e},getNormalizedKind:function(e){return o[e]||e}}}),r("lib/mscgenjs-core/render/text/textutensils",[],function(){"use strict";return{wrap:function(e,t){for(var r=0,n=[],o=0,i=0,a=0,c=0,s=e.replace(/[\t\n]+/g," ").replace(/\\n/g,"\n");c<=s.length;)c>=s.length?n.push(s.substring(o,c)):"\n"===s[c]?(r=0,a=c,n.push(s.substring(o,a)),o=a+1):r++>=t&&(a=s.substring(0,c).lastIndexOf(" "),-1===a||o>a?(r=1,a=c,i=c):(r=0,i=a+1),n.push(s.substring(o,a)),o=i),c++;return n},unescapeString:function(e){return e.replace(/\\"/g,'"')},escapeString:function(e){return e.replace(/\\"/g,'"').replace(/"/g,'\\"')}}}),r("lib/mscgenjs-core/render/text/flatten",["./asttransform","./arcmappings","../../lib/lodash/lodash.custom","./textutensils"],function(e,t,r,n){"use strict";function o(e){"undefined"==typeof e.label&&(e.label=e.name)}function i(e){Boolean(e.label)&&(e.label=n.unescapeString(e.label)),Boolean(e.id)&&(e.id=n.unescapeString(e.id))}function a(e){e.label=Boolean(e.label)?e.label:""}function c(e){if(e.kind&&t.getNormalizedKind(e.kind)!==e.kind){e.kind=t.getNormalizedKind(e.kind);var r=e.from;e.from=e.to,e.to=r}return e}function s(e,t){!e.linecolor&&t.arclinecolor&&(e.linecolor=t.arclinecolor),!e.textcolor&&t.arctextcolor&&(e.textcolor=t.arctextcolor),!e.textbgcolor&&t.arctextbgcolor&&(e.textbgcolor=t.arctextbgcolor)}function u(e,t){if(e&&e.from){var r=t.filter(function(t){return t.name===e.from});r.length>0&&s(e,r[0])}}function l(e){return e.arcs.reduce(function(e,t){return e+(Boolean(t[0].arcs)?l(t[0])+1:0)},e.arcs.length)}function p(e,n,o,i){var a=[],c=[],u=[];return e.forEach(function(e){if("inline_expression"===t.getAggregate(e.kind)){if(e.depth=n,Boolean(e.arcs)){var a=r.cloneDeep(e);a.numberofrows=l(a),delete a.arcs,c.push(a),e.arcs.forEach(function(e){u=u.concat(p(e,n+1,a.from,a.to)),e.forEach(function(e){s(e,a)})}),n>g&&(g=n)}else c.push(e);u.push([{kind:"|||",from:e.from,to:e.to}])}else o&&i&&"emptyarc"===t.getAggregate(e.kind)&&(e.from=o,e.to=i,e.depth=n),c.push(e)}),a.push(c),a.concat(u)}function f(e){var t={};return g=0,Boolean(e.options)&&(t.options=r.cloneDeep(e.options)),Boolean(e.entities)&&(t.entities=r.cloneDeep(e.entities)),t.arcs=[],e&&e.arcs&&e.arcs.forEach(function(e){p(e,0).forEach(function(e){t.arcs.push(e)})}),t.depth=g+1,t}function d(e,t){return e.filter(function(e){return t.from!==e.name}).map(function(e){return t.to=e.name,r.cloneDeep(t)})}function h(e){if(e.entities&&e.arcs){var t=[],n={};e.arcs.forEach(function(o,i){o.filter(function(e){return"*"===e.to}).forEach(function(a,c){n=r.cloneDeep(a),delete e.arcs[i][c],t=d(e.entities,n),o[c]=t.shift(),e.arcs[i]=o.concat(t)})})}return e}var g=0;return{swapRTLArc:c,unwind:f,explodeBroadcasts:h,flatten:function(t){return e.transform(f(t),[o,i],[c,u,i,a])},dotFlatten:function(t){return h(e.transform(t,[o],[c,u]))}}}),r("lib/mscgenjs-core/render/graphics/swap",[],function(){"use strict";function e(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}return{swapfromto:function(t){e(t,"from","to")}}}),r("lib/mscgenjs-core/render/graphics/rowmemory",[],function(){"use strict";function e(e,t){o=[],i=e,a=t}function t(e){return o[e]?o[e]:{y:i+1.5*a+e*a,height:a}}function r(){return t(o.length-1)}function n(e,r,n){if(("undefined"==typeof r||a>r)&&(r=a),"undefined"==typeof n){var i=t(e-1);i&&i.y>0&&(n=i.y+(i.height+r)/2)}o[e]={y:n,height:r}}var o=[],i=0,a=0;return{clear:e,get:t,getLast:r,set:n}}),r("lib/mscgenjs-core/render/graphics/markermanager",["../../lib/lodash/lodash.custom","../text/arcmappings"],function(e,t){"use strict";function r(e,t,r){return t&&r&&["<->","->"].indexOf(e>-1)?r>t?"signal":"signal-u":""}function n(e,t,r){return"<->"===e&&r>=t?"signal-l":"signal-lu"}function o(e,t,o,i,a){var c=[];return u[t]&&u[t].attributes&&(c=u[t].attributes.map(function(c){return{name:c.name,value:c.value.replace(/\{\{signal-marker-end\}\}/g,r(t,i,a)).replace(/\{\{signal-marker-start\}\}/g,n(t,i,a)).replace(/\{\{id\}\}/g,e).replace(/\{\{color\}\}/g,o||"black")}})),c}function i(e,r){return u[t.getNormalizedKind(e)].marker.name+(Boolean(r)?" "+r:" black")}function a(e,r){function n(t){a(e,t)}return Array.isArray(r)&&r.forEach(n),r.arcs&&r.arcs.forEach(n),r.kind&&u[t.getNormalizedKind(r.kind)]&&u[t.getNormalizedKind(r.kind)].marker&&e.indexOf(i(r.kind,r.linecolor))<0&&e.push(i(r.kind,r.linecolor)),e}function c(e){return{kind:e.split(" ")[0],color:e.split(" ")[1]}}function s(e){return e.arcs.reduce(a,[]).sort().map(c)}var u={"->":{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:""}}},l={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"}]}};return{getAttributes:o,getMarkerDefs:function(t,r){return e.flatten(s(r).map(function(e){return l[e.kind].variants.map(function(r){return{name:t+e.kind+r.name+"-"+e.color,path:r.path,color:e.color,type:e.kind}})}))}}}),r("lib/mscgenjs-core/render/graphics/renderlabels",["./svgelementfactory","./svgutensils","./constants","../text/textutensils","../text/arcmappings"],function(e,t,r,n,o){"use strict";function i(e,t){t&&e.setAttribute("style","fill:"+t+";")}function a(e,t,r){i(e,t&&!r?"blue":r)}function c(r,n){var o=e.createRect(t.getBBox(r),"label-text-background");return n&&o.setAttribute("style","fill:"+n+"; stroke:"+n+";"),o}function s(t,r,n,o,i,a){var c={};return c=0===t?e.createText(r,{x:n,y:o},i,a.url,a.id,a.idurl):e.createText(r,{x:n,y:o},i,a.url)}function u(e,t,r){var n=t||e,i=o.getClass(n),a=o.getAggregateClass(n);return i===a?i+r:a+r+i+r}function l(e,n,o,c,l,p){var f=o+(l+.25)*t.calculateTextHeight(),d="";d=u(c.kind,p&&p.kind,"-text "),p&&(p.alignLeft&&(d+="anchor-start "),p.alignAround&&(f=o+(l+.25)*(t.calculateTextHeight()+r.LINE_WIDTH)));var h=s(l,e,n,f,d,c);return i(h,c.textcolor), -a(h,c.url,c.textcolor),h}function p(n,o,i,a){var s=e.createGroup(a);if(n.label){var u=o.x+o.width/2,p=d(n.label,n.kind,o.width,r.FONT_SIZE,i?i.wordWrapArcs:!1),f={};i&&i.alignAbove&&p.forEach(function(){p.push("")});var h=o.y-(p.length-1)/2*(t.calculateTextHeight()+1);i&&i.alignAround&&(1===p.length&&p.push(""),h=o.y-(p.length-1)/2*(t.calculateTextHeight()+r.LINE_WIDTH+1)),p.forEach(function(e,t){""!==e&&(f=l(e,u,h,n,t,i),i&&i.ownBackground&&s.appendChild(c(f,n.textbgcolor)),s.appendChild(f)),h++})}return s}function f(e,t){var r=Math.abs(e),n=12;return 160>=r?r/(t/n*8):320>=r?r/(t/n*6.4):480>=r?r/(t/n*5.9):r/(t/n*5.6)}function d(e,t,r,i,a){return"box"===o.getAggregate(t)||"undefined"==typeof t||a?n.wrap(e,f(r,i)):e.split("\\n")}return{createLabel:p,splitLabel:d}}),r("lib/mscgenjs-core/render/graphics/entities",["./renderlabels","./constants"],function(e,t){"use strict";function r(e){return c[e]}var n=160,o=100,i=34,a={interEntitySpacing:n,height:i,width:o},c={};return{init:function(e){a.interEntitySpacing=n,a.height=i,a.width=o,e&&(a.interEntitySpacing=e*n,a.width=e*o),c={}},getX:r,setX:function(e,t){c[e.name]=t+a.width/2},getOAndD:function(e,t){return{from:r(e),to:r(t)}},setHeight:function(e){a.height=e},getDims:function(){return a},getNoEntityLines:function(r){return e.splitLabel(r,"box",a.width,t.FONT_SIZE).length}}}),r("lib/mscgenjs-core/render/graphics/renderast",["./svgelementfactory","./svglowlevelfactory","./svgutensils","./renderutensils","./renderskeleton","../text/flatten","../text/arcmappings","./swap","./rowmemory","./idmanager","./markermanager","./entities","./renderlabels","./constants","../../lib/lodash/lodash.custom"],function(e,t,r,n,o,i,a,c,s,u,l,p,f,d,h){"use strict";function g(e,t,r,n,o){return m(e,n,r,{source:t,styleAdditions:o})}function m(e,t,n,o){var a=i.flatten(e),c=o||{};c=h.defaults(c,{source:null,styleAdditions:null,mirrorEntitiesOnBottom:!1}),b(a,t,n,c),y(a),v(a);var s=t.document.getElementById(n);return s?r.webkitNamespaceBugWorkaround(s.innerHTML):r.webkitNamespaceBugWorkaround(t.document.body.innerHTML)}function b(e,t,n,i){u.setPrefix(n),J.document=o.bootstrap(t,n,u.get(),l.getMarkerDefs(u.get(),e),i),J.mirrorEntitiesOnBottom=Boolean(i.mirrorEntitiesOnBottom),r.init(J.document),x(J,e.depth),k(J,e.options)}function y(e){N(e.entities),s.clear(p.getDims().height,J.arcRowHeight),B(e.arcs,e.entities),J.mirrorEntitiesOnBottom&&T()}function v(e){var t=_(e);A(J,t),L(e.options,t),j(t)}function x(e,t){w(e.layer,e.document),e.maxDepth=t?t:0}function w(e,t){e.defs=t.getElementById(u.get("__defs")),e.lifeline=t.getElementById(u.get("__lifelinelayer")),e.sequence=t.getElementById(u.get("__sequencelayer")),e.notes=t.getElementById(u.get("__notelayer")),e.inline=t.getElementById(u.get("__arcspanlayer")),e.watermark=t.getElementById(u.get("__watermark"))}function C(e,t){e.arcRowHeight=K,e.arcGradient=Z,e.wordWrapArcs=!1,t&&(t.arcgradient&&(e.arcRowHeight=parseInt(t.arcgradient,10)+K,e.arcGradient=parseInt(t.arcgradient,10)+Z),e.wordWrapArcs=Boolean(t.wordwraparcs))}function k(e,t){p.init(t&&t.hscale),C(e,t)}function _(e){var t=n.determineDepthCorrection(e.depth,d.LINE_WIDTH),r=s.getLast(),o={width:e.entities.length*p.getDims().interEntitySpacing+t,height:Boolean(J.mirrorEntitiesOnBottom)?2*p.getDims().height+r.y+r.height+2*$:r.y+r.height/2+2*$,horizontaltransform:(p.getDims().interEntitySpacing+t-p.getDims().width)/2,autoscale:!!e.options&&!!e.options.width&&"auto"===e.options.width,verticaltransform:$,scale:1};return o.x=0-o.horizontaltransform,o.y=0-o.verticaltransform,o}function A(t,r){var n=e.createRect(r,"bglayer");t.document.getElementById(u.get("__background")).appendChild(n)}function E(t,r){J.layer.watermark.appendChild(e.createDiagonalText(t,r,"watermark"))}function L(e,t){e&&(e.watermark&&E(e.watermark,t),e.width&&"auto"!==e.width&&n.scaleCanvasToWidth(e.width,t))}function j(e){var r=J.document.getElementById(u.get()),n=J.document.getElementById(u.get("__body"));n.setAttribute("transform","translate("+e.horizontaltransform+","+e.verticaltransform+") scale("+e.scale+","+e.scale+")"),e.autoscale&&e.autoscale===!0?t.setAttributes(r,{width:"100%",height:"100%",viewBox:"0 0 "+e.width.toString()+" "+e.height.toString()}):t.setAttributes(r,{width:e.width.toString(),height:e.height.toString()})}function S(e){var t=e[0],n=2;return e.forEach(function(e){var r=p.getNoEntityLines(e.label);r>n&&(n=r,t=e)}),n>2?Math.max(p.getDims().height,r.getBBox(I(t)).height):p.getDims().height}function I(t,r){var n=e.createGroup(u.get(t.name)),o=p.getDims();o.x=r?r:0;var i=f.createLabel(t,{x:o.x,y:o.height/2,width:o.width},{kind:"entity"}),a=e.createRect(o,"entity",t.linecolor,t.textbgcolor);return n.appendChild(a),n.appendChild(i),n}function T(){var t=s.getLast().y+(s.getLast().height+J.arcRowHeight)/2;J.layer.lifeline.appendChild(e.createUse({x:0,y:t},u.get("arcrow"))),J.layer.sequence.appendChild(e.createUse({x:0,y:t+J.arcRowHeight/2},u.get("entities")))}function N(t){var r=0,n=e.createGroup(u.get("entities"));t&&(p.setHeight(S(t)+2*d.LINE_WIDTH),t.forEach(function(e){n.appendChild(I(e,r)),p.setX(e,r),r+=p.getDims().interEntitySpacing}),J.layer.defs.appendChild(n),J.layer.sequence.appendChild(e.createUse({x:0,y:0},u.get("entities")))),J.arcEndX=r-p.getDims().interEntitySpacing+p.getDims().width}function D(t,n,o){var i=!1,c=[];s.set(n),t.forEach(function(e,t){var l=u.get(n.toString()+"_"+t.toString()),h={};switch(a.getAggregate(e.kind)){case"emptyarc":h=M(e,l),i="..."===e.kind,c.push({id:l,layer:J.layer.sequence});break;case"box":h=P(l,p.getOAndD(e.from,e.to),e),c.push({id:l,layer:J.layer.notes});break;case"inline_expression":h=O(l+"_label",e),c.push({id:l+"_label",layer:J.layer.notes}),Q.push({id:l,arc:e,rownum:n});break;default:if(e.from&&e.to){var g=0,m=0;if("*"===e.to){var b=e.label;m=p.getX(e.from),o.forEach(function(t,r){t.name!==e.from&&(g=p.getX(t.name),e.label="",J.layer.defs.appendChild(q(l+"bc"+r,e,m,g)),c.push({id:l+"bc"+r,layer:J.layer.sequence}))}),e.label=b,h=f.createLabel(e,{x:0,y:0,width:J.arcEndX},{alignAround:!0,ownBackground:!0,wordWrapArcs:J.wordWrapArcs},l+"_lbl"),c.push({id:l+"_lbl",layer:J.layer.sequence})}else h=q(l,e,p.getX(e.from),p.getX(e.to)),c.push({id:l,layer:J.layer.sequence})}}h&&(s.set(n,Math.max(s.get(n).height,r.getBBox(h).height+2*d.LINE_WIDTH)),J.layer.defs.appendChild(h))});var l="arcrow_"+n.toString(),h="arcrow";i&&(h="arcrowomit"),J.layer.defs.appendChild(W(o,h,s.get(n).height,u.get(l))),J.layer.lifeline.appendChild(e.createUse({x:0,y:s.get(n).y},u.get(l))),c.forEach(function(t){t.layer.appendChild(e.createUse({x:0,y:s.get(n).y},t.id))})}function B(t,r){if(Q=[],J.layer.defs.appendChild(W(r,u.get("arcrow"))),J.layer.lifeline.appendChild(e.createUse({x:0,y:s.get(-1).y},u.get("arcrow"))),t){for(var n=0;no.to&&c.swapfromto(o);var a=2*J.maxDepth*d.LINE_WIDTH,s=o.to-o.from+(p.getDims().interEntitySpacing-2*d.LINE_WIDTH)-i-d.LINE_WIDTH,u=o.from-(p.getDims().interEntitySpacing-3*d.LINE_WIDTH-a)/2-2*(J.maxDepth-n.depth)*d.LINE_WIDTH,l=e.createGroup(t);n.label=n.kind+(n.label?": "+n.label:"");var h=f.createLabel(n,{x:u+d.LINE_WIDTH-s/2,y:J.arcRowHeight/4,width:s},{alignLeft:!0,ownBackground:!1,wordWrapArcs:J.wordWrapArcs}),g=r.getBBox(h),m=Math.max(g.height+2*d.LINE_WIDTH,J.arcRowHeight/2-2*d.LINE_WIDTH),b=Math.min(g.width+2*d.LINE_WIDTH,s),y=e.createEdgeRemark({width:b-d.LINE_WIDTH+i,height:m,x:u,y:0},"box inline_expression_label",n.linecolor,n.textbgcolor,i);return l.appendChild(y),l.appendChild(h),l}function H(t){t.forEach(function(t){J.layer.defs.appendChild(R(t)),J.layer.inline.appendChild(e.createUse({x:0,y:s.get(t.rownum).y},t.id))})}function R(e){var t=s.get(e.rownum).y,r=s.get(e.rownum+e.arc.numberofrows+1).y,n=r-t;return e.arc.label="",P(e.id,p.getOAndD(e.arc.from,e.arc.to),e.arc,n)}function W(t,r,n,o){o||(o=r),(!n||np.getX(e.to)&&c.swapfromto(e),e.kind){case"...":case"|||":r=z(t,e);break;case"---":r=U(t,e)}return r}function G(e){return e.arcskip?e.arcskip*J.arcRowHeight:0}function X(e){return"<:>"===e?"bidi ":"::"===e?"nodi ":""}function q(t,r,o,i){var c=e.createGroup(t),s="arc ";s+=X(r.kind),s+=a.getAggregateClass(r.kind)+" "+a.getClass(r.kind);var h=[":>","::","<:>"].indexOf(r.kind)>-1,g=G(r),m=0===g?J.arcGradient:g;if(i=n.determineArcXTo(r.kind,o,i),o===i){c.appendChild(F(r.kind,o,g,h,r.linecolor));var b=2*p.getDims().interEntitySpacing/3;c.appendChild(f.createLabel(r,{x:o+1.5*d.LINE_WIDTH-b/2,y:0-J.arcRowHeight/5-d.LINE_WIDTH/2,width:b},{alignLeft:!0,alignAbove:!0,ownBackground:!0,wordWrapArcs:J.wordWrapArcs}))}else{var y=e.createLine({xFrom:o,yFrom:0,xTo:i,yTo:m},s,h);l.getAttributes(u.get(),r.kind,r.linecolor,o,i).forEach(function(e){y.setAttribute(e.name,e.value)}),c.appendChild(y),c.appendChild(f.createLabel(r,{x:o,y:0,width:i-o},{alignAround:!0,ownBackground:!0,wordWrapArcs:J.wordWrapArcs}))}return c}function z(t,r){var n=0,o=J.arcEndX,i=e.createGroup(t);return r.from&&r.to&&(n=p.getX(r.from),o=Math.abs(p.getX(r.to)-p.getX(r.from))),i.appendChild(f.createLabel(r,{x:n,y:0,width:o},{ownBackground:!0,wordWrapArcs:J.wordWrapArcs},t+"_lbl")),i}function U(t,r){var n=0,o=J.arcEndX,i="comment",a=e.createGroup(t);if(r.from&&r.to){var c=1*J.maxDepth*d.LINE_WIDTH,s=2*(J.maxDepth-r.depth)*d.LINE_WIDTH;n=p.getX(r.from)-(p.getDims().interEntitySpacing+2*d.LINE_WIDTH)/2-(s-c),o=p.getX(r.to)+(p.getDims().interEntitySpacing+2*d.LINE_WIDTH)/2+(s-c),i="inline_expression_divider"}var u=e.createLine({xFrom:n,yFrom:0,xTo:o,yTo:0},i);return a.appendChild(u),a.appendChild(z(t+"_txt",r)),r.linecolor&&u.setAttribute("style","stroke:"+r.linecolor+";"),a}function P(t,n,o,i){n.from>n.to&&c.swapfromto(n);var a=2*J.maxDepth*d.LINE_WIDTH,s=n.to-n.from+p.getDims().interEntitySpacing-2*d.LINE_WIDTH-a,u=6,l=n.from-(p.getDims().interEntitySpacing-2*d.LINE_WIDTH-a)/2,h=e.createGroup(t),g={},m=f.createLabel(o,{x:l,y:0,width:s}),b=r.getBBox(m),y=i?i:Math.max(b.height+2*d.LINE_WIDTH,J.arcRowHeight-2*d.LINE_WIDTH),v={width:s,height:y,x:l,y:0-y/2};switch(o.kind){case"box":g=e.createRect(v,"box",o.linecolor,o.textbgcolor);break;case"rbox":g=e.createRect(v,"box rbox",o.linecolor,o.textbgcolor,u,u);break;case"abox":v.y=0,g=e.createABox(v,"box abox",o.linecolor,o.textbgcolor);break;case"note":g=e.createNote(v,"box note",o.linecolor,o.textbgcolor);break;default:var x=2*(J.maxDepth-o.depth)*d.LINE_WIDTH;g=e.createRect({width:s+2*x,height:y,x:l-x,y:0},"box inline_expression "+o.kind,o.linecolor,o.textbgcolor)}return h.appendChild(g),h.appendChild(m),h}function V(e,t){J.document=o.init(t),r.init(J.document),r.removeRenderedSVGFromElement(e)}var $=3,K=38,Z=0,J=Object.seal({arcRowHeight:K,arcGradient:Z,arcEndX:0,wordWrapArcs:!1,mirrorEntitiesOnBottom:!1,maxDepth:0,document:{},layer:{defs:{},lifeline:{},sequence:{},notes:{},inline:{},watermark:{}}}),Q=[];return{clean:V,renderAST:g,renderASTNew:m}}),r("utl/exporter",[],function(){"use strict";function e(e,t,r){return e.pathname+"?lang="+r+"&msc="+encodeURIComponent(t)}function t(t,n,o){return e(t,n,o).lengtho;o++)r=" "+r;return r}function r(e,r){return t(r,3)+" "+e}function n(t,r){return t.split("").reduce(function(t,n,i){return i===r?t+e.applyTemplate(s,{"char":o(n)}):t+o(n)},"")}function o(e){return e.replace(/"}}}),r("utl/domutl",[],function(){"use strict";return{ajax:function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(e){e.target.readyState===XMLHttpRequest.DONE&&(200===n.status?t(e):r(e))},n.open("GET",e),n.responseType="text";try{n.send()}catch(o){r(o)}}}}),t(["lib/mscgenjs-core/parse/xuparser","lib/mscgenjs-core/parse/msgennyparser","lib/mscgenjs-core/render/graphics/renderast","utl/exporter","embedding/config","embedding/error-rendering","utl/domutl","utl/tpl"],function(e,t,r,n,o,i,a,c){"use strict";function s(){u();var e=document.getElementsByClassName("mscgen_js");l(e,0),l(document.getElementsByTagName("mscgen"),e.length)}function u(){for(var e=document.scripts,t=0;t{string}",{string:t})}function d(e,t){m(e,t),e.setAttribute("data-renderedby","mscgen_js"),o.getConfig().loadFromSrcAttribute&&e.getAttribute("data-src")?a.ajax(e.getAttribute("data-src"),function(t){h(e,t.target.response)},function(){f(e,c.applyTemplate(k,{url:e.getAttribute("data-src")}))}):!o.getConfig().loadFromSrcAttribute&&e.getAttribute("data-src")?f(e,c.applyTemplate(_,{url:e.getAttribute("data-src")})):h(e,e.textContent)}function h(e,t){var r=b(e),n=v(t,r);n.entities?x(n,e.id,t,r,y(e)):e.innerHTML=i.renderError(t,n.location,n.message)}function g(e,t,r){var i={pathname:"index.html"},a=document.createElement("a");return a.setAttribute("href",o.getConfig().clickURL+n.toLocationString(i,e,t)),a.setAttribute("id",r+"link"),a.setAttribute("style","text-decoration: none;"),a.setAttribute("title","click to edit in the mscgen_js interpreter"),a}function m(e,t){e.id||(e.id=o.getConfig().parentElementPrefix+t.toString())}function b(e){var t=e.getAttribute("data-language");return t||(t=o.getConfig().defaultLanguage),t}function y(e){var t=e.getAttribute("data-mirror-entities");return t&&"true"===t?!0:!1}function v(r,n){var o={};try{o="msgenny"===n?t.parse(r):"json"===n?JSON.parse(r):e.parse(r)}catch(i){return i}return o}function x(e,t,n,i,a){var c=document.getElementById(t);c.innerHTML="",!0===o.getConfig().clickable&&(c.appendChild(g(n,i,t)),t+="link"),r.clean(t,window),r.renderASTNew(e,window,t,{source:n,mirrorEntitiesOnBottom:a})}var w="{msc}",C="data-src='{src}' ",k="ERROR: Could not find or open the URL '{url}' specified in the data-src attribute.",_="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.",A={"text/x-mscgen":"mscgen","text/x-msgenny":"msgenny","text/x-xu":"xu"};s()}),r("mscgen-inpage",function(){})}(); \ No newline at end of file +!function(){var t,e,r;!function(n){function i(t,e){return x.call(t,e)}function o(t,e){var r,n,i,o,a,c,s,u,l,d,p,f,h=e&&e.split("/"),g=y.map,b=g&&g["*"]||{};if(t){for(t=t.split("/"),a=t.length-1,y.nodeIdCompat&&C.test(t[a])&&(t[a]=t[a].replace(C,"")),"."===t[0].charAt(0)&&h&&(f=h.slice(0,h.length-1),t=f.concat(t)),l=0;l0&&(t.splice(l-1,2),l-=2)}t=t.join("/")}if((h||b)&&g){for(r=t.split("/"),l=r.length;l>0;l-=1){if(n=r.slice(0,l).join("/"),h)for(d=h.length;d>0;d-=1)if(i=g[h.slice(0,d).join("/")],i&&(i=i[n])){o=i,c=l;break}if(o)break;!s&&b&&b[n]&&(s=b[n],u=l)}!o&&s&&(o=s,c=u),o&&(r.splice(0,c,o),t=r.join("/"))}return t}function a(t,e){return function(){var r=w.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),f.apply(n,r.concat([t,e]))}}function c(t){return function(e){return o(e,t)}}function s(t){return function(e){b[t]=e}}function u(t){if(i(m,t)){var e=m[t];delete m[t],v[t]=!0,p.apply(n,e)}if(!i(b,t)&&!i(v,t))throw new Error("No "+t);return b[t]}function l(t){var e,r=t?t.indexOf("!"):-1;return r>-1&&(e=t.substring(0,r),t=t.substring(r+1,t.length)),[e,t]}function d(t){return function(){return y&&y.config&&y.config[t]||{}}}var p,f,h,g,b={},m={},y={},v={},x=Object.prototype.hasOwnProperty,w=[].slice,C=/\.js$/;h=function(t,e){var r,n=l(t),i=n[0];return t=n[1],i&&(i=o(i,e),r=u(i)),i?t=r&&r.normalize?r.normalize(t,c(e)):o(t,e):(t=o(t,e),n=l(t),i=n[0],t=n[1],i&&(r=u(i))),{f:i?i+"!"+t:t,n:t,pr:i,p:r}},g={require:function(t){return a(t)},exports:function(t){var e=b[t];return"undefined"!=typeof e?e:b[t]={}},module:function(t){return{id:t,uri:"",exports:b[t],config:d(t)}}},p=function(t,e,r,o){var c,l,d,p,f,y,x=[],w=typeof r;if(o=o||t,"undefined"===w||"function"===w){for(e=!e.length&&r.length?["require","exports","module"]:e,f=0;fr;)n=t.charAt(r),"\n"===n?(i.seenCR||i.line++,i.column=1,i.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(i.line++,i.column=1,i.seenCR=!0):(i.column++,i.seenCR=!1),r++;return oo[e]=i,i}function o(t,e){var r=i(t),n=i(e);return{start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:n.line,column:n.column}}}function a(t){ao>no||(no>ao&&(ao=no,co=[]),co.push(t))}function c(t,r,n,i){function o(t){var e=1;for(t.sort(function(t,e){return t.descriptione.description?1:0});e1?a.slice(0,-1).join(", ")+" or "+a[t.length-1]:a[0],i=e?'"'+r(e)+'"':"end of input","Expected "+n+" but "+i+" found."}return null!==r&&o(r),new e(null!==t?t:a(r,n),r,n,i)}function s(){var e,r,n,i,o,c,s,d,p,f;return e=no,r=$(),r!==wt?(n=u(),n!==wt?(i=$(),i!==wt?(123===t.charCodeAt(no)?(o=_t,no++):(o=wt,0===so&&a(At)),o!==wt?(c=$(),c!==wt?(s=l(),s!==wt?(d=$(),d!==wt?(125===t.charCodeAt(no)?(p=Et,no++):(p=wt,0===so&&a(Lt)),p!==wt?(f=$(),f!==wt?(io=e,r=St(r,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e}function u(){var e;return t.substr(no,3).toLowerCase()===jt?(e=t.substr(no,3),no+=3):(e=wt,0===so&&a(It)),e===wt&&(t.substr(no,2).toLowerCase()===Tt?(e=t.substr(no,2),no+=2):(e=wt,0===so&&a(Nt))),e}function l(){var t,e,r,n,i;return t=no,e=no,r=d(),r!==wt&&(io=e,r=Dt(r)),e=r,e===wt&&(e=null),e!==wt?(r=no,n=f(),n!==wt&&(io=r,n=Bt(n)),r=n,r===wt&&(r=null),r!==wt?(n=no,i=g(),i!==wt&&(io=n,i=Ot(i)),n=i,n===wt&&(n=null),n!==wt?(e=[e,r,n],t=e):(no=t,t=wt)):(no=t,t=wt)):(no=t,t=wt),t}function d(){var e,r,n,i,o,c;for(e=no,r=no,n=[],i=no,o=p(),o!==wt?(44===t.charCodeAt(no)?(c=Ht,no++):(c=wt,0===so&&a(Rt)),c!==wt?(io=i,o=Ft(o),i=o):(no=i,i=wt)):(no=i,i=wt);i!==wt;)n.push(i),i=no,o=p(),o!==wt?(44===t.charCodeAt(no)?(c=Ht,no++):(c=wt,0===so&&a(Rt)),c!==wt?(io=i,o=Ft(o),i=o):(no=i,i=wt)):(no=i,i=wt);return n!==wt?(i=no,o=p(),o!==wt?(59===t.charCodeAt(no)?(c=Wt,no++):(c=wt,0===so&&a(Mt)),c!==wt?(io=i,o=Ft(o),i=o):(no=i,i=wt)):(no=i,i=wt),i!==wt?(n=[n,i],r=n):(no=r,r=wt)):(no=r,r=wt),r!==wt&&(io=e,r=Gt(r)),e=r}function p(){var e,r,n,i,o,c,s,u;return so++,e=no,r=$(),r!==wt?(t.substr(no,6).toLowerCase()===qt?(n=t.substr(no,6),no+=6):(n=wt,0===so&&a(zt)),n===wt&&(t.substr(no,11).toLowerCase()===Ut?(n=t.substr(no,11),no+=11):(n=wt,0===so&&a(Pt))),n!==wt?(i=$(),i!==wt?(61===t.charCodeAt(no)?(o=Vt,no++):(o=wt,0===so&&a($t)),o!==wt?(c=$(),c!==wt?(s=K(),s!==wt?(u=$(),u!==wt?(io=e,r=Kt(n,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(t.substr(no,5).toLowerCase()===Zt?(n=t.substr(no,5),no+=5):(n=wt,0===so&&a(Jt)),n!==wt?(i=$(),i!==wt?(61===t.charCodeAt(no)?(o=Vt,no++):(o=wt,0===so&&a($t)),o!==wt?(c=$(),c!==wt?(s=nt(),s!==wt?(u=$(),u!==wt?(io=e,r=Kt(n,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(t.substr(no,12).toLowerCase()===Qt?(n=t.substr(no,12),no+=12):(n=wt,0===so&&a(Yt)),n!==wt?(i=$(),i!==wt?(61===t.charCodeAt(no)?(o=Vt,no++):(o=wt,0===so&&a($t)),o!==wt?(c=$(),c!==wt?(s=tt(),s!==wt?(u=$(),u!==wt?(io=e,r=te(n,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(t.substr(no,9).toLowerCase()===ee?(n=t.substr(no,9),no+=9):(n=wt,0===so&&a(re)),n!==wt?(i=$(),i!==wt?(61===t.charCodeAt(no)?(o=Vt,no++):(o=wt,0===so&&a($t)),o!==wt?(c=$(),c!==wt?(s=B(),s!==wt?(u=$(),u!==wt?(io=e,r=Kt(n,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)))),so--,e===wt&&(r=wt,0===so&&a(Xt)),e}function f(){var e,r,n,i,o,c;for(e=no,r=no,n=[],i=no,o=h(),o!==wt?(44===t.charCodeAt(no)?(c=Ht,no++):(c=wt,0===so&&a(Rt)),c!==wt?(io=i,o=ne(o),i=o):(no=i,i=wt)):(no=i,i=wt);i!==wt;)n.push(i),i=no,o=h(),o!==wt?(44===t.charCodeAt(no)?(c=Ht,no++):(c=wt,0===so&&a(Rt)),c!==wt?(io=i,o=ne(o),i=o):(no=i,i=wt)):(no=i,i=wt);return n!==wt?(i=no,o=h(),o!==wt?(59===t.charCodeAt(no)?(c=Wt,no++):(c=wt,0===so&&a(Mt)),c!==wt?(io=i,o=ne(o),i=o):(no=i,i=wt)):(no=i,i=wt),i!==wt?(n=[n,i],r=n):(no=r,r=wt)):(no=r,r=wt),r!==wt&&(io=e,r=ie(r)),e=r}function h(){var e,r,n,i,o,c,s,u;return so++,e=no,r=$(),r!==wt?(n=B(),n!==wt?(i=$(),i!==wt?(o=no,91===t.charCodeAt(no)?(c=ae,no++):(c=wt,0===so&&a(ce)),c!==wt?(s=T(),s!==wt?(93===t.charCodeAt(no)?(u=se,no++):(u=wt,0===so&&a(ue)),u!==wt?(io=o,c=le(n,s),o=c):(no=o,o=wt)):(no=o,o=wt)):(no=o,o=wt),o===wt&&(o=null),o!==wt?(c=$(),c!==wt?(io=e,r=de(n,o),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(n=R(),n!==wt?(i=$(),i!==wt?(o=no,91===t.charCodeAt(no)?(c=ae,no++):(c=wt,0===so&&a(ce)),c!==wt?(s=T(),s!==wt?(93===t.charCodeAt(no)?(u=se,no++):(u=wt,0===so&&a(ue)),u!==wt?(io=o,c=le(n,s),o=c):(no=o,o=wt)):(no=o,o=wt)):(no=o,o=wt),o===wt&&(o=null),o!==wt?(c=$(),c!==wt?(io=e,r=pe(n,o),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)),so--,e===wt&&(r=wt,0===so&&a(oe)),e}function g(){var e,r,n,i,o;if(e=[],r=no,n=b(),n!==wt?(i=$(),i!==wt?(59===t.charCodeAt(no)?(o=Wt,no++):(o=wt,0===so&&a(Mt)),o!==wt?(io=r,n=fe(n),r=n):(no=r,r=wt)):(no=r,r=wt)):(no=r,r=wt),r!==wt)for(;r!==wt;)e.push(r),r=no,n=b(),n!==wt?(i=$(),i!==wt?(59===t.charCodeAt(no)?(o=Wt,no++):(o=wt,0===so&&a(Mt)),o!==wt?(io=r,n=fe(n),r=n):(no=r,r=wt)):(no=r,r=wt)):(no=r,r=wt);else e=wt;return e}function b(){var e,r,n,i,o,c,s;for(e=no,r=no,n=[],i=no,o=m(),o!==wt?(c=$(),c!==wt?(44===t.charCodeAt(no)?(s=Ht,no++):(s=wt,0===so&&a(Rt)),s!==wt?(io=i,o=fe(o),i=o):(no=i,i=wt)):(no=i,i=wt)):(no=i,i=wt);i!==wt;)n.push(i),i=no,o=m(),o!==wt?(c=$(),c!==wt?(44===t.charCodeAt(no)?(s=Ht,no++):(s=wt,0===so&&a(Rt)),s!==wt?(io=i,o=fe(o),i=o):(no=i,i=wt)):(no=i,i=wt)):(no=i,i=wt);return n!==wt?(i=no,o=m(),o!==wt&&(io=i,o=he(o)),i=o,i!==wt?(n=[n,i],r=n):(no=r,r=wt)):(no=r,r=wt),r!==wt&&(io=e,r=ge(r)),e=r}function m(){var t;return t=y(),t===wt&&(t=C()),t}function y(){var e,r,n,i,o,c;return e=no,r=no,n=v(),n!==wt&&(io=r,n=fe(n)),r=n,r===wt&&(r=no,n=w(),n!==wt&&(io=r,n=fe(n)),r=n,r===wt&&(r=no,n=x(),n!==wt&&(io=r,n=fe(n)),r=n)),r!==wt?(n=no,91===t.charCodeAt(no)?(i=ae,no++):(i=wt,0===so&&a(ce)),i!==wt?(o=T(),o!==wt?(93===t.charCodeAt(no)?(c=se,no++):(c=wt,0===so&&a(ue)),c!==wt?(io=n,i=be(r,o),n=i):(no=n,n=wt)):(no=n,n=wt)):(no=n,n=wt),n===wt&&(n=null),n!==wt?(io=e,r=me(r,n),e=r):(no=e,e=wt)):(no=e,e=wt),e}function v(){var t,e,r,n;return t=no,e=$(),e!==wt?(r=k(),r!==wt?(n=$(),n!==wt?(io=t,e=ye(r),t=e):(no=t,t=wt)):(no=t,t=wt)):(no=t,t=wt),t}function x(){var t,e,r,n;return t=no,e=$(),e!==wt?(r=_(),r!==wt?(n=$(),n!==wt?(io=t,e=ye(r),t=e):(no=t,t=wt)):(no=t,t=wt)):(no=t,t=wt),t}function w(){var e,r,n,i,o,c,s,u;return e=no,r=$(),r!==wt?(n=H(),n!==wt?(i=$(),i!==wt?(o=A(),o!==wt?(c=$(),c!==wt?(s=H(),s!==wt?(u=$(),u!==wt?(io=e,r=ve(n,o,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(42===t.charCodeAt(no)?(n=xe,no++):(n=wt,0===so&&a(we)),n!==wt?(i=$(),i!==wt?(o=S(),o!==wt?(c=$(),c!==wt?(s=H(),s!==wt?(u=$(),u!==wt?(io=e,r=Ce(o,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(n=H(),n!==wt?(i=$(),i!==wt?(o=L(),o!==wt?(c=$(),c!==wt?(42===t.charCodeAt(no)?(s=xe,no++):(s=wt,0===so&&a(we)),s!==wt?(u=$(),u!==wt?(io=e,r=ke(n,o),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e===wt&&(e=no,r=$(),r!==wt?(n=H(),n!==wt?(i=$(),i!==wt?(o=E(),o!==wt?(c=$(),c!==wt?(42===t.charCodeAt(no)?(s=xe,no++):(s=wt,0===so&&a(we)),s!==wt?(u=$(),u!==wt?(io=e,r=ke(n,o),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)))),e}function C(){var e,r,n,i,o,c,s,u,l,d,p,f,h,b,m,y;return e=no,r=$(),r!==wt?(n=H(),n!==wt?(i=$(),i!==wt?(o=I(),o!==wt?(c=$(),c!==wt?(s=H(),s!==wt?(u=$(),u!==wt?(l=no,91===t.charCodeAt(no)?(d=ae,no++):(d=wt,0===so&&a(ce)),d!==wt?(p=T(),p!==wt?(93===t.charCodeAt(no)?(f=se,no++):(f=wt,0===so&&a(ue)),f!==wt?(io=l,d=_e(n,o,s,p),l=d):(no=l,l=wt)):(no=l,l=wt)):(no=l,l=wt),l===wt&&(l=null),l!==wt?(d=$(),d!==wt?(123===t.charCodeAt(no)?(p=_t,no++):(p=wt,0===so&&a(At)),p!==wt?(f=$(),f!==wt?(h=g(),h===wt&&(h=null),h!==wt?(b=$(),b!==wt?(125===t.charCodeAt(no)?(m=Et,no++):(m=wt,0===so&&a(Lt)),m!==wt?(y=$(),y!==wt?(io=e,r=Ae(n,o,s,l,h),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e}function k(){var e,r;return so++,t.substr(no,3)===Le?(e=Le,no+=3):(e=wt,0===so&&a(Se)),e===wt&&(t.substr(no,3)===je?(e=je,no+=3):(e=wt,0===so&&a(Ie))),so--,e===wt&&(r=wt,0===so&&a(Ee)),e}function _(){var e,r;return so++,t.substr(no,3)===Ne?(e=Ne,no+=3):(e=wt,0===so&&a(De)),so--,e===wt&&(r=wt,0===so&&a(Te)),e}function A(){var t,e;return t=no,e=E(),e===wt&&(e=L(),e===wt&&(e=S(),e===wt&&(e=j()))),e!==wt&&(io=t,e=Be(e)),t=e}function E(){var e,r;return so++,t.substr(no,2)===He?(e=He,no+=2):(e=wt,0===so&&a(Re)),e===wt&&(t.substr(no,3)===Fe?(e=Fe,no+=3):(e=wt,0===so&&a(We)),e===wt&&(t.substr(no,2)===Me?(e=Me,no+=2):(e=wt,0===so&&a(Ge)),e===wt&&(t.substr(no,5)===Xe?(e=Xe,no+=5):(e=wt,0===so&&a(qe)),e===wt&&(t.substr(no,3)===ze?(e=ze,no+=3):(e=wt,0===so&&a(Ue)),e===wt&&(t.substr(no,2)===Pe?(e=Pe,no+=2):(e=wt,0===so&&a(Ve)),e===wt&&(t.substr(no,4)===$e?(e=$e,no+=4):(e=wt,0===so&&a(Ke)),e===wt&&(t.substr(no,2)===Ze?(e=Ze,no+=2):(e=wt,0===so&&a(Je)),e===wt&&(t.substr(no,3)===Qe?(e=Qe,no+=3):(e=wt,0===so&&a(Ye)))))))))),so--,e===wt&&(r=wt,0===so&&a(Oe)),e}function L(){var e,r;return so++,t.substr(no,2)===er?(e=er,no+=2):(e=wt,0===so&&a(rr)),e===wt&&(t.substr(no,3)===nr?(e=nr,no+=3):(e=wt,0===so&&a(ir)),e===wt&&(t.substr(no,2)===or?(e=or,no+=2):(e=wt,0===so&&a(ar)),e===wt&&(t.substr(no,2)===cr?(e=cr,no+=2):(e=wt,0===so&&a(sr)),e===wt&&(t.substr(no,2)===ur?(e=ur,no+=2):(e=wt,0===so&&a(lr)),e===wt&&(t.substr(no,2).toLowerCase()===dr?(e=t.substr(no,2),no+=2):(e=wt,0===so&&a(pr))))))),so--,e===wt&&(r=wt,0===so&&a(tr)),e}function S(){var e,r;return so++,t.substr(no,2)===hr?(e=hr,no+=2):(e=wt,0===so&&a(gr)),e===wt&&(t.substr(no,3)===br?(e=br,no+=3):(e=wt,0===so&&a(mr)),e===wt&&(t.substr(no,2)===yr?(e=yr,no+=2):(e=wt,0===so&&a(vr)),e===wt&&(t.substr(no,2)===xr?(e=xr,no+=2):(e=wt,0===so&&a(wr)),e===wt&&(t.substr(no,2)===Cr?(e=Cr,no+=2):(e=wt,0===so&&a(kr)),e===wt&&(t.substr(no,2).toLowerCase()===_r?(e=t.substr(no,2),no+=2):(e=wt,0===so&&a(Ar))))))),so--,e===wt&&(r=wt,0===so&&a(fr)),e}function j(){var e,r;return so++,t.substr(no,4).toLowerCase()===Lr?(e=t.substr(no,4),no+=4):(e=wt,0===so&&a(Sr)),e===wt&&(t.substr(no,4).toLowerCase()===jr?(e=t.substr(no,4),no+=4):(e=wt,0===so&&a(Ir)),e===wt&&(t.substr(no,4).toLowerCase()===Tr?(e=t.substr(no,4),no+=4):(e=wt,0===so&&a(Nr)),e===wt&&(t.substr(no,3).toLowerCase()===Dr?(e=t.substr(no,3),no+=3):(e=wt,0===so&&a(Br))))),so--,e===wt&&(r=wt,0===so&&a(Er)),e}function I(){var e,r;return so++,e=no,t.substr(no,3).toLowerCase()===Hr?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(Rr)),r===wt&&(t.substr(no,4).toLowerCase()===Fr?(r=t.substr(no,4),no+=4):(r=wt,0===so&&a(Wr)),r===wt&&(t.substr(no,3).toLowerCase()===Mr?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(Gr)),r===wt&&(t.substr(no,5).toLowerCase()===Xr?(r=t.substr(no,5),no+=5):(r=wt,0===so&&a(qr)),r===wt&&(t.substr(no,3).toLowerCase()===zr?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(Ur)),r===wt&&(t.substr(no,3).toLowerCase()===Pr?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(Vr)),r===wt&&(t.substr(no,6).toLowerCase()===$r?(r=t.substr(no,6),no+=6):(r=wt,0===so&&a(Kr)),r===wt&&(t.substr(no,3).toLowerCase()===Zr?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(Jr)),r===wt&&(t.substr(no,8).toLowerCase()===Qr?(r=t.substr(no,8),no+=8):(r=wt,0===so&&a(Yr)),r===wt&&(t.substr(no,6).toLowerCase()===tn?(r=t.substr(no,6),no+=6):(r=wt,0===so&&a(en)),r===wt&&(t.substr(no,8).toLowerCase()===rn?(r=t.substr(no,8),no+=8):(r=wt,0===so&&a(nn)),r===wt&&(t.substr(no,6).toLowerCase()===on?(r=t.substr(no,6),no+=6):(r=wt,0===so&&a(an)),r===wt&&(t.substr(no,4).toLowerCase()===cn?(r=t.substr(no,4),no+=4):(r=wt,0===so&&a(sn)),r===wt&&(t.substr(no,3).toLowerCase()===un?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(ln)),r===wt&&(t.substr(no,3).toLowerCase()===dn?(r=t.substr(no,3),no+=3):(r=wt,0===so&&a(pn)))))))))))))))),r!==wt&&(io=e,r=fn(r)),e=r,so--,e===wt&&(r=wt,0===so&&a(Or)),e}function T(){var e,r,n,i,o,c;for(e=no,r=no,n=[],i=no,o=N(),o!==wt?(44===t.charCodeAt(no)?(c=Ht,no++):(c=wt,0===so&&a(Rt)),c!==wt?(io=i,o=fe(o),i=o):(no=i,i=wt)):(no=i,i=wt);i!==wt;)n.push(i),i=no,o=N(),o!==wt?(44===t.charCodeAt(no)?(c=Ht,no++):(c=wt,0===so&&a(Rt)),c!==wt?(io=i,o=fe(o),i=o):(no=i,i=wt)):(no=i,i=wt);return n!==wt?(i=no,o=N(),o!==wt&&(io=i,o=fe(o)),i=o,i!==wt?(n=[n,i],r=n):(no=r,r=wt)):(no=r,r=wt),r!==wt&&(io=e,r=Gt(r)),e=r}function N(){var e,r,n,i,o,c,s,u;return e=no,r=$(),r!==wt?(n=D(),n!==wt?(i=$(),i!==wt?(61===t.charCodeAt(no)?(o=Vt,no++):(o=wt,0===so&&a($t)),o!==wt?(c=$(),c!==wt?(s=H(),s!==wt?(u=$(),u!==wt?(io=e,r=hn(n,s),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e}function D(){var e,r;return so++,t.substr(no,5).toLowerCase()===bn?(e=t.substr(no,5),no+=5):(e=wt,0===so&&a(mn)),e===wt&&(t.substr(no,5).toLowerCase()===yn?(e=t.substr(no,5),no+=5):(e=wt,0===so&&a(vn)),e===wt&&(t.substr(no,2).toLowerCase()===xn?(e=t.substr(no,2),no+=2):(e=wt,0===so&&a(wn)),e===wt&&(t.substr(no,3).toLowerCase()===Cn?(e=t.substr(no,3),no+=3):(e=wt,0===so&&a(kn)),e===wt&&(t.substr(no,9).toLowerCase()===_n?(e=t.substr(no,9),no+=9):(e=wt,0===so&&a(An)),e===wt&&(t.substr(no,10).toLowerCase()===En?(e=t.substr(no,10),no+=10):(e=wt,0===so&&a(Ln)),e===wt&&(t.substr(no,9).toLowerCase()===Sn?(e=t.substr(no,9),no+=9):(e=wt,0===so&&a(jn)),e===wt&&(t.substr(no,10).toLowerCase()===In?(e=t.substr(no,10),no+=10):(e=wt,0===so&&a(Tn)),e===wt&&(t.substr(no,11).toLowerCase()===Nn?(e=t.substr(no,11),no+=11):(e=wt,0===so&&a(Dn)),e===wt&&(t.substr(no,12).toLowerCase()===Bn?(e=t.substr(no,12),no+=12):(e=wt,0===so&&a(On)),e===wt&&(t.substr(no,12).toLowerCase()===Hn?(e=t.substr(no,12),no+=12):(e=wt,0===so&&a(Rn)),e===wt&&(t.substr(no,13).toLowerCase()===Fn?(e=t.substr(no,13),no+=13):(e=wt,0===so&&a(Wn)),e===wt&&(t.substr(no,12).toLowerCase()===Mn?(e=t.substr(no,12),no+=12):(e=wt,0===so&&a(Gn)),e===wt&&(t.substr(no,13).toLowerCase()===Xn?(e=t.substr(no,13),no+=13):(e=wt,0===so&&a(qn)),e===wt&&(t.substr(no,14).toLowerCase()===zn?(e=t.substr(no,14),no+=14):(e=wt,0===so&&a(Un)),e===wt&&(t.substr(no,15).toLowerCase()===Pn?(e=t.substr(no,15),no+=15):(e=wt,0===so&&a(Vn)),e===wt&&(t.substr(no,7).toLowerCase()===$n?(e=t.substr(no,7),no+=7):(e=wt,0===so&&a(Kn)))))))))))))))))),so--,e===wt&&(r=wt,0===so&&a(gn)),e}function B(){var e,r,n,i;return so++,e=no,34===t.charCodeAt(no)?(r=Jn,no++):(r=wt,0===so&&a(Qn)),r!==wt?(n=O(),n!==wt?(34===t.charCodeAt(no)?(i=Jn,no++):(i=wt,0===so&&a(Qn)),i!==wt?(io=e,r=Yn(n),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),so--,e===wt&&(r=wt,0===so&&a(Zn)),e}function O(){var e,r,n,i;for(e=[],r=no,n=no,so++,34===t.charCodeAt(no)?(i=Jn,no++):(i=wt,0===so&&a(Qn)),so--,i===wt?n=void 0:(no=n,n=wt),n!==wt?(t.substr(no,2)===ti?(i=ti,no+=2):(i=wt,0===so&&a(ei)),i===wt&&(t.length>no?(i=t.charAt(no),no++):(i=wt,0===so&&a(ri))),i!==wt?(io=r,n=ni(i),r=n):(no=r,r=wt)):(no=r,r=wt);r!==wt;)e.push(r),r=no,n=no,so++,34===t.charCodeAt(no)?(i=Jn,no++):(i=wt,0===so&&a(Qn)),so--,i===wt?n=void 0:(no=n,n=wt),n!==wt?(t.substr(no,2)===ti?(i=ti,no+=2):(i=wt,0===so&&a(ei)),i===wt&&(t.length>no?(i=t.charAt(no),no++):(i=wt,0===so&&a(ri))),i!==wt?(io=r,n=ni(i),r=n):(no=r,r=wt)):(no=r,r=wt);return e}function H(){var t,e;return so++,t=R(),t===wt&&(t=B()),so--,t===wt&&(e=wt,0===so&&a(ii)),t}function R(){var e,r,n;if(e=no,r=[],oi.test(t.charAt(no))?(n=t.charAt(no),no++):(n=wt,0===so&&a(ai)),n!==wt)for(;n!==wt;)r.push(n),oi.test(t.charAt(no))?(n=t.charAt(no),no++):(n=wt,0===so&&a(ai));else r=wt;return r!==wt&&(io=e,r=ci(r)),e=r}function F(){var e,r;return so++,e=no,ui.test(t.charAt(no))?(r=t.charAt(no),no++):(r=wt,0===so&&a(li)),r!==wt&&(io=e,r=ni(r)),e=r,so--,e===wt&&(r=wt,0===so&&a(si)),e}function W(){var e,r;return so++,e=no,pi.test(t.charAt(no))?(r=t.charAt(no),no++):(r=wt,0===so&&a(fi)),r!==wt&&(io=e,r=ni(r)),e=r,so--,e===wt&&(r=wt,0===so&&a(di)),e}function M(){var e;return t.substr(no,2)===hi?(e=hi,no+=2):(e=wt,0===so&&a(gi)),e}function G(){var e;return t.substr(no,2)===bi?(e=bi,no+=2):(e=wt,0===so&&a(mi)),e}function X(){var e,r,n;return e=no,r=no,so++,t.substr(no,2)===bi?(n=bi,no+=2):(n=wt,0===so&&a(mi)),so--,n===wt?r=void 0:(no=r,r=wt),r!==wt?(t.length>no?(n=t.charAt(no),no++):(n=wt,0===so&&a(ri)),n!==wt?(io=e,r=ni(n),e=r):(no=e,e=wt)):(no=e,e=wt),e}function q(){var t,e,r,n;if(t=no,e=M(),e!==wt){for(r=[],n=X();n!==wt;)r.push(n),n=X();r!==wt?(n=G(),n!==wt?(io=t,e=yi(e,r,n),t=e):(no=t,t=wt)):(no=t,t=wt)}else no=t,t=wt;return t}function z(){var e;return t.substr(no,2)===vi?(e=vi,no+=2):(e=wt,0===so&&a(xi)),e===wt&&(35===t.charCodeAt(no)?(e=wi,no++):(e=wt,0===so&&a(Ci))),e}function U(){var e;return ki.test(t.charAt(no))?(e=t.charAt(no),no++):(e=wt,0===so&&a(_i)),e}function P(){var t,e,r,n;if(t=no,e=z(),e!==wt){for(r=[],n=U();n!==wt;)r.push(n),n=U();r!==wt?(io=t,e=Ai(e,r),t=e):(no=t,t=wt)}else no=t,t=wt;return t}function V(){var t,e;return so++,t=P(),t===wt&&(t=q()),so--,t===wt&&(e=wt,0===so&&a(Ei)),t}function $(){var t,e;for(t=[],e=F(),e===wt&&(e=W(),e===wt&&(e=V()));e!==wt;)t.push(e),e=F(),e===wt&&(e=W(),e===wt&&(e=V()));return t}function K(){var t,e;return so++,t=no,e=Z(),e!==wt&&(io=t,e=Si(e)),t=e,t===wt&&(t=no,e=J(),e!==wt&&(io=t,e=ji(e)),t=e),so--,t===wt&&(e=wt,0===so&&a(Li)),t}function Z(){var e,r,n,i;return e=no,34===t.charCodeAt(no)?(r=Jn,no++):(r=wt,0===so&&a(Qn)),r!==wt?(n=J(),n!==wt?(34===t.charCodeAt(no)?(i=Jn,no++):(i=wt,0===so&&a(Qn)),i!==wt?(io=e,r=Ii(n),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e}function J(){var t;return t=Y(),t===wt&&(t=Q()),t}function Q(){var e,r,n;if(e=no,r=[],Ti.test(t.charAt(no))?(n=t.charAt(no),no++):(n=wt,0===so&&a(Ni)),n!==wt)for(;n!==wt;)r.push(n),Ti.test(t.charAt(no))?(n=t.charAt(no),no++):(n=wt,0===so&&a(Ni));else r=wt;return r!==wt&&(io=e,r=Di(r)),e=r}function Y(){var e,r,n,i,o;return e=no,r=no,n=Q(),n!==wt?(46===t.charCodeAt(no)?(i=Bi,no++):(i=wt,0===so&&a(Oi)),i!==wt?(o=Q(),o!==wt?(n=[n,i,o],r=n):(no=r,r=wt)):(no=r,r=wt)):(no=r,r=wt),r!==wt&&(io=e,r=Hi(r)),e=r}function tt(){var t,e;return so++,t=no,e=et(),e!==wt&&(io=t,e=Fi(e)),t=e,t===wt&&(t=no,e=rt(),e!==wt&&(io=t,e=Wi(e)),t=e),so--,t===wt&&(e=wt,0===so&&a(Ri)),t}function et(){var e,r,n,i;return e=no,34===t.charCodeAt(no)?(r=Jn,no++):(r=wt,0===so&&a(Qn)),r!==wt?(n=rt(),n!==wt?(34===t.charCodeAt(no)?(i=Jn,no++):(i=wt,0===so&&a(Qn)),i!==wt?(io=e,r=Si(n),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e}function rt(){var e;return t.substr(no,4).toLowerCase()===Mi?(e=t.substr(no,4),no+=4):(e=wt,0===so&&a(Gi)),e===wt&&(t.substr(no,5).toLowerCase()===Xi?(e=t.substr(no,5),no+=5):(e=wt,0===so&&a(qi)),e===wt&&(t.substr(no,2).toLowerCase()===zi?(e=t.substr(no,2),no+=2):(e=wt,0===so&&a(Ui)),e===wt&&(t.substr(no,3).toLowerCase()===Pi?(e=t.substr(no,3),no+=3):(e=wt,0===so&&a(Vi)),e===wt&&(48===t.charCodeAt(no)?(e=$i,no++):(e=wt,0===so&&a(Ki)),e===wt&&(49===t.charCodeAt(no)?(e=Zi,no++):(e=wt,0===so&&a(Ji))))))),e}function nt(){var t,e;return so++,t=it(),t===wt&&(t=ot()),so--,t===wt&&(e=wt,0===so&&a(Qi)),t}function it(){var e,r,n,i;return e=no,34===t.charCodeAt(no)?(r=Jn,no++):(r=wt,0===so&&a(Qn)),r!==wt?(n=ot(),n!==wt?(34===t.charCodeAt(no)?(i=Jn,no++):(i=wt,0===so&&a(Qn)),i!==wt?(io=e,r=Si(n),e=r):(no=e,e=wt)):(no=e,e=wt)):(no=e,e=wt),e}function ot(){var e,r;return e=no,r=J(),r!==wt&&(io=e,r=Yi(r)),e=r,e===wt&&(e=no,t.substr(no,4).toLowerCase()===to?(r=t.substr(no,4),no+=4):(r=wt,0===so&&a(eo)),r!==wt&&(io=e,r=ro(r)),e=r),e}function at(t,e){e&&Object.getOwnPropertyNames(e).forEach(function(r){t[r]=e[r]})}function ct(t,e){return t=t?t:{},at(t,e),t}function st(t){var e={};return t[0].forEach(function(t){e=ct(e,t)}),ct(e,t[1])}function ut(t){return["true","on","1"].indexOf(t.toLowerCase())>-1}function lt(t,e){var r={};return r[t.toLowerCase()]=e,r}function dt(t,e){return void 0===e||"*"===e||t.entities.some(function(t){return t.name===e})}function pt(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"].indexOf(t)>-1}function ft(t,e){return"Entity '"+t+"' in arc '"+e.from+" "+e.kind+" "+e.to+"' is not defined."}function ht(t,e){this.name="EntityNotDefinedError",this.message=ft(t,e),e.location&&(this.location=e.location,this.location.start.line++,this.location.end.line++)}function gt(t,e){return t||(t={},t.entities=[]),e&&e.arcs&&e.arcs.forEach(function(e){e.forEach(function(e){if(e.from&&!dt(t,e.from))throw new ht(e.from,e);if(e.to&&!dt(t,e.to))throw new ht(e.to,e);e.location&&delete e.location,e.arcs&>(t,e)})}),t}function bt(t){return t&&t.options?!!t.options.watermark||!!t.options.width&&"auto"===t.options.width:!1}function mt(t){return t&&t.arcs?t.arcs.some(function(t){return t.some(function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].indexOf(t.kind)>-1})}):!1}function yt(t,e){var r=bt(t),n=mt(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}var vt,xt=arguments.length>1?arguments[1]:{},wt={},Ct={program:s},kt=s,_t="{",At={type:"literal",value:"{",description:'"{"'},Et="}",Lt={type:"literal",value:"}",description:'"}"'},St=function(t,e){e[1]=gt(e[1],e[2]);var r=ct(e[0],ct(e[1],e[2]));return r=ct({meta:yt(e[0],e[2])},r),t.length>0&&(r=ct({precomment:t},r)),r},jt="msc",It={type:"literal",value:"msc",description:'"msc"'},Tt="xu",Nt={type:"literal",value:"xu",description:'"xu"'},Dt=function(t){return{options:t}},Bt=function(t){return{entities:t}},Ot=function(t){return{arcs:t}},Ht=",",Rt={type:"literal",value:",",description:'","'},Ft=function(t){return t},Wt=";",Mt={type:"literal",value:";",description:'";"'},Gt=function(t){return st(t)},Xt={type:"other",description:"option"},qt="hscale",zt={type:"literal",value:"hscale",description:'"hscale"'},Ut="arcgradient",Pt={type:"literal",value:"arcgradient",description:'"arcgradient"'},Vt="=",$t={type:"literal",value:"=",description:'"="'},Kt=function(t,e){return lt(t,e)},Zt="width",Jt={type:"literal",value:"width",description:'"width"'},Qt="wordwraparcs",Yt={type:"literal",value:"wordwraparcs",description:'"wordwraparcs"'},te=function(t,e){var r={};return r[t.toLowerCase()]=ut(e),r},ee="watermark",re={type:"literal",value:"watermark",description:'"watermark"'},ne=function(t){return t},ie=function(t){return t[0].push(t[1]),t[0]},oe={type:"other",description:"entity"},ae="[",ce={type:"literal",value:"[",description:'"["'},se="]",ue={type:"literal",value:"]",description:'"]"'},le=function(t,e){return e},de=function(t,e){return ct({name:t},e)},pe=function(t,e){return pt(t)&&n("MscGen keywords aren't allowed as entity names (embed them in quotes if you need them)"),ct({name:t},e)},fe=function(t){return t},he=function(t){return[t]},ge=function(t){return t[0].push(t[1][0]),t[0]},be=function(t,e){return e},me=function(t,e){return ct(t,e)},ye=function(t){return{kind:t}},ve=function(t,e,n){return{kind:e,from:t,to:n,location:r()}},xe="*",we={type:"literal",value:"*",description:'"*"'},Ce=function(t,e){return{kind:t,from:"*",to:e,location:r()}},ke=function(t,e){return{kind:e,from:t,to:"*",location:r()}},_e=function(t,e,r,n){return n},Ae=function(t,e,n,i,o){var a={kind:e,from:t,to:n,location:r(),arcs:o};return ct(a,i)},Ee={type:"other",description:"empty row"},Le="|||",Se={type:"literal",value:"|||",description:'"|||"'},je="...",Ie={type:"literal",value:"...",description:'"..."'},Te={type:"other",description:"---"},Ne="---",De={type:"literal",value:"---",description:'"---"'},Be=function(t){return t.toLowerCase()},Oe={type:"other",description:"bi-directional arrow"},He="--",Re={type:"literal",value:"--",description:'"--"'},Fe="<->",We={type:"literal",value:"<->",description:'"<->"'},Me="==",Ge={type:"literal",value:"==",description:'"=="'},Xe="<<=>>",qe={type:"literal",value:"<<=>>",description:'"<<=>>"'},ze="<=>",Ue={type:"literal",value:"<=>",description:'"<=>"'},Pe="..",Ve={type:"literal",value:"..",description:'".."'},$e="<<>>",Ke={type:"literal",value:"<<>>",description:'"<<>>"'},Ze="::",Je={type:"literal",value:"::",description:'"::"'},Qe="<:>",Ye={type:"literal",value:"<:>",description:'"<:>"'},tr={type:"other",description:"left to right arrow"},er="->",rr={type:"literal",value:"->",description:'"->"'},nr="=>>",ir={type:"literal",value:"=>>",description:'"=>>"'},or="=>",ar={type:"literal",value:"=>",description:'"=>"'},cr=">>",sr={type:"literal",value:">>",description:'">>"'},ur=":>",lr={type:"literal",value:":>",description:'":>"'},dr="-x",pr={type:"literal",value:"-x",description:'"-x"'},fr={type:"other",description:"right to left arrow"},hr="<-",gr={type:"literal",value:"<-",description:'"<-"'},br="<<=",mr={type:"literal",value:"<<=",description:'"<<="'},yr="<=",vr={type:"literal",value:"<=",description:'"<="'},xr="<<",wr={type:"literal",value:"<<",description:'"<<"'},Cr="<:",kr={type:"literal",value:"<:",description:'"<:"'},_r="x-",Ar={type:"literal",value:"x-",description:'"x-"'},Er={type:"other",description:"box"},Lr="note",Sr={type:"literal",value:"note",description:'"note"'},jr="abox",Ir={type:"literal",value:"abox",description:'"abox"'},Tr="rbox",Nr={type:"literal",value:"rbox",description:'"rbox"'},Dr="box",Br={type:"literal",value:"box",description:'"box"'},Or={type:"other",description:"inline expression"},Hr="alt",Rr={type:"literal",value:"alt",description:'"alt"'},Fr="else",Wr={type:"literal",value:"else",description:'"else"'},Mr="opt",Gr={type:"literal",value:"opt",description:'"opt"'},Xr="break",qr={type:"literal",value:"break",description:'"break"'},zr="par",Ur={type:"literal",value:"par",description:'"par"'},Pr="seq",Vr={type:"literal",value:"seq",description:'"seq"'},$r="strict",Kr={type:"literal",value:"strict",description:'"strict"'},Zr="neg",Jr={type:"literal",value:"neg",description:'"neg"'},Qr="critical",Yr={type:"literal",value:"critical",description:'"critical"'},tn="ignore",en={type:"literal",value:"ignore",description:'"ignore"'},rn="consider",nn={type:"literal",value:"consider",description:'"consider"'},on="assert",an={type:"literal",value:"assert",description:'"assert"'},cn="loop",sn={type:"literal",value:"loop",description:'"loop"'},un="ref",ln={type:"literal",value:"ref",description:'"ref"'},dn="exc",pn={type:"literal",value:"exc",description:'"exc"'},fn=function(t){return t.toLowerCase()},hn=function(t,e){var r={};return r[t.toLowerCase().replace("colour","color")]=e,r},gn={type:"other",description:"attribute name"},bn="label",mn={type:"literal",value:"label",description:'"label"'},yn="idurl",vn={type:"literal",value:"idurl",description:'"idurl"'},xn="id",wn={type:"literal",value:"id",description:'"id"'},Cn="url",kn={type:"literal",value:"url",description:'"url"'},_n="linecolor",An={type:"literal",value:"linecolor",description:'"linecolor"'},En="linecolour",Ln={type:"literal",value:"linecolour",description:'"linecolour"'},Sn="textcolor",jn={type:"literal",value:"textcolor",description:'"textcolor"'},In="textcolour",Tn={type:"literal",value:"textcolour",description:'"textcolour"'},Nn="textbgcolor",Dn={type:"literal",value:"textbgcolor",description:'"textbgcolor"'},Bn="textbgcolour",On={type:"literal",value:"textbgcolour",description:'"textbgcolour"'},Hn="arclinecolor",Rn={type:"literal",value:"arclinecolor",description:'"arclinecolor"'},Fn="arclinecolour",Wn={type:"literal",value:"arclinecolour", +description:'"arclinecolour"'},Mn="arctextcolor",Gn={type:"literal",value:"arctextcolor",description:'"arctextcolor"'},Xn="arctextcolour",qn={type:"literal",value:"arctextcolour",description:'"arctextcolour"'},zn="arctextbgcolor",Un={type:"literal",value:"arctextbgcolor",description:'"arctextbgcolor"'},Pn="arctextbgcolour",Vn={type:"literal",value:"arctextbgcolour",description:'"arctextbgcolour"'},$n="arcskip",Kn={type:"literal",value:"arcskip",description:'"arcskip"'},Zn={type:"other",description:"double quoted string"},Jn='"',Qn={type:"literal",value:'"',description:'"\\""'},Yn=function(t){return t.join("")},ti='\\"',ei={type:"literal",value:'\\"',description:'"\\\\\\""'},ri={type:"any",description:"any character"},ni=function(t){return t},ii={type:"other",description:"identifier"},oi=/^[A-Za-z_0-9]/,ai={type:"class",value:"[A-Za-z_0-9]",description:"[A-Za-z_0-9]"},ci=function(t){return t.join("")},si={type:"other",description:"whitespace"},ui=/^[ \t]/,li={type:"class",value:"[ \\t]",description:"[ \\t]"},di={type:"other",description:"lineend"},pi=/^[\r\n]/,fi={type:"class",value:"[\\r\\n]",description:"[\\r\\n]"},hi="/*",gi={type:"literal",value:"/*",description:'"/*"'},bi="*/",mi={type:"literal",value:"*/",description:'"*/"'},yi=function(t,e,r){return t+e.join("")+r},vi="//",xi={type:"literal",value:"//",description:'"//"'},wi="#",Ci={type:"literal",value:"#",description:'"#"'},ki=/^[^\r\n]/,_i={type:"class",value:"[^\\r\\n]",description:"[^\\r\\n]"},Ai=function(t,e){return t+e.join("")},Ei={type:"other",description:"comment"},Li={type:"other",description:"number"},Si=function(t){return t},ji=function(t){return t.toString()},Ii=function(t){return t.toString()},Ti=/^[0-9]/,Ni={type:"class",value:"[0-9]",description:"[0-9]"},Di=function(t){return parseInt(t.join(""),10)},Bi=".",Oi={type:"literal",value:".",description:'"."'},Hi=function(t){return parseFloat(t.join(""))},Ri={type:"other",description:"boolean"},Fi=function(t){return t},Wi=function(t){return t.toString()},Mi="true",Gi={type:"literal",value:"true",description:'"true"'},Xi="false",qi={type:"literal",value:"false",description:'"false"'},zi="on",Ui={type:"literal",value:"on",description:'"on"'},Pi="off",Vi={type:"literal",value:"off",description:'"off"'},$i="0",Ki={type:"literal",value:"0",description:'"0"'},Zi="1",Ji={type:"literal",value:"1",description:'"1"'},Qi={type:"other",description:"size"},Yi=function(t){return t.toString()},to="auto",eo={type:"literal",value:"auto",description:'"auto"'},ro=function(t){return t.toLowerCase()},no=0,io=0,oo=[{line:1,column:1,seenCR:!1}],ao=0,co=[],so=0;if("startRule"in xt){if(!(xt.startRule in Ct))throw new Error("Can't start parsing from rule \""+xt.startRule+'".');kt=Ct[xt.startRule]}if(vt=kt(),vt!==wt&&no===t.length)return vt;throw vt!==wt&&nor;)n=t.charAt(r),"\n"===n?(i.seenCR||i.line++,i.column=1,i.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(i.line++,i.column=1,i.seenCR=!0):(i.column++,i.seenCR=!1),r++;return fi[e]=i,i}function n(t,e){var n=r(t),i=r(e);return{start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:i.line,column:i.column}}}function i(t){hi>di||(di>hi&&(hi=di,gi=[]),gi.push(t))}function o(t,r,n,i){function o(t){var e=1;for(t.sort(function(t,e){return t.descriptione.description?1:0});e1?a.slice(0,-1).join(", ")+" or "+a[t.length-1]:a[0],i=e?'"'+r(e)+'"':"end of input","Expected "+n+" but "+i+" found."}return null!==r&&o(r),new e(null!==t?t:a(r,n),r,n,i)}function a(){var t,e,r,n;return t=di,e=z(),e!==gt?(r=c(),r!==gt?(n=z(),n!==gt?(pi=t,e=yt(e,r),t=e):(di=t,t=gt)):(di=t,t=gt)):(di=t,t=gt),t}function c(){var t,e,r,n,i;return t=di,e=di,r=s(),r!==gt&&(pi=e,r=vt(r)),e=r,e===gt&&(e=null),e!==gt?(r=di,n=l(),n!==gt&&(pi=r,n=xt(n)),r=n,r===gt&&(r=null),r!==gt?(n=di,i=p(),i!==gt&&(pi=n,i=wt(i)),n=i,n===gt&&(n=null),n!==gt?(e=[e,r,n],t=e):(di=t,t=gt)):(di=t,t=gt)):(di=t,t=gt),t}function s(){var e,r,n,o,a,c;for(e=di,r=di,n=[],o=di,a=u(),a!==gt?(44===t.charCodeAt(di)?(c=Ct,di++):(c=gt,0===bi&&i(kt)),c!==gt?(pi=o,a=_t(a),o=a):(di=o,o=gt)):(di=o,o=gt);o!==gt;)n.push(o),o=di,a=u(),a!==gt?(44===t.charCodeAt(di)?(c=Ct,di++):(c=gt,0===bi&&i(kt)),c!==gt?(pi=o,a=_t(a),o=a):(di=o,o=gt)):(di=o,o=gt);return n!==gt?(o=di,a=u(),a!==gt?(59===t.charCodeAt(di)?(c=At,di++):(c=gt,0===bi&&i(Et)),c!==gt?(pi=o,a=_t(a),o=a):(di=o,o=gt)):(di=o,o=gt),o!==gt?(n=[n,o],r=n):(di=r,r=gt)):(di=r,r=gt),r!==gt&&(pi=e,r=Lt(r)),e=r}function u(){var e,r,n,o,a,c,s,u;return e=di,r=z(),r!==gt?(t.substr(di,6).toLowerCase()===St?(n=t.substr(di,6),di+=6):(n=gt,0===bi&&i(jt)),n===gt&&(t.substr(di,11).toLowerCase()===It?(n=t.substr(di,11),di+=11):(n=gt,0===bi&&i(Tt))),n!==gt?(o=z(),o!==gt?(61===t.charCodeAt(di)?(a=Nt,di++):(a=gt,0===bi&&i(Dt)),a!==gt?(c=z(),c!==gt?(s=U(),s!==gt?(u=z(),u!==gt?(pi=e,r=Bt(n,s),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e===gt&&(e=di,r=z(),r!==gt?(t.substr(di,5).toLowerCase()===Ot?(n=t.substr(di,5),di+=5):(n=gt,0===bi&&i(Ht)),n!==gt?(o=z(),o!==gt?(61===t.charCodeAt(di)?(a=Nt,di++):(a=gt,0===bi&&i(Dt)),a!==gt?(c=z(),c!==gt?(s=Y(),s!==gt?(u=z(),u!==gt?(pi=e,r=Bt(n,s),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e===gt&&(e=di,r=z(),r!==gt?(t.substr(di,12).toLowerCase()===Rt?(n=t.substr(di,12),di+=12):(n=gt,0===bi&&i(Ft)),n!==gt?(o=z(),o!==gt?(61===t.charCodeAt(di)?(a=Nt,di++):(a=gt,0===bi&&i(Dt)),a!==gt?(c=z(),c!==gt?(s=Z(),s!==gt?(u=z(),u!==gt?(pi=e,r=Wt(n,s),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e===gt&&(e=di,r=z(),r!==gt?(t.substr(di,9).toLowerCase()===Mt?(n=t.substr(di,9),di+=9):(n=gt,0===bi&&i(Gt)),n!==gt?(o=z(),o!==gt?(61===t.charCodeAt(di)?(a=Nt,di++):(a=gt,0===bi&&i(Dt)),a!==gt?(c=z(),c!==gt?(s=j(),s!==gt?(u=z(),u!==gt?(pi=e,r=Bt(n,s),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)))),e}function l(){var e,r,n,o,a,c;for(e=di,r=di,n=[],o=di,a=d(),a!==gt?(44===t.charCodeAt(di)?(c=Ct,di++):(c=gt,0===bi&&i(kt)),c!==gt?(pi=o,a=Xt(a),o=a):(di=o,o=gt)):(di=o,o=gt);o!==gt;)n.push(o),o=di,a=d(),a!==gt?(44===t.charCodeAt(di)?(c=Ct,di++):(c=gt,0===bi&&i(kt)),c!==gt?(pi=o,a=Xt(a),o=a):(di=o,o=gt)):(di=o,o=gt);return n!==gt?(o=di,a=d(),a!==gt?(59===t.charCodeAt(di)?(c=At,di++):(c=gt,0===bi&&i(Et)),c!==gt?(pi=o,a=Xt(a),o=a):(di=o,o=gt)):(di=o,o=gt),o!==gt?(n=[n,o],r=n):(di=r,r=gt)):(di=r,r=gt),r!==gt&&(pi=e,r=qt(r)),e=r}function d(){var e,r,n,o,a,c,s,u,l;return bi++,e=di,r=z(),r!==gt?(n=D(),n!==gt?(o=z(),o!==gt?(a=di,58===t.charCodeAt(di)?(c=Ut,di++):(c=gt,0===bi&&i(Pt)),c!==gt?(s=z(),s!==gt?(u=S(),u!==gt?(l=z(),l!==gt?(pi=a,c=Vt(n,u),a=c):(di=a,a=gt)):(di=a,a=gt)):(di=a,a=gt)):(di=a,a=gt),a===gt&&(a=null),a!==gt?(pi=e,r=$t(n,a),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),bi--,e===gt&&(r=gt,0===bi&&i(zt)),e}function p(){var e,r,n,o,a;if(e=[],r=di,n=f(),n!==gt?(o=z(),o!==gt?(59===t.charCodeAt(di)?(a=At,di++):(a=gt,0===bi&&i(Et)),a!==gt?(pi=r,n=Kt(n),r=n):(di=r,r=gt)):(di=r,r=gt)):(di=r,r=gt),r!==gt)for(;r!==gt;)e.push(r),r=di,n=f(),n!==gt?(o=z(),o!==gt?(59===t.charCodeAt(di)?(a=At,di++):(a=gt,0===bi&&i(Et)),a!==gt?(pi=r,n=Kt(n),r=n):(di=r,r=gt)):(di=r,r=gt)):(di=r,r=gt);else e=gt;return e}function f(){var e,r,n,o,a,c;for(e=di,r=di,n=[],o=di,a=h(),a!==gt?(44===t.charCodeAt(di)?(c=Ct,di++):(c=gt,0===bi&&i(kt)),c!==gt?(pi=o,a=Kt(a),o=a):(di=o,o=gt)):(di=o,o=gt);o!==gt;)n.push(o),o=di,a=h(),a!==gt?(44===t.charCodeAt(di)?(c=Ct,di++):(c=gt,0===bi&&i(kt)),c!==gt?(pi=o,a=Kt(a),o=a):(di=o,o=gt)):(di=o,o=gt);return n!==gt?(o=di,a=h(),a!==gt&&(pi=o,a=Zt(a)),o=a,o!==gt?(n=[n,o],r=n):(di=r,r=gt)):(di=r,r=gt),r!==gt&&(pi=e,r=Jt(r)),e=r}function h(){var t;return t=g(),t===gt&&(t=v()),t}function g(){var e,r,n,o,a,c,s;return e=di,r=di,n=b(),n!==gt&&(pi=r,n=Qt(n)),r=n,r===gt&&(r=di,n=y(),n!==gt&&(pi=r,n=Yt(n)),r=n,r===gt&&(r=di,n=m(),n!==gt&&(pi=r,n=te(n)),r=n)),r!==gt?(n=di,58===t.charCodeAt(di)?(o=Ut,di++):(o=gt,0===bi&&i(Pt)),o!==gt?(a=z(),a!==gt?(c=S(),c!==gt?(s=z(),s!==gt?(pi=n,o=ee(r,c),n=o):(di=n,n=gt)):(di=n,n=gt)):(di=n,n=gt)):(di=n,n=gt),n===gt&&(n=null),n!==gt?(pi=e,r=re(r,n),e=r):(di=e,e=gt)):(di=e,e=gt),e}function b(){var t,e,r,n;return t=di,e=z(),e!==gt?(r=x(),r!==gt?(n=z(),n!==gt?(pi=t,e=ne(r),t=e):(di=t,t=gt)):(di=t,t=gt)):(di=t,t=gt),t}function m(){var t,e,r,n;return t=di,e=z(),e!==gt?(r=w(),r!==gt?(n=z(),n!==gt?(pi=t,e=ne(r),t=e):(di=t,t=gt)):(di=t,t=gt)):(di=t,t=gt),t}function y(){var e,r,n,o,a,c,s,u;return e=di,r=z(),r!==gt?(n=D(),n!==gt?(o=z(),o!==gt?(a=C(),a!==gt?(c=z(),c!==gt?(s=D(),s!==gt?(u=z(),u!==gt?(pi=e,r=ie(n,a,s),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e===gt&&(e=di,r=z(),r!==gt?(42===t.charCodeAt(di)?(n=oe,di++):(n=gt,0===bi&&i(ae)),n!==gt?(o=z(),o!==gt?(a=A(),a!==gt?(c=z(),c!==gt?(s=D(),s!==gt?(u=z(),u!==gt?(pi=e,r=ce(a,s),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e===gt&&(e=di,r=z(),r!==gt?(n=D(),n!==gt?(o=z(),o!==gt?(a=_(),a!==gt?(c=z(),c!==gt?(42===t.charCodeAt(di)?(s=oe,di++):(s=gt,0===bi&&i(ae)),s!==gt?(u=z(),u!==gt?(pi=e,r=se(n,a),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e===gt&&(e=di,r=z(),r!==gt?(n=D(),n!==gt?(o=z(),o!==gt?(a=k(),a!==gt?(c=z(),c!==gt?(42===t.charCodeAt(di)?(s=oe,di++):(s=gt,0===bi&&i(ae)),s!==gt?(u=z(),u!==gt?(pi=e,r=se(n,a),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)))),e}function v(){var e,r,n,o,a,c,s,u,l,d,f,h,g,b,m;return e=di,r=z(),r!==gt?(n=D(),n!==gt?(o=z(),o!==gt?(a=L(),a!==gt?(c=z(),c!==gt?(s=D(),s!==gt?(u=z(),u!==gt?(l=di,58===t.charCodeAt(di)?(d=Ut,di++):(d=gt,0===bi&&i(Pt)),d!==gt?(f=z(),f!==gt?(h=S(),h!==gt?(g=z(),g!==gt?(pi=l,d=ue(n,a,s,h),l=d):(di=l,l=gt)):(di=l,l=gt)):(di=l,l=gt)):(di=l,l=gt),l===gt&&(l=null),l!==gt?(123===t.charCodeAt(di)?(d=le,di++):(d=gt,0===bi&&i(de)),d!==gt?(f=z(),f!==gt?(h=p(),h===gt&&(h=null),h!==gt?(g=z(),g!==gt?(125===t.charCodeAt(di)?(b=pe,di++):(b=gt,0===bi&&i(fe)),b!==gt?(m=z(),m!==gt?(pi=e,r=he(n,a,s,l,h),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e}function x(){var e,r;return bi++,t.substr(di,3)===be?(e=be,di+=3):(e=gt,0===bi&&i(me)),e===gt&&(t.substr(di,3)===ye?(e=ye,di+=3):(e=gt,0===bi&&i(ve))),bi--,e===gt&&(r=gt,0===bi&&i(ge)),e}function w(){var e,r;return bi++,t.substr(di,3)===we?(e=we,di+=3):(e=gt,0===bi&&i(Ce)),bi--,e===gt&&(r=gt,0===bi&&i(xe)),e}function C(){var t,e;return t=di,e=k(),e===gt&&(e=_(),e===gt&&(e=A(),e===gt&&(e=E()))),e!==gt&&(pi=t,e=ke(e)),t=e}function k(){var e,r;return bi++,t.substr(di,2)===Ae?(e=Ae,di+=2):(e=gt,0===bi&&i(Ee)),e===gt&&(t.substr(di,3)===Le?(e=Le,di+=3):(e=gt,0===bi&&i(Se)),e===gt&&(t.substr(di,2)===je?(e=je,di+=2):(e=gt,0===bi&&i(Ie)),e===gt&&(t.substr(di,5)===Te?(e=Te,di+=5):(e=gt,0===bi&&i(Ne)),e===gt&&(t.substr(di,3)===De?(e=De,di+=3):(e=gt,0===bi&&i(Be)),e===gt&&(t.substr(di,2)===Oe?(e=Oe,di+=2):(e=gt,0===bi&&i(He)),e===gt&&(t.substr(di,4)===Re?(e=Re,di+=4):(e=gt,0===bi&&i(Fe)),e===gt&&(t.substr(di,2)===We?(e=We,di+=2):(e=gt,0===bi&&i(Me)),e===gt&&(t.substr(di,3)===Ge?(e=Ge,di+=3):(e=gt,0===bi&&i(Xe)))))))))),bi--,e===gt&&(r=gt,0===bi&&i(_e)),e}function _(){var e,r;return bi++,t.substr(di,2)===ze?(e=ze,di+=2):(e=gt,0===bi&&i(Ue)),e===gt&&(t.substr(di,3)===Pe?(e=Pe,di+=3):(e=gt,0===bi&&i(Ve)),e===gt&&(t.substr(di,2)===$e?(e=$e,di+=2):(e=gt,0===bi&&i(Ke)),e===gt&&(t.substr(di,2)===Ze?(e=Ze,di+=2):(e=gt,0===bi&&i(Je)),e===gt&&(t.substr(di,2)===Qe?(e=Qe,di+=2):(e=gt,0===bi&&i(Ye)),e===gt&&(t.substr(di,2).toLowerCase()===tr?(e=t.substr(di,2),di+=2):(e=gt,0===bi&&i(er))))))),bi--,e===gt&&(r=gt,0===bi&&i(qe)),e}function A(){var e,r;return bi++,t.substr(di,2)===nr?(e=nr,di+=2):(e=gt,0===bi&&i(ir)),e===gt&&(t.substr(di,3)===or?(e=or,di+=3):(e=gt,0===bi&&i(ar)),e===gt&&(t.substr(di,2)===cr?(e=cr,di+=2):(e=gt,0===bi&&i(sr)),e===gt&&(t.substr(di,2)===ur?(e=ur,di+=2):(e=gt,0===bi&&i(lr)),e===gt&&(t.substr(di,2)===dr?(e=dr,di+=2):(e=gt,0===bi&&i(pr)),e===gt&&(t.substr(di,2).toLowerCase()===fr?(e=t.substr(di,2),di+=2):(e=gt,0===bi&&i(hr))))))),bi--,e===gt&&(r=gt,0===bi&&i(rr)),e}function E(){var e,r;return bi++,t.substr(di,4).toLowerCase()===br?(e=t.substr(di,4),di+=4):(e=gt,0===bi&&i(mr)),e===gt&&(t.substr(di,4).toLowerCase()===yr?(e=t.substr(di,4),di+=4):(e=gt,0===bi&&i(vr)),e===gt&&(t.substr(di,4).toLowerCase()===xr?(e=t.substr(di,4),di+=4):(e=gt,0===bi&&i(wr)),e===gt&&(t.substr(di,3).toLowerCase()===Cr?(e=t.substr(di,3),di+=3):(e=gt,0===bi&&i(kr))))),bi--,e===gt&&(r=gt,0===bi&&i(gr)),e}function L(){var e,r;return bi++,e=di,t.substr(di,3).toLowerCase()===Ar?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(Er)),r===gt&&(t.substr(di,4).toLowerCase()===Lr?(r=t.substr(di,4),di+=4):(r=gt,0===bi&&i(Sr)),r===gt&&(t.substr(di,3).toLowerCase()===jr?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(Ir)),r===gt&&(t.substr(di,5).toLowerCase()===Tr?(r=t.substr(di,5),di+=5):(r=gt,0===bi&&i(Nr)),r===gt&&(t.substr(di,3).toLowerCase()===Dr?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(Br)),r===gt&&(t.substr(di,3).toLowerCase()===Or?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(Hr)),r===gt&&(t.substr(di,6).toLowerCase()===Rr?(r=t.substr(di,6),di+=6):(r=gt,0===bi&&i(Fr)),r===gt&&(t.substr(di,3).toLowerCase()===Wr?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(Mr)),r===gt&&(t.substr(di,8).toLowerCase()===Gr?(r=t.substr(di,8),di+=8):(r=gt,0===bi&&i(Xr)),r===gt&&(t.substr(di,6).toLowerCase()===qr?(r=t.substr(di,6),di+=6):(r=gt,0===bi&&i(zr)),r===gt&&(t.substr(di,8).toLowerCase()===Ur?(r=t.substr(di,8),di+=8):(r=gt,0===bi&&i(Pr)),r===gt&&(t.substr(di,6).toLowerCase()===Vr?(r=t.substr(di,6),di+=6):(r=gt,0===bi&&i($r)),r===gt&&(t.substr(di,4).toLowerCase()===Kr?(r=t.substr(di,4),di+=4):(r=gt,0===bi&&i(Zr)),r===gt&&(t.substr(di,3).toLowerCase()===Jr?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(Qr)),r===gt&&(t.substr(di,3).toLowerCase()===Yr?(r=t.substr(di,3),di+=3):(r=gt,0===bi&&i(tn)))))))))))))))),r!==gt&&(pi=e,r=en(r)),e=r,bi--,e===gt&&(r=gt,0===bi&&i(_r)),e}function S(){var t;return t=j(),t===gt&&(t=T()),t}function j(){var e,r,n,o;return bi++,e=di,34===t.charCodeAt(di)?(r=nn,di++):(r=gt,0===bi&&i(on)),r!==gt?(n=I(),n!==gt?(34===t.charCodeAt(di)?(o=nn,di++):(o=gt,0===bi&&i(on)),o!==gt?(pi=e,r=an(n),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),bi--,e===gt&&(r=gt,0===bi&&i(rn)),e}function I(){var e,r,n,o;for(e=[],r=di,n=di,bi++,34===t.charCodeAt(di)?(o=nn,di++):(o=gt,0===bi&&i(on)),bi--,o===gt?n=void 0:(di=n,n=gt),n!==gt?(t.substr(di,2)===cn?(o=cn,di+=2):(o=gt,0===bi&&i(sn)),o===gt&&(t.length>di?(o=t.charAt(di),di++):(o=gt,0===bi&&i(un))),o!==gt?(pi=r,n=ln(o),r=n):(di=r,r=gt)):(di=r,r=gt);r!==gt;)e.push(r),r=di,n=di,bi++,34===t.charCodeAt(di)?(o=nn,di++):(o=gt,0===bi&&i(on)),bi--,o===gt?n=void 0:(di=n,n=gt),n!==gt?(t.substr(di,2)===cn?(o=cn,di+=2):(o=gt,0===bi&&i(sn)),o===gt&&(t.length>di?(o=t.charAt(di),di++):(o=gt,0===bi&&i(un))),o!==gt?(pi=r,n=ln(o),r=n):(di=r,r=gt)):(di=r,r=gt);return e}function T(){var t,e;return t=di,e=N(),e!==gt&&(pi=t,e=dn(e)),t=e}function N(){var e,r,n,o;for(e=[],r=di,n=di,bi++,44===t.charCodeAt(di)?(o=Ct,di++):(o=gt,0===bi&&i(kt)),o===gt&&(59===t.charCodeAt(di)?(o=At,di++):(o=gt,0===bi&&i(Et)),o===gt&&(123===t.charCodeAt(di)?(o=le,di++):(o=gt,0===bi&&i(de)))),bi--,o===gt?n=void 0:(di=n,n=gt),n!==gt?(t.length>di?(o=t.charAt(di),di++):(o=gt,0===bi&&i(un)),o!==gt?(pi=r,n=ln(o),r=n):(di=r,r=gt)):(di=r,r=gt);r!==gt;)e.push(r),r=di,n=di,bi++,44===t.charCodeAt(di)?(o=Ct,di++):(o=gt,0===bi&&i(kt)),o===gt&&(59===t.charCodeAt(di)?(o=At,di++):(o=gt,0===bi&&i(Et)),o===gt&&(123===t.charCodeAt(di)?(o=le,di++):(o=gt,0===bi&&i(de)))),bi--,o===gt?n=void 0:(di=n,n=gt),n!==gt?(t.length>di?(o=t.charAt(di),di++):(o=gt,0===bi&&i(un)),o!==gt?(pi=r,n=ln(o),r=n):(di=r,r=gt)):(di=r,r=gt);return e}function D(){var e,r,n;if(bi++,e=di,r=[],fn.test(t.charAt(di))?(n=t.charAt(di),di++):(n=gt,0===bi&&i(hn)),n!==gt)for(;n!==gt;)r.push(n),fn.test(t.charAt(di))?(n=t.charAt(di),di++):(n=gt,0===bi&&i(hn));else r=gt;return r!==gt&&(pi=e,r=gn(r)),e=r,e===gt&&(e=j()),bi--,e===gt&&(r=gt,0===bi&&i(pn)),e}function B(){var e,r;return bi++,e=di,mn.test(t.charAt(di))?(r=t.charAt(di),di++):(r=gt,0===bi&&i(yn)),r!==gt&&(pi=e,r=ln(r)),e=r,bi--,e===gt&&(r=gt,0===bi&&i(bn)),e}function O(){var e,r;return bi++,e=di,xn.test(t.charAt(di))?(r=t.charAt(di),di++):(r=gt,0===bi&&i(wn)),r!==gt&&(pi=e,r=ln(r)),e=r,bi--,e===gt&&(r=gt,0===bi&&i(vn)),e}function H(){var e;return t.substr(di,2)===Cn?(e=Cn,di+=2):(e=gt,0===bi&&i(kn)),e}function R(){var e;return t.substr(di,2)===_n?(e=_n,di+=2):(e=gt,0===bi&&i(An)),e}function F(){var e,r,n;return e=di,r=di,bi++,t.substr(di,2)===_n?(n=_n,di+=2):(n=gt,0===bi&&i(An)),bi--,n===gt?r=void 0:(di=r,r=gt),r!==gt?(t.length>di?(n=t.charAt(di),di++):(n=gt,0===bi&&i(un)),n!==gt?(pi=e,r=ln(n),e=r):(di=e,e=gt)):(di=e,e=gt),e}function W(){var t,e,r,n;if(t=di,e=H(),e!==gt){for(r=[],n=F();n!==gt;)r.push(n),n=F();r!==gt?(n=R(),n!==gt?(pi=t,e=En(e,r,n),t=e):(di=t,t=gt)):(di=t,t=gt)}else di=t,t=gt;return t}function M(){var e;return t.substr(di,2)===Ln?(e=Ln,di+=2):(e=gt,0===bi&&i(Sn)),e===gt&&(35===t.charCodeAt(di)?(e=jn,di++):(e=gt,0===bi&&i(In))),e}function G(){var e;return Tn.test(t.charAt(di))?(e=t.charAt(di),di++):(e=gt,0===bi&&i(Nn)),e}function X(){var t,e,r,n;if(t=di,e=M(),e!==gt){for(r=[],n=G();n!==gt;)r.push(n),n=G();r!==gt?(pi=t,e=Dn(e,r),t=e):(di=t,t=gt)}else di=t,t=gt;return t}function q(){var t,e;return bi++,t=X(),t===gt&&(t=W()),bi--,t===gt&&(e=gt,0===bi&&i(Bn)),t}function z(){var t,e;for(t=[],e=B(),e===gt&&(e=O(),e===gt&&(e=q()));e!==gt;)t.push(e),e=B(),e===gt&&(e=O(),e===gt&&(e=q()));return t}function U(){var t,e;return bi++,t=di,e=P(),e!==gt&&(pi=t,e=Hn(e)),t=e,t===gt&&(t=di,e=V(),e!==gt&&(pi=t,e=Rn(e)),t=e),bi--,t===gt&&(e=gt,0===bi&&i(On)),t}function P(){var e,r,n,o;return e=di,34===t.charCodeAt(di)?(r=nn,di++):(r=gt,0===bi&&i(on)),r!==gt?(n=V(),n!==gt?(34===t.charCodeAt(di)?(o=nn,di++):(o=gt,0===bi&&i(on)),o!==gt?(pi=e,r=Fn(n),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e}function V(){var t;return t=K(),t===gt&&(t=$()),t}function $(){var e,r,n;if(e=di,r=[],Wn.test(t.charAt(di))?(n=t.charAt(di),di++):(n=gt,0===bi&&i(Mn)),n!==gt)for(;n!==gt;)r.push(n),Wn.test(t.charAt(di))?(n=t.charAt(di),di++):(n=gt,0===bi&&i(Mn));else r=gt;return r!==gt&&(pi=e,r=Gn(r)),e=r}function K(){var e,r,n,o,a;return e=di,r=di,n=$(),n!==gt?(46===t.charCodeAt(di)?(o=Xn,di++):(o=gt,0===bi&&i(qn)),o!==gt?(a=$(),a!==gt?(n=[n,o,a],r=n):(di=r,r=gt)):(di=r,r=gt)):(di=r,r=gt),r!==gt&&(pi=e,r=zn(r)),e=r}function Z(){var t,e;return bi++,t=di,e=J(),e!==gt&&(pi=t,e=Pn(e)),t=e,t===gt&&(t=di,e=Q(),e!==gt&&(pi=t,e=Vn(e)),t=e),bi--,t===gt&&(e=gt,0===bi&&i(Un)),t}function J(){var e,r,n,o;return e=di,34===t.charCodeAt(di)?(r=nn,di++):(r=gt,0===bi&&i(on)),r!==gt?(n=Q(),n!==gt?(34===t.charCodeAt(di)?(o=nn,di++):(o=gt,0===bi&&i(on)),o!==gt?(pi=e,r=Hn(n),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e}function Q(){var e;return t.substr(di,4).toLowerCase()===$n?(e=t.substr(di,4),di+=4):(e=gt,0===bi&&i(Kn)),e===gt&&(t.substr(di,5).toLowerCase()===Zn?(e=t.substr(di,5),di+=5):(e=gt,0===bi&&i(Jn)),e===gt&&(t.substr(di,2).toLowerCase()===Qn?(e=t.substr(di,2),di+=2):(e=gt,0===bi&&i(Yn)),e===gt&&(t.substr(di,3).toLowerCase()===ti?(e=t.substr(di,3),di+=3):(e=gt,0===bi&&i(ei)),e===gt&&(48===t.charCodeAt(di)?(e=ri,di++):(e=gt,0===bi&&i(ni)),e===gt&&(49===t.charCodeAt(di)?(e=ii,di++):(e=gt,0===bi&&i(oi))))))),e}function Y(){var t,e;return bi++,t=tt(),t===gt&&(t=et()),bi--,t===gt&&(e=gt,0===bi&&i(ai)),t}function tt(){var e,r,n,o;return e=di,34===t.charCodeAt(di)?(r=nn,di++):(r=gt,0===bi&&i(on)),r!==gt?(n=et(),n!==gt?(34===t.charCodeAt(di)?(o=nn,di++):(o=gt,0===bi&&i(on)),o!==gt?(pi=e,r=Hn(n),e=r):(di=e,e=gt)):(di=e,e=gt)):(di=e,e=gt),e}function et(){var e,r;return e=di,r=V(),r!==gt&&(pi=e,r=ci(r)),e=r,e===gt&&(e=di,t.substr(di,4).toLowerCase()===si?(r=t.substr(di,4),di+=4):(r=gt,0===bi&&i(ui)),r!==gt&&(pi=e,r=li(r)),e=r),e}function rt(t,e){e&&Object.getOwnPropertyNames(e).forEach(function(r){t[r]=e[r]})}function nt(t,e){return t=t?t:{},rt(t,e),t}function it(t){var e={};return t[0].forEach(function(t){e=nt(e,t)}),nt(e,t[1])}function ot(t){return["true","on","1"].indexOf(t.toLowerCase())>-1}function at(t,e){var r={};return r[t.toLowerCase()]=e,r}function ct(t,e,r){return void 0===e||"*"===e?!0:t.entities.some(function(t){return t.name===e})?!0:r[e]===!0}function st(t){var e={};return e.name=t,e}function ut(t,e,r){return t||(t={},t.entities=[]),r||(r={}),e&&e.arcs&&e.arcs.forEach(function(e){e.forEach(function(e){ct(t,e.from,r)||(t.entities[t.entities.length]=st(e.from)),e.arcs&&(r[e.to]=!0,nt(t,ut(t,e,r)),delete r[e.to]),ct(t,e.to,r)||(t.entities[t.entities.length]=st(e.to))})}),t}function lt(t){return t&&t.options?!!t.options.watermark||!!t.options.width&&"auto"===t.options.width:!1}function dt(t){return t&&t.arcs?t.arcs.some(function(t){return t.some(function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].indexOf(t.kind)>-1})}):!1}function pt(t,e){var r=lt(t),n=dt(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}var ft,ht=arguments.length>1?arguments[1]:{},gt={},bt={program:a},mt=a,yt=function(t,e){e[1]=ut(e[1],e[2]);var r=nt(e[0],nt(e[1],e[2]));return r=nt({meta:pt(e[0],e[2])},r),t.length>0&&(r=nt({precomment:t},r)),r},vt=function(t){return{options:t}},xt=function(t){return{entities:t}},wt=function(t){return{arcs:t}},Ct=",",kt={type:"literal",value:",",description:'","'},_t=function(t){return t},At=";",Et={type:"literal",value:";",description:'";"'},Lt=function(t){return it(t)},St="hscale",jt={type:"literal",value:"hscale",description:'"hscale"'},It="arcgradient",Tt={type:"literal",value:"arcgradient",description:'"arcgradient"'},Nt="=",Dt={type:"literal",value:"=",description:'"="'},Bt=function(t,e){return at(t,e)},Ot="width",Ht={type:"literal",value:"width",description:'"width"'},Rt="wordwraparcs",Ft={type:"literal",value:"wordwraparcs",description:'"wordwraparcs"'},Wt=function(t,e){var r={};return r[t.toLowerCase()]=ot(e),r},Mt="watermark",Gt={type:"literal",value:"watermark",description:'"watermark"'},Xt=function(t){return t},qt=function(t){return t[0].push(t[1]),t[0]},zt={type:"other",description:"entity"},Ut=":",Pt={type:"literal",value:":",description:'":"'},Vt=function(t,e){return e},$t=function(t,e){var r={};return r.name=t,e&&(r.label=e),r},Kt=function(t){return t},Zt=function(t){return[t]},Jt=function(t){return t[0].push(t[1][0]),t[0]},Qt=function(t){return t},Yt=function(t){return t},te=function(t){return t},ee=function(t,e){return e},re=function(t,e){return e&&(t.label=e),t},ne=function(t){return{kind:t}},ie=function(t,e,r){return{kind:e,from:t,to:r}},oe="*",ae={type:"literal",value:"*",description:'"*"'},ce=function(t,e){return{kind:t,from:"*",to:e}},se=function(t,e){return{kind:e,from:t,to:"*"}},ue=function(t,e,r,n){return n},le="{",de={type:"literal",value:"{",description:'"{"'},pe="}",fe={type:"literal",value:"}",description:'"}"'},he=function(t,e,r,n,i){var o={kind:e,from:t,to:r,arcs:i};return n&&(o.label=n),o},ge={type:"other",description:"empty row"},be="|||",me={type:"literal",value:"|||",description:'"|||"'},ye="...",ve={type:"literal",value:"...",description:'"..."'},xe={type:"other",description:"---"},we="---",Ce={type:"literal",value:"---",description:'"---"'},ke=function(t){return t.toLowerCase()},_e={type:"other",description:"bi-directional arrow"},Ae="--",Ee={type:"literal",value:"--",description:'"--"'},Le="<->",Se={type:"literal",value:"<->",description:'"<->"'},je="==",Ie={type:"literal",value:"==",description:'"=="'},Te="<<=>>",Ne={type:"literal",value:"<<=>>",description:'"<<=>>"'},De="<=>",Be={type:"literal",value:"<=>",description:'"<=>"'},Oe="..",He={type:"literal",value:"..",description:'".."'},Re="<<>>",Fe={type:"literal",value:"<<>>",description:'"<<>>"'},We="::",Me={type:"literal",value:"::",description:'"::"'},Ge="<:>",Xe={type:"literal",value:"<:>",description:'"<:>"'},qe={type:"other",description:"left to right arrow"},ze="->",Ue={type:"literal",value:"->",description:'"->"'},Pe="=>>",Ve={type:"literal",value:"=>>",description:'"=>>"'},$e="=>",Ke={type:"literal",value:"=>",description:'"=>"'},Ze=">>",Je={type:"literal",value:">>",description:'">>"'},Qe=":>",Ye={type:"literal",value:":>",description:'":>"'},tr="-x",er={type:"literal",value:"-x",description:'"-x"'},rr={type:"other",description:"right to left arrow"},nr="<-",ir={type:"literal",value:"<-",description:'"<-"'},or="<<=",ar={type:"literal",value:"<<=",description:'"<<="'},cr="<=",sr={type:"literal",value:"<=",description:'"<="'},ur="<<",lr={type:"literal",value:"<<",description:'"<<"'},dr="<:",pr={type:"literal",value:"<:",description:'"<:"'},fr="x-",hr={type:"literal",value:"x-",description:'"x-"'},gr={type:"other",description:"box"},br="note",mr={type:"literal",value:"note",description:'"note"'},yr="abox",vr={type:"literal",value:"abox",description:'"abox"'},xr="rbox",wr={type:"literal",value:"rbox",description:'"rbox"'},Cr="box",kr={type:"literal",value:"box",description:'"box"'},_r={type:"other",description:"inline expression"},Ar="alt",Er={type:"literal",value:"alt",description:'"alt"'},Lr="else",Sr={type:"literal",value:"else",description:'"else"'},jr="opt",Ir={type:"literal",value:"opt",description:'"opt"'},Tr="break",Nr={type:"literal",value:"break",description:'"break"'},Dr="par",Br={type:"literal",value:"par",description:'"par"'},Or="seq",Hr={type:"literal",value:"seq",description:'"seq"'},Rr="strict",Fr={type:"literal",value:"strict",description:'"strict"'},Wr="neg",Mr={type:"literal",value:"neg",description:'"neg"'},Gr="critical",Xr={type:"literal",value:"critical",description:'"critical"'},qr="ignore",zr={type:"literal",value:"ignore",description:'"ignore"'},Ur="consider",Pr={type:"literal",value:"consider",description:'"consider"'},Vr="assert",$r={type:"literal",value:"assert",description:'"assert"'},Kr="loop",Zr={type:"literal",value:"loop",description:'"loop"'},Jr="ref",Qr={type:"literal",value:"ref",description:'"ref"'},Yr="exc",tn={type:"literal",value:"exc",description:'"exc"'},en=function(t){return t.toLowerCase()},rn={type:"other",description:"double quoted string"},nn='"',on={type:"literal",value:'"',description:'"\\""'},an=function(t){return t.join("")},cn='\\"',sn={type:"literal",value:'\\"',description:'"\\\\\\""'},un={type:"any",description:"any character"},ln=function(t){return t},dn=function(t){return t.join("").trim()},pn={type:"other",description:"identifier"},fn=/^[^;, "\t\n\r=\-><:{*]/,hn={type:"class",value:'[^;, \\"\\t\\n\\r=\\-><:\\{\\*]',description:'[^;, \\"\\t\\n\\r=\\-><:\\{\\*]'},gn=function(t){return t.join("")},bn={type:"other",description:"whitespace"},mn=/^[ \t]/,yn={type:"class",value:"[ \\t]",description:"[ \\t]"},vn={type:"other",description:"lineend"},xn=/^[\r\n]/,wn={type:"class",value:"[\\r\\n]",description:"[\\r\\n]"},Cn="/*",kn={type:"literal",value:"/*",description:'"/*"'},_n="*/",An={type:"literal",value:"*/",description:'"*/"'},En=function(t,e,r){return t+e.join("")+r},Ln="//",Sn={type:"literal",value:"//",description:'"//"'},jn="#",In={type:"literal",value:"#",description:'"#"'},Tn=/^[^\r\n]/,Nn={type:"class",value:"[^\\r\\n]",description:"[^\\r\\n]"},Dn=function(t,e){return t+e.join("")},Bn={type:"other",description:"comment"},On={type:"other",description:"number"},Hn=function(t){return t},Rn=function(t){return t.toString()},Fn=function(t){return t.toString()},Wn=/^[0-9]/,Mn={type:"class",value:"[0-9]",description:"[0-9]"},Gn=function(t){return parseInt(t.join(""),10)},Xn=".",qn={type:"literal",value:".",description:'"."'},zn=function(t){return parseFloat(t.join(""))},Un={type:"other",description:"boolean"},Pn=function(t){return t},Vn=function(t){return t.toString()},$n="true",Kn={type:"literal",value:"true",description:'"true"'},Zn="false",Jn={type:"literal",value:"false",description:'"false"'},Qn="on",Yn={type:"literal",value:"on",description:'"on"'},ti="off",ei={type:"literal",value:"off",description:'"off"'},ri="0",ni={type:"literal",value:"0",description:'"0"'},ii="1",oi={type:"literal",value:"1",description:'"1"'},ai={type:"other",description:"size"},ci=function(t){return t.toString()},si="auto",ui={type:"literal",value:"auto",description:'"auto"'},li=function(t){return t.toLowerCase()},di=0,pi=0,fi=[{line:1,column:1,seenCR:!1}],hi=0,gi=[],bi=0;if("startRule"in ht){if(!(ht.startRule in bt))throw new Error("Can't start parsing from rule \""+ht.startRule+'".');mt=bt[ht.startRule]}if(ft=mt(),ft!==gt&&di===t.length)return ft;throw ft!==gt&&dit.xFrom&&(e=1),{dx:e,dy:e*(t.yTo-t.yFrom)/(t.xTo-t.xFrom)}}return{getDiagonalAngle:e,getDirection:r}}),r("lib/mscgenjs-core/render/graphics/svgelementfactory",["./constants","./svglowlevelfactory","./geometry"],function(t,e,r){"use strict";function n(r,n){return e.createElement("svg",{version:"1.1",id:r,"class":n,xmlns:t.SVGNS,"xmlns:xlink":t.XLINKNS,width:"0",height:"0"})}function i(t){return e.createElement("desc",{id:t})}function o(){return e.createElement("defs")}function a(t,r,n,i){return d(e.createElement("path",{d:t,"class":r}),n,i)}function c(t,r){return e.createElement("polygon",{points:t,"class":r})}function s(t,r,n,i,o,a){return d(e.createElement("rect",{width:t.width,height:t.height,x:t.x,y:t.y,rx:o,ry:a,"class":r}),n,i)}function u(t,r){return e.createElement("g",{id:t,"class":r})}function l(r,n){var i=e.createElement("use",{x:r.x.toString(),y:r.y.toString()});return i.setAttributeNS(t.XLINKNS,"xlink:href","#"+n),i}function d(t,r,n){var i="";return n&&(i+="fill:"+n+";"),r&&(i+="stroke:"+r+";"),e.setAttribute(t,"style",i); +}function p(t,r){return e.createElement("line",{x1:t.xFrom.toString(),y1:t.yFrom.toString(),x2:t.xTo.toString(),y2:t.yTo.toString(),"class":r})}function f(e,r){var n=S.createElementNS(t.SVGNS,"a");return n.setAttributeNS(t.XLINKNS,"xlink:href",e),n.setAttributeNS(t.XLINKNS,"xlink:title",e),n.setAttributeNS(t.XLINKNS,"xlink:show","new"),n.appendChild(r),n}function h(t,e,r,n){var i=3;return a("M"+t.x+","+t.y+"l"+i+", -"+t.height/2+"l"+(t.width-2*i)+",0l"+i+","+t.height/2+"l-"+i+","+t.height/2+"l-"+(t.width-2*i)+",0 l-"+i+",-"+t.height/2,e,r,n)}function g(e,r,n,i){var o=Math.max(9,Math.min(4.5*t.LINE_WIDTH,e.height/2)),c=o.toString(10);return a("M"+e.x+","+e.y+"l"+(e.width-o)+",0 l0,"+c+" l"+c+",0 m-"+c+",-"+c+" l"+c+","+c+" l0,"+(e.height-o)+" l-"+e.width+",0 l0,-"+(e.height+t.LINE_WIDTH/2)+" ",r,n,i)}function b(t,e,r,n,i){var o=i?i:7;return a("M"+t.x+","+t.y+" l"+t.width+",0 l0,"+(t.height-o)+" l-"+o.toString(10)+","+o.toString(10)+" l-"+(t.width-o)+",0 ",e,r,n)}function m(e,r){var n=S.createElementNS(t.SVGNS,"tspan"),i=S.createTextNode(e);return n.appendChild(i),r?f(r,n):n}function y(t,r,n,i,o,a){var c=e.createElement("text",{x:r.x.toString(),y:r.y.toString(),"class":n});if(c.appendChild(m(t,i)),o){var s=m(" ["+o+"]",a);s.setAttribute("style",j),c.appendChild(s)}return c}function v(t,n,i){return e.setAttributes(y(t,{x:n.width/2,y:n.height/2},i),{transform:"rotate("+r.getDiagonalAngle(n).toString()+" "+(n.width/2).toString()+" "+(n.height/2).toString()+")"})}function x(e,r){var n=0;return r.indexOf("nodi")<0&&(n=e.xTo>e.xFrom?-7.5*t.LINE_WIDTH:7.5*t.LINE_WIDTH),n}function w(e,r){var n=0;return r.indexOf("nodi")<0&&r.indexOf("bidi")>-1&&(n=e.xTo>e.xFrom?7.5*t.LINE_WIDTH:-7.5*t.LINE_WIDTH),n}function C(e,n){var i=t.LINE_WIDTH,o=r.getDirection(e),c=x(e,n),s=w(e,n),u=(e.xTo-e.xFrom+c-s).toString(),l=(e.yTo-e.yFrom).toString(),d="l"+o.dx.toString()+","+o.dy.toString(),p=" l"+u+","+l;return a("M"+e.xFrom.toString()+","+(e.yFrom-7.5*t.LINE_WIDTH*o.dy).toString()+d+"M"+(e.xFrom+s).toString()+","+(e.yFrom-i).toString()+p+"M"+(e.xFrom+s).toString()+","+(e.yFrom+i).toString()+p+"M"+(e.xTo-o.dx).toString()+","+(e.yTo+7.5*t.LINE_WIDTH*o.dy).toString()+d,n)}function k(t,e,r){return Boolean(r)?C(t,e):p(t,e)}function _(e,r,n,i,o){var c=o?e.x+7.5*t.LINE_WIDTH:e.x;return a("M"+e.x.toString()+", -"+e.y.toString()+" C"+(e.x+n).toString()+","+(e.y-7.5*t.LINE_WIDTH).toString()+" "+(e.x+n).toString()+","+(r+0).toString()+" "+c.toString()+","+r.toString(),i)}function A(t,r,n,i){return e.createElement("marker",{orient:n,id:t,"class":r,viewBox:Boolean(i)?i:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}function E(t,r,n){var i=A(t,"arrow-marker","auto");return i.appendChild(e.setAttributes(a(r,"arrow-style"),{style:"stroke-dasharray:100,1;stroke:"+n||"black"})),i}function L(t,r,n){var i=A(t,"arrow-marker","auto");return i.appendChild(e.setAttributes(c(r,"arrow-style"),{stroke:n||"black",fill:n||"black"})),i}var S={},j="vertical-align:text-top;";return j+="font-size:0.7em;text-anchor:start;",{init:function(t){S=t,e.init(t)},createSVG:n,createDesc:i,createDefs:o,createRect:s,createABox:h,createNote:g,createEdgeRemark:b,createText:y,createDiagonalText:v,createLine:k,createUTurn:_,createGroup:u,createUse:l,createMarkerPath:E,createMarkerPolygon:L}}),r("lib/mscgenjs-core/render/graphics/idmanager",[],function(){"use strict";var t="mscgen_js-svg-",e=t;return{setPrefix:function(r){e=t+r},get:function(t){return t?e+t:e}}}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e,r){var n=r.length;switch(n){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)}function i(t,e){for(var r=-1,n=t?t.length:0;++rr)return!1;var n=e.length-1;return r==n?e.pop():ur.call(e,r,1),!0}function _(t){var e=this.__data__,r=G(e,t);return 0>r?$t:e[r][1]}function A(t){return G(this.__data__,t)>-1}function E(t,e){var r=this.__data__,n=G(r,t);return 0>n?r.push([t,e]):r[n][1]=e,this}function L(t){var e=-1,r=t?t.length:0;for(this.clear();++e0&&r(s)?e>1?U(s,e-1,r,n,i):o(i,s):n||(i[i.length]=s)}return i}function P(t,e,r){var n=e(t);return Lr(t)?n:o(n,r(t))}function V(t,e){return null!=t&&(Qe.call(t,e)||"object"==typeof t&&e in t&&null===ft(t))}function $(t){if(!Rt(t)||_t(t))return!1;var e=Ot(t)||l(t)?tr:Oe;return e.test(Et(t))}function K(t){return dr(Object(t))}function Z(t){t=null==t?t:Object(t);var e=[];for(var r in t)e.push(r);return e}function J(t){return function(e){return null==e?$t:e[t]}}function Q(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Y(t){var e=new t.constructor(t.byteLength);return new ir(e).set(new ir(t)),e}function tt(t,e){var r=e?Y(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function et(e,r,n){var i=r?n(p(e),!0):p(e);return a(i,t,new e.constructor)}function rt(t){var e=new t.constructor(t.source,Ne.exec(t));return e.lastIndex=t.lastIndex,e}function nt(t,r,n){var i=r?n(f(t),!0):f(t);return a(i,e,new t.constructor)}function it(t){return Ar?Object(Ar.call(t)):{}}function ot(t,e){var r=e?Y(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function at(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r1?r[i-1]:$t,a=i>2?r[2]:$t;for(o=t.length>3&&"function"==typeof o?(i--,o):$t,a&&Ct(r[0],r[1],a)&&(o=3>i?$t:o,i=1),e=Object(e);++n-1&&t%1==0&&e>t}function Ct(t,e,r){if(!Rt(r))return!1;var n=typeof e;return("number"==n?Dt(r)&&wt(e,r.length):"string"==n&&e in r)?Tt(r[e],t):!1}function kt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function _t(t){return!!Ze&&Ze in t}function At(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||$e;return t===r}function Et(t){if(null!=t){try{return Je.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Lt(t){var e=t?t.length:0;return e?U(t,1):[]}function St(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(Jt);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a),a};return r.cache=new(St.Cache||L),r}function jt(t,e){if("function"!=typeof t)throw new TypeError(Jt);return e=pr(e===$t?t.length-1:Xt(e),0),function(){for(var r=arguments,i=-1,o=pr(r.length-e,0),a=Array(o);++i-1&&t%1==0&&te>=t}function Rt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ft(t){return!!t&&"object"==typeof t}function Wt(t){return"string"==typeof t||!Lr(t)&&Ft(t)&&Ye.call(t)==be}function Mt(t){return"symbol"==typeof t||Ft(t)&&Ye.call(t)==me}function Gt(t){if(!t)return 0===t?t:0;if(t=qt(t),t===Yt||t===-Yt){var e=0>t?-1:1;return e*ee}return t===t?t:0}function Xt(t){var e=Gt(t),r=e%1;return e===e?r?e-r:e:0}function qt(t){if("number"==typeof t)return t;if(Mt(t))return re;if(Rt(t)){var e=Ot(t.valueOf)?t.valueOf():t;t=Rt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Te,"");var r=Be.test(t);return r||He.test(t)?We(t.slice(2),r?2:8):De.test(t)?re:+t}function zt(t){var e=At(t);if(!e&&!Dt(t))return K(t);var r=vt(t),n=!!r,i=r||[],o=i.length;for(var a in t)!V(t,a)||n&&("length"==a||wt(a,o))||e&&"constructor"==a||i.push(a);return i}function Ut(t){for(var e=-1,r=At(t),n=Z(t),i=n.length,o=vt(t),a=!!o,c=o||[],s=c.length;++ee||Math.abs(t.width)>e?{height:0,width:0,x:0,y:0}:t}function s(t){return"function"==typeof t.getBBox?c(a(t)):{height:15,width:15,x:2,y:2}}function u(e){var r=f.createElementNS(t.SVGNS,"tspan");return r.appendChild(f.createTextNode(e)),r}function l(t){var e=n.createElement("text",{x:"0",y:"0"});return e.appendChild(u(t)),e}function d(){return s(l("ÁjyÎ9ƒ@💩")).height}function p(t){e.setPrefix(t);var r=f.getElementById(e.get());if(r){var n=f.getElementById(t);n?n.removeChild(r):f.body.removeChild(r)}}var f={},h=e.get("bboxer");return{init:function(t){f=t},removeRenderedSVGFromElement:p,getBBox:s,calculateTextHeight:i.memoize(d),webkitNamespaceBugWorkaround:function(t){return t.replace(/ xlink=/g," xmlns:xlink=","g").replace(/ href=/g," xlink:href=","g")}}}),r("lib/mscgenjs-core/render/graphics/renderutensils",[],function(){"use strict";function t(t,e){e.scale=t/e.width,e.width*=e.scale,e.height*=e.scale,e.horizontaltransform*=e.scale,e.verticaltransform*=e.scale,e.x=0-e.horizontaltransform,e.y=0-e.verticaltransform}function e(t,e){return t?2*(2*(t+1)*e):0}function r(t,e,r){return"-x"===t?e+.75*(r-e):r}return{scaleCanvasToWidth:t,determineDepthCorrection:e,determineArcXTo:r}}),r("lib/mscgenjs-core/render/graphics/csstemplates",[],function(){"use strict";return{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%>;color:black;}.<%=id%> rect{fill:none;stroke:black;}.<%=id%> rect.entity{fill:white;}.<%=id%> rect.label-text-background{fill:white;stroke:white;stroke-width:0;}.<%=id%> rect.bglayer{fill:white;stroke:white;stroke-width:0;}.<%=id%> line{stroke:black;}.<%=id%> line.return, .<%=id%> path.return{stroke-dasharray:5,2;}.<%=id%> line.comment{stroke-dasharray:5,2;}.<%=id%> line.inline_expression_divider{stroke-dasharray:10,5;}.<%=id%> text{color:inherit;stroke:none;text-anchor:middle;}.<%=id%> text.entity-text{text-decoration:underline;}.<%=id%> text.anchor-start{text-anchor:start;}.<%=id%> path{stroke:black;color:black;fill:none;}.<%=id%> .arrow-marker{overflow:visible;}.<%=id%> .arrow-style{stroke-width:1;}.<%=id%> .arcrowomit{stroke-dasharray:2,2;}.<%=id%> rect.box, .<%=id%> path.box{fill:white;}.<%=id%> .inherit{stroke:inherit;color:inherit;}.<%=id%> .inherit-fill{fill:inherit;}.<%=id%> .watermark{stroke:black;color:black;fill:black;font-size:48pt;font-weight:bold;opacity:0.14;}",additionalTemplates:[{name:"classic",css:".<%=id%> text.entity-text{text-decoration:none}.<%=id%> rect.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:"cygne",css:".<%=id%> line{stroke:#00A1DE}.<%=id%> text{fill:#005B82}.<%=id%> rect.entity,.<%=id%> rect.box,.<%=id%> path.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%> line.comment,.<%=id%> rect.inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> path.inline_expression_label{fill:white}"},{name:"grayscaled",css:"svg.<%=id%>{filter:grayscale(1);-webkit-filter:grayscale(1);}"},{name:"inverted",css:"svg.<%=id%>{filter:invert(1);-webkit-filter:invert(1);}"},{name:"lazy",css:".<%=id%> text.entity-text{font-weight:bold;text-decoration:none;}.<%=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:"pegasse",css:".<%=id%> line{stroke:rgba(0, 43, 84, 1)}.<%=id%> text{fill:rgba(0, 43, 84, 1)}.<%=id%> rect.entity,.<%=id%> rect.box,.<%=id%> path.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%> line.comment,.<%=id%> rect.inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> path.inline_expression_label{fill:white}"}]}}),r("lib/mscgenjs-core/render/graphics/renderskeleton",["./svgelementfactory","./constants","./csstemplates"],function(t,e,r){"use strict";function n(e,r){return r.forEach(function(r){"method"===r.type?e.appendChild(t.createMarkerPolygon(r.name,r.path,r.color)):e.appendChild(t.createMarkerPath(r.name,r.path,r.color))}),e}function i(t,e){var r=p.createElement("style");return r.setAttribute("type","text/css"),r.appendChild(p.createTextNode(d(t,e))),r}function o(e,r,o){var a=t.createDefs();return a.appendChild(i(o,e)),a=n(a,r),a.appendChild(t.createGroup(e+"__defs")),a}function a(e){var r=t.createGroup(e+"__body");return r.appendChild(t.createGroup(e+"__background")),r.appendChild(t.createGroup(e+"__arcspanlayer")),r.appendChild(t.createGroup(e+"__lifelinelayer")),r.appendChild(t.createGroup(e+"__sequencelayer")),r.appendChild(t.createGroup(e+"__notelayer")),r.appendChild(t.createGroup(e+"__watermark")),r.appendChild(t.createGroup(e+"__onionskin","onionskin")),r}function c(e){return t.init(e.document),e.document}function s(e,r,n,i,s){p=c(e);var l=p.getElementById(r);null===l&&(l=p.body);var d=t.createSVG(n,n);return d.appendChild(u(e,n,s.source)),d.appendChild(o(n,i,s)),d.appendChild(a(n)),l.appendChild(d),p}function u(e,r,n){var i=t.createDesc(r+"__msc_source");return Boolean(n)&&i.appendChild(e.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n"+n)),i}function l(t){var e="",n=[];return Boolean(t)?(Boolean(t.additionalTemplate)&&(n=r.additionalTemplates.filter(function(e){return e.name===t.additionalTemplate}),n.length>0&&(e=n[0].css)),Boolean(t.styleAdditions)&&(e+=t.styleAdditions),e):""}function d(t,n){return(r.baseTemplate+l(t)).replace(/<%=fontSize%>/g,e.FONT_SIZE).replace(/<%=lineWidth%>/g,e.LINE_WIDTH).replace(/<%=id%>/g,n)}var p={};return{bootstrap:s,init:c}}),r("lib/mscgenjs-core/render/text/asttransform",[],function(){"use strict";function t(t,e){t&&e&&t.forEach(function(t){e.forEach(function(e){e(t)})})}function e(t,e,r,n){n&&n.forEach(function(n){n(r,t,e)})}function r(t,r,i){r.forEach(function(o){e(t,r,o,i),o.arcs&&n(t,o.arcs,i)})}function n(t,e,n){t&&e&&n&&e.forEach(function(e){r(t,e,n)})}function i(e,r,i){return t(e.entities,r),n(e.entities,e.arcs,i),e}return{transform:i}}),r("lib/mscgenjs-core/render/text/arcmappings",[],function(){"use strict";var t={"->":"rvee","<->":"rvee","=>":"normal","<=>":"normal","-x":"oinvonormal"},e={box:"box",abox:"hexagon",rbox:"box",note:"note"},r={">>":"dashed","<<>>":"dashed","..":"dashed",":>":"bold","<:>":"bold","::":"bold",rbox:"rounded"},n={"|||":"emptyarc","...":"emptyarc","---":"emptyarc","->":"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"},i={"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"},o={"|||":"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"},a={"|||":"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"};return{getArrow:function(e){return t[e]},getShape:function(t){return e[t]},getStyle:function(t){return r[t]},getAggregate:function(t){return n[t]},getClass:function(t){return o[t]||t},getAggregateClass:function(t){return a[t]||t},getNormalizedKind:function(t){return i[t]||t}}}),r("lib/mscgenjs-core/render/text/textutensils",[],function(){"use strict";return{wrap:function(t,e){for(var r=0,n=[],i=0,o=0,a=0,c=0,s=t.replace(/[\t\n]+/g," ").replace(/\\n/g,"\n");c<=s.length;)c>=s.length?n.push(s.substring(i,c)):"\n"===s[c]?(r=0,a=c,n.push(s.substring(i,a)),i=a+1):r++>=e&&(a=s.substring(0,c).lastIndexOf(" "),-1===a||i>a?(r=1,a=c,o=c):(r=0,o=a+1),n.push(s.substring(i,a)),i=o),c++;return n},unescapeString:function(t){return t.replace(/\\"/g,'"')},escapeString:function(t){return t.replace(/\\"/g,'"').replace(/"/g,'\\"')}}}),r("lib/mscgenjs-core/render/text/flatten",["./asttransform","./arcmappings","../../lib/lodash/lodash.custom","./textutensils"],function(t,e,r,n){"use strict";function i(t){"undefined"==typeof t.label&&(t.label=t.name)}function o(t){Boolean(t.label)&&(t.label=n.unescapeString(t.label)),Boolean(t.id)&&(t.id=n.unescapeString(t.id))}function a(t){t.label=Boolean(t.label)?t.label:""}function c(t){if(t.kind&&e.getNormalizedKind(t.kind)!==t.kind){t.kind=e.getNormalizedKind(t.kind);var r=t.from;t.from=t.to,t.to=r}return t}function s(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 u(t,e){if(t&&t.from){var r=e.filter(function(e){return e.name===t.from});r.length>0&&s(t,r[0])}}function l(t){return t.arcs.reduce(function(t,e){return t+(Boolean(e[0].arcs)?l(e[0])+1:0)},t.arcs.length)}function d(t,n,i,o){var a=[],c=[],u=[];return t.forEach(function(t){if("inline_expression"===e.getAggregate(t.kind)){if(t.depth=n,Boolean(t.arcs)){var a=r.cloneDeep(t);a.numberofrows=l(a),delete a.arcs,c.push(a),t.arcs.forEach(function(t){u=u.concat(d(t,n+1,a.from,a.to)),t.forEach(function(t){s(t,a)})}),n>g&&(g=n)}else c.push(t);u.push([{kind:"|||",from:t.from,to:t.to}])}else i&&o&&"emptyarc"===e.getAggregate(t.kind)&&(t.from=i,t.to=o,t.depth=n),c.push(t)}),a.push(c),a.concat(u)}function p(t){var e={};return g=0,Boolean(t.options)&&(e.options=r.cloneDeep(t.options)),Boolean(t.entities)&&(e.entities=r.cloneDeep(t.entities)),e.arcs=[],t&&t.arcs&&t.arcs.forEach(function(t){d(t,0).forEach(function(t){e.arcs.push(t)})}),e.depth=g+1,e}function f(t,e){return t.filter(function(t){return e.from!==t.name}).map(function(t){return e.to=t.name,r.cloneDeep(e)})}function h(t){if(t.entities&&t.arcs){var e=[],n={};t.arcs.forEach(function(i,o){i.filter(function(t){return"*"===t.to}).forEach(function(a,c){n=r.cloneDeep(a),delete t.arcs[o][c],e=f(t.entities,n),i[c]=e.shift(),t.arcs[o]=i.concat(e)})})}return t}var g=0;return{swapRTLArc:c,unwind:p,explodeBroadcasts:h,flatten:function(e){return t.transform(p(e),[i,o],[c,u,o,a])},dotFlatten:function(e){return h(t.transform(e,[i],[c,u]))}}}),r("lib/mscgenjs-core/render/graphics/swap",[],function(){"use strict";function t(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}return{swapfromto:function(e){t(e,"from","to")}}}),r("lib/mscgenjs-core/render/graphics/rowmemory",[],function(){"use strict";function t(t,e){i=[],o=t,a=e}function e(t){return i[t]?i[t]:{y:o+1.5*a+t*a,height:a}}function r(){return e(i.length-1)}function n(t,r,n){if(("undefined"==typeof r||a>r)&&(r=a),"undefined"==typeof n){var o=e(t-1);o&&o.y>0&&(n=o.y+(o.height+r)/2)}i[t]={y:n,height:r}}var i=[],o=0,a=0;return{clear:t,get:e,getLast:r,set:n}}),r("lib/mscgenjs-core/render/graphics/markermanager",["../../lib/lodash/lodash.custom","../text/arcmappings"],function(t,e){"use strict";function r(t,e,r){return e&&r&&["<->","->"].indexOf(t>-1)?r>e?"signal":"signal-u":""}function n(t,e,r){return"<->"===t&&r>=e?"signal-l":"signal-lu"}function i(t,e,i,o,a){var c=[];return u[e]&&u[e].attributes&&(c=u[e].attributes.map(function(c){return{name:c.name,value:c.value.replace(/\{\{signal-marker-end\}\}/g,r(e,o,a)).replace(/\{\{signal-marker-start\}\}/g,n(e,o,a)).replace(/\{\{id\}\}/g,t).replace(/\{\{color\}\}/g,i||"black")}})),c}function o(t,r){return u[e.getNormalizedKind(t)].marker.name+(Boolean(r)?" "+r:" black")}function a(t,r){function n(e){a(t,e)}return Array.isArray(r)&&r.forEach(n),r.arcs&&r.arcs.forEach(n),r.kind&&u[e.getNormalizedKind(r.kind)]&&u[e.getNormalizedKind(r.kind)].marker&&t.indexOf(o(r.kind,r.linecolor))<0&&t.push(o(r.kind,r.linecolor)),t}function c(t){return{kind:t.split(" ")[0],color:t.split(" ")[1]}}function s(t){return t.arcs.reduce(a,[]).sort().map(c)}var u={"->":{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:""}}},l={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"}]}};return{getAttributes:i,getMarkerDefs:function(e,r){return t.flatten(s(r).map(function(t){return l[t.kind].variants.map(function(r){return{name:e+t.kind+r.name+"-"+t.color,path:r.path,color:t.color,type:t.kind}})}))}}}),r("lib/mscgenjs-core/render/graphics/renderlabels",["./svgelementfactory","./svgutensils","./constants","../text/textutensils","../text/arcmappings"],function(t,e,r,n,i){"use strict";function o(t,e){e&&t.setAttribute("style","fill:"+e+";")}function a(t,e,r){o(t,e&&!r?"blue":r)}function c(r,n){var i=t.createRect(e.getBBox(r),"label-text-background");return n&&i.setAttribute("style","fill:"+n+"; stroke:"+n+";"),i}function s(e,r,n,i,o,a){var c={};return c=0===e?t.createText(r,{x:n,y:i},o,a.url,a.id,a.idurl):t.createText(r,{x:n,y:i},o,a.url)}function u(t,e,r){var n=e||t,o=i.getClass(n),a=i.getAggregateClass(n);return o===a?o+r:a+r+o+r}function l(t,n,i,c,l,d){var p=i+(l+.25)*e.calculateTextHeight(),f="";f=u(c.kind,d&&d.kind,"-text "),d&&(d.alignLeft&&(f+="anchor-start "),d.alignAround&&(p=i+(l+.25)*(e.calculateTextHeight()+r.LINE_WIDTH)));var h=s(l,t,n,p,f,c);return o(h,c.textcolor),a(h,c.url,c.textcolor),h}function d(n,i,o,a){var s=t.createGroup(a);if(n.label){var u=i.x+i.width/2,d=f(n.label,n.kind,i.width,r.FONT_SIZE,o?o.wordWrapArcs:!1),p={};o&&o.alignAbove&&d.forEach(function(){d.push("")});var h=i.y-(d.length-1)/2*(e.calculateTextHeight()+1);o&&o.alignAround&&(1===d.length&&d.push(""),h=i.y-(d.length-1)/2*(e.calculateTextHeight()+r.LINE_WIDTH+1)),d.forEach(function(t,e){""!==t&&(p=l(t,u,h,n,e,o),o&&o.ownBackground&&s.appendChild(c(p,n.textbgcolor)),s.appendChild(p)),h++})}return s}function p(t,e){var r=Math.abs(t),n=12;return 160>=r?r/(e/n*8):320>=r?r/(e/n*6.4):480>=r?r/(e/n*5.9):r/(e/n*5.6)}function f(t,e,r,o,a){return"box"===i.getAggregate(e)||"undefined"==typeof e||a?n.wrap(t,p(r,o)):t.split("\\n")}return{createLabel:d,splitLabel:f}}),r("lib/mscgenjs-core/render/graphics/entities",["./renderlabels","./constants"],function(t,e){"use strict";function r(t){return c[t]}var n=160,i=100,o=34,a={interEntitySpacing:n,height:o,width:i},c={};return{init:function(t){a.interEntitySpacing=n,a.height=o,a.width=i,t&&(a.interEntitySpacing=t*n,a.width=t*i),c={}},getX:r,setX:function(t,e){c[t.name]=e+a.width/2},getOAndD:function(t,e){return{from:r(t),to:r(e)}},setHeight:function(t){a.height=t},getDims:function(){return a},getNoEntityLines:function(r){return t.splitLabel(r,"box",a.width,e.FONT_SIZE).length}}}),r("lib/mscgenjs-core/render/graphics/renderast",["./svgelementfactory","./svglowlevelfactory","./svgutensils","./renderutensils","./renderskeleton","../text/flatten","../text/arcmappings","./swap","./rowmemory","./idmanager","./markermanager","./entities","./renderlabels","./constants","../../lib/lodash/lodash.custom"],function(t,e,r,n,i,o,a,c,s,u,l,d,p,f,h){"use strict";function g(t,e,r,n,i){return b(t,n,r,{source:e,styleAdditions:i})}function b(t,e,n,i){var a=o.flatten(t),c=i||{};c=h.defaults(c,{source:null,styleAdditions:null,mirrorEntitiesOnBottom:!1}),m(a,e,n,c),y(a),v(a);var s=e.document.getElementById(n);return s?r.webkitNamespaceBugWorkaround(s.innerHTML):r.webkitNamespaceBugWorkaround(e.document.body.innerHTML)}function m(t,e,n,o){u.setPrefix(n),J.document=i.bootstrap(e,n,u.get(),l.getMarkerDefs(u.get(),t),o),J.mirrorEntitiesOnBottom=Boolean(o.mirrorEntitiesOnBottom),r.init(J.document),x(J,t.depth),k(J,t.options)}function y(t){N(t.entities),s.clear(d.getDims().height,J.arcRowHeight),B(t.arcs,t.entities),J.mirrorEntitiesOnBottom&&T()}function v(t){var e=_(t);A(J,e),L(t.options,e),S(e)}function x(t,e){w(t.layer,t.document),t.maxDepth=e?e:0}function w(t,e){t.defs=e.getElementById(u.get("__defs")),t.lifeline=e.getElementById(u.get("__lifelinelayer")),t.sequence=e.getElementById(u.get("__sequencelayer")),t.notes=e.getElementById(u.get("__notelayer")),t.inline=e.getElementById(u.get("__arcspanlayer")),t.watermark=e.getElementById(u.get("__watermark"))}function C(t,e){t.arcRowHeight=K,t.arcGradient=Z,t.wordWrapArcs=!1,e&&(e.arcgradient&&(t.arcRowHeight=parseInt(e.arcgradient,10)+K,t.arcGradient=parseInt(e.arcgradient,10)+Z),t.wordWrapArcs=Boolean(e.wordwraparcs))}function k(t,e){d.init(e&&e.hscale),C(t,e)}function _(t){var e=n.determineDepthCorrection(t.depth,f.LINE_WIDTH),r=s.getLast(),i={width:t.entities.length*d.getDims().interEntitySpacing+e,height:Boolean(J.mirrorEntitiesOnBottom)?2*d.getDims().height+r.y+r.height+2*$:r.y+r.height/2+2*$,horizontaltransform:(d.getDims().interEntitySpacing+e-d.getDims().width)/2,autoscale:!!t.options&&!!t.options.width&&"auto"===t.options.width,verticaltransform:$,scale:1};return i.x=0-i.horizontaltransform,i.y=0-i.verticaltransform,i}function A(e,r){var n=t.createRect(r,"bglayer");e.document.getElementById(u.get("__background")).appendChild(n)}function E(e,r){J.layer.watermark.appendChild(t.createDiagonalText(e,r,"watermark"))}function L(t,e){t&&(t.watermark&&E(t.watermark,e),t.width&&"auto"!==t.width&&n.scaleCanvasToWidth(t.width,e))}function S(t){var r=J.document.getElementById(u.get()),n=J.document.getElementById(u.get("__body"));n.setAttribute("transform","translate("+t.horizontaltransform+","+t.verticaltransform+") scale("+t.scale+","+t.scale+")"),t.autoscale&&t.autoscale===!0?e.setAttributes(r,{width:"100%",height:"100%",viewBox:"0 0 "+t.width.toString()+" "+t.height.toString()}):e.setAttributes(r,{width:t.width.toString(),height:t.height.toString()})}function j(t){var e=t[0],n=2;return t.forEach(function(t){var r=d.getNoEntityLines(t.label);r>n&&(n=r,e=t)}),n>2?Math.max(d.getDims().height,r.getBBox(I(e)).height):d.getDims().height}function I(e,r){var n=t.createGroup(u.get(e.name)),i=d.getDims();i.x=r?r:0;var o=p.createLabel(e,{x:i.x,y:i.height/2,width:i.width},{kind:"entity"}),a=t.createRect(i,"entity",e.linecolor,e.textbgcolor);return n.appendChild(a),n.appendChild(o),n}function T(){var e=s.getLast().y+(s.getLast().height+J.arcRowHeight)/2;J.layer.lifeline.appendChild(t.createUse({x:0,y:e},u.get("arcrow"))),J.layer.sequence.appendChild(t.createUse({x:0,y:e+J.arcRowHeight/2},u.get("entities")))}function N(e){var r=0,n=t.createGroup(u.get("entities"));e&&(d.setHeight(j(e)+2*f.LINE_WIDTH),e.forEach(function(t){n.appendChild(I(t,r)),d.setX(t,r),r+=d.getDims().interEntitySpacing}),J.layer.defs.appendChild(n),J.layer.sequence.appendChild(t.createUse({x:0,y:0},u.get("entities")))),J.arcEndX=r-d.getDims().interEntitySpacing+d.getDims().width}function D(e,n,i){var o=!1,c=[];s.set(n),e.forEach(function(t,e){var l=u.get(n.toString()+"_"+e.toString()),h={};switch(a.getAggregate(t.kind)){case"emptyarc":h=M(t,l),o="..."===t.kind,c.push({id:l,layer:J.layer.sequence});break;case"box":h=P(l,d.getOAndD(t.from,t.to),t),c.push({id:l,layer:J.layer.notes});break;case"inline_expression":h=O(l+"_label",t),c.push({id:l+"_label",layer:J.layer.notes}),Q.push({id:l,arc:t,rownum:n});break;default:if(t.from&&t.to){var g=0,b=0;if("*"===t.to){var m=t.label;b=d.getX(t.from),i.forEach(function(e,r){e.name!==t.from&&(g=d.getX(e.name),t.label="",J.layer.defs.appendChild(q(l+"bc"+r,t,b,g)),c.push({id:l+"bc"+r,layer:J.layer.sequence}))}),t.label=m,h=p.createLabel(t,{x:0,y:0,width:J.arcEndX},{alignAround:!0,ownBackground:!0,wordWrapArcs:J.wordWrapArcs},l+"_lbl"),c.push({id:l+"_lbl",layer:J.layer.sequence})}else h=q(l,t,d.getX(t.from),d.getX(t.to)),c.push({id:l,layer:J.layer.sequence})}}h&&(s.set(n,Math.max(s.get(n).height,r.getBBox(h).height+2*f.LINE_WIDTH)),J.layer.defs.appendChild(h))});var l="arcrow_"+n.toString(),h="arcrow";o&&(h="arcrowomit"),J.layer.defs.appendChild(F(i,h,s.get(n).height,u.get(l))),J.layer.lifeline.appendChild(t.createUse({x:0,y:s.get(n).y},u.get(l))),c.forEach(function(e){e.layer.appendChild(t.createUse({x:0,y:s.get(n).y},e.id))})}function B(e,r){if(Q=[],J.layer.defs.appendChild(F(r,u.get("arcrow"))),J.layer.lifeline.appendChild(t.createUse({x:0,y:s.get(-1).y},u.get("arcrow"))),e){for(var n=0;ni.to&&c.swapfromto(i);var a=2*J.maxDepth*f.LINE_WIDTH,s=i.to-i.from+(d.getDims().interEntitySpacing-2*f.LINE_WIDTH)-o-f.LINE_WIDTH,u=i.from-(d.getDims().interEntitySpacing-3*f.LINE_WIDTH-a)/2-2*(J.maxDepth-n.depth)*f.LINE_WIDTH,l=t.createGroup(e);n.label=n.kind+(n.label?": "+n.label:"");var h=p.createLabel(n,{x:u+f.LINE_WIDTH-s/2,y:J.arcRowHeight/4,width:s},{alignLeft:!0,ownBackground:!1,wordWrapArcs:J.wordWrapArcs}),g=r.getBBox(h),b=Math.max(g.height+2*f.LINE_WIDTH,J.arcRowHeight/2-2*f.LINE_WIDTH),m=Math.min(g.width+2*f.LINE_WIDTH,s),y=t.createEdgeRemark({width:m-f.LINE_WIDTH+o,height:b,x:u,y:0},"box inline_expression_label",n.linecolor,n.textbgcolor,o);return l.appendChild(y),l.appendChild(h),l}function H(e){e.forEach(function(e){J.layer.defs.appendChild(R(e)),J.layer.inline.appendChild(t.createUse({x:0,y:s.get(e.rownum).y},e.id))})}function R(t){var e=s.get(t.rownum).y,r=s.get(t.rownum+t.arc.numberofrows+1).y,n=r-e;return t.arc.label="",P(t.id,d.getOAndD(t.arc.from,t.arc.to),t.arc,n)}function F(e,r,n,i){i||(i=r),(!n||nd.getX(t.to)&&c.swapfromto(t),t.kind){case"...":case"|||":r=z(e,t);break;case"---":r=U(e,t)}return r}function G(t){return t.arcskip?t.arcskip*J.arcRowHeight:0}function X(t){return"<:>"===t?"bidi ":"::"===t?"nodi ":""}function q(e,r,i,o){var c=t.createGroup(e),s="arc ";s+=X(r.kind),s+=a.getAggregateClass(r.kind)+" "+a.getClass(r.kind);var h=[":>","::","<:>"].indexOf(r.kind)>-1,g=G(r),b=0===g?J.arcGradient:g;if(o=n.determineArcXTo(r.kind,i,o),i===o){c.appendChild(W(r.kind,i,g,h,r.linecolor));var m=2*d.getDims().interEntitySpacing/3;c.appendChild(p.createLabel(r,{x:i+1.5*f.LINE_WIDTH-m/2,y:0-J.arcRowHeight/5-f.LINE_WIDTH/2,width:m},{alignLeft:!0,alignAbove:!0,ownBackground:!0,wordWrapArcs:J.wordWrapArcs}))}else{var y=t.createLine({xFrom:i,yFrom:0,xTo:o,yTo:b},s,h);l.getAttributes(u.get(),r.kind,r.linecolor,i,o).forEach(function(t){y.setAttribute(t.name,t.value)}),c.appendChild(y),c.appendChild(p.createLabel(r,{x:i,y:0,width:o-i},{alignAround:!0,ownBackground:!0,wordWrapArcs:J.wordWrapArcs}))}return c}function z(e,r){var n=0,i=J.arcEndX,o=t.createGroup(e);return r.from&&r.to&&(n=d.getX(r.from),i=Math.abs(d.getX(r.to)-d.getX(r.from))),o.appendChild(p.createLabel(r,{x:n,y:0,width:i},{ownBackground:!0,wordWrapArcs:J.wordWrapArcs},e+"_lbl")),o}function U(e,r){var n=0,i=J.arcEndX,o="comment",a=t.createGroup(e);if(r.from&&r.to){var c=1*J.maxDepth*f.LINE_WIDTH,s=2*(J.maxDepth-r.depth)*f.LINE_WIDTH;n=d.getX(r.from)-(d.getDims().interEntitySpacing+2*f.LINE_WIDTH)/2-(s-c),i=d.getX(r.to)+(d.getDims().interEntitySpacing+2*f.LINE_WIDTH)/2+(s-c),o="inline_expression_divider"}var u=t.createLine({xFrom:n,yFrom:0,xTo:i,yTo:0},o);return a.appendChild(u),a.appendChild(z(e+"_txt",r)),r.linecolor&&u.setAttribute("style","stroke:"+r.linecolor+";"),a}function P(e,n,i,o){n.from>n.to&&c.swapfromto(n);var a=2*J.maxDepth*f.LINE_WIDTH,s=n.to-n.from+d.getDims().interEntitySpacing-2*f.LINE_WIDTH-a,u=6,l=n.from-(d.getDims().interEntitySpacing-2*f.LINE_WIDTH-a)/2,h=t.createGroup(e),g={},b=p.createLabel(i,{x:l,y:0,width:s}),m=r.getBBox(b),y=o?o:Math.max(m.height+2*f.LINE_WIDTH,J.arcRowHeight-2*f.LINE_WIDTH),v={width:s,height:y,x:l,y:0-y/2};switch(i.kind){case"box":g=t.createRect(v,"box",i.linecolor,i.textbgcolor);break;case"rbox":g=t.createRect(v,"box rbox",i.linecolor,i.textbgcolor,u,u);break;case"abox":v.y=0,g=t.createABox(v,"box abox",i.linecolor,i.textbgcolor);break;case"note":g=t.createNote(v,"box note",i.linecolor,i.textbgcolor);break;default:var x=2*(J.maxDepth-i.depth)*f.LINE_WIDTH;g=t.createRect({width:s+2*x,height:y,x:l-x,y:0},"box inline_expression "+i.kind,i.linecolor,i.textbgcolor)}return h.appendChild(g),h.appendChild(b),h}function V(t,e){J.document=i.init(e),r.init(J.document),r.removeRenderedSVGFromElement(t)}var $=3,K=38,Z=0,J=Object.seal({arcRowHeight:K,arcGradient:Z,arcEndX:0,wordWrapArcs:!1,mirrorEntitiesOnBottom:!1,maxDepth:0,document:{},layer:{defs:{},lifeline:{},sequence:{},notes:{},inline:{},watermark:{}}}),Q=[];return{clean:V,renderAST:g,renderASTNew:b}}),r("utl/exporter",[],function(){"use strict";function t(t,e,r){return t.pathname+"?lang="+r+"&msc="+encodeURIComponent(e)}function e(e,n,i){return t(e,n,i).lengthi;i++)r=" "+r;return r}function r(t,r){return e(r,3)+" "+t}function n(e,r){return e.split("").reduce(function(e,n,o){return o===r?e+t.applyTemplate(s,{"char":i(n)}):e+i(n)},"")}function i(t){return t.replace(/"}}}),r("utl/domutl",[],function(){"use strict";return{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(i){r(i)}}}}),e(["lib/mscgenjs-core/parse/xuparser","lib/mscgenjs-core/parse/msgennyparser","lib/mscgenjs-core/render/graphics/renderast","utl/exporter","embedding/config","embedding/error-rendering","utl/domutl","utl/tpl"],function(t,e,r,n,i,o,a,c){"use strict";function s(){u();var t=document.getElementsByClassName("mscgen_js");l(t,0),l(document.getElementsByTagName("mscgen"),t.length)}function u(){for(var t=document.scripts,e=0;e{string}",{string:e})}function f(t,e){b(t,e),t.setAttribute("data-renderedby","mscgen_js"),i.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?a.ajax(t.getAttribute("data-src"),function(e){h(t,e.target.response)},function(){p(t,c.applyTemplate(_,{url:t.getAttribute("data-src")}))}):!i.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?p(t,c.applyTemplate(A,{url:t.getAttribute("data-src")})):h(t,t.textContent)}function h(t,e){var r=m(t),n=x(e,r);n.entities?w(n,t.id,e,r,y(t),v(t)):t.innerHTML=o.renderError(e,n.location,n.message)}function g(t,e,r){var o={pathname:"index.html"},a=document.createElement("a");return a.setAttribute("href",i.getConfig().clickURL+n.toLocationString(o,t,e)),a.setAttribute("id",r+"link"),a.setAttribute("style","text-decoration: none;"),a.setAttribute("title","click to edit in the mscgen_js interpreter"),a}function b(t,e){t.id||(t.id=i.getConfig().parentElementPrefix+e.toString())}function m(t){var e=t.getAttribute("data-language");return e||(e=i.getConfig().defaultLanguage),e}function y(t){var e=t.getAttribute("data-mirror-entities");return e&&"true"===e?!0:!1}function v(t){return t.getAttribute("data-named-style")}function x(r,n){var i={};try{i="msgenny"===n?e.parse(r):"json"===n?JSON.parse(r):t.parse(r)}catch(o){return o}return i}function w(t,e,n,o,a,c){var s=document.getElementById(e);s.innerHTML="",!0===i.getConfig().clickable&&(s.appendChild(g(n,o,e)),e+="link"),r.clean(e,window),r.renderASTNew(t,window,e,{source:n,additionalTemplate:c,mirrorEntitiesOnBottom:a})}var C="{msc}",k="data-src='{src}' ",_="ERROR: Could not find or open the URL '{url}' specified in the data-src attribute.",A="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.",E={"text/x-mscgen":"mscgen","text/x-msgenny":"msgenny","text/x-xu":"xu"};s()}),r("mscgen-inpage",function(){})}(); \ No newline at end of file